PUTvision / qgis-plugin-deepness

Deepness is a remote sensing plugin that enables deep learning inference in QGIS
https://www.buymeacoffee.com/deepness
Apache License 2.0
94 stars 22 forks source link

Assistance Required for Installing Plug-ins on MacOS #180

Open Jenislq90146 opened 4 weeks ago

Jenislq90146 commented 4 weeks ago

Hi,

Thank you very much for creating this plugin.

I am struggling to install the following plug-ins required to use 'deepness': opencv-python-headless and onnxruntime. I've attempted to install them manually, but I haven't been successful so far.

I noticed that you have provided installation steps for Linux and Windows, but not for macOS. It would be incredibly helpful if you could provide the steps for macOS as well.

Alternatively, I would greatly appreciate any other resources or references that could assist me.

Thank you for your help.

Best regards, Jenis

Jenislq90146 commented 4 weeks ago

I was able to install the additional package manually after following help from online resources.

Jenislq90146 commented 4 weeks ago

Hi,

I have uninstalled Qgis by mistake, after reinstalling everything I am not able to run the plugin again. I am getting error because of 'libprotobuf.22.dylib'. I am using macOS with M1 chip. The version of 'protobuf' on mysystem is '27.3.0'.

It would be great help if someone help me resolve this issue?

chrisgnicholas commented 2 weeks ago

I'm also having some issues ... I have a brand new MAC, and installed QGIS 3.36 "Maidenhead', and get the following stack trace when I try to load the module:

deepness_errs.txt

przemyslaw-aszkowski commented 2 weeks ago

Hi,

Thanks for reporting. Unfortunately, we do not have a MAC to test on at the moment. If the automatic installer fails to install the packages, then please try to install the required packages (opencv-python, onnxruntime). I believe you can do it either through built in Python console in QGIS, or in normal termianal. This post looks helpful: https://stackoverflow.com/questions/64008273/how-can-i-install-a-third-party-python-library-for-example-pandas-in-qgis-on-l If it fails, please share the logs, maybe there is some system package missing.

I hope it helps, cheers Przemek

chrisgnicholas commented 2 weeks ago

ok - had to set my PATH to: /Applications/QGIS.app/Contents/MacOS/bin/

manually remove: /Applications/QGIS.app/Contents/MacOS/lib/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg

and THEN: pip install opencv-contrib-python

and now Deepness installs :-)

looking forward to playing with it!

Chris

p.s. - on a separate but related note, is it conceivable to author/calibrate models in 'Deepness'/QGIS, and run the results in a batch-oriented/headless configuration? I'm thinking of an Airflow module, within the context of 'Ecoscope', as per: https://ecoscope.io/en/stable/

przemyslaw-aszkowski commented 2 weeks ago

Hi, good to hear it worked and thanks for providing tips for others! We have a headless batch mode in our roadmap, but the closest you can get right now is looking at unit tests, as they run the models without UI. Cheers Przemek

asolis08219 commented 3 days ago

I was able to install the additional package manually after following help from online resources.

Hi, can you help me please, how did you do it?

chrisgnicholas commented 1 day ago

did you try what I wrote above, i.e.

1) set PATH to: /Applications/QGIS.app/Contents/MacOS/bin/

2) manually remove: /Applications/QGIS.app/Contents/MacOS/lib/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg

3): pip install opencv-contrib-python

asolis08219 commented 1 day ago

The path and the instalation is using terminal?

chrisgnicholas commented 21 hours ago

yes; in finder, go to Application > Utilities > terminal

try running:

export PATH=/Applications/QGIS.app/Contents/MacOS/bin/:$PATH

rm /Applications/QGIS.app/Contents/MacOS/lib/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg

pip install opencv-contrib-python

robmarkcole commented 11 hours ago

Followed the above but results in

RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000

Resolved: numpy > 2 was installed, now downgraded

asolis08219 commented 10 hours ago

Hi everyone its works, thanks a lot to everyone.

I made a tutorial and share it: https://www.youtube.com/watch?v=kWplkzpC3mQ