启用Thumbor使用AWS重新识别运行人脸检测
thumbor_rekognition的Python项目详细描述
启用Thumbor以使用AWS重新识别运行人脸检测
thumbor是一种智能图像服务。它支持按需种植, 图像的大小调整和翻转。它还具有智能检测 使用 opencv人脸检测算法。
AWS Rekognition可以使用复杂的 基于深度学习的视觉搜索和图像分类。
拇指指认有助于使用aws指认服务做面部表情 拇指容易被发现。
安装
pip install thumbor_rekognition
启用检测器
将thumbor_rekognition添加到thumbor.conf中。不包括 拇指是开箱即用的面部检测仪。
DETECTORS=[# Do not use out-of-box face detector# 'thumbor.detectors.face_detector',# Include thumbor_rekognition'thumbor_rekognition','thumbor.detectors.feature_detector',]
上面的配置告诉thumbor它应该运行两个面部 检测和特征检测。它们相互排斥, 这意味着如果检测到人脸,则不会运行特征检测器。
AWS重新命名
认证
身份验证由botocore处理,请参见Boto3 documentation。
区域
若要设置区域以使用重新登录服务,请添加REKOGNITION_REGION 给你的thumbor.conf。默认值是us-east-1。
# AWS region for the Rekognition serviceREKOGNITION_REGION='us-west-2'
使用它
安装Thumbor_Rekognition后,可以使用 以下URL。
http://<thumbor>:<port>/unsafe/300x300/smart/my.domain.com/picture.png
如果你想知道拇指在你的图像中看到了什么,请预先准备 /debug到所有参数。
http://<thumbor>:<port>/unsafe/debug/300x300/smart/my.domain.com/picture.png