All Projects → 610265158 → faceboxes-tensorflow

610265158 / faceboxes-tensorflow

Licence: Apache-2.0 License
a tensorflow implement faceboxes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to faceboxes-tensorflow

Spectrum
Spectrum is an AI that uses machine learning to generate Rap song lyrics
Stars: ✭ 37 (-17.78%)
Mutual labels:  tensorflow2
mtlearn
Multi-Task Learning package built with tensorflow 2 (Multi-Gate Mixture of Experts, Cross-Stitch, Ucertainty Weighting)
Stars: ✭ 45 (+0%)
Mutual labels:  tensorflow2
nalp
🗣️ NALP is a library that covers Natural Adversarial Language Processing.
Stars: ✭ 17 (-62.22%)
Mutual labels:  tensorflow2
scrabble-gan
Adversarial Generation of Handwritten Text Images
Stars: ✭ 49 (+8.89%)
Mutual labels:  tensorflow2
NARUTO-HandSignDetection
物体検出を用いてNARUTOの印(子~亥、壬、合掌)を検出するモデルとサンプルプログラムです。このリポジトリでは、YOLOXを使用しています(This is a model and sample program that detects NARUTO's hand sign using object detection. This repository use YOLOX.)
Stars: ✭ 186 (+313.33%)
Mutual labels:  tensorflow2
TensorFlow-Raspberry-Pi 64-bit
TensorFlow installation wheels for Raspberry Pi 64 OS
Stars: ✭ 27 (-40%)
Mutual labels:  tensorflow2
Deep-Learning
This repo provides projects on deep-learning mainly using Tensorflow 2.0
Stars: ✭ 22 (-51.11%)
Mutual labels:  tensorflow2
deeplearning-keras-tf2-torch
詳解ディープラーニング 第2版
Stars: ✭ 66 (+46.67%)
Mutual labels:  tensorflow2
tf-blazepose
BlazePose - Super fast human pose detection on Tensorflow 2.x
Stars: ✭ 139 (+208.89%)
Mutual labels:  tensorflow2
backyard birdbot
This project is for a Twitter bot that monitors a bird feeder in my backyard. Any detected birds are identified and posted to Twitter.
Stars: ✭ 63 (+40%)
Mutual labels:  tensorflow2
LIGHT-SERNET
Light-SERNet: A lightweight fully convolutional neural network for speech emotion recognition
Stars: ✭ 20 (-55.56%)
Mutual labels:  tensorflow2
CARLA
CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms
Stars: ✭ 166 (+268.89%)
Mutual labels:  tensorflow2
Text and Audio classification with Bert
Text Classification in Turkish Texts with Bert
Stars: ✭ 34 (-24.44%)
Mutual labels:  tensorflow2
ttt
A package for fine-tuning Transformers with TPUs, written in Tensorflow2.0+
Stars: ✭ 35 (-22.22%)
Mutual labels:  tensorflow2
TF2-RL
Reinforcement learning algorithms implemented for Tensorflow 2.0+ [DQN, DDPG, AE-DDPG, SAC, PPO, Primal-Dual DDPG]
Stars: ✭ 160 (+255.56%)
Mutual labels:  tensorflow2
text classifier
Tensorflow2.3的文本分类项目,支持各种分类模型,支持相关tricks。
Stars: ✭ 135 (+200%)
Mutual labels:  tensorflow2
GAN-RNN Timeseries-imputation
Recurrent GAN for imputation of time series data. Implemented in TensorFlow 2 on Wikipedia Web Traffic Forecast dataset from Kaggle.
Stars: ✭ 107 (+137.78%)
Mutual labels:  tensorflow2
FaceRecognition With FaceNet Android
Face Recognition using the FaceNet model and MLKit on Android.
Stars: ✭ 113 (+151.11%)
Mutual labels:  tensorflow2
food-vision-mobile-tensorflowjs
Food Vision project for mobile devices using TensorFlowJS
Stars: ✭ 19 (-57.78%)
Mutual labels:  tensorflow2
MIRNet
Tensorflow implementation of MIRNet for Low-light image enhancement
Stars: ✭ 78 (+73.33%)
Mutual labels:  tensorflow2

faceboxes

introduction

A tensorflow 2.0 implement faceboxes.

CAUTION: this is the tensorflow2 branch, if you need to work on tensorflow1, please switch to tf1 branch

And some changes has been made in RDCL module, to achieve a better performance and run faster:

  1. input size is 512 (1024 in the paper), then the first conv stride is 2, kernel size 7x7x12.
  2. replace the first maxpool by conv 3x3x24 stride 2
  3. replace the second 5x5 stride2 conv and maxpool by two 3x3 stride 2 conv
  4. anchor based sample is used in data augmentaion.

codes like below

    with tf.name_scope('RDCL'):
     net = conv2d(net_in, 12, [7, 7], stride=2,activation_fn=tf.nn.relu, scope='init_conv1')
     net = conv2d(net, 24, [3, 3], stride=2, activation_fn=tf.nn.crelu, scope='init_conv2')
    
     net = conv2d(net, 32, [3, 3], stride=2,activation_fn=tf.nn.relu,scope='conv1x1_before1')
     net = conv2d(net, 64, [3, 3], stride=2, activation_fn=tf.nn.crelu, scope='conv1x1_before2')
     
     return net

I want to name it faceboxes++ ,if u don't mind

Pretrained model can be download from:

Evaluation result on fddb

fddb

fddb
0.96

Speed: it runs over 70FPS on cpu (i7-8700K), 30FPS (i5-7200U), 140fps on gpu (2080ti) with fixed input size 512, tf2.0, multi thread. And i think the input size, the time consume and the performance is very appropriate for application :)

Hope the codes can help you, contact me if u have any question, [email protected] .

requirment

  • tensorflow2.0

  • tensorpack (data provider)

  • opencv

  • python 3.6

useage

train

  1. download widerface data from http://shuoyang1213.me/WIDERFACE/ and release the WIDER_train, WIDER_val and wider_face_split into ./WIDER,

  2. download fddb, and release FDDB-folds into ./FDDB , 2002,2003 into ./FDDB/img

  3. then run python prepare_data.pyit will produce train.txt and val.txt

    (if u like train u own data, u should prepare the data like this: ...../9_Press_Conference_Press_Conference_9_659.jpg| 483(xmin),195(ymin),735(xmax),543(ymax),1(class) ...... one line for one pic, caution! class should start from 1, 0 means bg)

  4. then, run:

    python train.py

    and if u want to check the data when training, u could set vis in train_config.py as True

finetune

  1. (if u like train u own data, u should prepare the data like this: ...../9_Press_Conference_Press_Conference_9_659.jpg| 483(xmin),195(ymin),735(xmax),543(ymax),1(class) ...... one line for one pic, caution! class should start from 1, 0 means bg)

  2. set config.MODEL.pretrained_model='./model/detector/variables/variables', in train_config.py, and the model dir structure is :

    ./model/
    ├── detector
    │   ├── saved_model.pb
    │   └── variables
    │       ├── variables.data-00000-of-00001
    │       └── variables.index
    
  3. adjust the lr policy

  4. python train.py

evaluation

    python test/fddb.py [--model [TRAINED_MODEL]] [--data_dir [DATA_DIR]]
                          [--split_dir [SPLIT_DIR]] [--result [RESULT_DIR]]
    --model              Path of the saved model,default ./model/detector
    --data_dir           Path of fddb all images
    --split_dir          Path of fddb folds
    --result             Path to save fddb results

example python model_eval/fddb.py --model model/detector --data_dir 'FDDB/img/' --split_dir FDDB/FDDB-folds/ --result 'result/'

visualization

A demo

  1. python vis.py --img_dir your_images_dir --model model/detector

  2. or use a camera: python vis.py --cam_id 0 --model model/detector

You can check the code in vis.py to make it runable, it's simple.

reference

FaceBoxes: A CPU Real-time Face Detector with High Accuracy

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