microsoft / FocalNet

[NeurIPS 2022] Official code for "Focal Modulation Networks"
MIT License
682 stars 61 forks source link

Where are the paths of training set images and annotations to be specified? #12

Closed mattroos closed 1 year ago

mattroos commented 1 year ago

In the example config file configs/focalnet/cascade_mask_rcnn_focalnet_tiny_patch4_mstrain_480-800_adamw_3x_coco_srf.py
we see:

data_root = 'data/coco/'
data = dict(
    train=dict(pipeline=train_pipeline),
    test=dict(
        ann_file=data_root + 'annotations/instances_val2017.json',
        img_prefix=data_root + 'val2017/'
    ),
    samples_per_gpu=1,
)

Why are ann_file and img_prefix defined in the test dict but not in the train dict? Where should the paths be specified for the training set?

jwyang commented 1 year ago

It is specified in mmdet's default dataset config. The current configs inherit the default dataset config: https://github.com/open-mmlab/mmdetection/blob/master/configs/_base_/datasets/coco_instance.py

mattroos commented 1 year ago

I see. So neither train nor test ann_file and img_prefix need to be specified in configs/focalnet/cascade_mask_rcnn_focalnet_tiny_patch4_mstrain_480-800_adamw_3x_coco_srf.py if they are correctly specified in the mmdet's default config, to my understanding.

If someone wanted to alter the paths for the training set would it look something list this train=dict(pipeline=train_pipeline, ann_file=path/to/json.json, img_prefix=path/to/prefix/) in configs/focalnet/cascade_mask_rcnn_focalnet_tiny_patch4_mstrain_480-800_adamw_3x_coco_srf.py?

jwyang commented 1 year ago

Hi, @mattroos , yes, you are correct.