GithubHelp home page GithubHelp logo

aihgf / fashionai_keypoints_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from machinelp/fashionai_keypoints_detection

0.0 2.0 0.0 91.71 MB

This my project of Fashion AI Key points detection contest.

Python 78.99% Shell 0.11% Jupyter Notebook 20.90%

fashionai_keypoints_detection's Introduction

A Pytorch implementation of Convolutional Pose Machine(CPM) and Feature Pyramid Netword(FPN) for FashionAI Key Points Detection

This code references some of the ideas of others on github and is based on the paper realtime multi-person pose estimation in CVPR'17 (Oral) . The final result is 56 on the leaderboard, and the score is 6.38%. It is not bad for me a freshman in the DeepLearning :) You can take the code as your baseline solution.

There are some visiable results as follows:

Example output of CPM + FPN with ResNet-50

You can reproduce my result by following steps.

STEP ONE

Dependency

  • Python version 3.5
  • Numpy
  • Pandas
  • PyTorch
  • cv2
  • tqdm
  • Keras(TensorFlow backend)

Data Preparation

Download FashionAI dataset and put files in such structure:

step1: make sure that your image data and annotations are in the fold 'data'.The data directory structure is as follows:

DATA_DIR/
	   |-- test/
	   |    |-- test.csv
	   |    |-- Images/
	   |    |    |-- blouse
	   |    |    |-- ...
	   |-- train/
	   |    |-- Annotations/
	   |    |    |-- train.csv
	   |    |-- Images/
	   |    |    |-- blouse
	   |    |    |-- ...
	   |-- ...

Some Pretrained model parameters download address

  1. MASK-RCNN for detecting fashion location (put the prameters file in the $ROOT/utils/)

  2. resnet-50 in Pytorch (put the prameters file in the $ROOT/detection/model/)

STEP TWO

Train your model form scratch

  1. After putting all the data in the appropriate directory. You should first run the $ROOT/code/data_preprocess.py to preprocess the raw data.

  2. For training, you can just run the $ROOT/code/train_net.py, the training process took me about 6 hours with one GPU(1080Ti). Also you can modify the $ROOT/code/config.yml just fit your environment. The parameters will be saved in the path of $ROOT/saveparameter/

  3. Also you can take my trained model parameters for pretrained model or demo test. click here to download.

Test your model and make the submit results

  1. After training your models, you should first run the $ROOT/detection/code/getRoi.sh for get the object locations information. The information will be saved in the path of $ROOT/detection/code/submit/. We set additional margin for the detection bounding box, you can midify this configration in the $ROOT/detection/code/clothes_test_ori.py/ line 228.

  2. Then you should run the $ROOT/code/submitDect.py to gain your results.

Inference

  1. There are some papers I think worthy for reading, they are:

《Realtime Multi-person Pose Estimation》

《Cascaded Pyramid Network for Multi-Person Pose Estimation》

《Attentive Fashion Grammar Network for Fashion Landmark Detection and Clothing Category Classification》

fashionai_keypoints_detection's People

Contributors

hongge831 avatar

Watchers

James Cloos avatar AIHGF 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.