问题描述
训练完模型以后,运行demo/demo.py去可视化结果,结果报错:
python demo/demo.py --config-file configs/PASCAL_VOC/base-training/R101_FPN_base_training_split1.yml \--input input1.jpg
# 报错:
AssertionError: get_event_storage() has to be called inside a 'with EventStorage(...)' context!
解决方案
将
roi_ heads.py中的
storage = get_ event_storage ()
改为
with EventStorage():
storage = get_event_storage()