manikandan18ramalingam commited on
Commit
64ed7d6
·
verified ·
1 Parent(s): 086fe47

Update traffic_sign_detection.py

Browse files
Files changed (1) hide show
  1. traffic_sign_detection.py +2 -2
traffic_sign_detection.py CHANGED
@@ -45,12 +45,12 @@ def detectTrafficObjects(imageFile, confidence_score):
45
  #plt.axis("off") # Hide axes
46
  #plt.show()
47
 
48
- def detectVideo(videoFile, confidence_score):
49
  # Load the video
50
  #video_path = "./Bangkok.mp4"
51
  cap = cv2.VideoCapture(videoFile)
52
 
53
- model = YOLO("yolov8n.pt", verbose=False)
54
  # Get video properties
55
  fps = int(cap.get(cv2.CAP_PROP_FPS))
56
  width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
 
45
  #plt.axis("off") # Hide axes
46
  #plt.show()
47
 
48
+ def detectTrafficVideo(videoFile, confidence_score):
49
  # Load the video
50
  #video_path = "./Bangkok.mp4"
51
  cap = cv2.VideoCapture(videoFile)
52
 
53
+ model = YOLO("./yolov8n_trained_traffic_signs.pt", verbose=False)
54
  # Get video properties
55
  fps = int(cap.get(cv2.CAP_PROP_FPS))
56
  width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))