TonyCongqianWang Tony Wang commited on
Commit
84c8121
·
1 Parent(s): 167c85e

fixing bug crashing eval on widerface (#267)

Browse files

Co-authored-by: Tony Wang <[email protected]>

models/face_detection_yunet/yunet.py CHANGED
@@ -52,4 +52,4 @@ class YuNet:
52
  def infer(self, image):
53
  # Forward
54
  faces = self._model.detect(image)
55
- return np.array([]) if faces[1] is None else faces[1]
 
52
  def infer(self, image):
53
  # Forward
54
  faces = self._model.detect(image)
55
+ return np.empty(shape=(0, 5)) if faces[1] is None else faces[1]