HunterJ-Lin / WSOVOD

Code release for "Weakly Supervised Open-Vocabulary Object Detection", AAAI2024
Apache License 2.0
28 stars 1 forks source link

dataset error #6

Closed cpy0029 closed 7 months ago

cpy0029 commented 8 months ago

The error I encountered during training is as follows: [03/27 11:11:45] d2.evaluation.evaluator INFO: Inference done 2462/2476. Dataloading: 0.0040 s/iter. Inference: 0.2617 s/iter. Eval: 0.0024 s/iter. Total: 0.2682 s/iter. ETA=0:00:03 [03/27 11:11:48] d2.evaluation.evaluator INFO: Total inference time: 0:11:02.103641 (0.267950 s / iter per device, on 2 devices) [03/27 11:11:48] d2.evaluation.evaluator INFO: Total inference pure compute time: 0:10:45 (0.261430 s / iter per device, on 2 devices) [03/27 11:11:49] wsovod.evaluation.pascal_voc_evaluation INFO: Evaluating voc_2007_test using 2007 metric. Note that results do not use the official Matlab API. [03/27 11:11:49] d2.engine.train_loop ERROR: Exception during training: Traceback (most recent call last): File "/home/data/anaconda3/lib/python3.11/site-packages/detectron2/engine/train_loop.py", line 156, in train self.after_step() File "/home/data/anaconda3/lib/python3.11/site-packages/detectron2/engine/train_loop.py", line 190, in after_step h.after_step() File "/home/data/anaconda3/lib/python3.11/site-packages/detectron2/engine/hooks.py", line 556, in after_step self._do_eval() File "/home/data/anaconda3/lib/python3.11/site-packages/detectron2/engine/hooks.py", line 529, in _do_eval results = self._func() ^^^^^^^^^^^^ File "/home/data/code/WSOVOD/wsovod/engine/defaults.py", line 209, in test_and_save_results self._last_eval_results = self.test(self.cfg, self.model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/data/code/WSOVOD/wsovod/engine/defaults.py", line 408, in test results_i = inference_on_dataset(model, data_loader, evaluator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/data/anaconda3/lib/python3.11/site-packages/detectron2/evaluation/evaluator.py", line 213, in inference_on_dataset results = evaluator.evaluate() ^^^^^^^^^^^^^^^^^^^^ File "/home/data/code/WSOVOD/wsovod/evaluation/pascal_voc_evaluation.py", line 103, in evaluate with open(res_file_template.format(cls_name), "w") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/data/dataset/VOC2007/../results/VOC2007/Main/comp3_f45a2977-e8f3-43d5-bb9d-f71b82de526e_det_test_aeroplane.txt'

There are not so many files in VOC2007. What caused this error? Thanks!

HunterJ-Lin commented 8 months ago

This may be due to the document structure of your dataset. The document structure of the VOC dataset should be as follows: -VOC2007 --results ---VOC2006 ---VOC2007 ----Layout ----Main -----comp3_xxxx_det_test_xxx.txt [your test results] ----Segmentation --VOC2007 ---Annotations ---ImageSets ---JPEGlmages

cpy0029 commented 7 months ago

Need to set: DETECTRON2_DATASETS=path/to/VOCdevkit