All Projects → zhengye1995 → Underwater Object Detection

zhengye1995 / Underwater Object Detection

Kesci underwater object detection algorithm contest

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Underwater Object Detection

Psconv
[ECCV 2020] PSConv: Squeezing Feature Pyramid into One Compact Poly-Scale Convolutional Layer
Stars: ✭ 138 (-6.76%)
Mutual labels:  object-detection
Tfclassify Unity
An example of using Tensorflow with Unity for image classification and object detection.
Stars: ✭ 140 (-5.41%)
Mutual labels:  object-detection
Yolov3
yolov3 by pytorch
Stars: ✭ 142 (-4.05%)
Mutual labels:  object-detection
Wsddn
Weakly Supervised Deep Detection Networks (CVPR 2016)
Stars: ✭ 138 (-6.76%)
Mutual labels:  object-detection
Voc2coco
How to create custom COCO data set for object detection
Stars: ✭ 140 (-5.41%)
Mutual labels:  object-detection
Ssd keras
A Keras port of Single Shot MultiBox Detector
Stars: ✭ 1,763 (+1091.22%)
Mutual labels:  object-detection
Yolov5 ncnn android
YOLOv5 C++ Implementation on Android using NCNN framework
Stars: ✭ 136 (-8.11%)
Mutual labels:  object-detection
Raspberrypi Objectdetection Tensorflow
Object Detection using TensorFlow on a Raspberry Pi
Stars: ✭ 147 (-0.68%)
Mutual labels:  object-detection
Unsupervised detection
An Unsupervised Learning Framework for Moving Object Detection From Videos
Stars: ✭ 139 (-6.08%)
Mutual labels:  object-detection
Iterdet
[S+SSPR2020] IterDet: Iterative Scheme for Object Detection in Crowded Environments
Stars: ✭ 143 (-3.38%)
Mutual labels:  object-detection
Deep Learning For Tracking And Detection
Collection of papers, datasets, code and other resources for object tracking and detection using deep learning
Stars: ✭ 1,920 (+1197.3%)
Mutual labels:  object-detection
Remo Python
🐰 Python lib for remo - the app for annotations and images management in Computer Vision
Stars: ✭ 138 (-6.76%)
Mutual labels:  object-detection
Lacmus
Lacmus is a cross-platform application that helps to find people who are lost in the forest using computer vision and neural networks.
Stars: ✭ 142 (-4.05%)
Mutual labels:  object-detection
Centernet
Codes for our paper "CenterNet: Keypoint Triplets for Object Detection" .
Stars: ✭ 1,750 (+1082.43%)
Mutual labels:  object-detection
Bmw Labeltool Lite
This repository provides you with a easy to use labeling tool for State-of-the-art Deep Learning training purposes.
Stars: ✭ 145 (-2.03%)
Mutual labels:  object-detection
Copy Paste Aug
Copy-paste augmentation for segmentation and detection tasks
Stars: ✭ 132 (-10.81%)
Mutual labels:  object-detection
Easy Faster Rcnn.pytorch
An easy implementation of Faster R-CNN (https://arxiv.org/pdf/1506.01497.pdf) in PyTorch.
Stars: ✭ 141 (-4.73%)
Mutual labels:  object-detection
Self Driving Golf Cart
Be Driven 🚘
Stars: ✭ 147 (-0.68%)
Mutual labels:  object-detection
Data science bowl 2018
My 5th place (out of 816 teams) solution to The 2018 Data Science Bowl organized by Booz Allen Hamilton
Stars: ✭ 147 (-0.68%)
Mutual labels:  object-detection
Tensorflow Anpr
Automatic Number (License) Plate Recognition using Tensorflow Object Detection API
Stars: ✭ 142 (-4.05%)
Mutual labels:  object-detection

Kesci 水下目标检测算法赛 underwater object detection algorithm contest Baseline A榜 mAP 48.7

比赛地址:Kesci 水下目标检测

Update 尝试过不work的内容:

  • 数据增强
    • 翻转旋转
    • 偏色校准
    • 亮度、对比度增强
    • 各种模糊平滑算子
    • 去雾
    • mixup
    • 引入往年数据
  • 模型集成
    • 直接nms
    • 加权nms
    • wbf
  • 训练采样
    • 基于数据分布即domain采样
    • OHEM
  • 模型部分
    • DCN
    • se154与x101 接近
  • 误差分析:从rpn很难收敛及OHEM掉分严重可以分析得出目前预测错误主要来源是:
    • 高分的fp: 相当多一部分是标注漏标错标造成,例如训练集存在相邻帧图片同一目标前一帧标注,后一帧不标情况,例如对于较为模糊的目标是否标注也很不统一
    • 低分的tp: 这一类主要集中在模糊目标上,模型整体对模糊目标预测的score较低,但是数据的标注对于模糊对象标准并不一致
    • 漏检: 少数模糊小目标漏检

Update 更新使用htc预训练的resnext101 64x4d 线上mAP为48.7

整体思路

  • detection algorithm: Cascade R-CNN
  • backbone: ResNet50 + FPN
  • post process: soft nms
  • 基于mmdetection, 不是最新版,大家可以自己升级
  • res50 和se50 均可以达到线上testA 46-47 mAP, 经过spytensor试验进行模型集成可以达到49+
  • resnext101 64x4d 48.7mAP

代码环境及依赖

  • OS: Ubuntu16.10
  • GPU: 2080Ti * 4
  • python: python3.7
  • nvidia 依赖:
    • cuda: 10.0.130
    • cudnn: 7.5.1
    • nvidia driver version: 430.14
  • deeplearning 框架: pytorch1.1.0
  • 其他依赖请参考requirement.txt
  • 显卡数量不太重要,大家依据自身显卡数量倍数调整学习率大小即可

训练数据准备

  • 相应文件夹创建准备

    • 在代码根目录下新建data文件夹,或者依据自身情况建立软链接

    • 进入data文件夹,创建文件夹:

      annotations

      pretrained

      results

      submit

    • 将官方提供的训练和测试数据解压到data目录中,产生:

      train

      test-A-image

  • label文件格式转换

    • 官方提供的是VOC格式的xml类型label文件,个人习惯使用COCO格式用于训练,所以进行格式转换

    • 使用 tools/data_process/xml2coco.py 将label文件转换为COCO格式,新的label文件 train.json 会保存在 data/train/annotations 目录下

    • 为了方便利用mmd多进程测试(速度较快),我们对test数据也生成一个伪标签文件,运行 tools/data_process/generate_test_json.py 生成 testA.json, 伪标签文件会保存在data/train/annotations 目录下

    • 总体运行内容:

      • python tools/data_process/xml2coco.py

      • python tools/data_process/generate_test_json.py

  • 预训练模型下载

依赖安装及编译

  • 依赖安装编译

    1. 创建并激活虚拟环境 conda create -n underwater python=3.7 -y conda activate underwater

    2. 安装 pytorch conda install pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=10.0 -c pytorch

    3. 安装其他依赖 pip install cython && pip --no-cache-dir install -r requirements.txt

    4. 编译cuda op等: python setup.py develop

模型训练及预测

  • 训练
1. 运行:
    
    r50:
    
	chmod +x tools/dist_train.sh

    ./tools/dist_train.sh configs/underwater/cas_r50/cascade_rcnn_r50_fpn_1x.py 4
    
    se50:
    
	chmod +x tools/dist_train.sh

    ./tools/dist_train.sh configs/underwater/cas_se/cas_se50_12ep.py 4
    
    x101_64x4d (htc pretrained):
    
	chmod +x tools/dist_train.sh

    ./tools/dist_train.sh configs/underwater/cas_x101/cascade_rcnn_x101_64x4d_fpn_1x.py 4
    
    (上面的4是我的gpu数量,请自行修改)

2. 训练过程文件及最终权重文件均保存在config文件中指定的workdir目录中
  • 预测
1. 运行:

    r50:

    chmod +x tools/dist_test.sh

    ./tools/dist_test.sh configs/underwater/cas_r50/cascade_rcnn_r50_fpn_1x.py workdirs/cascade_rcnn_r50_fpn_1x/latest.pth 4 --json_out results/cas_r50.json

    (上面的4是我的gpu数量,请自行修改)
    
    se50:

    chmod +x tools/dist_test.sh

    ./tools/dist_test.sh configs/underwater/cas_se/cas_se50_12ep.py workdirs/cas_se50_12ep/latest.pth 4 --json_out results/cas_se50.json

    (上面的4是我的gpu数量,请自行修改)
    
    x101_64x4d (htc pretrained):

    chmod +x tools/dist_test.sh

    ./tools/dist_test.sh configs/underwater/cas_x101/cascade_rcnn_x101_64x4d_fpn_1x.py workdirs/cas_x101_64x4d_fpn_htc_1x/latest.pth 4 --json_out results/cas_x101.json


2. 预测结果文件会保存在 /results 目录下

3. 转化mmd预测结果为提交csv格式文件:
   
   python tools/post_process/json2submit.py --test_json cas_r50.bbox.json --submit_file cas_r50.csv
   
   python tools/post_process/json2submit.py --test_json cas_se50.bbox.json --submit_file cas_se50.csv
   
   python tools/post_process/json2submit.py --test_json cas_x101.bbox.json --submit_file cas_x101.csv

   最终符合官方要求格式的提交文件 cas_r50.csv, cas_se50.csv 和 cas_x101.csv 位于 submit目录下

Contact

author:rill

email:[email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].