[python][原创]将yolov7检测封装成类几句代码调用

from Yolov7Manager import *

weights = './weights/yolov7-tiny.pt'
detector = Yolov7Manager(weights=weights)


img = cv2.imread('D:/test.jpg')
result_list = detector.inference_image(img)
print(result_list)
result_img = detector.draw_image(img, result_list)
cv2.imshow('result', result_img)
cv2.waitKey(0)


#detector.start_video('D:/car.mp4')

视频演示地址:将yolov7封装成一个类几句代码实现目标检测任务_哔哩哔哩_bilibili

你可能感兴趣的:(Python,python,opencv,计算机视觉)