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 后续兴许会更新?