mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
first commit
This commit is contained in:
10
demo/python/vision/yolov5.py
Normal file
10
demo/python/vision/yolov5.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import fastdeploy as fd
|
||||
import cv2
|
||||
|
||||
# 获取模型 和 测试图片
|
||||
# wget https://github.com/ultralytics/yolov5/releases/download/v6.0/yolov5s.onnx
|
||||
# wget https://raw.githubusercontent.com/ultralytics/yolov5/master/data/images/bus.jpg
|
||||
model = fd.vision.ultralytics.YOLOv5("yolov5s.onnx")
|
||||
im = cv2.imread("bus.jpg")
|
||||
result = model.predict(im, conf_threshold=0.25, nms_iou_threshold=0.5)
|
||||
print(result)
|
Reference in New Issue
Block a user