biigle/maia

Evaluate brightness augmentation

Closed this issue · 1 comments

mzur commented

As the camera has often (slightly) varying distances to the sea floor, the brighness of the image can vary as well. Test brightness augmentation and see if it can improve the detection performance.

mzur commented

I've evaluated brightness augmentation as part of #117. It had no effect on the results. This was the MMDetection train_pipeline which is the MAIA/UnKnoT augmentation with additional brightness augmentation:

train_pipeline = [
   {'type': 'LoadImageFromFile'},
   {'type': 'LoadAnnotations', 'with_bbox': True},
   {
      # Example: https://github.com/open-mmlab/mmdetection/blob/master/configs/albu_example/mask_rcnn_r50_fpn_albu_1x_coco.py#L44
      'type': 'Albu',
      'skip_img_without_anno': True,
      'bbox_params': {
         'type': 'BboxParams',
         'format': 'pascal_voc',
         'label_fields': ['gt_labels'],
         'filter_lost_elements': True,
         'min_area': 100,
      },
      'keymap': {
         'img': 'image',
         'gt_masks': 'masks',
         'gt_bboxes': 'bboxes',
      },
      'transforms': [
         {
            'type': 'SomeOf',
            'n': 5,
            'p': 0.2,
            'replace': False,
            'transforms': [
               {'type': 'Flip'},
               {'type': 'RandomRotate90'},
               {'type': 'GaussianBlur', 'sigma_limit': [1.0, 2.0]},
               {'type': 'JpegCompression', 'quality_lower': 25, 'quality_upper': 50},
               {'type': 'RandomBrightness', 'limit': 0.2},
            ],
         },
      ],
   },
   {
     'type': 'Normalize',
     'mean': [123.675, 116.28, 103.53],
     'std': [58.395, 57.12, 57.375],
     'to_rgb': True,
   },
   {'type': 'Pad', 'size_divisor': 32},
   {'type': 'DefaultFormatBundle'},
   {
      'type': 'Collect',
      'keys': ['img', 'gt_bboxes', 'gt_labels'],
      'meta_keys': ['filename', 'ori_filename', 'ori_shape', 'img_shape', 'pad_shape', 'scale_factor', 'img_norm_cfg'],
   },
]