Table of Contents
Purpose: We can set multi-scale image input in config files.
Comment off the lines in mmdet.datasets.pipelines:
test_time_aug.py
class MultiScaleFlipAug
def __init__:
# assert mmcv.is_list_of(self.img_scale, tuple)
transforms.py
class Resize
def __init__:
# assert mmcv.is_list_of(self.img_scale, tuple)
def random_select:
# assert mmcv.is_list_of(img_scales, tuple)
def random_sample:
# assert mmcv.is_list_of(img_scales, tuple) and len(img_scales) == 2
def random_sample_ratio:
# assert isinstance(img_scale, tuple) and len(img_scale) == 2
It mainly contains the self-defined code files.
It is recommended to put it under the mmdet directory.
Everything should be in xizhe.dataloader,
and all the code inside should NOT import anything from mmdet.datasets in canse of mutual import.
mmdet.datasets.builder.py
# comment off the original DataLoader
# from torch.utils.data import DataLoader
# add the new DataLoader
from mmdet.xizhe.dataloader import XDataLoader as DataLoader
Everything should be in xizhe.datasets.
mmdet.datasets.__init__.py,
# add
from ..xizhe.datasets import *
add the class name into __all__
,
.dev_scripts.gather_models.py (.dev_scripts is in the mmdetection root directory)
# add the class name
def get_dataset_name:
name_map = dict(...add it here...)
Everything should be in xizhe.models.
mmdet.models.__init__.py.
# add
from ..xizhe.models import *
It mainly contains the self-defined config files.