Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ 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[9]}{ltr[1]}{tsk[
|
| 17 |
model = YOLO(modin)
|
| 18 |
annotators = ["Box","RoundBox","BoxCorner","Color",
|
| 19 |
"Circle","Dot","Triangle","Elipse","Halo",
|
|
@@ -42,7 +42,7 @@ def stream_object_detection(video):
|
|
| 42 |
detections = sv.Detections.from_ultralytics(result)
|
| 43 |
print(detections)
|
| 44 |
|
| 45 |
-
box_annotator = eval(f'sv.{annotators[
|
| 46 |
|
| 47 |
outp = box_annotator.annotate(
|
| 48 |
scene=frame.copy(),
|
|
|
|
| 13 |
ltr=["n","s","m","1","x"]
|
| 14 |
tsk=["","-seg","-pose","-obb","-cls"]
|
| 15 |
#yolov8s.pt
|
| 16 |
+
modin=f"yolov{ver[9]}{ltr[1]}{tsk[0]}.pt"
|
| 17 |
model = YOLO(modin)
|
| 18 |
annotators = ["Box","RoundBox","BoxCorner","Color",
|
| 19 |
"Circle","Dot","Triangle","Elipse","Halo",
|
|
|
|
| 42 |
detections = sv.Detections.from_ultralytics(result)
|
| 43 |
print(detections)
|
| 44 |
|
| 45 |
+
box_annotator = eval(f'sv.{annotators[0]}Annotator()')
|
| 46 |
|
| 47 |
outp = box_annotator.annotate(
|
| 48 |
scene=frame.copy(),
|