tree3po commited on
Commit
18d2d1f
·
verified ·
1 Parent(s): 718ddba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -9,11 +9,11 @@ import numpy as np
9
  import uuid
10
  import spaces
11
 
12
- ver=[6,7,8,9,10,11]
13
  ltr=["n","s","m","1","x"]
14
  tsk=["","-seg","-pose","-obb","-cls"]
15
  #yolov8s.pt
16
- modin=f"yolov{ver[2]}{ltr[1]}{tsk[0]}.pt"
17
 
18
  print(modin)
19
  model = YOLO(modin)
@@ -57,6 +57,7 @@ def stream_object_detection(video):
57
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
58
  result = model(Image.fromarray(frame))[0]
59
  detections = sv.Detections.from_ultralytics(result)
 
60
  outp = draw_box(frame,detections)
61
  frame = np.array(outp)
62
  # Convert RGB to BGR
 
9
  import uuid
10
  import spaces
11
 
12
+ ver=[0,0,0,0,0,0,6,7,8,9,10,11]
13
  ltr=["n","s","m","1","x"]
14
  tsk=["","-seg","-pose","-obb","-cls"]
15
  #yolov8s.pt
16
+ modin=f"yolov{ver[11]}{ltr[1]}{tsk[0]}.pt"
17
 
18
  print(modin)
19
  model = YOLO(modin)
 
57
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
58
  result = model(Image.fromarray(frame))[0]
59
  detections = sv.Detections.from_ultralytics(result)
60
+ print(detections)
61
  outp = draw_box(frame,detections)
62
  frame = np.array(outp)
63
  # Convert RGB to BGR