This commit is contained in:
Victor Mylle
2023-03-26 19:40:47 +00:00
parent 883ea5d631
commit e13f365d81
24 changed files with 2562 additions and 734 deletions

17
export_json.py Normal file
View File

@@ -0,0 +1,17 @@
import json
from src.identifiers import HAND_LANDMARKS, POSE_LANDMARKS
def export_json(pose_landmarks, hand_landmarks, filename):
l = {
"pose_landmarks": list(pose_landmarks.values()),
"hand_landmarks": list(hand_landmarks.values())
}
# write l to filename
with open(filename, 'w') as f:
json.dump(l, f)
export_json(POSE_LANDMARKS, HAND_LANDMARKS, "landmarks.json")