Skip to content

人脸识别API打包Docker,其中包含人脸检测 人脸检测绘制 人脸地标检测 人脸地标检测绘制 人脸编码 人脸比较

Notifications You must be signed in to change notification settings

zh3389/faceRecognitionAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

人脸识别Docker服务

采用Docker + Python + FastAPI的方式开发人脸识别服务

依赖

  • FastAPI
  • uvicorn
  • pillow
  • numpy
  • python-multipart

快速开始

环境安装

git clone 本项目地址
pip install -r requirements.txt
python app.py
# 浏览器访问文档页面
http://localhost:9002/docs

客户端

import requests

url = 'http://localhost:9002/faceapi/v1/detectBox'
files = {'imgFile': ('file', open('/path/to/file', 'rb'))}

response = requests.get(url, files=files)

print(response.text)
curl --location --request GET 'http://localhost:9002/faceapi/v1/detectBox' \
--form 'imgFile=@"/path/to/file"'

Docker打包运行

docker build -t face_recognition_service .
docker run -d -p 9002:9002 face_recognition_service:latest
浏览器打开: http://localhost:9002/docs

About

人脸识别API打包Docker,其中包含人脸检测 人脸检测绘制 人脸地标检测 人脸地标检测绘制 人脸编码 人脸比较

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published