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

Update traffic_sign_detection.py

Browse files
Files changed (1) hide show
  1. traffic_sign_detection.py +2 -2
traffic_sign_detection.py CHANGED
@@ -15,7 +15,7 @@ def detectTrafficObjects(imageFile, confidence_score):
15
  model = YOLO("./yolov8n_trained_traffic_signs.pt") # Use other variants like yolov8s.pt for better accuracy
16
 
17
  # Define a custom directory to save the results
18
- custom_save_dir = f"./"
19
 
20
  custom_read_dir = "./"
21
 
@@ -35,7 +35,7 @@ def detectTrafficObjects(imageFile, confidence_score):
35
  output_path = f"{current_path}/output"
36
  #shutil.move(results[0].save_path, output_path)
37
  # Path to the saved image in the custom directory
38
- image_path = f"{imageFile}"
39
 
40
  # Load and display the image
41
  img = mpimg.imread(image_path)
 
15
  model = YOLO("./yolov8n_trained_traffic_signs.pt") # Use other variants like yolov8s.pt for better accuracy
16
 
17
  # Define a custom directory to save the results
18
+ custom_save_dir = f"/app/runs/detect/predict"
19
 
20
  custom_read_dir = "./"
21
 
 
35
  output_path = f"{current_path}/output"
36
  #shutil.move(results[0].save_path, output_path)
37
  # Path to the saved image in the custom directory
38
+ image_path = f"{custom_save_dir}/{imageFile}"
39
 
40
  # Load and display the image
41
  img = mpimg.imread(image_path)