Spaces:
Sleeping
Sleeping
Update services/under_construction/bridge_pier_check.py
Browse files
services/under_construction/bridge_pier_check.py
CHANGED
|
@@ -26,17 +26,6 @@ except Exception as e:
|
|
| 26 |
model = None
|
| 27 |
|
| 28 |
def process_bridge_piers(frame: np.ndarray) -> Tuple[List[Dict[str, Any]], np.ndarray]:
|
| 29 |
-
"""
|
| 30 |
-
Detect bridge piers in a video frame using YOLOv8n.
|
| 31 |
-
|
| 32 |
-
Args:
|
| 33 |
-
frame (np.ndarray): Input frame in BGR format.
|
| 34 |
-
|
| 35 |
-
Returns:
|
| 36 |
-
Tuple[List[Dict[str, Any]], np.ndarray]: A tuple containing:
|
| 37 |
-
- List of detected bridge piers.
|
| 38 |
-
- Annotated frame with bounding boxes and labels.
|
| 39 |
-
"""
|
| 40 |
# Validate input frame
|
| 41 |
if not isinstance(frame, np.ndarray) or frame.size == 0:
|
| 42 |
logging.error("Invalid input frame provided to bridge_pier_check.")
|
|
|
|
| 26 |
model = None
|
| 27 |
|
| 28 |
def process_bridge_piers(frame: np.ndarray) -> Tuple[List[Dict[str, Any]], np.ndarray]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Validate input frame
|
| 30 |
if not isinstance(frame, np.ndarray) or frame.size == 0:
|
| 31 |
logging.error("Invalid input frame provided to bridge_pier_check.")
|