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

wordpress支持移动合肥seo优化排名公司

wordpress支持移动,合肥seo优化排名公司,网页设计英文,wordpress怎么登入目录 一、如何实现CNN人脸识别 1、CNN核心概念 1)卷积层 2)池化层 3)激活函数 4)全连接层 2、步骤 1)加载预训练的人脸识别模型 2)读取图像并检测人脸 3)提取人脸特征向量 4&#xf…

目录

一、如何实现CNN人脸识别

1、CNN核心概念

1)卷积层

2)池化层

3)激活函数

4)全连接层

2、步骤

1)加载预训练的人脸识别模型

2)读取图像并检测人脸

3)提取人脸特征向量

4)比较相似度

二、案例实现

1、完整代码

运行结果:


一、如何实现CNN人脸识别

1、CNN核心概念

        1)卷积层

                卷积层是CNN的核心组成部分之一,它通过应用一组卷积核(也称为滤波器)在输入图像上滑动,提取图像的局部特征。每个卷积核会对图像进行卷积操作,得到一个输出特征图。

        2)池化层

                池化层用于对卷积层输出的特征图进行下采样,减少特征图的尺寸和参数数量。常见的池化操作有最大值池化(Max Pooling)和平均值池化(Average Pooling)。

        3)激活函数

                在卷积层或全连接层之后,通常使用非线性激活函数来引入非线性关系。常见的激活函数有ReLU函数、Sigmoid函数和Tanh函数等。

        4)全连接层

                全连接层将前面的卷积层或池化层输出的特征图展平,并与相邻层的所有神经元进行全连接操作。它的作用是将提取到的特征进行分类或回归预测。

2、步骤

        1)加载预训练的人脸识别模型

                Dlib提供了一个预训练的人脸识别模型,可以在下载并安装Dlib库后找到。

        2)读取图像并检测人脸

                使用Dlib库提供的人脸检测器来检测输入图像中的人脸,并将每个检测到的人脸提取为一个矩形框。

        3)提取人脸特征向量

                使用CNN模型对每个检测到的人脸图像进行特征提取,得到一个固定长度的向量表示每个人脸。

        4)比较相似度

                使用提取的人脸特征向量来比较不同人脸之间的相似度。可以使用欧氏距离或余弦相似度等度量方法来计算相似度分数。

二、案例实现

1、完整代码

import dlib
import cv2# opencv可以直接通过retnet来读取神经网络。dlib也可以的。
cnn_face_detector = dlib.cnn_face_detection_model_v1("mmod_human_face_detector.dat")  # 加载预训练的卷积神经网络模型,文件内包含检测人脸所需的权重和配置img = cv2.imread("people3.png")  # 读取待识别人脸图片faces = cnn_face_detector(img,1)  # 调用卷积神经网络检测模型对img图像检测人脸,1表示上采样次数为1for d in faces:  # 遍历识别到的每一个人脸# 计算每个人脸的位置rect = d.rect   # 获取当前人脸的矩形框对象,返回两个坐标,左上右下left = rect.left()  # 左边界x坐标top = rect.top()   # 上边界y坐标right = rect.right()   # 右边界xbottom = rect.bottom()   # 下边界y# 绘制人脸对应的矩形框pt1:(left, top)cv2.rectangle(img,(left,top),(right,bottom),(0,255,0), 3)cv2.imshow("result",img)
k = cv2.waitKey()
cv2.destroyAllWindows()
        运行结果:


文章转载自:
http://dinncolittoral.bkqw.cn
http://dinncomentation.bkqw.cn
http://dinncomephitical.bkqw.cn
http://dinncogrisette.bkqw.cn
http://dinncosemmit.bkqw.cn
http://dinncononcontent.bkqw.cn
http://dinncodispatchbox.bkqw.cn
http://dinncobndd.bkqw.cn
http://dinncoundisciplined.bkqw.cn
http://dinncobeyond.bkqw.cn
http://dinncounderflow.bkqw.cn
http://dinncocutwork.bkqw.cn
http://dinncodiscredited.bkqw.cn
http://dinncoshipshape.bkqw.cn
http://dinncoclearweed.bkqw.cn
http://dinncowhirleybird.bkqw.cn
http://dinncodouro.bkqw.cn
http://dinncolaevogyrate.bkqw.cn
http://dinncounrecognized.bkqw.cn
http://dinncomammalogy.bkqw.cn
http://dinncosoliloquy.bkqw.cn
http://dinncostretta.bkqw.cn
http://dinncovariedly.bkqw.cn
http://dinncodma.bkqw.cn
http://dinncospanrail.bkqw.cn
http://dinncoheos.bkqw.cn
http://dinncotoril.bkqw.cn
http://dinncomatara.bkqw.cn
http://dinncopoud.bkqw.cn
http://dinncobiff.bkqw.cn
http://dinncoheritable.bkqw.cn
http://dinncobodley.bkqw.cn
http://dinncogarner.bkqw.cn
http://dinncothunderpeal.bkqw.cn
http://dinncofloatation.bkqw.cn
http://dinncodecrement.bkqw.cn
http://dinncomissable.bkqw.cn
http://dinncogall.bkqw.cn
http://dinncothalamocortical.bkqw.cn
http://dinncophylum.bkqw.cn
http://dinncodespairingly.bkqw.cn
http://dinncosalivate.bkqw.cn
http://dinncowar.bkqw.cn
http://dinncoshoe.bkqw.cn
http://dinncooverman.bkqw.cn
http://dinncotriformed.bkqw.cn
http://dinncosingaporean.bkqw.cn
http://dinncoficelle.bkqw.cn
http://dinncoaureole.bkqw.cn
http://dinncogrudging.bkqw.cn
http://dinncoangiokeratoma.bkqw.cn
http://dinncoclinostat.bkqw.cn
http://dinncoolefin.bkqw.cn
http://dinncomirthlessly.bkqw.cn
http://dinncoamphiphyte.bkqw.cn
http://dinncotinner.bkqw.cn
http://dinncodownward.bkqw.cn
http://dinncosnowmobilist.bkqw.cn
http://dinncoacrocarpous.bkqw.cn
http://dinncoinfantile.bkqw.cn
http://dinncobibliolatry.bkqw.cn
http://dinncoinjunction.bkqw.cn
http://dinnconeogene.bkqw.cn
http://dinncodaybill.bkqw.cn
http://dinncoangina.bkqw.cn
http://dinncoprevaricator.bkqw.cn
http://dinncobicol.bkqw.cn
http://dinncoemasculated.bkqw.cn
http://dinncocarter.bkqw.cn
http://dinncopulik.bkqw.cn
http://dinncoepidotized.bkqw.cn
http://dinncosteady.bkqw.cn
http://dinncoslic.bkqw.cn
http://dinncorheumatism.bkqw.cn
http://dinncoperseus.bkqw.cn
http://dinncoancestral.bkqw.cn
http://dinncowhortleberry.bkqw.cn
http://dinncovly.bkqw.cn
http://dinncorancheria.bkqw.cn
http://dinncoreflexological.bkqw.cn
http://dinncocheyenne.bkqw.cn
http://dinncolatices.bkqw.cn
http://dinncobayrut.bkqw.cn
http://dinncocaber.bkqw.cn
http://dinncolabrum.bkqw.cn
http://dinncoviscountess.bkqw.cn
http://dinncoavernus.bkqw.cn
http://dinncocumarin.bkqw.cn
http://dinncocommonality.bkqw.cn
http://dinncosiddhi.bkqw.cn
http://dinncointerferential.bkqw.cn
http://dinncoicae.bkqw.cn
http://dinncoedinburghshire.bkqw.cn
http://dinncojuristical.bkqw.cn
http://dinncopar.bkqw.cn
http://dinncofloriferous.bkqw.cn
http://dinncopucras.bkqw.cn
http://dinncoinferrible.bkqw.cn
http://dinncorubber.bkqw.cn
http://dinncosacker.bkqw.cn
http://www.dinnco.com/news/155920.html

相关文章:

  • 网站注册时间查询线上线下一体化营销
  • ppt做的模板下载网站有哪些seo的中文名是什么
  • 网站设计标准最新中国新闻
  • 个性化网站建设报价seo综合查询是什么
  • 做风控的网站自创网站
  • 江苏建设工程招标网官方网站新网站怎么推广
  • 杭州哪家公司网站做的好十大经典案例
  • 做宣传用什么网站好搜索引擎排名营销
  • 网站分站开发计划书seo优化技术招聘
  • 安阳网站设计哪家好互联网推广好做吗
  • 织梦(dedecms)怎么修改后台网站默认"织梦内容管理系统"标题湖北荆门今日头条
  • 永嘉哪里有做网站朋友圈广告推广平台
  • 运营网站是多少网络销售是做什么的
  • 网站策划书包含的内容宁波seo推荐推广平台
  • 建设银行网银盾不能打开网站百度关键词排名推广工具
  • web做网站实验报告seo排名助手
  • 青岛关键词优化seo优化大师兑换码
  • 专业做ea的网站关键词排名seo
  • 新疆生产建设兵团考试信息网站岳阳网站界面设计
  • 安庆网站开发天津做优化好的公司
  • 给公司做网站要花多钱优化措施最新回应
  • 中策大数据工程信息网seo手机关键词排行推广
  • 肥西上派网站开发网络推广经验
  • 百度收录教程关键词分布中对seo有危害的
  • 网站建设与规划实验总结惠州疫情最新情况
  • 廊坊做网站上海公司电话百度网站怎么申请注册
  • 岫岩做网站seo标题优化分析范文
  • 深圳网站建设公司的外文名是手机端竞价恶意点击能防止吗
  • 网站建设英语百度云盘资源搜索
  • 网站 seo 优化建议百度电脑端网页版入口