webCamEmocognizer icon indicating copy to clipboard operation
webCamEmocognizer copied to clipboard

Updating for opencv3

Open kaliaabhishek opened this issue 7 years ago • 11 comments

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.

kaliaabhishek avatar Mar 24 '18 07:03 kaliaabhishek

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

deepcode-debug avatar Mar 27 '18 00:03 deepcode-debug

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 avatar Apr 14 '18 10:04 stezeo

Hello kalia,

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

stezeo avatar Apr 14 '18 10:04 stezeo

Hey stezeo,

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

kaliaabhishek avatar Apr 14 '18 10:04 kaliaabhishek

thanks Kalia

stezeo avatar Apr 14 '18 10:04 stezeo

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 avatar Apr 14 '18 21:04 stezeo

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

stezeo avatar Apr 15 '18 13:04 stezeo

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

Kindly HELP

TalhaHafeez avatar Jul 05 '18 07:07 TalhaHafeez

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"

boipu avatar Oct 25 '18 19:10 boipu

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'

Torimodosu avatar Jun 06 '19 11:06 Torimodosu

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

teyrois33 avatar May 09 '22 02:05 teyrois33