ORB-HD / deface

Video anonymization by face detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"deface cam" on Mac with 1920x1080 webcam would freeze on first frame

chienlim opened this issue · comments

On Mac with 1920x1080 webcam, "deface cam" will freeze on first frame. When using an older Mac with 1280x720 webcam no issue there.

There is a fix for frame grabbing using imageio.imiter, but I am not sure how to fix for the case of imageio.imread:

For example, this line will fail on 1920x1080 webcam:

for idx, frame in enumerate(iio.imiter("<%video0%>")):

This will pass on 1920x1080 webcam:

for idx, frame in enumerate(iio.imiter("<%video0%>", size=(1280, 720))):

Please help.

Found a workaround:

Instead of this:

for frame in read_iter:

Use this:

for frame in imageio.imiter(ipath, size=(1280, 720)):