lokesh341 commited on
Commit
801c01b
·
1 Parent(s): 5248991

Update services/operations_maintenance/crack_detection.py

Browse files
services/operations_maintenance/crack_detection.py CHANGED
@@ -27,15 +27,6 @@ except Exception as e:
27
  model = None
28
 
29
  def detect_cracks_and_objects(frame: np.ndarray) -> List[Dict[str, Any]]:
30
- """
31
- Detect cracks and other objects in a video frame using YOLOv8m.
32
-
33
- Args:
34
- frame (np.ndarray): Input frame in BGR format.
35
-
36
- Returns:
37
- List[Dict[str, Any]]: List of detected items with type, label, confidence, coordinates, and severity.
38
- """
39
  # Validate input frame
40
  if not isinstance(frame, np.ndarray) or frame.size == 0:
41
  logging.error("Invalid input frame provided to crack_detection.")
 
27
  model = None
28
 
29
  def detect_cracks_and_objects(frame: np.ndarray) -> List[Dict[str, Any]]:
 
 
 
 
 
 
 
 
 
30
  # Validate input frame
31
  if not isinstance(frame, np.ndarray) or frame.size == 0:
32
  logging.error("Invalid input frame provided to crack_detection.")