当前位置:网站首页>MTCNN人脸检测
MTCNN人脸检测
2022-07-06 09:14:00 【imxlw00】
MTCNN可实现两个任务——人脸检测与人脸关键点检测。
MTCNN已经集成到了python的库中。
安装
注意:安装前需要确认以下依赖:
python >= 3.4
opencv >= 4.1
Keras>=2.0.0
pip install mtcnn
人脸检测
from mtcnn import MTCNN
import cv2
img=cv2.imread("../datas/face/ldh2.jpg")
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
detector = MTCNN()
face =detector.detect_faces(img)
print(face)
[
{‘box’: [162, 72, 226, 281],
‘confidence’: 0.9999822378158569,
‘keypoints’: {‘left_eye’: (236, 190), ‘right_eye’: (335, 179), ‘nose’: (296, 248), ‘mouth_left’: (254, 291), ‘mouth_right’: (331, 282)}}
]
效果图
边栏推荐
- Did you forget to register or load this tag 报错解决方法
- 自动机器学习框架介绍与使用(flaml、h2o)
- Introduction to the easy copy module
- Number game
- MySQL主從複制、讀寫分離
- [AGC009D]Uninity
- [recommended by bloggers] C # generate a good-looking QR code (with source code)
- 记某公司面试算法题:查找一个有序数组某个数字出现的次数
- L2-004 这是二叉搜索树吗? (25 分)
- MySQL completely uninstalled (windows, MAC, Linux)
猜你喜欢
AcWing 242. A simple integer problem (tree array + difference)
Case analysis of data inconsistency caused by Pt OSC table change
Cookie setting three-day secret free login (run tutorial)
[蓝桥杯2017初赛]方格分割
Classes in C #
QT creator shape
Did you forget to register or load this tag 报错解决方法
软件测试与质量学习笔记3--白盒测试
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
自动机器学习框架介绍与使用(flaml、h2o)
随机推荐
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
L2-001 紧急救援 (25 分)
【博主推荐】C# Winform定时发送邮箱(附源码)
图片上色项目 —— Deoldify
AcWing 179. Factorial decomposition problem solution
QT creator create button
[recommended by bloggers] C # generate a good-looking QR code (with source code)
Idea import / export settings file
数据库高级学习笔记--SQL语句
What does BSP mean
Case analysis of data inconsistency caused by Pt OSC table change
Ansible实战系列一 _ 入门
AcWing 1298. Solution to Cao Chong's pig raising problem
SSM integrated notes easy to understand version
Ansible practical Series II_ Getting started with Playbook
Remember a company interview question: merge ordered arrays
Kept VRRP script, preemptive delay, VIP unicast details
QT creator uses Valgrind code analysis tool
Rhcsa certification exam exercise (configured on the first host)
Project practice - background employee information management (add, delete, modify, check, login and exit)