24 lines
654 B
Python
24 lines
654 B
Python
from utils.compreface_util import ComprefaceUtil
|
|
import asyncio
|
|
import os
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
image_path = "/root/robot_project/kangda-robot-backend-master/ruoyi-fastapi-backend/employee/face_images"
|
|
|
|
person_name = os.listdir(image_path)
|
|
|
|
for person in person_name:
|
|
image_list = os.listdir(os.path.join(image_path, person))
|
|
for image in image_list:
|
|
t = os.path.join(image_path, person, image)
|
|
try:
|
|
asyncio.run(ComprefaceUtil.face_addition(t, person))
|
|
except Exception as e:
|
|
print(e)
|
|
print(f"error: {person}")
|
|
|
|
# break |