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