Git Product home page Git Product logo

Comments (6)

EvilPort2 avatar EvilPort2 commented on July 21, 2024 1

@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:-

  1. Smaller in size (from a huge 8.78MB to 649kB).
  2. Faster (Prediction time decreased).
  3. 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.

monajalal avatar monajalal commented on July 21, 2024

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.

EvilPort2 avatar EvilPort2 commented on July 21, 2024

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.

monajalal avatar monajalal commented on July 21, 2024

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.

EvilPort2 avatar EvilPort2 commented on July 21, 2024

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.

EvilPort2 avatar EvilPort2 commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.