facedetect's Issues
difference between this cascade file and the one packaged by opencv
The haarcascade_frontalface_default.xml
file here is different from same file packaged by OpenCV (in /usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml
).
The size is smaller, but a diff does not say anything useful.
It would help to know if it is a different version, or has some improvements over the upstream, thanks.
.cpp:1698: error: (-215) !empty() in function cv::CascadeClassifier::detectMultiScale
Hi Shantnu ,
I am getting the error in face_detect.py
.cpp:1698: error: (-215) !empty() in function cv::CascadeClassifier::detectMultiScale
"
C:\work_office\hadoop\learning\Python\facedetection>
C:\work_office\hadoop\learning\Python\facedetection>python face_detect.py abba.png
libpng warning: iCCP: profile 'Photoshop ICC profile': 'GRAY': Gray color space not permitted on RGB PNG
OpenCV Error: Assertion failed (!empty()) in cv::CascadeClassifier::detectMultiScale, file C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp, line 1698
Traceback (most recent call last):
File "face_detect.py", line 21, in
flags=cv2.CASCADE_SCALE_IMAGE
cv2.error: C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1698: error: (-215) !empty() in function cv::CascadeClassifier::detectMultiScale
"
AttributeError: module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE'
File "face_detect.py", line 21, in
flags = cv2.CV_HAAR_SCALE_IMAGE AttributeError:
module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE'
I've replaced it with cv2.CASCADE_SCALE_IMAGE and now it works like a charm !
Face recognition
License
Hi,
I found your tutorial on https://realpython.com/face-recognition-with-python/ and was wondering if you have a license for this code? It was incredibly useful and I would like to use parts of it in a project I'm working on if possible.
list index out of range
in my python 3.7 on window 8 , and I have installed opencv-python through pip
I import cv2 and sys and everything.. But.. When it reaches imagePath = sys.argv[1] or
cascPath = sys.argv[2] It says:
list index out of range. !
I changed it to 0, and it passes, but then it tells me assertion error
for that line: gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
what's the solution?
recognize who's face it is
hello. how to recognize who's face it is with webcam? do i need to train this thing somehow for example for my mother's face, for father, for brother... or i can somehow do:
if face_of("father.jpg"):print("hello dad!")
module 'cv2.cv2' has no attribute 'cv'
font=cv2.cv.InitFont(cv2.cv.cv_FONT_HERSHEY_COMPLEX_SMALL,1,1,0,1)
when I write this the error of module 'cv2.cv2' has no attribute 'cv' come:(
help me plsssss
cv2.error: OpenCV(4.1.1) /io/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'
i was running this script(live.py) and the i got this error:
cv2.error: OpenCV(4.1.1) /io/opencv/modules/objdetect/src/cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'detectMultiScale'
how can i solve this problem?
tnx for answers
face_detect.py
The "face_detect.py" file in the repo has been overwritten with an XML file. The prepackaged zip file containing all of the source seems to be okay.
module 'cv2' has no attribute '__version__'
OpenCV version: 4.5.3
Python Version:3.7
Windows 10
I installed opencv using cmake and visual studio and when I run python on cmd and type out the code:
import cv2
print(cv2.version)
I get this error:
Traceback (most recent call last):
File , line 1, in
AttributeError: module 'cv2' has no attribute 'version'
Edit: There are double underscores before and after version but I cant seem to see them in the post.
Instructions don't work..
Following the instructions I get error. Below is what I do on my Ubuntu:
git clone https://github.com/shantnu/FaceDetect
cd FaceDetect
python face_detect.py haarcascade_frontalface_default.xml
I get this error:
Traceback (most recent call last):
File "face_detect.py", line 6, in <module>
cascPath = sys.argv[2]
IndexError: list index out of range
AttributeError: module 'cv2.cv2' has no attribute 'cv'
AttributeError Traceback (most recent call last)
in
19 minNeighbors=5,
20 minSize=(30, 30),
---> 21 flags = cv2.cv.CV_HAAR_SCALE_IMAGE
22 )
23
AttributeError: module 'cv2.cv2' has no attribute 'cv'
AttributeError: module 'cv2.cv2' has no attribute 'cv'
Seems to be a problem with the code itself. Your code may need to be fixed @shantnu
cv2.error: OpenCV(4.2.0) ../modules/core/src/persistence.cpp:719: error: (-49:Unknown error code -49) Input file is invalid in function 'open'
When I try to execute the example i have this output :
cv2.error: OpenCV(4.2.0) ../modules/core/src/persistence.cpp:719: error: (-49:Unknown error code -49) Input file is invalid in function 'open'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "face.py", line 9, in <module>
faceCascade = cv2.CascadeClassifier(cascPath)
SystemError: <class 'cv2.CascadeClassifier'> returned a result with an error set
How i can fix it?
the Confidentiality of pictures to be detected
hi,
I am so appreciate for your contribution of such a compressed and effective public code. But I have a warning about the confidentiality of our detect pictures because the html address used in the code. I'm sorry for that I don't familiar with the use of such html address.
Waitting for your replay~
module attribute error
Hi?
I am getting an error on running the command
Traceback (most recent call last):
File "face_detect.py", line 21, in
flags = cv2.cv.CV_HAAR_SCALE_IMAGE
AttributeError: 'module' object has no attribute 'cv'
Mark
thanks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.