Giter Site home page Giter Site logo

underwater_detection's Introduction

代码说明

  • 数据分析:data_analysis.ipynb

  • 获取test的json:get_testjson.py

  • Retinex与加速测试代码:Retinex.py

    已集成在mmdet的transform里,此处仅为测试用

  • WBF: Weighted-Boxes-Fusion/ensemble.ipynb

  • 泊松融合:poisson-image-editing和poisson_blending.ipynb

  • 画标注框到训练集图上:draw_bbox.ipynb

  • 画预测框到测试集图上:draw_pred_bbox.ipynb

  • 实例平衡增强:instance_balanced_augmentation.ipynb

  • 动态模糊可视化样本图代码:Motion_Blurring.ipynb

  • 动态模糊,Mixup和Retinex加入mmdetection后的代码:mmdet/datasets/pipelines/transforms.py,使用时请自行在__init__.py下加入它们的名称。

  • 配置文件按照需求修改以下内容:

    train_pipeline = [
      dict(type='LoadImageFromFile'),
      dict(type='LoadAnnotations', with_bbox=True),
      dict(type='Mixup', prob=0.5, lambd=0.8, mixup=True,
           json_path='data/seacoco/train_waterweeds.json',
           img_path='data/seacoco/train/'),
      dict(type='MotionBlur', p=0.3),
      dict(type='Resize', img_scale=[(4096, 600), (4096, 1000)],
           multiscale_mode='range', keep_ratio=True),
      dict(type='Retinex', model='MSR', sigma=[30, 150, 300],
           restore_factor=2.0, color_gain=6.0, gain=128.0, offset=128.0),
      dict(type='RandomFlip', flip_ratio=0.5),
      dict(type='Pad', size_divisor=32),
      dict(type='Albu',
           transforms=albu_train_transforms,
           bbox_params=dict(type='BboxParams',
                            format='pascal_voc',
                            label_fields=['gt_labels'],
                            min_visibility=0.0,
                            filter_lost_elements=True),
           keymap={
               'img': 'image',
               'gt_bboxes': 'bboxes'
           },
           update_pad_shape=False,
           skip_img_without_anno=True),
      dict(type='Normalize', **img_norm_cfg),
      dict(type='DefaultFormatBundle'),
      dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
    ]
  • 标签平滑:mmdet/losses/cross_entropy_loss.py加入了标签平滑的方法。在配置文件需要修改(rpn_head下的CEloss的平滑指数为0.0,bbox_head下的CEloss的平滑指数>0.0即可)如下:

    oss_cls=dict( type='CrossEntropyLoss',
                 use_sigmoid=False,
                 loss_weight=1.0smoothing=0.001)

underwater_detection's People

Contributors

alvinai96 avatar zml-ai avatar wenbin94 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.