shaunyuan22 / CFINet

The official implementation for ICCV'23 paper "Small Object Detection via Coarse-to-fine Proposal Generation and Imitation Learning"
Apache License 2.0
114 stars 5 forks source link

python ./tools/test.py ${CONFIG_FILE} ${WORK_DIR} --eval bbox中的${CONFIG_FILE} ${WORK_DIR}参数选择 #13

Closed yaosx425 closed 6 months ago

yaosx425 commented 6 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

master branch https://github.com/open-mmlab/mmdetection

Environment

sys.platform: linux Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0] CUDA available: True GPU 0,1,2,3,4,5,6,7: NVIDIA GeForce RTX 3080 Ti CUDA_HOME: /usr/local/cuda-11.2 NVCC: Cuda compilation tools, release 11.2, V11.2.67 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.11.0+cu113 PyTorch compiling details: PyTorch built with:

TorchVision: 0.12.0+cu113 OpenCV: 4.8.1 MMCV: 1.5.0 MMCV Compiler: GCC 7.5 MMCV CUDA Compiler: 11.2 MMDetection: 2.26.0+f365b8d

Reproduces the problem - code sample

1702261523949

Reproduces the problem - command or script

Traceback (most recent call last): File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmdet/datasets/custom.py", line 97, in init self.data_infos = self.load_annotations(local_path) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmdet/datasets/coco.py", line 72, in load_annotations self.coco = COCO(ann_file) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmdet/datasets/api_wrappers/coco_api.py", line 23, in init super().init(annotation_file=annotation_file) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/pycocotools/coco.py", line 81, in init with open(annotation_file, 'r') as f: FileNotFoundError: [Errno 2] No such file or directory: 'data/coco/annotations/instances_val2017.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./tools/test.py", line 286, in main() File "./tools/test.py", line 217, in main dataset = build_dataset(cfg.data.test) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmdet/datasets/builder.py ", line 82, in build_dataset dataset = build_from_cfg(cfg, DATASETS, default_args) File "/data2/shuxuan_anaconda/envs/cfinet/lib/python3.8/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') FileNotFoundError: CocoDataset: [Errno 2] No such file or directory: 'data/coco/annotations/instances_val2017.json' 不知道是不是mmcv没有配置好

Reproduces the problem - error message

其中显示没有这个数据,但是您给的数据集里面没有那个标记文件,不知道是不是我选择的configs有问题,如果要测试SODA-D这个数据集的话,我应该选择哪个configs配置文件呢?

Additional information

SODA-D

shaunyuan22 commented 6 months ago

No such file or directory: 'data/coco/annotations/instances_val2017.json, 你这个json文件是COCO数据集的。我不太理解你是要跑CFINet还是在SODA-D数据集上跑其他模型

yaosx425 commented 6 months ago

No such file or directory: 'data/coco/annotations/instances_val2017.json, 你这个json文件是COCO数据集的。我不太理解你是要跑CFINet还是在SODA-D数据集上跑其他模型

同学 你好!!我是想跑CFINet 用SODA-D的数据集 ,但是我下载了数据集应该放在什么目录里呢?现在报错 No such file or directory: '/data/SODA-D/divData/Annotations/test.json'

shaunyuan22 commented 6 months ago

请按照此链接完成SODA-D数据集的数据准备工作,然后按照本项目的readme运行即可,我猜您对MMDetection并不熟悉,建议您移步这里查看官方文档,本项目使用的是mmdet-2.26.0

yaosx425 commented 6 months ago

请按照此链接完成SODA-D数据集的数据准备工作,然后按照本项目的readme运行即可,我猜您对MMDetection并不熟悉,建议您移步这里查看官方文档,本项目使用的是mmdet-2.26.0

好的!!谢谢!!我继续学习一下!!