lokesh341 commited on
Commit
3c4f6ea
·
1 Parent(s): cfb76eb

Update services/road_safety/accident_spot_check.py

Browse files
services/road_safety/accident_spot_check.py CHANGED
@@ -5,7 +5,7 @@ import os
5
 
6
  # Load YOLOv8m model
7
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
8
- MODEL_PATH = os.path.join(BASE_DIR, "../../models/yolov8m.pt")
9
  model = YOLO(MODEL_PATH)
10
 
11
  def process_accident_spots(frame):
@@ -15,7 +15,7 @@ def process_accident_spots(frame):
15
  frame: Input frame (numpy array)
16
  Returns:
17
  list: List of detected accident spots
18
- numpy array: Annotated frame
19
  """
20
  results = model(frame)
21
 
 
5
 
6
  # Load YOLOv8m model
7
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
8
+ MODEL_PATH = os.path.abspath(os.path.join(BASE_DIR, "../../models/yolov8m.pt"))
9
  model = YOLO(MODEL_PATH)
10
 
11
  def process_accident_spots(frame):
 
15
  frame: Input frame (numpy array)
16
  Returns:
17
  list: List of detected accident spots
18
+ numpy array: Annotated frame with numbered labels
19
  """
20
  results = model(frame)
21