Coder Social home page Coder Social logo

bobdeng1974 / dfsign Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qixuxiang/dfsign

0.0 1.0 0.0 12.19 MB

DataFountain-基于虚拟仿真环境下的自动驾驶交通标志识别 4th

Python 82.56% MATLAB 0.11% C++ 3.87% Cuda 9.51% Shell 0.35% C 3.60%

dfsign's Introduction

原作者是Yifu Chen,该仓库版权属于Yifu Chen。

打个广告:算力充足的大佬可以跑跑mmdetection的SENet-154的backbone,给大伙贡献个coco预训练模型,功在当代,利在千秋啊!地址请戳mmdetection_with_SENet154

datafountain sign detection

分割->抠图->检测

比赛定位精度要求太高,关键还是使用cascade+更好的backbone,前几大佬基本都用了4个cascade头+cvpr19-HRNet,另外加上GIoU-loss和KL-loss应该有可观提升。

requirements

    python>=3.6
    numpy
    pandas
    opencv-python
    pytorch >= 1.0.0
    matplotlib
    pycocotools
    tqdm
    cython
    cffi
    opencv-python >= 4.0
    scipy
    msgpack
    easydict
    matplotlib
    pyyaml
    tensorboardX

数据准备

数据目录为~/data/dfsign,下载zip文件和label文件,解压zip到test和train目录

~/data
├── dfsign
│   ├── test
│   ├── train
│   ├── Test_fix.zip
│   ├── Train_fix.zip
│   ├── train_label_fix.csv

代码准备

代码需要放在特定目录$WORKDIR = ~/working/dfsign

链接数据

ln -s ~/data $WORKDIR/mmdetection

mmdetection extensions

cd $WORKDIR/mmdetection
./compile.sh
python setup.py develop

模型权重准备

  1. 将deeplab模型放在$WORKDIR/pytorch-deeplab-xception/run/dfsign
  2. 将detection模型放在WORKDIR/mmdetection/dfsign/work_dirs

生成训练数据

cd $WORKDIR/tools
# generate segmentation dataset
python convert2voc.py train_test
# generate detection trainset
python generate_train_chip.py

训练

使用deeplab和mmdetection中cascade

测试

cd $WORKDIR/pytorch-deeplab-xception
# run deeplab
./test.sh

cd $WORKDIR/tools
# crop seg results
python generate_mask_chip.py

cd $WORKDIR/mmdetection/dfsign
# run detect model_1 on images from seg results
python detect.py cascade_rcnn_x101_64x4d_fpn.py work_dirs/cascade_rcnn_x101_64x4d_fpn_1x/9954.pth --chip

cd $WORKDIR/tools
# crop detect results
python generate_detect_chip.py

cd $WORKDIR/mmdetection/dfsign
# run detect model_1 on images from detect results
python detect.py cascade_rcnn_x101_64x4d_fpn.py work_dirs/cascade_rcnn_x101_64x4d_fpn_1x/9954.pth
cd $WORKDIR/tools
# predict_1
python dfsign_submit.py predict_1

cd $WORKDIR/mmdetection/dfsign
# 修改cascade_rcnn_x101_64x4d_fpn_1x.py中25行anchor_ratios为[0.5, 1.0, 2.0]
# run detect model_2 on images from detect results
python detect.py cascade_rcnn_x101_64x4d_fpn.py work_dirs/cascade_rcnn_x101_64x4d_fpn_1x/9946.pth
cd $WORKDIR/tools
# predict_2
python dfsign_submit.py predict_2

# ensemble
python dfsign_ensemble
# 生成的predict.csv为最终结果

dfsign's People

Contributors

ixhorse avatar qixuxiang 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.