sovit-123 / fasterrcnn-pytorch-training-pipeline

PyTorch Faster R-CNN Object Detection on Custom Dataset
MIT License
223 stars 75 forks source link

index over error during traing #6

Open YangDongJae opened 2 years ago

YangDongJae commented 2 years ago

I got a something error that about index over...

see the error line, I think the reason of that is too much big parameter..

is it right?

why I get a error and how can I solved during training data

File "train.py", line 200, in <module> colors=COLORS File "/home/ubuntu/anaconda3/envs/pytorch1.7.1_p37/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/ubuntu/lecttue-diagonosis/YangDongJae/fastercnn-pytorch-training-pipeline/torch_utils/engine.py", line 138, in evaluate images, outputs, counter, out_dir, classes, colors File "/home/ubuntu/lecttue-diagonosis/YangDongJae/fastercnn-pytorch-training-pipeline/utils/general.py", line 218, in save_validation_results pred_classes = [classes[i] for i in labels.cpu().numpy()] File "/home/ubuntu/lecttue-diagonosis/YangDongJae/fastercnn-pytorch-training-pipeline/utils/general.py", line 218, in <listcomp> pred_classes = [classes[i] for i in labels.cpu().numpy()] IndexError: list index out of range

sovit-123 commented 2 years ago

Hi, I think that your classes names or the number of classes (NC) in the data YAML file are wrong. Can you recheck it or paste your dataset YAML file information here?