当前位置: 首页 > news >正文

读取电视剧MP4视频的每一帧,检测出现的每一个人脸并保存

检测效果还不错,就是追踪有点难做

import cv2
import mediapipe as mp
import os
from collections import defaultdict# pip install msvc-runtime# 初始化OpenCV的MultiTracker
# multi_tracker = cv2.MultiTracker_create()
# multi_tracker = cv2.legacy.MultiTracker_create()
# trackers = []# 创建Mediapipe人脸检测模型
mp_face_detection = mp.solutions.face_detection
face_detection = mp_face_detection.FaceDetection(model_selection=1  , min_detection_confidence=0.9)
# face_detection = mp_face_detection.FaceDetection()# 创建输出文件夹
output_dir = "detected_faces"
if not os.path.exists(output_dir):os.makedirs(
http://www.lryc.cn/news/501392.html

相关文章:

  • HTML前端开发-- Iconfont 矢量图库使用简介
  • 使用Allure作为测试报告生成器(Java+Selenium)
  • RocketMQ面试题合集
  • Qt初识_对象树
  • axios的get和post请求,关于携带参数相关的讲解一下
  • Vue前端开发-路由其他配置
  • 框架建设实战7——定时任务组件
  • mybatis 整合 ehcache
  • 【PlantUML系列】用例图(三)
  • 发送请求时遇到了数据库完整性约束错误 1048 Column ‘platform‘ cannot be null
  • 三菱FX3U模拟量产品的介绍
  • pdf转图片
  • Go 协程上下文切换的代价
  • HTTP 持久连接(长连接)
  • 12月10日IO
  • Composite Pattern
  • Springboot MVC
  • MySQL数据表记录增操作
  • maven报错“找不到符号“
  • python进阶-05-利用Selenium来实现动态爬虫
  • P1226 【模板】快速幂
  • 【C++】求第二大的数详细解析
  • 从零开始学TiDB(3)TiKV 持久化机制
  • Elasticsearch+Kibana+IK分词器+拼音分词器安装
  • 子网划分实例
  • 上海亚商投顾:创业板指震荡调整 机器人概念股再度爆发
  • 【C++ 20进阶(2):初始化 Initializer
  • 【重生之我在B站学MySQL】
  • Python实现中国象棋
  • LBS 开发微课堂|通过openGL ES轻松实现建筑物渲染及动画