train_pipeline: type: Compose components: - type: LoadImageFromFile - type: LoadAnnotations with_bbox: true - type: Resize img_scale: [(1333, 800), (1333, 1333)] keep_ratio: True - type: RandomFlip flip_ratio: 0.5 - type: Normalize mean: [123.675, 116.28, 103.53] std: [58.395, ...
dict(type='Resize', img_scale=(1333, 800), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'...
不详细分析,从config/yolo/yolov3_d53_320_273e_coco.py的train_pipeline可以看到,图片经过了MinIoURandomCrop、Resize、RandomFlip、PhotoMetricDistortion、Normalize、Pad等前处理操作。 _base_='./yolov3_d53_mstrain-608_273e_coco.py'# dataset settingsimg_norm_cfg=dict(mean=[0,0,0],std=[255.,255...
img_scale=(1333, 800), # 决定测试时可改变图像的最大规模。用于改变图像大小的流程。 flip=False, # 测试时是否翻转图像。 transforms=[ dict(type='Resize', # 使用改变图像大小的数据增广。 keep_ratio=True), # 是否保持宽和高的比例,这里的图像比例设置将覆盖上面的图像规模大小的设置。 dict(type='R...
img_scale=image_size, ratio_range=(0.8, 1.25), multiscale_mode='range', keep_ratio=True), dict( type='RandomCrop', crop_type='absolute_range', crop_size=image_size, recompute_bbox=True, allow_negative_crop=True), dict(type='FilterAnnotations', min_gt_bbox_wh=(1e-2, 1e-2)),...
- 'img_shape': shape of the image input to the network as a tuple (h, w, c). Note that images may be zero padded on the bottom/right if the batch tensor is larger than this shape. - 'scale_factor': a float indicating the preprocessing scale ...
scale_major=True, octave_base_scale=None, scales_per_octave=None, centers=None, center_offset=0.):pass# 获得基础anchor的数量,比如ssd300->[4,6,6,6,4,4]defnum_base_anchors(self):pass# 获得特征层数,比如ssd300->6层defnum_levels(self):pass# 计算基础anchor,等于每个层(6层)最左上角的一...
type='MultiScaleFlipAug3D', img_scale=(1333, 800), pts_scale_ratio=1, flip=False, transforms=[ dict( type='GlobalRotScaleTrans', rot_range=[0, 0], scale_ratio_range=[1.0, 1.0], translation_std=[0, 0, 0]), dict(type='RandomFlip3D'), ...
pad_w=int(np.ceil(img.shape[1]/divisor))*divisor 经过pad操作之后,将(800,1200)变成了(800, 1216),这步操作的目的是避免卷积时,特征损失。 keep_ratio=False时,直接按照config配置中的img_scale来缩放图片,大值代表长边,小值代表短边,不会保持原有图片比例。
'mmcv.cnn.bricks.scale', 'mmcv.cnn.bricks.swish', 'mmcv.cnn.bricks.upsample', 'mmcv.cnn.bricks.wrappers', 'mmcv.cnn.bricks', 'mmcv.runner.dist_utils', 'mmcv.runner.base_module', 'torchvision.extension', 'torchvision.models.utils', 'torchvision.models.alexnet', 'torchvision.models.resnet...