forked from interfacew/GestureMate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.py
22 lines (19 loc) · 788 Bytes
/
Main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
from TaskController import TaskController
from ValidateConfig import ValidateConfig
import mediapipe.python.solutions as sol
if __name__ == "__main__":
data_dir = r".\data"
if not os.path.exists(data_dir):
os.mkdir(data_dir)
if not os.path.exists(os.path.join(data_dir, "config.json")):
with open(os.path.join(data_dir, "config.json"), "w") as f:
f.write("[]")
with sol.holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5, model_complexity=2) as holistic:
pass
exit(0)
if not ValidateConfig(os.path.join(data_dir, "config.json")):
exit(0)
controller = TaskController()
controller.readConfig(os.path.join(data_dir, "config.json"))
controller.startListen()