Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
khiemauto committed Jan 12, 2021
1 parent 68cb254 commit ffc5da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions main_retina_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@

app = FaceRecogAPI(share_param.system, folders_path, db_folder_path)

share_param.bRunning = True

device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
print('Running on device: {}'.format(device))

Expand Down Expand Up @@ -371,7 +369,7 @@ def pushserver_thread_fun():
share_param.cam_infos, share_param.face_infos = initiation()
share_param.batch_size = len(share_param.cam_infos)
share_param.stream_queue = queue.Queue(maxsize=15*share_param.batch_size)
object_queue = queue.Queue(maxsize=15*share_param.batch_size)
share_param.object_queue = queue.Queue(maxsize=15*share_param.batch_size)
stream_threads = []
for deviceID, camURL in share_param.cam_infos.items():
stream_threads.append(threading.Thread(
Expand All @@ -381,7 +379,8 @@ def pushserver_thread_fun():
pushserver_thread = threading.Thread(target=pushserver_thread_fun, daemon=True, args=())
fileserver = socketserver.TCPServer((share_param.devconfig["FILESERVER"]["host"], share_param.devconfig["FILESERVER"]["port"]), http.server.SimpleHTTPRequestHandler)
file_thread = threading.Thread(target=fileserver.serve_forever, daemon=True, args=())


share_param.bRunning = True
file_thread.start()
for stream_thread in stream_threads:
stream_thread.start()
Expand Down
2 changes: 1 addition & 1 deletion share_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
cam_infos = {}
face_infos = {}

bRunning = True
bRunning = False

batch_size = 1
stream_queue = queue.Queue(maxsize=15*batch_size)
Expand Down

0 comments on commit ffc5da2

Please sign in to comment.