ucbdrive / few-shot-object-detection

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

Checkpoint X not found and X not available in Model Zoo! on Google Colab. #136

Closed mrconter1 closed 2 years ago

mrconter1 commented 2 years ago

Hi,

I've been trying to get the system up and running in Google Colab using the tutorial. This is the result:

[10/10 14:39:32 fvcore.common.checkpoint]: [Checkpointer] Loading from checkpoints/voc/faster_rcnn/faster_rcnn_R_101_FPN_base1/model_reset_surgery.pth ... Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/content/few-shot-object-detection/tools/test_net.py", line 211, in args=(args,), File "/usr/local/lib/python3.7/dist-packages/detectron2/engine/launch.py", line 62, in launch main_func(*args) File "/content/few-shot-object-detection/tools/test_net.py", line 145, in main ckpt_file, resume=resume File "/usr/local/lib/python3.7/dist-packages/fvcore/common/checkpoint.py", line 215, in resume_or_load return self.load(path, checkpointables=[]) File "/usr/local/lib/python3.7/dist-packages/fvcore/common/checkpoint.py", line 141, in load assert os.path.isfile(path), "Checkpoint {} not found!".format(path) AssertionError: Checkpoint checkpoints/voc/faster_rcnn/faster_rcnn_R_101_FPN_base1/model_reset_surgery.pth not found!

When running this command after following the tutorial:

!python3 -m tools.test_net --num-gpus 1 \ --config-file configs/PascalVOC-detection/split1/faster_rcnn_R_101_FPN_ft_all1_1shot.yaml \ --eval-only \

In response, I try to download the model using:

from fsdet import model_zoo model = model_zoo.get("COCO-detection/faster_rcnn_R_101_FPN_ft_all_1shot.yaml", trained=True)

Which in turn results in:

/content/few-shot-object-detection/fsdet/model_zoo/model_zoo.py in get_config_file(config_path) 150 if not os.path.exists(cfg_file): 151 raise RuntimeError( --> 152 "{} not available in Model Zoo!".format(config_path) 153 ) 154 return cfg_file

RuntimeError: COCO-detection/faster_rcnn_R_101_FPN_ft_all_1shot.yaml not available in Model Zoo!


Any idea how to solve these problems?

mrconter1 commented 2 years ago

It seems to have solved itself by updating to the latest.

thomasehuang commented 2 years ago

Sounds like the issue is resolved so will close this. Feel free to reopen the issue if there's any other issues regarding this.