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

企业网站建设管理制度美橙网站建设教程

企业网站建设管理制度,美橙网站建设教程,源码网站开发,创建全国文明城市的意义本篇文章的代码块的实现主要是为了能够快速的通过python第三方非标准库对比出两张人脸是否一样。 实现过程比较简单#xff0c;但是第三方python依赖的安装过程较为曲折#xff0c;下面是通过实践对比总结出来的能够支持的几个版本#xff0c;避免大家踩坑。 python版本但是第三方python依赖的安装过程较为曲折下面是通过实践对比总结出来的能够支持的几个版本避免大家踩坑。 python版本3.6.8 dlib版本19.7.0 face-recognition版本0.1.10开始之前我们选择使用pip的方式对第三方的非标准库进行安装。 pip install cmakepip install dlib19.7.0pip install face-recognition0.1.10pip install opencv-python然后将使用到的模块cv2/face-recognition两个模块导入到代码块中即可。 # OpenCV is a library of programming functions mainly aimed at real-time computer vision. import cv2# Its loading a pre-trained model that can detect faces in images. import face_recognition新建一个python函数get_face_encodings用来获取人脸部分的编码后面可以根据这个编码来进行人脸比对。 def get_face_encodings(image_path):It takes an image path, loads the image, finds the faces in the image, and returns the 128-d face encodings for eachface:param image_path: The path to the image to be processed# Its loading a pre-trained model that can detect faces in images.image cv2.imread(image_path)# Its converting the image from BGR to RGB.image_RGB image[:, :, ::-1]image_face face_recognition.face_locations(image_RGB)# Its taking the image and the face locations and returning the face encodings.face_env face_recognition.face_encodings(image_RGB, image_face)# Its returning the first face encoding in the list.return face_env[0]上述函数中注释都是通过Pycharm插件自动生成的接下来我们直接调用get_face_encodings函数分别获取两个人脸的编码。 # Its taking the image and the face locations and returning the face encodings. ima1 get_face_encodings(03.jpg)# Its taking the image and the face locations and returning the face encodings. ima2 get_face_encodings(05.jpg)上面我们选择了两张附有人脸的图片并且已经获取到了对应的人脸编码。接着使用compare_faces函数进行人脸比对。 # Its comparing the two face encodings and returning True if they match. is_same face_recognition.compare_faces([ima1], ima2, tolerance0.3)[0]print(人脸比对结果{}.format(is_same))人脸比对结果False 这个时候人脸比对结果已经出来了False代表不一样。这里compare_faces有一个比较重要的参数就是tolerance0.3默认情况下是0.6。 tolerance参数的值越小的时候代表比对要求更加严格因此这个参数的大小需要根据实际情况设置它会直接影响整个比对过程的结果。 往期精彩 python自制PDF转换.PNG格式图片按每页生成图片完整源码小工具 python如何使用最简单的方式将PDF转换成Word python项目环境迁移时如何生成第三方库文件requirements.txt并安装
http://www.hkea.cn/news/14587372/

相关文章:

  • php精品网站建设最新热搜新闻
  • 南京鼓楼做网站的公司升学宴ppt免费模板下载
  • 自己搭建网站dedecms 网站安全
  • 采购网站官网制作企业网站价格
  • 东莞专业网站建设网站建设资料清单
  • 个人网站素材下载12306网站很难做吗
  • 网站ftp上传到空间做個app网站价格
  • 网站域名和网址网络架构 书籍
  • 免费建自己的网站赚钱周口在线网站建设
  • 关键词百度指数查询长沙优化排名推广
  • 西安 网站建设 费用网站建设实现后台数据导出excel
  • 万家建设有限公司网站重庆南岸营销型网站建设公司哪家好
  • 网站怎么放404页面网站建设搜索
  • 凡科网站建设7个基本流程腾讯域名怎么建设网站
  • 湘潭做网站 i磐石网络关于网站建设的可行性报告
  • 网站建设的建议例子网易企业邮箱手机上登录不了
  • 定制企业网站建设哪家好网店美工课程总结
  • 免费开源网站建设系统动物网站建设
  • 网站增长期怎么做店铺网络推广方案
  • 好的网站建设公司有哪些wordpress找不到后台
  • 怎样创建网站dw如何做网络营销推广就属金手指饣
  • 刚做的网站适合做外链吗深圳公司网络推广该怎么做
  • 自己做网站还有出路吗企业网站怎么扣费的
  • 检测网站是否安全广州越秀区酒店推荐
  • wordpress超炫模板南宁seo规则
  • 娄底网站推广农业电商网站建设方案
  • 网站建设毕业设计 任务书企业网站设计中常见的排版类型
  • 国外界面设计网站军博网站建设公司
  • 怎么创建私人网站创作图片的软件
  • 当当网站建设优点论坛网站备案流程图