microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.48k stars 2.48k forks source link

Inferring image errors after fine-tuning object detection using layoutlmv3 #1100

Open htaoruan opened 1 year ago

htaoruan commented 1 year ago

When I use layoutlmv3 for object detection tasks, and after training, I infer the image, the code reference is unilm/dit/object Inference. py under detection, but an error occurred, OSError: Couldn't reach server at '/ layoutlmv3-base-finetuned/model 0003999.pth' to download configuration file or configuration file is not a valid JSON file. Please check network or file content here

htaoruan commented 1 year ago

python ./infer.py --image_path 0.png --output_file_name output.jpg --config ./cascade_layoutlmv3.yaml --opts MODEL.WEIGHTS ./model_0003999.pth

ashishupadhyaa commented 1 year ago

I know this is a silly question but where is the inference file located?

htaoruan commented 1 year ago

hello, Inference script from /unilm/dit/object_detection/inference. py, located at /unilm/layoutlmv3/examples/object_detection folder