Giter Club home page Giter Club logo

awesome_ssd_fpn_giou's Introduction

SSD_FPN_GIoU, in PyTorch

This is a SSD experiment reposity, the purpose is to reproduce some related papers based on SSD The code references SSD: Single Shot MultiBox Object Detector, in PyTorch and mmdet. Currently, some experiments are carried out on the VOC dataset, if you want to train your own dataset, you can refer to the part of training-yourself-dataset.

Table of Contents

       

Fold-Structure

The fold structure as follow:

  • config/
    • config.py
    • init.py
  • data/
    • init.py
    • VOC.py
    • VOCdevkit/
  • model/
    • build_ssd.py
    • init.py
    • backbone/
    • neck/
    • head/
    • utils/
  • utils/
    • box/
    • detection/
    • loss/
    • init.py
  • tools/
    • train.py
    • eval.py
    • test.py
  • work_dir/

Environment

  • pytorch 0.4.1
  • python3+
  • visdom
    • for real-time loss visualization during training!
     pip install visdom
    • Start the server (probably in a screen or tmux)
     python visdom
    • Then (during training) navigate to http://localhost:8097/ (see the Train section below for training details).

Datasets

  • PASCAL VOC:Download VOC2007, VOC2012 dataset, then put VOCdevkit in the data directory

Training

Training VOC

python tools/train.py
  • Note:
    • For training, default NVIDIA GPU.
    • You can set the parameters in the train.py (see 'tools/train.py` for options)
    • In the config,you can set the work_dir to save your training weight.(see 'configs/config.py`)
    • if you want to selected the classficaiton and Regression Loss, you can to change the train_config. Now, we provide the classficaiton {FocalLoss,CrossEntropy},Regression {SmoothL1,Giou}.(see 'configs/config.py`)

Training yourself dataset

  • if you want to trainning yourself dataset, there are some steps:
  1. you need to make the dataset refer the VOC dataset, and take it to data/
  2. in the data/ ,you need make yourself-data.py, for example CRACK.py(it is my dataset), and change it according to your dataset. Also,in the init.py you can write something about your dataset
  3. change the config/ config.py, and make your dataset config,like CRACK(dict{})
  4. In the main,load your dataset.
  • In the SSD_FPN_GIoU fold:
python tools/train.py

Evaluation

  • To evaluate a trained network:
python eval.py --trained_model your_weight_address

Test

  • To test a trained network:
python test.py -- trained_model your_weight_address

if you want to visual the box, you can add the command --visbox True(default False)

Performance

VOC2007 Test mAP

  • Backbone is the ResNet50:
Test mAP(iou=0.5) mAP(iou=0.6) mAP(iou=0.75)
SSD 75.49% 70.87% 53.44 %
SSD+Gious 76.09% 71.01% 54.70 %
SSD+FPN 78.99% 73.18% 55.19 %
SSD+FPN+Gious 78.96% 73.35% 55.83 %

result

FPS

  • SSD+FPN+Gious: GTX 1080ti: ~35 FPS

Download a pre-trained network

  • Currently, we provide the following PyTorch models:

Authors

References

awesome_ssd_fpn_giou's People

Contributors

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