TypeError: 'NoneType' object is not subscriptable


Traceback (most recent call last):
  File "/home/lixinru/Vir_env/unilm-master/dit/object_detection/inference.py", line 83, in <module>
    main()
  File "/home/lixinru/Vir_env/unilm-master/dit/object_detection/inference.py", line 71, in main
    output = predictor(img)["instances"]
  File "/home/lixinru/anaconda3/envs/layoutmv3/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 311, in __call__
    original_image = original_image[:, :, ::-1]
TypeError: 'NoneType' object is not subscriptable

请问这个应该怎么解决,是在inference.py使用指令:

python ./dit/object_detection/inference.py \
--image_path ./dit/object_detection/publaynet_example.jpeg \
--output_file_name output.jpg \
--config ./dit/object_detection/publaynet_configs/maskrcnn/maskrcnn_dit_base.yaml \
--opts MODEL.WEIGHTS https://layoutlm.blob.core.windows.net/dit/dit-fts/publaynet_dit-b_mrcnn.pth \

把路径修改为我自己的绝对路径出现的。