-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(pose) migrate body parts to separate file
- Loading branch information
1 parent
bdce167
commit 1a8e7f0
Showing
3 changed files
with
69 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import body_parts |
64 changes: 64 additions & 0 deletions
64
image_recognition_pose_estimation/src/image_recognition_pose_estimation/body_parts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Yolo pose keypoint labels | ||
# 0: nose | ||
# 1: left-eye | ||
# 2: right-eye | ||
# 3: left-ear | ||
# 4: right-ear | ||
# 5: left-shoulder | ||
# 6: right-shoulder | ||
# 7: left-elbow | ||
# 8: right-elbow | ||
# 9: left-wrist | ||
# 10: right-wrist | ||
# 11: left-hip | ||
# 12: right-hip | ||
# 13: left-knee | ||
# 14: right-knee | ||
# 15: left-ankle | ||
# 16: right-ankle | ||
|
||
BODY_PARTS = { | ||
"Nose": "Nose", | ||
"LEye": "LEye", | ||
"REye": "REye", | ||
"LEar": "LEar", | ||
"REar": "REar", | ||
"LShoulder": "LShoulder", | ||
"RShoulder": "RShoulder", | ||
"LElbow": "LElbow", | ||
"RElbow": "RElbow", | ||
"LWrist": "LWrist", | ||
"RWrist": "RWrist", | ||
"LHip": "LHip", | ||
"RHip": "RHip", | ||
"LKnee": "LKnee", | ||
"RKnee": "RKnee", | ||
"LAnkle": "LAnkle", | ||
"RAnkle": "RAnkle", | ||
} | ||
|
||
BODY_PART_LINKS = [ | ||
# The lowest index first | ||
# Matches the keys of BODY_PARTS | ||
# HEAD | ||
("Nose", "LEye"), | ||
("LEye", "LEar"), | ||
("Nose", "REye"), | ||
("LEye", "REye"), | ||
("REye", "REar"), | ||
# Left side | ||
("LEar", "LShoulder"), | ||
("LShoulder", "LElbow"), | ||
("LElbow", "LWrist"), | ||
("LShoulder", "LHip"), | ||
("LHip", "LKnee"), | ||
("LKnee", "LAnkle"), | ||
|
||
# Right side | ||
("REar", "RShoulder"), | ||
("RShoulder", "RElbow"), | ||
("RElbow", "RWrist"), | ||
("RShoulder", "RHip"), | ||
("RHip", "RKnee"), | ||
("RKnee", "RAnkle"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters