Update traffic_sign_detection.py
Browse files
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
|
| 49 |
# Load the video
|
| 50 |
#video_path = "./Bangkok.mp4"
|
| 51 |
cap = cv2.VideoCapture(videoFile)
|
| 52 |
|
| 53 |
-
model = YOLO("
|
| 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))
|