Giter Club home page Giter Club logo

convolutional-pose-machine-tf's Introduction

Convolutional Pose Machine implemented with tensorflow

This model is still work in progress.

Trainable with MPI dataset.

Details are in my blog in Chinese.

CPM

Model: Convolutional Pose Machine

Please go to my site to choose the Convolutional Pose Machine model And put the model in model/ directory

Demo & Benchmark Results

50FPS@GTX960 RealTime DEMO PCKh Benchmark Result Demo

Train & model update (2018-Nov)

  • Mobile CPM is avaliable! 50FPS!! try it out!
  • Parameters in Numpy is avaliable!
  • Native Data Generator in Paralleled structures
  • More Layers and Faster R-CNN Code in side (Find your gadget in repo)
  • more functionality! like layers (Proposal Layers, Dispatch Layers, RoI Align Layer) and Regularization stuffs
  • Pretrained model avaliable in days here!

Live demo avaliable (2018-Jul)

  • Live Camera Demo
  • Offline Video Processing Demo

Live Demo

TODOs

  • Still working in benchmark (Not in this project's workflow)

Credit

@inproceedings{wei2016cpm,
    author = {Shih-En Wei and Varun Ramakrishna and Takeo Kanade and Yaser Sheikh},
    booktitle = {CVPR},
    title = {Convolutional pose machines},
    year = {2016}
}

Thanks to wbenbihi@github for his batch generator~

Author: Liu Fangrui aka mpsk
    Beijing University of Technology
        College of Computer Science & Technology

convolutional-pose-machine-tf's People

Contributors

mpskex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

convolutional-pose-machine-tf's Issues

Error when trainning.

I use my own data, but got this problem :(
[*] Model Built
Traceback (most recent call last):
File "trainCPM.py", line 38, in
model.train()
File "../net/CPM.py", line 224, in train
_train_batch = next(self.generator)
File "../dataset/datagen_para_branch.py", line 59, in generator
gen = self.datagen.generator(*args, **kwargs)
File "../dataset/datagen.py", line 459, in generator
return self._aux_generator(*args, **kwargs)
TypeError: _aux_generator() got an unexpected keyword argument 'norm'

报错 求指导

您好!
非常感谢你的分享!
我是一个刚入门的小白。在运行您的程序 predict.py 时报错了。
if name=='main':
img_names = ['test_pic.jpg']
j = predict(img_names, 'model/model.ckpt-99.data-00000-of-00001', debug=True, is_name=True)
print(j)

image

请问下,是我的参数设置的哪里有问题吗?

关于数据

你好,请问可以自己定义关键点位置和做数据么?如果可以,能给些指导么?

about trained model

hello, i find the url of trained model is invalid, can you re-upload an available link?

关于预训练模型vgg.和mobile v1的问题

看了前辈的文章和代码,我受益匪浅,十分感谢!
我看您的code在训练中使用了pretrained_model='../model/mobilev1_1.0.npy'; pretrained_model="../model/vgg19.npy"这个两个pretrained模型,但是我不知道他们在哪,看了您分享的链接,没有这两个文件,希望前辈指教

关于net的疑惑

您好!感谢您的分享!
我对net文件夹里的文件的具体含义稍微有一些疑惑:

  1. PPNnMask.py指代的是R-CNN吗?
  2. MobileCPM的结构与原本的CPM的区别在哪里呢?
    由于我是刚入门计算机视觉的新手,提出的问题可能比较粗浅,望谅解!
    再次感谢您的分享!

Unable to access the model from offered site

Hello,
Thanks for your sharing! However, the site offered for downloading your model seems to be unaccessible currently. Is it Okay for you to put them on Google or BaiduYun Drive? Thanks a lot!

train自己的数据报错

大神您好,想针对自己的问题做个尝试,有两个问题想请教您,关于MPII标注的数据结构,是否就是 picturename minbox.x minbox.y maxbox.x maxbox.y point1.x point1.y ........
另外,我自己尝试运行trainMobileCPM,发现缺少了‘import dataset.datagen_para_branch as paral’,添加后出现RuntimeError :
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

关于valPCK 问题

pck
pck0 5result

这里使用你写的valPCK 验证文件执行的结果,这个结果为什么这么高?是不是那里出现了问题了呢?

the problem in the code about crop and padding

def _crop_data(self, height, width, box, joints, boxp=0.05):
""" Automatically returns a padding vector and a bounding box given
the size of the image and a list of joints.
Args:
height : Original Height
width : Original Width
box : Bounding Box
joints : Array of joints
boxp : Box percentage (Use 20% to get a good bounding box)
"""
padding = [[0, 0], [0, 0], [0, 0]]
j = np.copy(joints)
if box[0:2] == [-1, -1]:
j[joints == -1] = 1e5
box[0], box[1] = min(j[:, 0]), min(j[:, 1])
crop_box = [box[0] - int(boxp * (box[2] - box[0])), box[1] - int(boxp * (box[3] - box[1])),
box[2] + int(boxp * (box[2] - box[0])), box[3] + int(boxp * (box[3] - box[1]))]
if crop_box[0] < 0: crop_box[0] = 0
if crop_box[1] < 0: crop_box[1] = 0
if crop_box[2] > width - 1: crop_box[2] = width - 1
if crop_box[3] > height - 1: crop_box[3] = height - 1
new_h = int(crop_box[3] - crop_box[1])
new_w = int(crop_box[2] - crop_box[0])
crop_box = [crop_box[0] + new_w // 2, crop_box[1] + new_h // 2, new_w, new_h]
if new_h > new_w:
bounds = (crop_box[0] - new_h // 2, crop_box[0] + new_h // 2)
if bounds[0] < 0:
padding[1][0] = abs(bounds[0])
if bounds[1] > width - 1:
padding[1][1] = abs(width - bounds[1])
elif new_h < new_w:
bounds = (crop_box[1] - new_w // 2, crop_box[1] + new_w // 2)
if bounds[0] < 0:
padding[0][0] = abs(bounds[0])
if bounds[1] > width - 1:
padding[0][1] = abs(height - bounds[1])
crop_box[0] += padding[1][0]
crop_box[1] += padding[0][0]
return padding, crop_box

你这里是 操作的padding[1],padding[0], 最后使用了 np.pad(padding),但是 np.pad 中的pad 参数 第一个是用来填充的数字,padding[1], padding[2]才是用来存储应该pad的最小最大扩展长度

A bug in net/CPM.py

As you said in the comment in net/CPM.py line 262, my training crashed exactly when it tries to save the ckpt file. But this is not the problem of the TF 1.10.

If you change the name of the local variable 'n' in line 238 to something else (e.g. '_n'), it works perfectly fine even with TF 1.10. Note that another variable with the same name has already been used in the line 221

训练MPII数据集

大佬可以详细说一下怎么训练mpii数据集么,下的数据集是.mat格式,就是可以详细的说一下怎么跑么

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.