face

OpenCV Facial Detection come ups with this error

匆匆过客 提交于 2021-02-11 16:56:57
问题 I keep getting this error: faces = face_cascade.detectMultiScale(gray, 1.3, 5) cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' when trying to run this code import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascase_frontalface_default.xml') cap = cv2.VideoCapture(0) while 1: ret, img = cap

OpenCV Facial Detection come ups with this error

£可爱£侵袭症+ 提交于 2021-02-11 16:55:38
问题 I keep getting this error: faces = face_cascade.detectMultiScale(gray, 1.3, 5) cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale' when trying to run this code import cv2 import numpy as np face_cascade = cv2.CascadeClassifier('haarcascase_frontalface_default.xml') cap = cv2.VideoCapture(0) while 1: ret, img = cap

Using MTCNN with a webcam via OpenCV

旧时模样 提交于 2020-12-10 05:26:18
问题 I wish to be able to use a webcam and utilize MTCNN as the primary facial detector. Just as one can use Haar Cascades, I want to use MTCNN to find faces on my webcam This video is about breaking MTCNN, but nonetheless provides insight into my goal: https://www.youtube.com/watch?v=OY70OIS8bxs Here is my code so far. It used to be so that the plot would show and I'd have to "X" it out but now it just doesn't work from mtcnn.mtcnn import MTCNN import cv2 as cv from matplotlib import pyplot from

Gson简要使用笔记

旧时模样 提交于 2020-03-08 14:13:09
  前几段微软推出的大数据人脸识别年龄应用how-old.net在微博火了一把,它可以通过照片快速获得照片上人物的年龄,系统会对瞳孔、眼角、鼻子等27个“面部地标点"展开分析,进而得出你的“颜龄"。 来看下关于这款应用的截图:  昨晚闲着没事,在网上查阅了点资料仿写了一款类似功能的APP,看下截图:       关于人脸识别技术本想去使用微软给开发人员提供的SDK,但由于天朝巨坑的网络,我连How-old.net官网都登不上,只能绕道去找找其他地方有没类似功能的SDK。后来想起之前在搞O2O的时候,看到过一则关于支付宝"刷脸支付"功能的新闻,查找了相关资料发现他们的"刷脸技术"是Face++提供的,也就这样找到了个好东西。   这是Face++的官方网站: http://www.faceplusplus.com.cn/ ,在网站里可以找到它为开发者提供了一部分功能的SDK(需要注册),其中就有人脸识别,判断年龄性别种族这个功能。   我们注册个账号,然后创建个应用就可以得到官方给我们提供的APIKey和APISecret,记录下来,然后到到开发者中心( http://www.faceplusplus.com.cn/dev-tools-sdks/ )就可以下载到对应版本的SDK,就一个Jar包直接导入项目就可以,这是官方给我们提供的API参考文档( http://www

specifying bounding boxes when adding faces to large_person_group_person in cognitive Face API

别等时光非礼了梦想. 提交于 2020-01-17 18:11:32
问题 What I'm trying to do is to use only face recognition without detection because I already have ground truth bounding box information. So I want to add faces to my large_person_group_person with my own bounding box information. Is there a way to specify bounding box information when using face add function? or other functions that supports this? The link below is the reference of face add function. https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations

set transparent (opacity: 0) to some faces of a sphere geometry

久未见 提交于 2019-12-25 00:12:57
问题 I want to make half the faces of a sphere transparent and the other half colored. How can I do that? I've tried to set a transparent color, but it seems it doesn't work that way. geometry = new THREE.SphereGeometry(1.0, 17, 17); for (var i = 0; i < geometry.faces.length; i++) { let x = Math.random(); //Here I'm trying to set a transparent color to half the faces of the sphere. let color = 0 if (x < 0.5) { color = '0x000000'; } else { color = '0xffffff'; } geometry.faces[i].color.setHex(color)

Colouring individual triangles in a TriangleMesh through texture map is inaccurate

我的未来我决定 提交于 2019-12-24 07:42:00
问题 The problem I am having is that I want to color complex models (+4k triangles) without having to split the models up into many TriangleMesh objects. From my understanding this can only be done through mapping the colors onto an image and then calculate the texture coordinates of each color pixel in the image. Which I have done below: val uniqueColors = colors.toHashSet() val colorTexCoordsMap = HashMap<Color, FloatArray>() val atlas = WritableImage(uniqueColors.size, 1) for((index, color) in

Can CATransform3D be used to get eye size dimensions in Face Mesh?

给你一囗甜甜゛ 提交于 2019-12-21 16:57:57
问题 I am trying to get width of the eyes and distance of 2 eyes using 3D Face Mesh of ARKit. I have used CATransform3D of ARAnchor ; struct CATransform3D { CGFloat m11, m12, m13, m14; CGFloat m21, m22, m23, m24; CGFloat m31, m32, m33, m34; CGFloat m41, m42, m43, m44; }; Below is my code; func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) { guard let faceAnchor = anchor as? ARFaceAnchor else { return } let leftcaTransform3DValue : CATransform3D = (faceAnchor

Three.js: Convert face normal from local space to world space

泪湿孤枕 提交于 2019-12-19 04:06:05
问题 I have a THREE.PlaneGeometry , with ComputeFaceNormals() . I create two meshes using this geometry, with different rotations applied to them. I want to compute the two angles between the camera and the two meshes central face normal. It should be : vLocalCamera = vCamera.position - mesh1.position; mesh1.normal() . vLocalCamera = cos(angle); The problem is that I don't know how to get the mesh normal in world coordinate (from geometry and mesh rotation) with three.js API 回答1: If you want to