Comments (6)
@monajalal I have updated the repo. Now the blank images are removed. Maybe the presence of blank images made the accuracy higher was either due bad hyperparameter selection or a bad model.
The new model thus created is:-
- Smaller in size (from a huge 8.78MB to 649kB).
- Faster (Prediction time decreased).
- Better (Can predict you gesture even if you flip your hands).
Also I did some minor memory tweaks so that the load_images.py take much less memory during execution.
from sign-language.
Installed OpenCV 3.4.1 and still get the same error:
[jalal@goku Sign-Language]$ conda install -c conda-forge opencv
Solving environment: done
## Package Plan ##
environment location: /scratch/sjn/anaconda
added / updated specs:
- opencv
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.5.4 | py36_0 621 KB conda-forge
certifi-2018.4.16 | py36_0 142 KB conda-forge
scipy-1.1.0 |py36_blas_openblas_200 40.2 MB conda-forge
------------------------------------------------------------
Total: 41.0 MB
The following packages will be UPDATED:
blas: 1.0-mkl anaconda --> 1.1-openblas conda-forge
ca-certificates: 2018.03.07-0 anaconda --> 2018.4.16-0 conda-forge
certifi: 2018.4.16-py36_0 anaconda --> 2018.4.16-py36_0 conda-forge
conda: 4.5.4-py36_0 anaconda --> 4.5.4-py36_0 conda-forge
numpy: 1.13.3-py36hdbf6ddf_4 anaconda --> 1.13.3-py36_blas_openblas_201 conda-forge [blas_openblas]
opencv: 3.3.1-py36h6cbbc71_1 anaconda --> 3.4.1-py36_blas_openblas_200 conda-forge [blas_openblas]
openssl: 1.0.2o-h20670df_0 anaconda --> 1.0.2o-0 conda-forge
scikit-learn: 0.19.1-py36h7aa7ec6_0 anaconda --> 0.19.1-py36_blas_openblas_201 conda-forge [blas_openblas]
scipy: 1.1.0-py36hfc37229_0 anaconda --> 1.1.0-py36_blas_openblas_200 conda-forge [blas_openblas]
The following packages will be DOWNGRADED:
ffmpeg: 3.4-h7264315_0 anaconda --> 3.2.4-2 conda-forge
Proceed ([y]/n)?
Downloading and Extracting Packages
conda-4.5.4 | 621 KB | ########################################################################################## | 100%
certifi-2018.4.16 | 142 KB | ########################################################################################## | 100%
scipy-1.1.0 | 40.2 MB | ########################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
[jalal@goku Sign-Language]$ python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.4.1'
>>> quit()
[jalal@goku Sign-Language]$ python set_hand_hist.py
OpenCV(3.4.1) Error: Assertion failed ((scn == 3 || scn == 4) && (depth == 0 || depth == 5)) in cvtColor, file /feedstock_root/build_artefacts/opencv_1520722599420/work/opencv-3.4.1/modules/imgproc/src/color.cpp, line 11214
Traceback (most recent call last):
File "set_hand_hist.py", line 70, in <module>
get_hand_hist()
File "set_hand_hist.py", line 38, in get_hand_hist
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
cv2.error: OpenCV(3.4.1) /feedstock_root/build_artefacts/opencv_1520722599420/work/opencv-3.4.1/modules/imgproc/src/color.cpp:11214: error: (-215) (scn == 3 || scn == 4) && (depth == 0 || depth == 5) in function cvtColor
from sign-language.
the '0/' folder is supposed to contain blank images. that folder is not broken. due to some reason keeping those blank images increased my accuracy to ~99%.
as for the error in set_hand_hist.py, i think you are using an old version of this project. that error happens when the img variable is None. it happened due to a bug in the code. but it was fixed later. so try recloning the repo.
in case that does not work, see if your laptop's/computer's camera is connected properly and is working with some other application like skype.
from sign-language.
I literally used the code right when I wrote this issue. Can you please push the newer and working version of the project?
from sign-language.
I have updated the repo. The new code is pushed. I am facing no such problem set_hand_hist.py file. It is working just fine for me.
from sign-language.
See this video if you are unable to use the set_hand_hist.py. https://www.youtube.com/watch?v=KYfBLeYDMW4&feature=youtu.be
from sign-language.
Related Issues (20)
- Error on contourArea function when running create_gestures.py
- Error on contourArea function when running create_gestures.py (Please help) HOT 3
- Working on Respberry Pi HOT 2
- Problem with keras. HOT 2
- Delete from gesture_db.db HOT 2
- I cloned your repo. But it gives wrong output. I ran the set_hand_hist.py file first and then recognize_gestures.py still i am not getting accuracy. Please help.
- change in saving keras model
- This part should be
- This part should be contours = cv2.findContours(thresh.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)[0]
- Error CNN-tf HOT 1
- wrong output HOT 1
- Update cnn_tf.py to Tensorflow 2.0 and fix value error on cnn_tf.py
- fun.util is not working
- issue with cnn_keras.py HOT 1
- TypeError: Value passed to parameter 'input' has DataType uint8 not in list of allowed values: float16, bfloat16, float32, float64, int32 HOT 2
- How to replace the text output of a gesture?
- no folder names train_image found HOT 1
- AttributeError: module 'tensorflow._api.v2.train' has no attribute 'LoggingTensorHook'
- TypeError: Value passed to parameter 'input' has DataType uint8 not in list of allowed values: float16, bfloat16, float32, float64
- Problem with Keras Version
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.
from sign-language.