EasyCV icon indicating copy to clipboard operation
EasyCV copied to clipboard

feature extract error

Open budaLi opened this issue 2 years ago • 5 comments

image

budaLi avatar Jul 18 '22 05:07 budaLi

can you attach the exported checkpoint and give the model info

wenmengzhou avatar Jul 19 '22 03:07 wenmengzhou

看起来是训练时候的配置参数是OrderDict类型的,不支持直接写入 image

budaLi avatar Jul 19 '22 03:07 budaLi

can you attach the exported checkpoint and give the model info

请问有比较好的解决方法嘛

budaLi avatar Jul 19 '22 06:07 budaLi

can you attach the exported checkpoint and give the model info

请问有比较好的解决方法嘛

看起来你是直接用的训练保存的checkpoint做预测,而没有进行export模型?

wenmengzhou avatar Jul 30 '22 07:07 wenmengzhou

exported the model and still faced the same issue. it was due to the TorchFeatureExtractor writing the dictionary model configs into a disk while expecting it as a string. for a quick walkaround, just replace "ofile.write(config_str)" in line 48 with:

import json
json.dump(config_str, ofile)

silly issue. maybe some other models have the value config checkpoint['meta']['config'] as a string.

MuhammadHakami avatar Sep 17 '22 18:09 MuhammadHakami