AI face_recognition项目
#安装
https://gist.github.com/ageitgey/629d75c1baac34dfa5ca2a1928a7aeaf
#步骤方法
face_recognition/README_Simplified_Chinese.md at master · ageitgey/face_recognition · GitHub
#Dockerfile
FROM python:3.10.3-slim-bullseye
RUN apt-get -y update
RUN apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-base-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-numpy \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
# The rest of this file just runs an example script.
# If you wanted to use this Dockerfile to run your own app instead, maybe you would do this:
# COPY . /root/your_app_or_whatever
# RUN cd /root/your_app_or_whatever && \
# pip3 install -r requirements.txt
# RUN whatever_command_you_run_to_start_your_app
#COPY . /root/face_recognition
#RUN cd /root/face_recognition && \
# pip3 install -r requirements.txt && \
# python3 setup.py install
# Add pip3 install opencv-python==4.1.2.30 if you want to run the live webcam examples
#CMD cd /root/face_recognition/examples && \
# python3 recognize_faces_in_pictures.py
执行完docker镜像后,再安装
pip3 install face_recognition
face_recognition know/ unknow/
face_detection know/
结果执行