root
......@@ -113,7 +113,7 @@ class Client(tk.Frame):
if (x2-x1) * (y2-y1) < 15000:
# 얼굴 해상도가 너무 낮으면 무시
continue
image = frame
image = frame[int(y1):int(y2), int(x1):int(x2)]
image_list.append(image)
# MTCNN 데이터 저장
face_list.append(face.numpy())
......@@ -168,10 +168,11 @@ class Client(tk.Frame):
self.logging('출석확인: ' + data['student_id'])
asyncio.ensure_future(self.set_rectangle())
else:
if data['status'] == 'fail':
send = json.dumps({'action': 'save_image', 'image': image.tolist()})
await websocket.send(send)
elif data['status'] == 'already':
# 이미지 DB에 저장, 일단 보류
#if data['status'] == 'fail':
# send = json.dumps({'action': 'save_image', 'image': image.tolist()})
# await websocket.send(send)
if data['status'] == 'already':
asyncio.ensure_future(self.set_rectangle())
except Exception as e:
self.logging(e)
......