Skip to content

Commit 0eba8b1

Browse files
committed
fix truth value of of numpy array
when --input_crop arg is given, it is throwing error with "truth value of an array with more than on element ambiguous". since already there is check for crop_size>0 I I guess .any() should be sufficient. Signed-off-by: Ambica Pramod <[email protected]>
1 parent 809020a commit 0eba8b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demos/face_recognition_demo/python/face_recognition_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def main():
228228
if frame_num == 0:
229229
raise ValueError("Can't read an image from the input")
230230
break
231-
if input_crop:
231+
if input_crop it not None:
232232
frame = center_crop(frame, input_crop)
233233
if frame_num == 0:
234234
output_transform = OutputTransform(frame.shape[:2], args.output_resolution)

0 commit comments

Comments
 (0)