ScaledYOLOv4
ScaledYOLOv4 copied to clipboard
"__getitem__" in LoadImagesAndLabels class
Hi, I found something strange in loadImagesAndLabels class when I tried to use "image_weight", which is a policy of upadating the weight of each class when training based on map. The error I 'm faced with is actually almost the same as the one in this link: https://github.com/ultralytics/yolov5/issues/885 the same attribute error: 'LoadImagesAndLabels' object has no attribute 'indices' and found almost the same code in places linked to this error. So I guess it's the same way to fix it.
@WongKinYiu
Actually, this is how to fix the bug, I guess. https://github.com/ultralytics/yolov5/commit/69ff781ca5fa995ce2eeae215a486ab9f7ff566c
Well,I tried the way I mentioned to fix it, and it worked. Meanwhile, it greatly accelerated the training process and improved the performance on classes with relatively little training data, so I believe it worths to be fixed.