I'm trying to train the YOLOv7-w6 variation of YOLOv7.
This is the link to my Colab notebook.
I'm getting the following error message, and it cannot start training:
Epoch gpu_mem box obj cls total labels img_size
0% 0/1827 [00:00<?, ?it/s]/content/yolov7/train.py:353: DeprecationWarning: non-integer arguments to randrange() have been deprecated since Python 3.10 and will be removed in a subsequent version
sz = random.randrange(imgsz * 0.5, imgsz * 1.5 + gs) // gs * gs # size
0% 0/1827 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/content/yolov7/train.py", line 616, in <module>
train(hyp, opt, device, tb_writer)
File "/content/yolov7/train.py", line 363, in train
loss, loss_items = compute_loss_ota(pred, targets.to(device), imgs) # loss scaled by batch_size
File "/content/yolov7/utils/loss.py", line 585, in __call__
bs, as_, gjs, gis, targets, anchors = self.build_targets(p, targets, imgs)
File "/content/yolov7/utils/loss.py", line 677, in build_targets
b, a, gj, gi = indices[i]
IndexError: list index out of range
I cannot locate this error in your Colab file, have you solved the issue?
If you require Defect Detection, I would like to recommend an online demo for Anamoly Detection, which I found to be free and user-friendly. Additionally, it also had Yolo-v7 Detection which was also free and easy to use.