Code Monkey home page Code Monkey logo

blaze_pose's Introduction

run foot_pose_box.py to get keypoint of the cropped foot box image

run foot_pose_tfrecords.py to make tfrecords

https://arxiv.org/abs/2006.10204

Dependencies

docker 20.10.17
tensorflow 2.6.1
tensorflowjs 3.9.0
opencv 4.5.5.62

Installation

docker script

    sudo docker run -it --rm  \
      --name "tf_$USER_$(date +%Y%m%d_%H%M%S)" \
      -v /etc/group:/etc/group:ro \
      -v /etc/passwd:/etc/passwd:ro \
      -v $HOME:$HOME \
      --privileged \
      --shm-size=256m \
      --net=host \
      -e DISPLAY=$DISPLAY \
      -env="QT_X11_NO_MITSHM=1" \
      -e XDG_RUNTIME_DIR=/run/user/1000/bin/bash \
      -w=$(pwd) \
      --gpus '"device=0"' \
      tensorflow/tensorflow:2.6.1-gpu \

      /bin/bash

install dependencies

    pip install imgaug
    pip install numpy==1.23.5
    pip install silence_tensorflow
    pip install tensorflow_addons
    pip install tflite_support
    pip install tensorflowjs==3.9.0
    pip install opencv-python==4.5.5.62
    pip install pillow
    apt-get update
    apt-get -y install libgl1-mesa-glx

Execution

training

    shell command
    chmod +x train.sh
    ./train.sh

training strategy

    heatmap
        config file : configs/blazepose_cfg.py
        learning : 0.0004(~100 epoch) -> 0.00004(~150 epoch)
        howto : to change the learning, In config file(blazepose_cfg.py),
                modify 'BASE_CFG['train']['load_weight_path']' to 100 epoch checkpoint file path,
                modify BASE_CFG['train']['learning_rate']['init_learning_rate'] to next learning rate

    regression
        config file : configs/reg_cfg.py
        learning : 0.0001(~50epoch) -> 0.00001(~80epoch) -> 0.000001(~100epoch)
        howto : to start learning with regression mode, In 'train.sh' file,
                change blazepose -> blazepose_reg,
                and In config file(reg_cfg.py)
                modify 'BASE_CFG['train']['load_weight_path']' to heatmap trained checkpoint file path

                to change the learning, In config file(reg_cfg.py),
                modify 'BASE_CFG['train']['load_weight_path']' to  epoch checkpoint file path,
                modify BASE_CFG['train']['learning_rate']['init_learning_rate'] to next learning rate


convert tensorflowjs

    need to change the paths(--input_ckpt, --save_folder, )

    sudo chmod +x ./model_export/tfjs_converter.sh
    ./model_export/tfjs_converter.sh

blaze_pose's People

Stargazers

Ray Kwak avatar

Watchers

Kostas Georgiou avatar Ray Kwak 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.