1. Config的pipeline配置

Compose
to_tensor
ToTensor
ImageToTensor
ToDataContainer
Transpose
Collect
DefaultFormatBundle
LoadAnnotations
LoadImageFromFile
LoadImageFromWebcam
LoadMultiChannelImageFromFiles
LoadProposals
MultiScaleFlipAug
Resize
RandomFlip
Pad
RandomCrop
Normalize
SegRescale
MinIoURandomCrop
Expand
PhotoMetricDistortion
Albu
InstaBoost
RandomCenterCropPad
AutoAugment
CutOut
Shear
Rotate
ColorTransform
EqualizeTransform
BrightnessTransform
ContrastTransform
Translate
RandomShift
Mosaic
MixUp
RandomAffine
2. 自定义Pipeline
# Copyright (c) OpenMMLab. All rights reserved.import os.path as ospimport mmcvimport numpy as npimport pycocotools.mask as maskUtilsfrom mmdet.core import BitmapMasks, PolygonMasksfrom ..builder import PIPELINEStry:from panopticapi.utils import rgb2idexcept ImportError:rgb2id = None@PIPELINES.register_module()class MiddleDebug:"""Load an image from file.Required keys are "img_prefix" and "img_info" (a dict that must contain thekey "filename"). Added or updated keys are "filename", "img", "img_shape","ori_shape" (same as `img_shape`), "pad_shape" (same as `img_shape`),"scale_factor" (1.0) and "img_norm_cfg" (means=0 and stds=1).Args:to_float32 (bool): Whether to convert the loaded image to a float32numpy array. If set to False, the loaded image is an uint8 array.Defaults to False.color_type (str): The flag argument for :func:`mmcv.imfrombytes`.Defaults to 'color'.file_client_args (dict): Arguments to instantiate a FileClient.See :class:`mmcv.fileio.FileClient` for details.Defaults to ``dict(backend='disk')``."""def __init__(self, mode=1):self.mode = 1def __call__(self, results):"""Call functions to load image and get image meta information.Args:results (dict): Result dict from :obj:`mmdet.CustomDataset`.Returns:dict: The dict contains loaded image and meta information."""print(results)return results
