All Projects → tucan9389 → Tf2 Mobile 2d Single Pose Estimation

tucan9389 / Tf2 Mobile 2d Single Pose Estimation

Licence: apache-2.0
💃 Pose estimation for iOS and android using TensorFlow 2.0

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tf2 Mobile 2d Single Pose Estimation

Tf Pose Estimation
Deep Pose Estimation implemented using Tensorflow with Custom Architectures for fast inference.
Stars: ✭ 3,856 (+3060.66%)
Mutual labels:  pose-estimation, mobile
Tensorflow realtime multi Person pose estimation
Multi-Person Pose Estimation project for Tensorflow 2.0 with a small and fast model based on MobilenetV3
Stars: ✭ 129 (+5.74%)
Mutual labels:  pose-estimation, mobile
Go Gtp
GTP(GPRS Tunneling Protocol) implemented in pure Golang.
Stars: ✭ 116 (-4.92%)
Mutual labels:  mobile
Dom7
Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
Stars: ✭ 119 (-2.46%)
Mutual labels:  mobile
Mentorship Android
Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the Android application of this project.
Stars: ✭ 117 (-4.1%)
Mutual labels:  mobile
Couchbase Lite Ios
Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps.
Stars: ✭ 1,532 (+1155.74%)
Mutual labels:  mobile
Calendar
📆 calendar 日历
Stars: ✭ 119 (-2.46%)
Mutual labels:  mobile
Swiftlysalesforce
The swiftest way to build iOS apps that connect to Salesforce
Stars: ✭ 115 (-5.74%)
Mutual labels:  mobile
Flutter app sample
flutter app sample
Stars: ✭ 120 (-1.64%)
Mutual labels:  mobile
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (-4.1%)
Mutual labels:  mobile
Koom
KOOM is an OOM killer on mobile platform by Kwai.
Stars: ✭ 2,247 (+1741.8%)
Mutual labels:  mobile
Truffle Shuffle
An Android data-driven, percentage-based UI Card Gallery Library
Stars: ✭ 117 (-4.1%)
Mutual labels:  mobile
Tenginekit
TengineKit - Free, Fast, Easy, Real-Time Face Detection & Face Landmarks & Face Attributes & Hand Detection & Hand Landmarks & Body Detection & Body Landmarks & Iris Landmarks & Yolov5 SDK On Mobile.
Stars: ✭ 2,103 (+1623.77%)
Mutual labels:  mobile
Chainer Pose Proposal Net
Chainer implementation of Pose Proposal Networks
Stars: ✭ 119 (-2.46%)
Mutual labels:  pose-estimation
Mobile Threat Catalogue
NIST/NCCoE Mobile Threat Catalogue
Stars: ✭ 116 (-4.92%)
Mutual labels:  mobile
Quickmenu
The new era of mobile navigation for the web, we're out of hamburgers.
Stars: ✭ 119 (-2.46%)
Mutual labels:  mobile
Bodyweight Fitness Ios
Bodyweight Fitness (iOS)
Stars: ✭ 115 (-5.74%)
Mutual labels:  mobile
Eruda
Console for mobile browsers
Stars: ✭ 11,547 (+9364.75%)
Mutual labels:  mobile
Model2app
Turn your Swift data model into a working CRUD app.
Stars: ✭ 118 (-3.28%)
Mutual labels:  mobile
Pleaserotate.js
🔄 Politely ask your users to view your mobile website in portrait or landscape mode
Stars: ✭ 121 (-0.82%)
Mutual labels:  mobile

💃 Mobile 2D Single Person (Or Your Own Object) Pose Estimation for TensorFlow 2.0

This repository is forked from edvardHua/PoseEstimationForMobile when the original repository was closed.
edvardHua/PoseEstimationForMobile repository is reopened! I'll maintain it separately. 👍

This repository currently implemented the Hourglass model using TensorFlow 2.0 with Keras API.

Table of contents

Goals

  • 📚 Easy to train
  • 🏃‍ Easy to use the model on mobile device

Getting Started

Install Anaconda (~10 min)

Create Virtual Environment (~2 min)

Create new environment.

conda create -n {env_name} python={python_version} anaconda
# in my case
# conda create -n mpe-env-tf2-alpha0 python=3.7 anaconda

Start the environment.

source activate {env_name}
# in my case
# source activate mpe-env-tf2-alpha0

Install the requirements (~1 min)

cd {tf2-mobile-pose-estimation_path}
pip install -r requirements.txt
pip install git+https://github.com/philferriere/=PythonAPI
Download original COCO dataset.

Download original COCO dataset

Special script that will help you to download and unpack needed COCO datasets. Please fill COCO_DATASET_PATH with path that is used in current version of repository. You can check needed path in file train.py

Warning Your system should have approximately 40gb of free space for datasets

python downloader.py --download-path=COCO_DATASET_PATH

Run The Project

In order to use the project you have to:

  1. Prepare the dataset(ai_challenger dataset) and unzip.
  2. Run the model using:
python train.py \
--dataset_config config/dataset/coco_single_person_only-gpu.cfg \
--experiment_config config/training/coco_single_experiment01-cpm-sg4-gpu.cfg

Compatiable Datasets

Dataset Name Doanload Size Number of images
train/valid
Number of Keypoints Note
ai challenge google drive 2GB 22k/1.5k 14 default dataset of this repo
coco single person only google drive 4GB 25k/1k 17 filtered by showing only one person in an image which is from coco 2017 keypoint dataset
  • ai challenge's keypoint names: ['top_head', 'neck', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle']
  • coco's keypoint names: ['nose', 'left_eye', 'right_eye', 'left_ear', 'right_ear', 'left_shoulder', 'right_shoulder', 'left_elbow', 'right_elbow', 'left_wrist', 'right_wrist', 'left_hip', 'right_hip', 'left_knee', 'right_knee', 'left_ankle', 'right_ankle']

Results

AI Challenge Dataset

Model Name Backbone Stage Or Depth [email protected] Size Total Epoch Total Training Time Note
MobileNetV2 based CPM cpm-b0 Stage 1 .. .. .. .. Default CPM
MobileNetV2 based CPM cpm-b0 Stage 2 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 3 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 4 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 5 .. .. .. ..
MobileNetV2 based Hourglass hg-b0 Depth 4 .. .. .. .. Default Hourglass

COCO Single persononly Dataset

Model Name Backbone Stage Or Depth OKS Size Total Epoch Total Training Time Note
MobileNetV2 based CPM cpm-b0 Stage 1 .. .. .. .. Default CPM
MobileNetV2 based CPM cpm-b0 Stage 2 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 3 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 4 .. .. .. ..
MobileNetV2 based CPM cpm-b0 Stage 5 .. .. .. ..
MobileNetV2 based Hourglass hg-b0 Depth 4 .. .. .. .. Default Hourglass

Converting To Mobile Model

TensorFLow Lite

If you train the model, it will create tflite models per evaluation step.

Core ML

Check convert_to_coreml.py script. The converted .mlmodel support iOS14+.

Details

This section will be separated to other .md file.

Folder Structure

tf2-mobile-pose-estimation
├── config
|   ├── model_config.py
|   └── train_config.py
├── data_loader
|   ├── data_loader.py
|   ├── dataset_augment.py
|   ├── dataset_prepare.py
|   └── pose_image_processor.py
├── models
|   ├── common.py
|   ├── mobilenet.py
|   ├── mobilenetv2.py
|   ├── mobilenetv3.py
|   ├── resnet.py
|   ├── resneta.py
|   ├── resnetd.py
|   ├── senet.py
|   ├── simplepose_coco.py
|   └── simpleposemobile_coco.py
├── train.py            - the main training script
├── common.py 
├── requirements.txt
└── outputs             - this folder will be generated automatically when start training
    ├── 20200312-sp-ai_challenger
    |   ├── saved_model
    |   └── image_results
    └── 20200312-sp-ai_challenger
        └── ...

My SSD    
└── datasets            - this folder contains the datasets of the project.
    └── ai_challenger
        ├── train.json
        ├── valid.json
        ├── train
        └── valid

TODO

  • Save model to saved_model
  • Convert the model(saved_model) to TFLite model(.tflite)
  • Convert the model(saved_model) to Core ML model(.mlmodel)
  • Run the model on iOS
  • Release 1.0 models
  • Support distributed GPUs training
  • Make DEMO gif running on mobile device
  • Run the model on Android

Reference

[1] Paper of Convolutional Pose Machines
[2] Paper of Stack Hourglass
[3] Paper of MobileNet V2
[4] Repository PoseEstimation-CoreML
[5] Repository of tf-pose-estimation
[6] Devlope guide of TensorFlow Lite
[7] Mace documentation

Related Projects

Other Pose Estimation Projects

Contributing

This section will be separated to other .md file.

Any contributions are welcome including improving the project.

License

Apache License 2.0

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