|
@@ -26,7 +26,7 @@ async def upload_image(session, url, payload, files):
|
|
|
|
|
|
async def process_stream():
|
|
|
logger.info("====== Start Server =======")
|
|
|
- human_model_path = "models/work_clo_person_head_hat.pt"
|
|
|
+ human_model_path = "models/yolo11m.pt"
|
|
|
door_model_path = "models/door_classify.pt"
|
|
|
test_area = [[(222, 59), (432, 3), (528, 96), (318, 198)]]
|
|
|
|
|
@@ -40,10 +40,11 @@ async def process_stream():
|
|
|
for frame, ret in stream():
|
|
|
if not ret:
|
|
|
continue
|
|
|
-
|
|
|
+ if time.time() - posttime < 30:
|
|
|
+ continue
|
|
|
image = frame.copy()
|
|
|
result = instance(image)
|
|
|
- if len(result) > 0 and time.time() - posttime > 30:
|
|
|
+ if len(result) > 0:
|
|
|
try:
|
|
|
posttime = time.time()
|
|
|
videoTime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())
|