当前位置:网站首页>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)}}
]
效果图

边栏推荐
- [recommended by bloggers] C MVC list realizes the function of adding, deleting, modifying, checking, importing and exporting curves (with source code)
- Request object and response object analysis
- QT creator support platform
- 数据库高级学习笔记--SQL语句
- AI benchmark V5 ranking
- Navicat 導出錶生成PDM文件
- AcWing 1294. Cherry Blossom explanation
- Idea import / export settings file
- Windows下安装MongDB教程、Redis教程
- Codeforces Round #753 (Div. 3)
猜你喜欢

Django运行报错:Error loading MySQLdb module解决方法
![[recommended by bloggers] asp Net WebService background data API JSON (with source code)](/img/04/c721e6177b578b30cbbf334cb1b6c9.png)
[recommended by bloggers] asp Net WebService background data API JSON (with source code)

【博主推荐】SSM框架的后台管理系统(附源码)

How to configure flymcu (STM32 serial port download software) is shown in super detail

Windows下安装MongDB教程、Redis教程

Swagger, Yapi interface management service_ SE

MySQL master-slave replication, read-write separation

自动机器学习框架介绍与使用(flaml、h2o)

QT creator shape

neo4j安装教程
随机推荐
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
01 project demand analysis (ordering system)
Swagger、Yapi接口管理服务_SE
打开浏览器的同时会在主页外同时打开芒果TV,抖音等网站
Ansible实战系列一 _ 入门
Remember a company interview question: merge ordered arrays
LeetCode #461 汉明距离
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)
数数字游戏
Armv8-a programming guide MMU (2)
Ansible实战系列三 _ task常用命令
自动机器学习框架介绍与使用(flaml、h2o)
【博主推荐】C# Winform定时发送邮箱(附源码)
Data dictionary in C #
Windows cannot start the MySQL service (located on the local computer) error 1067 the process terminated unexpectedly
JDBC原理
Case analysis of data inconsistency caused by Pt OSC table change
neo4j安装教程
What does BSP mean
AcWing 242. A simple integer problem (tree array + difference)