Skip to content

python上使用新函数应该更快 #2

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
JiaPai12138 opened this issue Jan 1, 2022 · 0 comments
Open

python上使用新函数应该更快 #2

JiaPai12138 opened this issue Jan 1, 2022 · 0 comments

Comments

@JiaPai12138
Copy link

JiaPai12138 commented Jan 1, 2022

classes, scores, boxes = model.detect(frames, conf_thd, nms_thd)

其中model这个是来自:
net = cv2.dnn.readNetFromDarknet(CONFIG_FILE, WEIGHT_FILE) # 读取权重与配置文件

net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
model = cv2.dnn_DetectionModel(net)
model.setInputParams(size=(side_width, side_height), scale=1/255, swapRB=True)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant