ucbdrive / few-shot-object-detection

Implementations of few-shot object detection benchmarks
Apache License 2.0
1.1k stars 223 forks source link

Error when trying to run Demo #91

Closed ruohuali closed 3 years ago

ruohuali commented 3 years ago

When running demo.demo.py, error AssertionError: Checkpoint fsdet://coco/tfa_cos_1shot/model_final.pth not found! was reported. Is training mandatory for this repo or is there anywhere I can download the pretrained weights? Thx for the help!

Whole terminal output: ` fvcore version of PathManager will be deprecated soon. Please migrate to the version in iopath repo. https://github.com/facebookresearch/iopath

fvcore version of PathManager will be deprecated soon. Please migrate to the version in iopath repo. https://github.com/facebookresearch/iopath

[03/01 04:20:13 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='configs/COCO-detection/faster_rcnn_R_101_FPN_ft_all_1shot.yaml', input=['input1.jpg', 'input2.jpg'], opts=['MODEL.WEIGHTS', 'fsdet://coco/tfa_cos_1shot/model_final.pth'], output=None, video_input=None, webcam=False) froze backbone parameters froze proposal generator parameters froze roi_box_head parameters [03/01 04:20:16 fvcore.common.checkpoint]: Loading checkpoint from fsdet://coco/tfa_cos_1shot/model_final.pth Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/ruohuali/Desktop/few-shot-object-detection/demo/demo.py", line 81, in demo = VisualizationDemo(cfg) File "/home/ruohuali/Desktop/few-shot-object-detection/demo/predictor.py", line 35, in init self.predictor = DefaultPredictor(cfg) File "/home/ruohuali/Desktop/few-shot-object-detection/fsdet/engine/defaults.py", line 220, in init checkpointer.load(cfg.MODEL.WEIGHTS) File "/home/ruohuali/smr-pyenv/lib/python3.8/site-packages/fvcore/common/checkpoint.py", line 141, in load assert os.path.isfile(path), "Checkpoint {} not found!".format(path) AssertionError: Checkpoint fsdet://coco/tfa_cos_1shot/model_final.pth not found! `

scott-vsi commented 3 years ago

fsdet:// defines a model as downloaded by fsdet & detectron2's model zoo. MODEL_ZOO.md describes how to do this. However, I had a problem with that command. I fixed it like this: #97 [edited]

scott-vsi commented 3 years ago

Oops. I meant #97

xinw1012 commented 3 years ago

Thanks, @scott-vsi! Closing the issue for now.