hukaixuan19970627 / yolov5_obb

yolov5 + csl_label.(Oriented Object Detection)(Rotation Detection)(Rotated BBox)基于yolov5的旋转目标检测
GNU General Public License v3.0
1.77k stars 421 forks source link

[WARNING in command "val.py with --task test"]: WARNING: test/images/ML_120.png: ignoring corrupt image/label: 'dict' object has no attribute 'index' #424

Open elahe-badali opened 1 year ago

elahe-badali commented 1 year ago

Hi @hukaixuan19970627 , I want to run val.py with --task test for calculating precision, recall in test dataset. But I have this issue:

test: Scanning 'test/labelTxt' images and labels...102 found, 0 missing, 0 empty, 102 corrupted: 100%|█████████████████| 102/102 [00:00<00:00, 17673.36it/s]
test: WARNING: test/images/ML_120.png: ignoring corrupt image/label: 'dict' object has no attribute 'index'

But this code has been running good on train and validation part and it gives results. How can I fix that? I copied some files from val folder to test folder. They are ok if I choose val/images in yaml file for test but for that test folder it doesn't work.

Galaxy-Ding commented 1 year ago

最新的代码是有问题的。 修改utls/datasets.py 文件,修改成下图的结果即可 image

ZKZontheway commented 1 year ago

最新的代码是有问题的。 修改utls/datasets.py 文件,修改成下图的结果即可 image

谢了兄弟

ibtehajali67 commented 1 year ago

The latest code is problematic. Modify the utls/datasets.py file and modify it to the result shown in the figure below image

nice , After this update is working for me