【发布时间】:2025-11-28 13:00:01
【问题描述】:
请下载图片并保存为test.png。
每个人都可以看到里面有两个人,每个人都有一张完整的脸。
让python代码统计图片中的人脸数量。
from PIL import Image
import face_recognition
image = face_recognition.load_image_file('test.png')
face_locations = face_recognition.face_locations(image)
print("I found {} face(s) in this photograph.".format(len(face_locations)))
输出:
I found 1 face(s) in this photograph.
如何让 face_recognition 得到正确的人脸号码?
【问题讨论】:
标签: python-3.x face-recognition