Mune's Weblog

鹿児島在住のstray radiologistです
仕事も趣味も画像関係…

Yolo v5 メモ

2022年07月03日 | 仕事関係
先月試していたYOLO v5のメモ。

検出テスト時のエラー
AttributeError: 'str' object has no attribute 'get'
→yamlファイルの記載方法を訂正して解決

train:_./path to train images
_部分はスペースが必要 パスは相対パスでOK

カスタムデータの学習時のエラー
AttributeError: 'NoneType' object has no attribute '_free_weak_ref'
→torch, torchvisionのダウングレードで解決
https://github.com/ultralytics/yolov5/issues/7127
pip3 uninstall torch torchvision
pip install torch==1.10.1+cu102 torchvision==0.11.2+cu102 torchaudio==0.10.1 -f https://download.pytorch.org/whl/torch_stable.html
https://pytorch.org/get-started/previous-versions/