Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.44k stars 2.21k forks source link

coco training:IndexError: list index out of range #1273

Closed jinbo8 closed 2 years ago

jinbo8 commented 2 years ago

我训练coco格式数据时遇到了以下问题,查了很多博客, 没有找到解决方法,下载使用的是官网链接的coco128数据集,也修改了类别yolox_.py下的类别为80,这种问题有大佬知道怎么解决的吗? image

SEYXW6MM_`9RM2_ K$HZYWU

ninenox-dev commented 2 years ago

I had error same you, How to fix it?

doctorchoco commented 2 years ago

Your annotation files are not fit to your image files. Check it!

Finorita commented 2 years ago

修改的类别是在yolox_base.py文件下的吗?然后你训练的时候,加载的配置文件对应的numclasses有没有修改成71?例子中,配置文件是yolox_vox_x.py,可以直接使用exps/co(用户-英文不记得了)/yolox_s.py,直接运行就OK了,要修改一下数据集路径哦!coco128类别是71

Finorita commented 2 years ago

我的意思是,看看官方文件的例子来做,但是配置文件用exps/co(用户-英文不记得了)/yolox_s.py这个就好啦

Finorita commented 2 years ago

有个不情之请,你做完以后可以告诉我预测结果标签和框对应得上吗?还有可以告诉我coco128的json文件中的category(最后一项)对应的是1-80还是1-71呀?

jinbo8 commented 2 years ago

change H:\YOLOX\exps\example\custom\yolox_s.py -->self.num_classes = 71; H:\YOLOX\exps\example\custom\yolox_s.py-->self.num_classes = 80;then run train.py; ok!!! image

image