Skip to content
Permalink
Browse files

extractor: fix for amd

  • Loading branch information...
iperov committed Oct 27, 2019
1 parent f17a54b commit 8035325f92b2565a1e5ff6bc0189108d86e27852
Showing with 7 additions and 1 deletion.
  1. +7 −1 facelib/FANExtractor.py
@@ -63,7 +63,13 @@ def extract (self, input_image, rects, second_pass_extractor=None, is_bgr=True,
images += [ self.crop(input_image, c, scale) ]

images = np.stack (images)
predicted = self.model.predict (images.astype(np.float32) / 255.0).transpose (0,3,1,2)
images = images.astype(np.float32) / 255.0

predicted = []
for i in range( len(images) ):
predicted += [ self.model.predict ( images[i][None,...] ).transpose (0,3,1,2)[0] ]

predicted = np.stack(predicted)

for i, pred in enumerate(predicted):
ptss += [ self.get_pts_from_predict ( pred, centers[i], scale) ]

0 comments on commit 8035325

Please sign in to comment.
You can’t perform that action at this time.