Giter VIP home page Giter VIP logo

mtcnn_train's Introduction

MTCNN_TRAIN

MTCNN_Train Scripts with PyTorch 0.4.0

Declaration

The source code in this repository is mainly from kuaikuaikim/DFace. I reimplemented the part of MTCNN with PyTorch 0.4.0 and made some optimizations but most remains unchanged. If you want to know more details, please go to kuaikuaikim/DFace


Introduction

This project is still in progess, I will finish it in my spare time as soon as possible !

This project is a reimplementation version of mtcnn face detection, most of the source code is from kuaikuaikim/DFace, I restructed the source code with Pytorch 0.4.0 and made some modifications and optimizations. All the contributions I have made is listed below.

The Contributions

  1. restruct the source code with PyTorch 0.4.0.
  2. avoid some unnecessary image data copy operation in training data preparation, for example, ./prepare_data/gen_Pnet_data.py and so on.
  3. remove some meaningless operation in traing process, and format the output information during training.
  4. fix the bug that data_loader can't load the last mini_batch when the last minibatch'size is less than the batch_size in ./tools/image_reader.py.
  5. to be continue.

How to use

For training PNet and RNet, I only use the Widerface for face classification and face bounding box regression. For training ONet, I use Widerface for face classification and face bounding box regression and use Training Dataset for face landmark regression.

  1. Train PNet
cd MTCNN_TRAIN
python prepare_data/gen_Pnet_train_data.py
python prepare_data/assemble_pnet_imglist.py 
python train_net/train_p_net.py
  1. Train RNet
cd MTCNN_TRAIN
python prepare_data/gen_Rnet_train_data.py
python prepare_data/assemble_rnet_imglist.py 
python train_net/train_r_net.py
  1. Train ONet
cd MTCNN_TRAIN
python prepare_data/gen_landmark_48.py
python prepare_data/gen_Onet_train_data.py
python prepare_data/assemble_onet_imglist.py 
python train_net/train_o_net.py
  1. Test Image
cd MTCNN_TRAIN
python test_image.py

Results

Because I didn't use much data to train, the detection results is not at the best.
avatar

Problems

There still remains a problem to solve: When starting to train each stage network, the first batch will last for a long time about 30 minutes and I don't know why.

mtcnn_train's People

Contributors

kli-casia avatar wujiyang avatar

Watchers

 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.