Dirake commited on
Commit
cb8ea16
·
verified ·
1 Parent(s): 3024f64

Create predict.py

Browse files
Files changed (1) hide show
  1. predict.py +11 -0
predict.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import ultralytics
2
+ from ultralytics import YOLO
3
+ ultralytics.checks()
4
+ import torch
5
+
6
+ device = 'cuda'
7
+
8
+ model = YOLO("best.pt")
9
+ path ="test.mp4"
10
+
11
+ results = model.predict(source=path, show = True)