All Projects → HarleysZhang → detect_steel_number

HarleysZhang / detect_steel_number

Licence: other
DCIC 钢筋数量AI识别 baseline 0.98+。

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to detect steel number

mask-rcnn-edge-agreement-loss
Reference implementation of "Faster Training of Mask R-CNN by Focusing on Instance Boundaries"
Stars: ✭ 40 (-33.33%)
Mutual labels:  mask-rcnn
cityscapes-to-coco-conversion
Cityscapes to CoCo Format Conversion Tool for Mask-RCNN and Detectron
Stars: ✭ 40 (-33.33%)
Mutual labels:  mask-rcnn
Skin-Cancer-Segmentation
Classification and Segmentation with Mask-RCNN of Skin Cancer using ISIC dataset
Stars: ✭ 61 (+1.67%)
Mutual labels:  mask-rcnn
Detectron.pytorch
A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
Stars: ✭ 2,805 (+4575%)
Mutual labels:  mask-rcnn
instance-segmentation
No description or website provided.
Stars: ✭ 40 (-33.33%)
Mutual labels:  mask-rcnn
zed-pytorch
3D Object detection using the ZED and Pytorch
Stars: ✭ 41 (-31.67%)
Mutual labels:  mask-rcnn
SALSA-Semantic-Assisted-SLAM
SALSA: Semantic Assisted Life-Long SLAM for Indoor Environments (16-833 SLAM Project at CMU)
Stars: ✭ 52 (-13.33%)
Mutual labels:  mask-rcnn
mrcnn serving ready
🛠 Mask R-CNN Keras to Tensorflow and TFX models + Serving models using TFX GRPC & RESTAPI
Stars: ✭ 96 (+60%)
Mutual labels:  mask-rcnn
image-segmentation
Mask R-CNN, FPN, LinkNet, PSPNet and UNet with multiple backbone architectures support readily available
Stars: ✭ 62 (+3.33%)
Mutual labels:  mask-rcnn
open-solution-googleai-object-detection
Open solution to the Google AI Object Detection Challenge 🍁
Stars: ✭ 46 (-23.33%)
Mutual labels:  mask-rcnn
Mask rcnn
Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Stars: ✭ 21,044 (+34973.33%)
Mutual labels:  mask-rcnn
Mmdetection
OpenMMLab Detection Toolbox and Benchmark
Stars: ✭ 17,646 (+29310%)
Mutual labels:  mask-rcnn
smd
Simple mmdetection CPU inference
Stars: ✭ 27 (-55%)
Mutual labels:  mask-rcnn
Custom-Mask-RCNN-Using-Tensorfow-Object-Detection-API
A sample project to build a custom Mask RCNN model using Tensorflow object detection API
Stars: ✭ 70 (+16.67%)
Mutual labels:  mask-rcnn
rt-mrcnn
Real time instance segmentation with Mask R-CNN, live from webcam feed.
Stars: ✭ 47 (-21.67%)
Mutual labels:  mask-rcnn
Tensorflow-Object-Detection-API-train-custom-Mask-R-CNN-model
Train a Mask R-CNN model with the Tensorflow Object Detection API
Stars: ✭ 59 (-1.67%)
Mutual labels:  mask-rcnn
celldetection
Cell Detection with PyTorch.
Stars: ✭ 44 (-26.67%)
Mutual labels:  mask-rcnn
bird species classification
Supervised Classification of bird species 🐦 in high resolution images, especially for, Himalayan birds, having diverse species with fairly low amount of labelled data
Stars: ✭ 59 (-1.67%)
Mutual labels:  mask-rcnn
Mask-YOLO
Inspired from Mask R-CNN to build a multi-task learning, two-branch architecture: one branch based on YOLOv2 for object detection, the other branch for instance segmentation. Simply tested on Rice and Shapes. MobileNet supported.
Stars: ✭ 100 (+66.67%)
Mutual labels:  mask-rcnn
AutoSweep
The implementation for the AutoSweep (TVCG 2018)
Stars: ✭ 47 (-21.67%)
Mutual labels:  mask-rcnn

比赛地址

智能盘点—钢筋数量AI识别

环境依赖

ubuntu, python3, tensorflow, keras, skimage, opencv-python, numpy, pandas, matplotlib等

我的方案

关于检测/分割模型选择

尝试了 retinanet、faster rcnn、fpnmsak rcnn ,其中 mask rcnn 得分 0.980,从 kaggle 上得知使用 U-Net 全卷积网络进行语义分割可能效果比较好,目前还没有尝试。

关于预训练模型

经过后期大佬分享,建议选用 coco 预训练模型。

关于优化器选择

  • 前期选择默认 SGD 优化器,后来在 60epoch 后选择用 Adam 优化器。
  • I found that the model reaches a local minima faster when trained using Adam optimizer compared to default SGD optimizer。

关于学习率策略

每隔 25 epoch,学习率下降 10 倍比较好。

关于训练策略

Train in 3 stages: on 512x512 crops containing ships, then finetune on 1024x1024, and finally on 2048x2048. Inference on full-sized 2000x2666 images(由于时间关系没有尝试)

关于图像尺寸

图像尺寸越大越好,但是注意至少要为 $2^6$ 倍数,受限于硬件条件我这里是 2048*2048

关于多尺度训练

每次加载图像数据,随机选择一个图像尺寸来 read image,这样可以让模型适应于检测目标尺寸变化较大的场景。比如图像 size, 可以从这个列表中选取 [514+i*32, 1024], i 表示训练 iter

我不确定数据增强是否有很大效果,下面是我的数据增强方式:

augmentation = iaa.Sometimes(0.6,
                             iaa.Noop(),
                             iaa.OneOf(
                                 [
                                     iaa.Fliplr(0.5),
                                     iaa.Flipud(0.5),
                                     iaa.GaussianBlur(sigma=(0.0, 3.0)),
                                     iaa.AdditiveGaussianNoise(scale=(0, 0.02 * 255)),
                                     iaa.CoarseDropout(0.02, size_percent=0.5),
                                     # iaa.Add((-40, 40), per_channel=0.5),
                                     # iaa.WithChannels(0, iaa.Affine(rotate=(0, 45))),
                                     iaa.Multiply((0.8, 1.5)),
                                     # iaa.Superpixels(p_replace=0.1, n_segments=(16, 32))
                                 ]
                             ))

使用方法

1. Clone this repository

git clone https://github.com/HarleysZhang/detect_steel_number.git

2. Install dependencies

pip3 install -r requirements.txt

3. Run setup from the repository root directory

python3 setup.py install

4.Download the data

After download the data, put it into /path/samples/gangjin/dataset, file structure is:

-gangjin
  - dataset/
    - rain/
      - xxx.jpg
      ...
      - via_region_data.json
    - val/
      - xxx.jpg
      ...
      - via_region_data.json
    - test/
      - xxx.jpg
  - train_labels.csv

5.Oversample data (Optional)

cd samples/gangjin/
python3 oversample_data.py
python3 read_json.py

6. convert the csv format to json format (Optional)

python3 read_json.py

7. train the model

python gangjin.py train --dataset=./datasets/ --weights=coco

8. predict

python3 predict.py

模型效果

DCIC 钢筋数量识别比赛 baseline 模型精度 0.98+

Reference

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow

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].