YOLOX版本0.3.0在colab上可以正常运行,但是在本地环境上训练进行验证时会报错:

AttributeError: module 'yolox.layers.fast_cocoeval' has no attribute 'InstanceAnnotation'

解决方法:
将文件E:\pythonFiles\YOLOX\yolox\evaluators\coco_evaluator.py中270行左右的

            try:
                from yolox.layers import COCOeval_opt as COCOeval
            except ImportError:
                from pycocotools.cocoeval import COCOeval

                logger.warning("Use standard COCOeval.")

更改为:

            try:
                # from yolox.layers import COCOeval_opt as COCOeval
                from pycocotools.cocoeval import COCOeval
            except ImportError:
                from pycocotools.cocoeval import COCOeval

                logger.warning("Use standard COCOeval.")

具体原因不详,YOLOX后续也许会更新?


奇天大郑
70 声望10 粉丝