From bcbf3492510e4677069c9cdbe343d5338876e9e0 Mon Sep 17 00:00:00 2001 From: gineshidalgo99 Date: Mon, 4 Jun 2018 22:10:31 -0400 Subject: [PATCH] COCO JSON saver works with BODY_25 --- README.md | 26 ++++++++++++++++------- doc/calibration_demo.md | 2 +- doc/release_notes.md | 2 +- src/openpose/filestream/cocoJsonSaver.cpp | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b66c6630..124a9eaf 100644 --- a/README.md +++ b/README.md @@ -14,16 +14,24 @@

-**Functionality**: - -- **Real-time multi-person keypoint detection**. - - 15 or **18-keypoint body estimation**. **Running time invariant to number of detected people**. - - **2x21-keypoint hand** estimation. Currently, **running time depends** on **number of detected people**. - - **70-keypoint face** estimation. Currently, **running time depends** on **number of detected people**. -- **Input**: Image, video, webcam, and IP camera. Included C++ demos to add your custom input. +## Features +- **Functionality**: + - **2D real-time multi-person keypoint detection**: + - 15 or **18-keypoint body keypoint estimation**. **Running time invariant to number of detected people**. + - **2x21-keypoint hand keypoint estimation**. Currently, **running time depends** on **number of detected people**. + - **70-keypoint face keypoint estimation**. Currently, **running time depends** on **number of detected people**. + - **3D real-time multi-person keypoint detection**: + - 3-D triangulation from multiple single views. + - Synchronization of Flir cameras handled. + - Compatible with Flir/Point Grey cameras, but provided C++ demos to add your custom input. + - **Calibration toolbox**: + - Easy estimation of distortion, intrinsic, and extrinsic camera parameters. +- **Input**: Image, video, webcam, Flir/Point Grey and IP camera. Included C++ demos to add your custom input. - **Output**: Basic image + keypoint display/saving (PNG, JPG, AVI, ...), keypoint saving (JSON, XML, YML, ...), and/or keypoints as array class. -- Available: command-line demo, C++ wrapper, and C++ API. - **OS**: Ubuntu (14, 16), Windows (8, 10), Mac OSX, Nvidia TX2. +- **Others**: + - Available: command-line demo, C++ wrapper, and C++ API. + - CUDA (Nvidia GPU) and CPU versions. @@ -94,6 +102,8 @@ Most users do not need the [OpenPose C++ API](#openpose-c-api), but they can sim bin\OpenPoseDemo.exe --video examples\media\video.avi ``` +- **Calibration toolbox**: To easily calibrate your cameras for 3-D OpenPose or any other stereo vision task. See [doc/calibration_demo.md](doc/calibration_demo.md). + - **OpenPose Wrapper**: If you want to read a specific input, and/or add your custom post-processing function, and/or implement your own display/saving, check the `Wrapper` tutorial on [examples/tutorial_wrapper/](examples/tutorial_wrapper/). You can create your custom code on [examples/user_code/](examples/user_code/) and quickly compile it by using `make all` in the OpenPose folder (assuming Makefile installer). - **OpenPose C++ API**: See [doc/library_introduction.md](doc/library_introduction.md). diff --git a/doc/calibration_demo.md b/doc/calibration_demo.md index 50005ea4..09c520e4 100644 --- a/doc/calibration_demo.md +++ b/doc/calibration_demo.md @@ -28,7 +28,7 @@ Check [doc/installation.md#calibration-module](./installation.md#calibration-mod Note: In order to maximize calibration quality, **do not reuse the same video sequence for both intrinsic and extrinsic parameter estimation**. The intrinsic parameter calibration should be run camera by camera, where each recorded video sequence should be focused in covering all regions of the camera view and repeated from several distances. In the extrinsic sequence, this video sequence should be focused in making sure that the checkboard is visible from at least 2 cameras at the time. So for 3-camera calibration, you would need 1 video sequence per camera as well as a final sequence for the extrinsic parameter calibration. ### General Quality Tips -1. Keep the same orientation of the chessboard, i.e., do not rotate it circularly more than ~15-30 degress. Our algorithm assumes that the origin is the corner at the top left, so rotating the chessboard circularly will change this origin across frames, resulting in many frames being rejected for the final calibration, i.e., lower calibration accuracy. +1. Keep the same orientation of the chessboard, i.e., do not rotate it circularly more than ~15-30 degress with respect to its center (i.e., going from a `w` x `h` number of squares to a `h` x `w` one). Our algorithm assumes that the origin is the corner at the top left, so rotating the chessboard circularly will change this origin across frames, resulting in many frames being rejected for the final calibration, i.e., lower calibration accuracy. 2. Cover several distances, and within each distance, cover all parts of the image view (all corners and center). 3. Save the images in PNG format (default behavior) in order to improve calibration quality. PNG images are bigger than JPG equivalent, but do not lose information by compression. 4. Use a chessboard as big as possible, ideally a chessboard with of at least 8x6 squares with a square size of at least 100 millimeters. It will specially affect the extrinsic calibration quality. diff --git a/doc/release_notes.md b/doc/release_notes.md index 2bb30acf..f6f84b43 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -211,7 +211,7 @@ OpenPose Library - Release Notes -## Current version - future OpenPose 1.3.1 +## Current version - future OpenPose 1.4.0 1. Main improvements: 1. New calibration module: Intrinsic and extrinsic camera calibration toolbox based on OpenCV. 2. Improvements involving Flir cameras: diff --git a/src/openpose/filestream/cocoJsonSaver.cpp b/src/openpose/filestream/cocoJsonSaver.cpp index 8f8ed4e7..64c51144 100644 --- a/src/openpose/filestream/cocoJsonSaver.cpp +++ b/src/openpose/filestream/cocoJsonSaver.cpp @@ -78,7 +78,7 @@ namespace op { if (numberBodyParts == 18) indexesInCocoOrder = std::vector{0, 15,14,17,16, 5,2,6,3,7, 4,11,8,12, 9, 13,10}; - else if (numberBodyParts == 19 || numberBodyParts == 59) + else if (numberBodyParts == 19 || numberBodyParts == 25 || numberBodyParts == 59) indexesInCocoOrder = std::vector{0, 16,15,18,17, 5,2,6,3,7, 4,12,9,13,10, 14,11}; else if (numberBodyParts == 23) indexesInCocoOrder = std::vector{18,21,19,22,20, 4,1,5,2,6, 3,13,8,14, 9, 15,10}; -- GitLab