Skip to content

Commit

Permalink
fix input format error
Browse files Browse the repository at this point in the history
  • Loading branch information
F committed Nov 2, 2018
1 parent c896f19 commit 1d9299d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion face_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
isSuccess,frame = cap.read()
if isSuccess:
try:
image = Image.fromarray(frame[...,::-1]) #bgr to rgb
# image = Image.fromarray(frame[...,::-1]) #bgr to rgb
image = Image.fromarray(frame)
bboxes, faces = mtcnn.align_multi(image, conf.face_limit, conf.min_face_size)
bboxes = bboxes[:,:-1] #shape:[10,4],only keep 10 highest possibiity faces
bboxes = bboxes.astype(int)
Expand Down
3 changes: 2 additions & 1 deletion infer_on_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
while cap.isOpened():
isSuccess,frame = cap.read()
if isSuccess:
image = Image.fromarray(frame[...,::-1]) #bgr to rgb
# image = Image.fromarray(frame[...,::-1]) #bgr to rgb
image = Image.fromarray(frame)
try:
bboxes, faces = mtcnn.align_multi(image, conf.face_limit, 16)
except:
Expand Down

0 comments on commit 1d9299d

Please sign in to comment.