• Stars
    star
    115
  • Rank 304,100 (Top 7 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created about 6 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

S3FD: single shot face detector in pytorch

sfd.pytorch

sfd implementation for face recognition in pytorch. Paper at: SFD: Single Shot Scale-invariant Face Detector

Need help ๐Ÿ’ฆ

This repo is still under developing, any issue or pull request is very welcome. Currently the weights given bellow achieve 0.7 mAP on all the validation set of wider face. I'm still training it with my poor 1080ti. Anyone with more computing resources wants to train this please open an issue to get in touched.

Requirements

  • Python 3.6
  • Pytorch 0.4
  • TensorBoard(Optional)

TODOs

  • Training on wider faces.
  • Inference tools and API.
  • Non-maximum suppression at reference.
  • TensorBoard supported.
  • Evaluation.
  • Image augmentation.
  • Multi-class detection.

Detection

The detector.py is executable and programmable, see inference.ipynb for a quick look at how to use the detector API. Using the following command for directly use it in the command line.

python3 detector.py --image ./image/test.jpg --model ./epoch_204.pth.tar

The trained model epoch_204.pth.tar can be downloaded from Baidu Yun or Google Drive.

The detector will draw bounding boxes and the result is showing bellow

Train

To train with the wider_face dataset, download and extract everything in one directory named wider_face. The file trees should then look like this,

โ””โ”€โ”€ wider_face
    โ”œโ”€โ”€ Submission_example.zip
    โ”œโ”€โ”€ wider_face_split
    โ”‚ย ย  โ”œโ”€โ”€ readme.txt
    โ”‚ย ย  โ”œโ”€โ”€ wider_face_test_filelist.txt
    โ”‚ย ย  โ”œโ”€โ”€ wider_face_test.mat
    โ”‚ย ย  โ”œโ”€โ”€ wider_face_train_bbx_gt.txt
    โ”‚ย ย  โ”œโ”€โ”€ wider_face_train.mat
    โ”‚ย ย  โ”œโ”€โ”€ wider_face_val_bbx_gt.txt
    โ”‚ย ย  โ””โ”€โ”€ wider_face_val.mat
    โ”œโ”€โ”€ wider_face_split.zip
    โ”œโ”€โ”€ WIDER_test
    โ”‚ย ย  โ””โ”€โ”€ images
    โ”œโ”€โ”€ WIDER_test.zip
    โ”œโ”€โ”€ WIDER_train
    โ”‚ย ย  โ””โ”€โ”€ images
    โ”œโ”€โ”€ WIDER_train.zip
    โ”œโ”€โ”€ WIDER_val
    โ”‚ย ย  โ””โ”€โ”€ images
    โ””โ”€โ”€ WIDER_val.zip

In the config.py, set the DATASET_DIR to the path of wider_face, and set the LOG_DIR to whatever but a existed directory. Now it's ready to train with the following command,

python3 main.py # there is no stdout

The training log is in LOG_DIR/log.txt, and models will be saved at LOG_DIR/models/epoch_xx.pth. There are many options in config.py(including learning rate or resumption) for you to tweak to get a better model.

TensorBoard

If you have TensorBoard installed, set TENSOR_BOARD_ENABLED to True in the config.py, you can use the following command to quickly start the TensorBoard server.

./bin/tensorboard

To visualize how the loss is changing.

More Repositories

1

minetorch

Build deep learning applications in a new and easy way.
Python
236
star
2

center-loss.pytorch

center loss for face recognition
Python
177
star
3

torchscript-demos

A brief of TorchScript by MNIST
C++
107
star
4

dsb

kaggle 2018 data science bowl competition
Python
24
star
5

exhaustive-weighted-random-sampler

The missing distributed weighted random sampler for PyTorch
Python
24
star
6

reef-solution

reef-solution for upload
Python
23
star
7

ai4code

ai4code competition source code
Python
18
star
8

gradio-log

A Gradio component designed to continuously show any logs.
Python
14
star
9

pytorch-tao

tao for machine learning
Python
12
star
10

focal-loss.pytorch

Focal loss implemention by PyTorch
Python
11
star
11

BiSeNet.pytorch

BiSeNet in pytorch
Python
10
star
12

nvjpeg2k-python

NVJPEG2K python binding
C++
9
star
13

rsna-2022-public

RSNA Screening Mammography Breast Cancer Detection 26 th source code
Python
6
star
14

torch-serve-mnist

torch-serve-mnist example
Python
4
star
15

featurize-doc

document of featurize
Ruby
3
star
16

gislr-live

Live Demo of Google - Isolated Sign Language Recognition
JavaScript
3
star
17

pytorch-tricks

Jupyter Notebook
3
star
18

tornado-resource-handler

tornado resource handler
Python
1
star
19

voc2012-dataset.torch

Pytorch Dataset and other utils for VOC2012 dataset
Jupyter Notebook
1
star
20

collector-go

log collector in go
Go
1
star
21

maskrcnn.pytorch

mask rcnn implemented by pytorch
Python
1
star
22

aio-scheduler

This is async io scheduler based on redis
Python
1
star
23

featurize-tensorboard

ๅœจ Featurize ไธญไฝฟ็”จ TensorBoard
Python
1
star
24

simple-uploader

Resumable file upload service
Go
1
star