0

我一直在尝试运行 python 脚本来测试预训练模型 (ResNeXt-101) 并可视化 TableBank 提出的表检测任务的性能。作者使用 Detectron 库(Facebook AI Research 的 (FAIR) 软件系统,实现了最先进的对象检测算法,包括 Mask R-CNN)对模型进行了预训练。我遵循了本教程:https ://github.com/doc-analysis/TableBank/blob/master/TestPretrainedModel.md

这是我的命令:

python tools/infer_simple.py --cfg /home/xxxx/ModelResNeXt101.pkl --output-dir /tmp/detectron-tablebank --image-ext jpg --wts /home/xxxx/config_X101.yaml /home/xxxx/TableBank/data/Sampled_Detection_data/Latex/images

我得到以下信息:

Found Detectron ops lib: /home/xxxx/.local/lib/python2.7/site-packages/torch/lib/libcaffe2_detectron_ops_gpu.so
[E init_intrinsics_check.cc:43] CPU feature avx is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
[E init_intrinsics_check.cc:43] CPU feature avx2 is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
[E init_intrinsics_check.cc:43] CPU feature fma is present on your machine, but the Caffe2 binary is not compiled with it. It means you may not get the full speed of your CPU.
Traceback (most recent call last):
  File "tools/infer_simple.py", line 185, in <module>
    main(args)
  File "tools/infer_simple.py", line 125, in main
    merge_cfg_from_file(args.cfg)
  File "/detectron/detectron/core/config.py", line 1146, in 
    merge_cfg_from_file
    yaml_cfg = AttrDict(load_cfg(f))
  File "/detectron/detectron/core/config.py", line 1133, in load_cfg
cfg_to_load = ''.join(cfg_to_load.readlines())
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)

有谁知道如何解决这个问题?任何帮助表示赞赏。

4

1 回答 1

0

我终于明白了!我交换了命令中的请求序列,所以它必须是:

python detectron/tools/infer_simple.py --wts /home/arij_sediri/ModelResNeXt152.pkl --output-dir /tmp/detectron-tablebank --image-ext jpg --cfg /home/arij_sediri/config_X152.yaml /home/arij_sediri/TableBank/TableBank/data/Sampled_Detection_data/Latex/images

好推论!

于 2019-05-21T08:58:31.127 回答