fudan-zvg / SETR

[CVPR 2021] Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers
MIT License
1.05k stars 149 forks source link

The input size problem #15

Closed water-wave closed 3 years ago

water-wave commented 3 years ago

Thank you for your great work.The size of my picture is (256,832),how should I deal with it?Please tell me more details.thanks.

sixiaozheng commented 3 years ago
  1. you will have to organize your dataset to meet the requirements of mmsegmentation. Please check here.

  2. Please refer to SETR/mmseg/datasets/ade.py to write a python script SETR/mmseg/datasets/{your_dataset}.py for your own dataset, and add your dataset into SETR/mmseg/datasets/__init__.py.

  3. Please refer to SETR/configs/_base_/datasets/ade20k.py to write a configuration file for your own dataset, SETR/configs/_base_/datasets/{your_dataset}.py. You need to modify dataset_type, data_root, img_scale, crop_size, samples_per_gpu, img_dir, ann_dir, split.

Note that the h and w of crop_size should be equal and must be in multiplies of 16. Neither of h and w is allowed to exceed the shortest side of the image after random resize — dict(type='Resize', img_scale=img_scale, ratio_range=(0.5, 2.0))

water-wave commented 3 years ago

Thank you for your reply.I will follow steps that your give.thanks again.