Closed mainguyenanhvu closed 5 years ago
Hello mainguyenanhvu,
Thanks for reaching out! Did you run git checkout mask_r_cnn
(i.e., are you in the right branch of the repo?
Pierre
It showed me:
fatal: not a git repository (or any parent up to mount point /user) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Alright, seems you're not in the right repository. Could you start over with the following commands:
git clone https://github.com/facebookresearch/kill-the-bits
cd kill-the-bits
git checkout mask_r_cnn
And then run inference.py
as you did. Do you still encounter the same error?Yes, the file mask_r_cnn.pth
is present in both branches. The file to perform inference on this compressed model is only present in the branch mask_r_cnn
of the repo. Moreover, maskrcnn_resnet50_fpn
refers to the architecture file present in PyTorch, not to the compressed weights.
So I do think this problem is related to git. Please follow the instructions above and let me know.
Thanks a lot @pierrestock. It run well.
I have downloaded and run follow the readme. But when running
python inference.py --model maskrcnn_resnet50_fpn --state-dict-compressed models/compressed/mask_r_cnn.pth --device cuda --data-path YOUR_COCO_PATH
(actually I replaced YOUR_COCO_PATH), it thrown me an error:usage: inference.py [-h] [--model {resnet18,resnet50,resnet50_semisup}] [--state-dict-compressed STATE_DICT_COMPRESSED] [--device {cpu,cuda}] [--data-path DATA_PATH] [--batch-size BATCH_SIZE] [--n-workers N_WORKERS] inference.py: error: argument --model: invalid choice: 'maskrcnn_resnet50_fpn' (choose from 'resnet18', 'resnet50', 'resnet50_semisup')
I try to insert 'maskrcnn_resnet50_fpn' in model but it still does not run.
Please, help me to solve it.
Thanks a lot.