DeepInEvil / webCamEmocognizer

A cool emotion detector using your laptop/desktop webcam
57 stars 20 forks source link

Updating for opencv3 #2

Open kaliaabhishek opened 6 years ago

kaliaabhishek commented 6 years ago

Hi,

Thank you for providing the fer2013.csv file.

Another issue I'm running into is that the code uses opencv2 1.0 which has since been deprecated. I don't know whether it is too much to ask but could you update the code such that it runs with the version opencv-python 3.4.0?

Because I keep running into this issue

Traceback (most recent call last): File "./DetectEmotion.py", line 58, in <module> gray, detected_faces = detect_face(frame) File "./DetectEmotion.py", line 43, in detect_face flags=cv2.cv.CV_HAAR_FEATURE_MAX) AttributeError: 'module' object has no attribute 'cv'

Thanks.

DeepInEvil commented 6 years ago

Hey, am just too busy lately with stuff in general, Would you like to be the contributor in this repo? I could do with some help. Also, need to update the keras version and stuff. I can help you with coding and optimization.

Thanks, Deep

stezeo commented 6 years ago

Hello Debanjan,

you really did a great deal of work here. I am still very much a beginner. kindly, I am trying to replicate same project using TensorFlow, cv 3.1.0 version, keras 2.1.5, pandas 0.22.0, numpy 1.14.2.

kindly, how do i get fer2103.csv file? it is not included in your repository.

stezeo commented 6 years ago

Hello kalia,

kindly, where you able to generate and train in python 3.5?

kaliaabhishek commented 6 years ago

Hey stezeo,

https://github.com/DeepInEvil/webCamEmocognizer/issues/1 for the fer2013 file.

stezeo commented 6 years ago

thanks Kalia

stezeo commented 6 years ago

Hello,

I have successfully run the genScaledDat.py, trainCNN.py but have issue with DetecEmotion.py.

i keep getting this error for DetectEmotion.py:
FileNotFoundError: [Errno 2] No such file or directory: './models/Face_model_architecture.json'

please is there anyone with a solution to that?

kindly is there solution for python 3.5 version?

stezeo commented 6 years ago

my mistake. I got it fixed. reason is that i did not create the json file correctly.

kindly guys, i have another: I got this error when i ran DetectEmotion.py
runfile('C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer/DetectEmotion.py', wdir='C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer') Traceback (most recent call last):

File "", line 1, in runfile('C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer/DetectEmotion.py', wdir='C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer')

File "C:\Users\Kasutaja\Anaconda3\envs\tensorflow-cpu\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)

File "C:\Users\Kasutaja\Anaconda3\envs\tensorflow-cpu\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer/DetectEmotion.py", line 58, in gray, detected_faces = detect_face(frame)

File "C:/Users/Kasutaja/Documents/WebcamFacialExpressionRecognizer/DetectEmotion.py", line 36, in detect_face gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

error: ......\modules\imgproc\src\color.cpp:7456: error: (-215) scn == 3 || scn == 4 in function cv::ipp_cvtColor**

please your help will do me alot of good. thanks

TalhaHafeez commented 6 years ago

Hey Stezeo Getting the same error as you and cant seem to find a solution did you find one ?

Kindly HELP

boipu commented 5 years ago

Hi,

Thank you for providing the fer2013.csv file.

Another issue I'm running into is that the code uses opencv2 1.0 which has since been deprecated. I don't know whether it is too much to ask but could you update the code such that it runs with the version opencv-python 3.4.0?

Because I keep running into this issue

Traceback (most recent call last): File "./DetectEmotion.py", line 58, in <module> gray, detected_faces = detect_face(frame) File "./DetectEmotion.py", line 43, in detect_face flags=cv2.cv.CV_HAAR_FEATURE_MAX) AttributeError: 'module' object has no attribute 'cv'

Thanks.

"you can comment out that specific line.the code will still work. not the best solution but if you just want to run the program then it will work"

Torimodosu commented 5 years ago

Hi, I'm running the code using opencv 4.1.0 which raise an issue mentioned below. can you please help me to solve this

Traceback (most recent call last): File "./DetectEmotion.py", line 58, in gray, detected_faces = detect_face(frame) File "./DetectEmotion.py", line 35, in detect_face flags=cv2.cv.CV_HAAR_FEATURE_MAX

AttributeError: module 'cv2.cv2' has no attribute 'cv'

teyrois33 commented 2 years ago

Can you share the whole program file of this scripts? I need help to use it for my MacBook 12 store page.