-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
30 lines (20 loc) · 856 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
23
24
25
26
27
28
29
30
import ai_cameras
import torch
from config_loader import JsonReader
def main():
loader = JsonReader('../Diploma/Diploma/Files/startup_config.json')
json = loader.read()
cam_manager = ai_cameras.CameraManager()
for path in json["Sources"]:
cam_manager.create_cam(path, json["Weights"], name=None, detect_faces=json["IsDetectFaces"],
send_time_sec=json["SendEveryXsec"], dataset_path="person_faces",
img_size=json["ImageSize"], stride=json["Stride"])
cam_manager.run_all()
print(cam_manager.n_alive_cam_threads())
# cam = ai_cameras.Camera()
# cam = ai_cameras.Camera()
# cam.run()
# # Press the green button in the gutter to run the script.
if __name__ == '__main__':
main()
# See PyCharm help at https://www.jetbrains.com/help/pycharm/