ntsc207 commited on
Commit
03d7fe4
·
verified ·
1 Parent(s): 773b61b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -78,6 +78,7 @@ def yolov9_inference(model_id, img_path=None, vid_path=None, tracking_algorithm
78
  output_path, df, frame_counts_df = run(weights=model_id, imgsz=(image_size,image_size), conf_thres=conf_threshold, iou_thres=iou_threshold, source=input_path, device='0', hide_conf= True)
79
  # Assuming output_path is the path to the output file
80
  _, output_extension = os.path.splitext(output_path)
 
81
  if output_extension.lower() in img_extensions:
82
  output_image = output_path # Load the image file here
83
  output_video = None
 
78
  output_path, df, frame_counts_df = run(weights=model_id, imgsz=(image_size,image_size), conf_thres=conf_threshold, iou_thres=iou_threshold, source=input_path, device='0', hide_conf= True)
79
  # Assuming output_path is the path to the output file
80
  _, output_extension = os.path.splitext(output_path)
81
+ palette = {"Bus": "red", "Bike": "blue", "Car": "green", "Pedestrian": "yellow", "Truck": "purple"}
82
  if output_extension.lower() in img_extensions:
83
  output_image = output_path # Load the image file here
84
  output_video = None