Zolver
Zolver copied to clipboard
distance_signature fails
Hi, thank you for the nice program. Looks like you put a lot of effort into it.
The function distance_signature fails when calculating the cross product:
ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (1,)
Is it even possible to calculate the cross product in twodimensional space? I uses your examples. Maybe you could check whether it still works for you?
Best strohne
Hi @strohne !
I will have a look. Do you use the requirements file we provided? (can you indicate the version of the libraries you are using?) Do you use the graphical version? on what picture, can you provide it to us?
Thanks for your interest in the project :) BR,
-- Jérémy Lugand
I tried with your requirements file, but it didn't work out. Installing old versions (even in venv) is quite troublesome.
My versions are in square brackets:
numpy>=1.11.0 [1.16.0] scipy==1.0.0 [1.2.0] opencv-python==3.3.0.10 [4.0.0.21] scikit-image==0.13.1 [0.14.2] matplotlib==2.1.0 [3.0.2] Pillow [5.4.1] PyQt5>=5.0 [5.11.3] skimage [not available, used scikit-image instead] scikit-learn>=0.18.1 [0.20.2]
I use the GUI version with different of your examples, especially the degaulle.png file.
Thanks for your help!
Hello,
I have the same problem. I've tested the GUI and CMD using the images provided in resources. The requirements that I've used (in [...] is the actual installed version): numpy==1.17.3 [1.17.3] scipy==1.4.0 [1.4.0] opencv_python==3.4.8.29 [3.4.8.29] opencv-contrib-python==3.4.8.29 [3.4.8.29] scikit_image==0.14.2 [0.14.2] matplotlib==2.2.5 [2.2.5] Pillow [7.1.2] PyQt5>=5.0 [5.14.2] scikit_learn>=0.18.1 [0.22.2.post1]
I've tested in Ubuntu and Windows 10. For windows I modified all the files that had '/tmp/' and put an existing path. Also for windows, after installing the requirements, I got this error: ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\program files\python38\Lib\site-packages\numpy'. I've fixed by executing 'pip install --user PACKAGE_AND_VERSION_FROM_REQ', that's why you'll see that my versions are not different from the ones from requirements.txt.
Thank you for your help, Flavius
I've solved it by doing the following. The error says:
File "C:\Users\Flavius\AppData\Roaming\Python\Python38\site-packages\numpy\core\numeric.py", line 1574, in cross cp -= a1 * b0 ValueError: non-broadcastable output operand with shape () doesn't match the broadcast shape (1,)
The problem is caused by cp -= a1 * b0.
To fix this change the line 1574 from 'numeric.py' to:
cp1 = a1 * b0
cp = cp - cp1
This is just a temporary fix. Changes to
Fix comes from:
https://stackoverflow.com/questions/47493559/valueerror-non-broadcastable-output-operand-with-shape-3-1-doesnt-match-the
https://github.com/numpy/numpy/issues/9031