Skip to content

Commit 3eb5672

Browse files
authored
fix: set backend and target in init (#293)
1 parent 80711ad commit 3eb5672

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/license_plate_detection_yunet/lpd_yunet.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def __init__(self, modelPath, inputSize=[320, 240], confThreshold=0.8, nmsThresh
2121

2222
# load model
2323
self.model = cv.dnn.readNet(self.model_path)
24+
# set backend and target
25+
self.model.setPreferableBackend(self.backend_id)
26+
self.model.setPreferableTarget(self.target_id)
2427
# generate anchors/priorboxes
2528
self._priorGen()
2629

0 commit comments

Comments
 (0)