sfzhang15 / ATSS

Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection, CVPR, Oral, 2020
Other
1.08k stars 162 forks source link

Running test_ net.py How is the test data loaded? #72

Closed Alan-D-Chen closed 4 years ago

Alan-D-Chen commented 4 years ago

Running test_ net.py How is the test data loaded?

python tools/test_net.py \ --config-file configs/atss/atss_R_50_FPN_1x.yaml \ MODEL.WEIGHT ATSS_R_50_FPN_1x.pth \ TEST.IMS_PER_BATCH 4

Alan-D-Chen commented 4 years ago

just get that:

File "tools/test_net.py", line 97, in <module>
    main()
  File "tools/test_net.py", line 80, in main
    data_loaders_val = make_data_loader(cfg, is_train=False, is_distributed=distributed)
  File "/home/alanc/Documents/ATSS/atss_core/data/build.py", line 155, in make_data_loader
    datasets = build_dataset(dataset_list, transforms, DatasetCatalog, is_train)
  File "/home/alanc/Documents/ATSS/atss_core/data/build.py", line 44, in build_dataset
    dataset = factory(**args)
  File "/home/alanc/Documents/ATSS/atss_core/data/datasets/coco.py", line 43, in __init__
    super(COCODataset, self).__init__(root, ann_file)
  File "/home/alanc/anaconda3/envs/ATSS/lib/python3.6/site-packages/torchvision/datasets/coco.py", line 97, in __init__
    self.coco = COCO(annFile)
  File "/home/alanc/anaconda3/envs/ATSS/lib/python3.6/site-packages/pycocotools-2.0-py3.6-linux-x86_64.egg/pycocotools/coco.py", line 84, in __init__
    dataset = json.load(open(annotation_file, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/annotations/instances_val2017.json'
Alan-D-Chen commented 4 years ago

@sfzhang15 help me,please~

sfzhang15 commented 4 years ago

@Alan-D-Chen Download 2017 Train images [118K/18GB], 2017 Val images [5K/1GB], 2017 Test images [41K/6GB], 2017 Train/Val annotations [241MB], 2017 Testing Image info [1MB] from MS COCO dataset, extract them as the following structure:

datasets/coco/annotations/*.json
datasets/coco/train2017/*.jpg
datasets/coco/val2017/*.jpg
datasets/coco/test2017/*.jpg
Alan-D-Chen commented 4 years ago

thx a lot!! @sfzhang15