Code Monkey home page Code Monkey logo

openpose-pytorch's Introduction

PyTorch implementation of the OpenPose

The OpenPose is one of the most popular keypoint estimator, which uses two branches of feature map (is trained and enhanced via multiple stages) to estimate (via a postprocess procedure) the position of keypoints (via Gaussian heatmap) and the relationship between keypoints (called part affinity fields), respectively. This project adopts PyTorch as the developing framework to increase productivity, and utilize ONNX to convert models into Caffe 2 to benefit engineering deployment. If you are benefited from this project, a donation will be appreciated (via PayPal, 微信支付 or 支付宝).

Designs

  • Flexible configuration design. Program settings are configurable and can be modified (via configure file overlaping (-c/--config option) or command editing (-m/--modify option)) using command line argument.

  • Monitoring via TensorBoard. Such as the loss values and the debugging images (such as IoU heatmap, ground truth and predict bounding boxes).

  • Parallel model training design. Different models are saved into different directories so that can be trained simultaneously.

  • Time-based output design. Running information (such as the model, the summaries (produced by TensorBoard), and the evaluation results) are saved periodically via a predefined time.

  • Checkpoint management. Several latest checkpoint files (.pth) are preserved in the model directory and the older ones are deleted.

  • NaN debug. When a NaN loss is detected, the running environment (data batch) and the model will be exported to analyze the reason.

  • Unified data cache design. Various dataset are converted into a unified data cache via a programmable (a series of Python lambda expressions, which means some points can be flexibly generated) configuration. Some plugins are already implemented. Such as MS COCO.

  • Arbitrarily replaceable model plugin design. The deep neural network (both the feature extraction network and the stage networks) can be easily replaced via configuration settings. Multiple models are already provided. Such as the oringal VGG like network, Inception v4, MobileNet v2 and U-Net.

  • Extendable data preprocess plugin design. The original images (in different sizes) and labels are processed via a sequence of operations to form a training batch (images with the same size, and bounding boxes list are padded). Multiple preprocess plugins are already implemented. Such as augmentation operators to process images and labels (such as random rotate and random flip) simultaneously, operators to resize both images and labels into a fixed size in a batch (such as random crop), and operators to augment images without labels (such as random blur, random saturation and random brightness).

Quick Start

This project uses Python 3. To install the dependent libraries, make sure the pyopenpose is installed, and type the following command in a terminal.

sudo pip3 install -r requirements.txt

quick_start.sh contains the examples to perform detection and evaluation. Run this script. The COCO dataset is downloaded (aria2 is required) and cached, and the original pose model (18 parts and 19 limbs) is converted into PyTorch's format. If a webcam is present, the keypoint estimation demo will be shown. Finally, the training program is started.

openpose-pytorch's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

openpose-pytorch's Issues

import error

Thank you for your work!
When I just run "python train.py -c config.ini config/original_person18_19.ini -m cache/name=cache_original model/name=model_original"
I get the following:
QQ图片20190411212218

How can I solve this?

pre-trained models

would it be possible to provide pre-trained models for the inference scripts?
Thanks!

单纯运行estimate.py报错

python3 estimate.py -c config.ini config/original_person18_19.ini -m model/name=model_original
运行这段然后报错...
Traceback (most recent call last): File "estimate.py", line 224, in <module> main() File "estimate.py", line 193, in main estimate = Estimate(args, config) File "estimate.py", line 78, in __init__ self.step, self.epoch, self.dnn, self.stages = self.load() File "estimate.py", line 102, in load path, step, epoch = utils.train.load_model(self.model_dir) File "/home/bhrgzn/openpose/openpose-pytorch/utils/train.py", line 63, in load_model step, name = max(steps, key=operator.itemgetter(0)) ValueError: max() arg is an empty sequence del Exception ignored in: <function Estimate.__del__ at 0x7f1c52b10bf8> Traceback (most recent call last): File "estimate.py", line 99, in __del__ self.cap.release() AttributeError: 'Estimate' object has no attribute 'cap'
是要-i 加摄像头id吗

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.