表检测任务(TableBank & Detectron):UnicodeDecode错误:'ascii'编解码器无法解码位置 0 中的字节0x80:序数不在范围内(128)



我一直在尝试运行一个python脚本来测试验证的模型(resnext-101(,并可视化表银行提出的表检测任务的性能。作者使用检测库(Facebook AI Research的(Fair(软件系统,可以实现最新的对象检测算法,包括Mask R-CNN(。我遵循了本教程:https://github.com/doc-analysis/tablebank/blob/master/master/testpretretainingmodel.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)

有人知道如何解决此问题吗?任何帮助都将受到赞赏。

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

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

良好推理!

相关内容

最新更新