Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'cvlib' has no attribute 'detect_face' #25

Open
yensan0512 opened this issue Jul 15, 2019 · 4 comments
Open

module 'cvlib' has no attribute 'detect_face' #25

yensan0512 opened this issue Jul 15, 2019 · 4 comments

Comments

@yensan0512
Copy link

C:\xampp\htdocs\faceD>python cvlib.py
Using TensorFlow backend.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-07-15 20:47:44.195976: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Traceback (most recent call last):
File "cvlib.py", line 12, in
import cvlib as cv
File "C:\xampp\htdocs\faceD\cvlib.py", line 42, in
face, confidence = cv.detect_face(frame)
AttributeError: module 'cvlib' has no attribute 'detect_face'
[ WARN:0] terminating async callback

@arunponnusamy
Copy link
Owner

Hi @yensan0512 , can you try changing the name of the script you are running from cvlib.py to something else like cvlib_script.py ?

@yensan0512
Copy link
Author

I have change to cvlib_script.py but it still the same,sir

C:\xampp\htdocs\faceD>python cvlib_script.py
Using TensorFlow backend.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-07-16 14:37:08.106793: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Traceback (most recent call last):
File "cvlib_script.py", line 12, in
import cvlib_script as cv
File "C:\xampp\htdocs\faceD\cvlib_script.py", line 42, in
face, confidence = cv.detect_face(frame)
AttributeError: module 'cvlib_script' has no attribute 'detect_face'

@arunponnusamy
Copy link
Owner

You can keep the import statement as

import cvlib as cv

No need to change any code inside the script. The reason for changing the file name is it might confuse python while trying to import the package cvlib since the filename is also named cvlib.

@yensan0512
Copy link
Author

yensan0512 commented Jul 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants