If I used the default confg, I get the following error.
I changed the defaults.py in maskrcnn_benchmark about
_C.DATASETS.PREDEFINED_TEXT_C.DATASETS.OVERRIDE_CATEGORY_C.DATASETS.SUPRESS_QUERY_C.DATASETS.CAPTION_PROMPT
(They were all set to None, and I set them to "")
and I was able to get the dataset loaded. But get the following error. Do you know what was wrong in the code? Do we need to specify more paths?
The combined datasets are: ('coco_2017_val',).
loading annotations into memory...
Done (t=0.89s)
creating index..
index created!
coco_2017_val has the 5000 data points COCODataset
2023-06-30 17:23:49,852 maskrcnn_benchmark.inference INFO: Start evaluation on coco_2017_val dataset(5000 images).
Traceback (most recent call last):
File "tools/test_grounding_net.py", line 222, in
main()
File "tools/test_grounding_net.py", line 215, in main
cfg=cfg
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 426, in inference
all_queries, all_positive_map_label_to_token = create_queries_and_maps_from_dataset(dataset, cfg)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 204, in create_queries_and_maps_from_dataset
labels_i, label_list_i, additional_labels = cfg.DATASETS.SUPRESS_QUERY if cfg.DATASETS.USE_SUPRESS_QUERY else None, cfg = cfg)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 227, in create_queries_and_maps
caption_prompt = load_from_yaml_file(caption_prompt)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/data/datasets/tsv.py", line 34, in load_from_yaml_file
with open(yaml_file, 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: ''
Hi I managed to build GLIP and use the following command to test zero-shot on COCO
python tools/test_grounding_net.py --config-file configs/pretrain/glip_Swin_L.yaml --weight MODEL/glip_large_model.pth TEST.IMS_PER_BATCH 1 MODEL.DYHEAD.SCORE_AGG "MEAN" TEST.EVAL_TASK detection MODEL.DYHEAD.FUSE_CONFIG.MLM_LOSS False OUTPUT_DIR results
If I used the default confg, I get the following error.
I changed the
defaults.py
inmaskrcnn_benchmark
about_C.DATASETS.PREDEFINED_TEXT
_C.DATASETS.OVERRIDE_CATEGORY
_C.DATASETS.SUPRESS_QUERY
_C.DATASETS.CAPTION_PROMPT
(They were all set toNone
, and I set them to""
)and I was able to get the dataset loaded. But get the following error. Do you know what was wrong in the code? Do we need to specify more paths?
The combined datasets are: ('coco_2017_val',).
loading annotations into memory... Done (t=0.89s) creating index.. index created! coco_2017_val has the 5000 data points COCODataset 2023-06-30 17:23:49,852 maskrcnn_benchmark.inference INFO: Start evaluation on coco_2017_val dataset(5000 images). Traceback (most recent call last): File "tools/test_grounding_net.py", line 222, in
main()
File "tools/test_grounding_net.py", line 215, in main
cfg=cfg
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 426, in inference
all_queries, all_positive_map_label_to_token = create_queries_and_maps_from_dataset(dataset, cfg)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 204, in create_queries_and_maps_from_dataset
labels_i, label_list_i, additional_labels = cfg.DATASETS.SUPRESS_QUERY if cfg.DATASETS.USE_SUPRESS_QUERY else None, cfg = cfg)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/engine/inference.py", line 227, in create_queries_and_maps
caption_prompt = load_from_yaml_file(caption_prompt)
File "/usr/{dir}/GLIP/maskrcnn_benchmark/data/datasets/tsv.py", line 34, in load_from_yaml_file
with open(yaml_file, 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: ''
Thank you!