All Projects → StevenBanama → C3ae

StevenBanama / C3ae

Licence: bsd-2-clause
C3AE implement

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to C3ae

Srnn
sliced-rnn
Stars: ✭ 462 (+696.55%)
Mutual labels:  keras-tensorflow
Otto
Otto makes machine learning an intuitive, natural language experience. 🏆 Facebook AI Hackathon winner ⭐️ #1 Trending on MadeWithML.com ⭐️ #4 Trending JavaScript Project on GitHub ⭐️ #15 Trending (All Languages) on GitHub
Stars: ✭ 894 (+1441.38%)
Mutual labels:  keras-tensorflow
Unsuprevised seg via cnn
Stars: ✭ 38 (-34.48%)
Mutual labels:  keras-tensorflow
Labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 508 (+775.86%)
Mutual labels:  keras-tensorflow
Pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 676 (+1065.52%)
Mutual labels:  keras-tensorflow
Tf Keras Surgeon
Pruning and other network surgery for trained TF.Keras models.
Stars: ✭ 25 (-56.9%)
Mutual labels:  keras-tensorflow
Predictive Maintenance Using Lstm
Example of Multiple Multivariate Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras.
Stars: ✭ 352 (+506.9%)
Mutual labels:  keras-tensorflow
Text Classification Keras
📚 Text classification library with Keras
Stars: ✭ 53 (-8.62%)
Mutual labels:  keras-tensorflow
Face Mask Detection
Face Mask Detection system based on computer vision and deep learning using OpenCV and Tensorflow/Keras
Stars: ✭ 774 (+1234.48%)
Mutual labels:  keras-tensorflow
Nhdrrnet
Keras Implementation of the paper Deep HDR Imaging via A Non-Local Network - TIP 2020
Stars: ✭ 37 (-36.21%)
Mutual labels:  keras-tensorflow
Music recommender
Music recommender using deep learning with Keras and TensorFlow
Stars: ✭ 528 (+810.34%)
Mutual labels:  keras-tensorflow
Kafka Streams Machine Learning Examples
This project contains examples which demonstrate how to deploy analytic models to mission-critical, scalable production environments leveraging Apache Kafka and its Streams API. Models are built with Python, H2O, TensorFlow, Keras, DeepLearning4 and other technologies.
Stars: ✭ 661 (+1039.66%)
Mutual labels:  keras-tensorflow
Dncnn
Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP, 2017)
Stars: ✭ 912 (+1472.41%)
Mutual labels:  keras-tensorflow
Introneuralnetworks
Introducing neural networks to predict stock prices
Stars: ✭ 486 (+737.93%)
Mutual labels:  keras-tensorflow
Keras one cycle clr
Keras callbacks for one-cycle training, cyclic learning rate (CLR) training, and learning rate range test.
Stars: ✭ 41 (-29.31%)
Mutual labels:  keras-tensorflow
Invoice
增值税发票OCR识别,使用flask微服务架构,识别type:增值税电子普通发票,增值税普通发票,增值税专用发票;识别字段为:发票代码、发票号码、开票日期、校验码、税后金额等
Stars: ✭ 381 (+556.9%)
Mutual labels:  keras-tensorflow
Deep Music Genre Classification
🎵 Using Deep Learning to Categorize Music as Time Progresses Through Spectrogram Analysis
Stars: ✭ 23 (-60.34%)
Mutual labels:  keras-tensorflow
Ds and ml projects
Data Science & Machine Learning projects and tutorials in python from beginner to advanced level.
Stars: ✭ 56 (-3.45%)
Mutual labels:  keras-tensorflow
Interp Net
Interpolation-Prediction Networks for Irregularly Sampled Time Series
Stars: ✭ 43 (-25.86%)
Mutual labels:  keras-tensorflow
Densedepth
High Quality Monocular Depth Estimation via Transfer Learning
Stars: ✭ 963 (+1560.34%)
Mutual labels:  keras-tensorflow

C3AE

This is a unofficial keras implements of c3ae for age estimation. welcome to discuss ~

--------[result]-----------------

Update History:

  • 2019-9 C3AE org
  • 2020-7 transfer to tensorflow2.1 and exposing gender branch.
    • 1.add gender prediction
    • 2.change neck
    • 3.add Mish6, GeM, Smooth label and so on.
    • 4.add utk, afad, asia dataset
    • 5.add tflite freezing
  • 2020-8 fixed bugs and add fixed-precision model
      1. remove nan weights (it may case predict as unpredict)
      1. add -fp16

Part1 age branch

source version IMDB(mae) WIKI(mae) extra change model
from papper -- 6.57 6.44 -- --
our implement c3ae-v84 6.77 6.74 change kl to focal loss without se_net model/imdb_focal_loss_c3ae_v84.h5
our implement v2 c3ae-v89 6.58 -- SE_NET + focal_loss model/c3ae_imdb_v89.h5
our implement v3 c3ae-v90 6.51 -- white norm + SE_NET + focal_loss mail to [email protected]

Part2 add gender branch

Triple-Boxes show much influence with different dataset, meanwhile the distribution plays an important role.

source version asia utk afad model
our implement v4 asia age: 5.83 gender 0.955 -- -- ./model/c3ae_model_v2_117_5.830443-0.955
our implement v4 asia+utk -- age: 5.2 gender 0.967 -- ./model/c3ae_model_v2_91_5.681206-0.949
our implement v4 asia+utk+afad age: 5.9 gender 0.9234 age: 5.789 gender: 0.9491 age: 3.61 gender: 0.9827 ./model/c3ae_model_v2_151_4.301724-0.962
our implement v4 fp16+white-norm asia+utk+afad age: 6.0 gender 0.97 age: 5.6 gender: 0.942 age: 3.72 gender: 0.987 ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973

cation: Gender annotaion of utk is opposite to wiki/imdb/asia.

**You can change weights of loss to improve age mae, [1, 20, 20].

python nets/C3AE_expand.py --white -se --source "afad" -gpu -m "fp16_white_se" -p ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973 -fp16 -test

structs

  • assets
  • dataset (you`d better put dataset into this dir.)
  • detect (MTCNN and align)
  • download.sh (bash script of downloading dataset)
  • model (pretrain model will be here)
  • nets (all tainging code)
    • C3AE.py
  • preproccessing (preprocess dataset), which contains "wiki" "imdb" "afad" "asia" "utk"

Pretrain model(a temp model)

all trainned model saved in dir named "model"

required enviroments:

numpy, tensorflow(2.1), pandas, feather, opencv, python=3.6.5

pip install -r requirements2.1.txt

numpy, tensorflow(1.8), pandas, feather, opencv, python=2.7

pip install -r requirements.txt

test

age and gender branch(only for py3 and tensorflow2+)

  • for image

    python nets/test.py -g -white -se -i assets/timg.jpg -m ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973

  • for video

    python nets/test.py -g -white -v -se -m ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973

age branch

  • for image

    python nets/test.py -se -i assets/timg.jpg -m model/c3ae_imdb_v89.h5

  • for video

    python nets/test.py -v -se -m model/c3ae_imdb_v89.h5

Preparation Datasets

download imdb/wiki dataset and then extract those data to the "./dataset/"
download wiki download imdb download asia download utk download afad

Preprocess:

>>> python preproccessing/dataset_proc.py -i ./dataset/wiki_crop --source wiki
>>> python preproccessing/dataset_proc.py -i ./dataset/imdb_crop --source imdb
>>> python preproccessing/dataset_proc.py -i ./dataset/AFAD-Full --source afad 

training:

plain net
>>> python C3AE.py -gpu -p c3ae_v16.h5 -s c3ae_v16.h5 --source imdb -w 10
with se-net and white-norm (better result)
>>> python C3AE.py -gpu -p c3ae_v16.h5 -s c3ae_v16.h5 --source imdb -w 10 -white -se
for gender and age prediction:
>>> python nets/C3AE_expand.py -se -white --source "afad" -gpu -fp16 -p ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973 

freeze tflite

python nets/C3AE_expand.py -se -white --source "asia" -gpu -fp16 -p ./model/c3ae_model_v2_fp16_white_se_132_4.208622-0.973 -fz

DETECT:

[mtcnn] (https://github.com/YYuanAnyVision/mxnet_mtcnn_face_detection): detect\align\random erasing
trible box

net struct

 params  plain_model

Q&A:

  • only 10 bins in paper: why we got 12 category: we can split it as "[0, 10, ... 110 ]" by two points!\
  • Conv5 1 * 1 * 32, has 1056 params, which mean 32 * 32 + 32. It contains a conv(1 * 1 * 32) with bias
  • feat: change [4 * 4 * 32] to [12] with 6156 params.As far as known, it may be compose of conv(6144+12) ,pooling and softmax.
  • the distribution of imdb and wiki are unbalanced, that`s why change the KL loss to focal loss
  • gender prediction: detail in nets/C3AE_expand.py

To-Do:

- 1.anchor free boundbox
- 2.add another new feathers

Reference

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