meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.71k stars 1.03k forks source link

Index Error: list index out of range during training. #935

Open angela804 opened 1 year ago

angela804 commented 1 year ago

Before Asking

Search before asking

Question

Not sure why I got this error. python tools/train.py --batch 8 --conf configs/yolov6n_seg.py --data data/custom.yaml --epochs 5

inputting this command gives me this error when it prompts in inferencing model in trained datasets

ERROR in training loop or eval/save model. Traceback (most recent call last): File "C:\Users\GIGAbyte!\YOLOv6\tools\train.py", line 142, in main(args) File "C:\Users\GIGAbyte!\YOLOv6\tools\train.py", line 132, in main trainer.train() File "C:\Users\GIGAbyte!\YOLOv6\yolov6\core\engine.py", line 125, in train self.after_epoch() File "C:\Users\GIGAbyte!\YOLOv6\yolov6\core\engine.py", line 201, in after_epoch self.ap = self.evaluate_results[3] IndexError: list index out of range

Additional

No response

cayuso-skylark commented 1 year ago

Same issue.

angela804 commented 1 year ago

Same issue.

i saw this repository. check the engine.py here. I was able to finish training when i changed the engine.py same as here https://github.com/nirbarazida/YOLOv6

My only problem is that training data in each epoch are not recorded. i dont know im so confused. have you worked it out?

Chilicyy commented 1 year ago

hi @angela804 @cayuso-skylark Are you using the latest code from the official YOLOv6 project?
You can refer to this line : https://github.com/meituan/YOLOv6/blob/d512ce7c4f103e8887960198505518bed404abdc/yolov6/core/engine.py#L189C51-L189C51

angela804 commented 1 year ago

hi @angela804 @cayuso-skylark Are you using the latest code from the official YOLOv6 project? You can refer to this line : https://github.com/meituan/YOLOv6/blob/d512ce7c4f103e8887960198505518bed404abdc/yolov6/core/engine.py#L189C51-L189C51

hey. thank you so much for this one. By any chance, do you also have info about this model to record losses at every epoch and the confusion matrix?

MiksVasiljevs commented 11 months ago

hi @angela804 @cayuso-skylark Are you using the latest code from the official YOLOv6 project? You can refer to this line : https://github.com/meituan/YOLOv6/blob/d512ce7c4f103e8887960198505518bed404abdc/yolov6/core/engine.py#L189C51-L189C51

Hi @Chilicyy

On the segmentation branch, it is self.ap = self.evaluate_results[3]. If this is not intended, could this be fixed by any chance?

https://github.com/meituan/YOLOv6/blob/463d8e7bee6ebbceaf8484c9a2a0468164b63338/yolov6/core/engine.py#L201