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

Broken requirements.txt because of changes in opencv-contrib library #1

Closed
Purefekt opened this issue Aug 20, 2021 · 2 comments
Closed

Comments

@Purefekt
Copy link

Describe the bug
Because of patented algorithms like surf and sift being removed from opencv-contrib, installing via the given method in the readme is not working.

To Reproduce
Steps to reproduce the behavior:
Try installing and running the program.

Expected behavior
Opencv-contrib library wont install

How to fix
I installed the following packages in a conda environment one by one and then used a special flag to install opencv-contrib and it worked

Installation - WORKING USING CONDA

Create conda environment with the name 'signature_extraction' and activate virtual env

conda create --name signature_extraction

conda activate signature_extraction

Install packages one by one (requirements.txt not working properly because of different channels)

conda install -c anaconda joblib

conda install -c anaconda numpy

conda install -c anaconda scikit-learn

conda install -c anaconda scipy

conda install -c conda-forge opencv

conda install -c conda-forge threadpoolctl

conda install -c conda-forge tqdm

opencv-contrib package will have to be built from source with NONFREE flag set. If this package installed directly then we wont be able to use a crucial function in the code. This might take some time.

CMAKE_ARGS="-DOPENCV_ENABLE_NONFREE=ON" pip install --no-binary=opencv-contrib-python opencv-contrib-python

Once all packages are installed to the virtual env, cd to the project directory and run the GUI app with

python3 src/extract_gui.py
@saifkhichi96
Copy link
Owner

saifkhichi96 commented Aug 21, 2021

You need an older version of opencv-contrib-python and opencv-python. Something 3.+ but before 3.4.2.17. Let me know if it works. Try using pip inside the anaconda environment, it should install the package in the environment. pip install opencv-contrib-python=3.4.2.17 should work. You can find available versions at https://pypi.org/project/opencv-contrib-python/#history

@saifkhichi96
Copy link
Owner

Closed due to inactivity.

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