thanks for advice
boxes,_ = mtcnn.detect(frame_pil)
...
for box in boxes:
The first error is likely because you are not checking
if boxes is not None:
for box in boxes:
1 Like