Dev
This commit is contained in:
17
export_json.py
Normal file
17
export_json.py
Normal 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")
|
||||
Reference in New Issue
Block a user