@@ -27,7 +27,7 @@ def setBackendAndTarget(self, backendId, targetId):
2727 self ._model .setPreferableBackend (self ._backendId )
2828 self ._model .setPreferableTarget (self ._targetId )
2929
30- def _preprocess (self , image , points , lables ):
30+ def _preprocess (self , image , points , labels ):
3131
3232 image = cv .cvtColor (image , cv .COLOR_BGR2RGB )
3333 # record the input image size, (width, height)
@@ -46,17 +46,17 @@ def _preprocess(self, image, points, lables):
4646
4747 points_blob = np .array ([[points ]], dtype = np .float32 )
4848
49- lables_blob = np .array ([[[lables ]]])
49+ labels_blob = np .array ([[[labels ]]])
5050
51- return image_blob , points_blob , lables_blob
51+ return image_blob , points_blob , labels_blob
5252
53- def infer (self , image , points , lables ):
53+ def infer (self , image , points , labels ):
5454 # Preprocess
55- imageBlob , pointsBlob , lablesBlob = self ._preprocess (image , points , lables )
55+ imageBlob , pointsBlob , labelsBlob = self ._preprocess (image , points , labels )
5656 # Forward
5757 self ._model .setInput (imageBlob , self ._inputNames [0 ])
5858 self ._model .setInput (pointsBlob , self ._inputNames [1 ])
59- self ._model .setInput (lablesBlob , self ._inputNames [2 ])
59+ self ._model .setInput (labelsBlob , self ._inputNames [2 ])
6060 outputBlob = self ._model .forward ()
6161 # Postprocess
6262 results = self ._postprocess (outputBlob )
0 commit comments