Navy commited on
Commit
7a2bc25
·
1 Parent(s): 72e5b52

update docker

Browse files
Files changed (1) hide show
  1. core/defect_detection.py +6 -6
core/defect_detection.py CHANGED
@@ -96,12 +96,12 @@ def detect_defect_from_video_url(station_id, camera_id: str, video_url: str, mod
96
  frame_base64 = base64.b64encode(buffer).decode("utf-8")
97
 
98
  # Save annotated image
99
- output_dir = "outputs/images"
100
- os.makedirs(output_dir, exist_ok=True)
101
- filename = f"{station_id}_{camera_id}_NG_{datetime.now().strftime('%Y%m%d_%H%M%S')}.jpg"
102
- filepath = os.path.join(output_dir, filename)
103
- cv2.imwrite(filepath, frame)
104
- logger.info(f"[SAVED] NG image saved to {filepath}")
105
 
106
  cap.release()
107
  logger.info(f"[DETECTED] Camera {camera_id} → {defect_name} ({conf:.2f})")
 
96
  frame_base64 = base64.b64encode(buffer).decode("utf-8")
97
 
98
  # Save annotated image
99
+ # output_dir = "outputs/images"
100
+ # os.makedirs(output_dir, exist_ok=True)
101
+ # filename = f"{station_id}_{camera_id}_NG_{datetime.now().strftime('%Y%m%d_%H%M%S')}.jpg"
102
+ # filepath = os.path.join(output_dir, filename)
103
+ # cv2.imwrite(filepath, frame)
104
+ # logger.info(f"[SAVED] NG image saved to {filepath}")
105
 
106
  cap.release()
107
  logger.info(f"[DETECTED] Camera {camera_id} → {defect_name} ({conf:.2f})")