Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/csrc/cpp/pose_tracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DEFINE_int32(flip, 0, "Set to 1 for flipping the input horizontally");
DEFINE_int32(show, 1, "Delay passed to `cv::waitKey` when using `cv::imshow`; -1: disable");

DEFINE_string(skeleton, "coco",
R"(Path to skeleton data or name of predefined skeletons: "coco", "coco-wholebody")");
R"(Path to skeleton data or name of predefined skeletons: "coco", "coco-wholebody", "coco-wholebody-hand")");
DEFINE_string(background, "default",
R"(Output background, "default": original image, "black": black background)");

Expand Down
21 changes: 21 additions & 0 deletions demo/csrc/cpp/utils/skeleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ const Skeleton& gSkeletonCocoWholeBody() {
return inst;
}

const Skeleton& gSkeletonCocoWholeBodyHand() {
static const Skeleton inst{
{
{0, 1}, {1, 2}, {2, 3}, {3, 4},
{0, 5}, {5, 6}, {6, 7}, {7, 8},
{0, 9}, {9, 10}, {10, 11}, {11, 12},
{0, 13}, {13, 14}, {14, 15}, {15, 16},
{0, 17}, {17, 18}, {18, 19}, {19, 20},
},
{
{255, 255, 255}, {255, 128, 0}, {255, 153, 255},
{102, 178, 255}, {255, 51, 51}, {0, 255, 0},
},
{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5,},
{0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5,},
};
return inst;
}

// n_links
// u0, v0, u1, v1, ..., un-1, vn-1
// n_palette
Expand All @@ -86,6 +105,8 @@ inline Skeleton Skeleton::get(const std::string& path) {
return gSkeletonCoco();
} else if (path == "coco-wholebody") {
return gSkeletonCocoWholeBody();
} else if (path == "coco-wholebody-hand") {
return gSkeletonCocoWholeBodyHand();
}
std::ifstream ifs(path);
if (!ifs.is_open()) {
Expand Down