GithubHelp home page GithubHelp logo

pondjames007 / rl_pose_estimation Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 123 KB

Final Project for Vision Meets Machine Learning

Jupyter Notebook 58.00% Python 42.00%
q-learning machine-learning reinforcement-learning computer-vision python3

rl_pose_estimation's Introduction

Reinforcement Learning Multi-Person Pose Estimation

Final Project for Vision Meets Machine Learning Trying to apply Q-learning on Multi-Person Pose Estimation The goal is to use Q-learning to recognize the human action Clapping It is based on the paper CVPR'17 paper and its GitHub link.

The human action detection dataset is from NTU RGB+D dataset.

Codes

read_skeleton_file.py

Arrange skeleton data to what we need, discard some joints we don't need.

rl_qtraining.py

Apply Q-Learning on to the data, train the agent to recognize clapping.

Approaches

  • Use Traditional Q-Learning
  • Setup a game (move all skeletons) and an agent (try to do clapping)
  • Inputs: States (13 joints * 2 features(v, d) * 3 coordinates)
  • Outputs: Actions (13 * 1 * 3)
  • Model
    model = Sequential()
    model.add(Dense(hidden_size, input_shape=(2*13*3,), activation='relu'))
    model.add(Dense(hidden_size, activation='relu'))
    model.add(Dense(13*3))
    model.compile(loss='mse', optimizer='sgd')
    self.Q = model 
  • Agents remembers previous moves
  • Give reward for each action according to the frame number and do training at the end

rewards.append([[frame], [self.env.scaling_factor * pow(self.discount,self.env.max_frame - frame)*reward]])

  • Gamma (discount) = 0.95
  • Training
    def replay(self, batch_size):
        inputs, targets, rewards= self._prep_batch(batch_size)
        # the model is trained here
        print(rewards.shape)
        loss = self.Q.train_on_batch(inputs, targets)
        return loss

rl_pose_estimation's People

Contributors

pondjames007 avatar

Watchers

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