提交 29b6697d 编写于 作者: G gineshidalgo99

Json naming renamed

上级 8c7a49b7
......@@ -20,18 +20,23 @@ OpenPose Demo - Output
There are 2 alternatives to save the OpenPose output.
1. The `write_json` flag saves the people pose data using a custom JSON writer. Each JSON file has a `people` array of objects, where each object has:
1. An array `pose_keypoints` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `keypoint_scale`, while `c` is the confidence score in the range [0,1].
2. The arrays `face_keypoints`, `hand_left_keypoints`, and `hand_right_keypoints`, analogous to `pose_keypoints`.
3. The body part candidates before being assembled into people (if `--part_candidates` is enabled).
1. An array `pose_keypoints_2d` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `keypoint_scale`, while `c` is the confidence score in the range [0,1].
2. The arrays `face_keypoints_2d`, `hand_left_keypoints_2d`, and `hand_right_keypoints_2d`, analogous to `pose_keypoints_2d`.
3. The analogous 3-D arrays `body_keypoints_3d`, `face_keypoints_3d`, `hand_left_keypoints_2d`, and `hand_right_keypoints_2d` (if `--3d` is enabled, otherwise they will be empty).
4. The body part candidates before being assembled into people (if `--part_candidates` is enabled).
```
{
"version":1.1,
"people":[
{
"pose_keypoints":[582.349,507.866,0.845918,746.975,631.307,0.587007,...],
"face_keypoints":[468.725,715.636,0.189116,554.963,652.863,0.665039,...],
"hand_left_keypoints":[746.975,631.307,0.587007,615.659,617.567,0.377899,...],
"hand_right_keypoints":[617.581,472.65,0.797508,0,0,0,723.431,462.783,0.88765,...]
"pose_keypoints_2d":[582.349,507.866,0.845918,746.975,631.307,0.587007,...],
"face_keypoints_2d":[468.725,715.636,0.189116,554.963,652.863,0.665039,...],
"hand_left_keypoints_2d":[746.975,631.307,0.587007,615.659,617.567,0.377899,...],
"hand_right_keypoints_2d":[617.581,472.65,0.797508,0,0,0,723.431,462.783,0.88765,...]
"pose_keypoints_3d":[582.349,507.866,507.866,0.845918,507.866,746.975,631.307,0.587007,...],
"face_keypoints_3d":[468.725,715.636,715.636,0.189116,715.636,554.963,652.863,0.665039,...],
"hand_left_keypoints_3d":[746.975,631.307,631.307,0.587007,631.307,615.659,617.567,0.377899,...],
"hand_right_keypoints_3d":[617.581,472.65,472.65,0.797508,472.65,0,0,0,723.431,462.783,0.88765,...]
}
],
// If `--part_candidates` enabled
......
......@@ -135,7 +135,7 @@ build\x64\Release\OpenPoseDemo.exe --flir_camera --3d --number_people_max 1 --fa
```
# Ubuntu (same flags for Windows version)
# Note: saving in PNG rather than JPG will improve image quality, but slow down FPS (depending on hard disk writing speed and camera number)
./build/examples/openpose/openpose.bin --flir_camera --num_gpu 0 --write_images output_folder_path/
./build/examples/openpose/openpose.bin --flir_camera --num_gpu 0 --write_images output_folder_path/ --write_images_format jpg
```
4. Reading and processing previouly saved stereo camera images
......
......@@ -191,6 +191,7 @@ OpenPose Library - Release Notes
2. Functions or parameters renamed:
1. Flag `no_display` renamed as `display`, able to select between `NoDisplay`, `Display2D`, `Display3D`, and `DisplayAll`.
2. 3-D reconstruction demo is now inside the OpenPose demo binary.
3. Renamed `*_keypoints` by `*_keypoints_2d` to avoid confusion with 3d ones in `--write_json` output file.
3. Main bugs fixed:
1. Slight speed up (~1%) for performing the non-maximum suppression stage only in the body part heatmaps channels, and not also in the PAF channels.
2. Fixed core-dumped in PoseRenderer with GUI when changed element to be rendered to something else than skeleton.
......
......@@ -67,10 +67,10 @@ namespace op
const std::vector<std::pair<Array<float>, std::string>> keypointVector{
// 2D
std::make_pair(tDatum.poseKeypoints, "pose_keypoints"),
std::make_pair(tDatum.faceKeypoints, "face_keypoints"),
std::make_pair(tDatum.handKeypoints[0], "hand_left_keypoints"),
std::make_pair(tDatum.handKeypoints[1], "hand_right_keypoints"),
std::make_pair(tDatum.poseKeypoints, "pose_keypoints_2d"),
std::make_pair(tDatum.faceKeypoints, "face_keypoints_2d"),
std::make_pair(tDatum.handKeypoints[0], "hand_left_keypoints_2d"),
std::make_pair(tDatum.handKeypoints[1], "hand_right_keypoints_2d"),
// 3D
std::make_pair(tDatum.poseKeypoints3D, "pose_keypoints_3d"),
std::make_pair(tDatum.faceKeypoints3D, "face_keypoints_3d"),
......
......@@ -137,6 +137,7 @@ namespace op
}
}
// 3D reconstruction
keypoints3D.reset({ 1, numberBodyParts, 4 }, 0);
if (!xyPoints.empty())
{
// Do 3D reconstruction
......@@ -154,7 +155,6 @@ namespace op
// cv::Mat reconstructedPoints{4, firstcv::Points.size(), CV_64F};
// cv::triangulatecv::Points(cv::Mat::eye(3,4, CV_64F), M_3_1, firstcv::Points, secondcv::Points,
// reconstructedcv::Points);
keypoints3D.reset({ 1, numberBodyParts, 4 }, 0);
const auto lastChannelLength = keypoints3D.getSize(2);
for (auto index = 0u; index < indexesUsed.size(); index++)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册