Giter VIP home page Giter VIP logo

dzetsaka's People

Contributors

matt-needle avatar nkarasiak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dzetsaka's Issues

SVM classification bug

Hi all,

I'm using this classification tool on MacOS with QGIS3.1 and it worked well with the Gaussian, RF and KNN methods but it remains stuck always at 83% for the SVM classification.

I also tried with the samples but same issue...

Does anyone has the same issue ?

Thank you !

plugin in gqis2 for osx doesn't recognize scikit-learn

Trying to run random forest for qgis2 on osx with your plugin. Says it needs scikit-learn. Following instructions with pip I get
Requirement already satisfied: scikit-learn in ./anaconda2/lib/python2.7/site-packages

Yet the plugin doesn't recognize the installation.

batch processing problem with train algorithm

I' a new user of dzetsaka algorithm, trying to do a svm classification using batch processing in qgis 3.16.0. I'm getting this log error messages. by the time when I use the classification dock it's run without problem with individual scenes
try fixing dzetsaka train algorithm

Can not use dzetsaka algorithms in models

I use Predict model (classification map) algorithm in my model and noticed very strange behavior. Algorithm added to the model, connected to inputs. But when model executed, next step failed because output from Predict model (classification map) algorithm does not passed correctly to the next algorithm.

Here is the model log execution log

Processing algorithm…
Algorithm 'test' starting…
Input parameters:
{ 'inputraster' : '/home/alex/datasets/test/raster.tif', 'dzetsakamodel' : '/home/alex/datasets/tree-inventory/RF-model.model', 'vectorzones' : '/home/alex/datasets/test/polygons.shp' }

Prepare algorithm: dzetsaka:Predict model (classification map)_1
Running Predict model (classification map) [1/2]
Input Parameters:
{ INPUT_MASK: , INPUT_MODEL: '/home/alex/datasets/tree-inventory/RF-model.model', INPUT_RASTER: '/home/alex/datasets/test/raster.tif', OUTPUT_RASTER: '/tmp/processing_8ecfcdea23904a36b83d2d6aeddfece2/caf41486cd744fd7b1212e0c35736a88/OUTPUT_RASTER.tif' }
OK. Execution took 23.972 s (1 outputs).
Prepare algorithm: qgis:zonalstatistics_1
Running Zonal statistics [2/2]
Input Parameters:
{ COLUMN_PREFIX: '_', INPUT_RASTER: None, INPUT_VECTOR: '/home/alex/datasets/test/polygons.shp', RASTER_BAND: 1, STATS: 9 }
Traceback (most recent call last):
File "/tmp/build/qgis/output/python/plugins/processing/algs/qgis/ZonalStatistics.py", line 132, in prepareAlgorithm
self.raster_interface = rasterLayer.dataProvider().clone()
AttributeError: 'NoneType' object has no attribute 'dataProvider'

Error encountered while running Zonal statistics
Error encountered while running Zonal statistics
Execution failed after 24.08 seconds

Loading resulting layers
Algorithm 'test' finished

As you can see, Zonal statistics algorithm gets None as input raster instead of raster layer/path. At the same time, output from dzetsaka exists and contains valid raster.

Test data (layers, project and model) attached. Any ideas what can be wrong here and how to fix it?
test.zip

failed install scikit-learn windows 10

i tried to install scikit-leart but it failed, message was :

C:\Windows\System32>pip install scikit-learn
Fatal error in launcher: Unable to create process using '"c:\osgeo41\bin\python3.exe" "C:\PROGRA1\QGIS3~1.4\apps\Python37\Scripts\pip.exe" install scikit-learn'

how to solve this problem, thank you

Add macOS instructions to readme

There is no instruction available for macOS.

There is a pending pull request from #25 (tested with macOS 10.13.6 (High Sierra) and 10.15.5 (Catalina), QGIS 3.10.)
Also, there is an open issue #10 but related to qgis2.

Failed to recognize scikit-learn in qgis 3.10.7 on Gentoo

Params:

$ uname -a
Linux ipee251 4.9.228-gentoo-x86_64-Shu #1 SMP PREEMPT Fri Jun 26 12:15:46 MSK 2020 x86_64 Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz GenuineIntel GNU/Linux
$ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python2.7
  [3]   python3.8 (fallback)
$ eix -I learn
[I] sci-libs/scikits_learn
     Available:      ~0.19.0-r1^t ~0.20.2^t ~0.20.4^t 0.22.2_p1^t {examples test PYTHON_TARGETS="python3_6 python3_7 python3_8"}
     Installed:  0.22.2_p1^t(15:26:24 15.07.2020)(-examples -test PYTHON_TARGETS="python3_7 -python3_6 -python3_8")

The library scikit-learn is installed. Python by itself recognized it: when I tried to install scikit-learn via pip it warned me that '...already installed'. No error/warning messages in QGIS.

I'm absolutely nub in Python, so was stuck for a day. But then I simply copypasted line

from sklearn import metrics

to Python console and saw several errors ending with:

ModuleNotFoundError: no module named 'joblib'

And yes, dev-python/joblib wasn't installed! Installation of it and restarting QGIS allowed me to select Random Forest and others.

So it is not a real bug, but it will be nice just to write in README/greeting/etc about that requirement.

Classifying with a trained model fails if a shapefile isn't selected

When i try to classify a raster file with a trained kNN model and i don't have at least one shapefile available i get the following error:

2019-05-20T09:54:03     WARNING    Traceback (most recent call last):
              File "C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\dzetsaka\dzetsaka.py", line 536, in runMagic
              inShape=inShape.dataProvider().dataSourceUri().split('|')[0] # Remove layerid=0 from SHP Path
             AttributeError: 'NoneType' object has no attribute 'dataProvider'
             
             During handling of the above exception, another exception occurred:
             
             Traceback (most recent call last):
              File "C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\dzetsaka\dzetsaka.py", line 556, in runMagic
              QgsMessageLog.logMessage('inShape is : '+inShape)
             TypeError: can only concatenate str (not "NoneType") to str

Having one shapefile available, even if not related to the classification, fixes this somehow.

Training algorithm

Hi all,

Sorry in advance, I am pretty new to programming in general. For my research project, I am working on a SAR image, and I want to do supervised classifications on it to assess areas of water and non-water using training data I created in QGIS Lima. The image is quite big, so I Have broken it into smaller sample areas. I am currently running QGIS on mac OSX.

When running either the RF or SVM algorithm using the plugin. I receive these messages. Not sure where to go from here. If anyone has any advice, I would be deeply grateful.

Cheers,
Tim

Screen Shot 2024-03-06 at 8 27 40 PM

Bug on MacOS

When we install scitkit-learn library and then the Dzetsaka plugin, QGIS opens several replicas, without ending, and we have to force quit them all. If we uninstall scitkit-learn library, the instalation of the plugin goes flawlessly. However, without the scitkit-learn library it will not work, as expected.

Support for 4th band?

Using the Tool with a 4 band RGBI Image does not cause an error but the tool runs endlessly.
Would a 4 bandsupport be possible?

Failed to recognize scikit-learn in qgis 3.6 for ubuntu

When I tried to run SVM in qgis using the plugin, I got the library missing message "Scikit-learn library is missing on your computer." Although I have scikit-learn in my system:
Requirement already satisfied: scikit-learn in ./.local/lib/python3.6/site-packages (0.20.3)
Requirement already satisfied: scipy>=0.13.3 in ./.local/lib/python3.6/site-packages (from scikit-learn) (1.2.1)
Requirement already satisfied: numpy>=1.8.2 in ./.local/lib/python3.6/site-packages (from scikit-learn) (1.16.2)
How to let QGIS recognize the library?
System: ubuntu 18.04.
Try type:import sklearn in python console in qgis, it seems the scikit-learn is not installed in qgis.

error when running classification

This is the error I am receiving:

2019-02-18T16:28:21	1	Traceback (most recent call last):
			  File "/Users/user/.qgis2/python/plugins/dzetsaka/dzetsaka.py", line 1114, in runMagic
			    temp.initPredict(inRaster,model,outRaster,inMask,confidenceMap,inClassifier)
			  File "/Users/user/.qgis2/python/plugins/dzetsaka/scripts/mainfunction.py", line 314, in initPredict
			    predictedImage=self.predict_image(inRaster,outRaster,tree,inMask,confidenceMap,-10000,SCALE=[M,m],classifier=classifier)
			UnboundLocalError: local variable 'tree' referenced before assignment

dzetsaka tells of an nonexistent problem

Hi, Nicolas

I'm trying to run RF and I keep getting an error message asking me to make sure that my classes column has only integer values and that both my shapefile and raster have the same projection (EPSG:32616). However, both of these conditions are met by my files.

Where might the source of the problem be?

No headers in matrix output

The output matrix would be enhanced by headers for (what I assume?) is the user and producer accuracy statistics generated. As it stands, there is uncertainty over exactly what the matrix values are reporting.

output model file format

Hey thanks for the plugin! I'm trying to test out the functionality of a few of the algorithms in QGIS 3.10, and am getting some strange results from my prediction map. I'm thinking it may be related to my output model from the train algorithm. What file format is the output model (in the train algorithm tool) supposed to be saved as?

Thanks,
Rob

Changing training parameters

Thanks for your valuable work. Really user-friendly and useful plugin for remote sensing users. I want to ask a question. Can we change the parameters of classification algorithms? For example, can we change the number of threes for the Random Forest algorithm? It is important for experiments. Because sometimes changing these parameters is increasing the accuracy of the final results. Thanks.

QGIS 3

Bonjour Nicolas,

is your tool compatible with QGIS 3?

Please consider moving it under Processing

You'll save coding the interface, and the user will be able to integrate this into more complex workflows, having iterations, and much more.
Ask @volaya for howto, or have a look to other Processing plugins.

Which are the default parameters on KNN and Random Forest?

How can I find out which were the parameters values used to do the classification, looking at the scripts, it seems to me that the program tests some values and choose the best suitable:

elif inClassifier == 'KNN':
from sklearn import neighbors

                **param_grid = dict(n_neighbors=np.arange(1, 20, 4))**
                if 'param_algo' in locals():
                    classifier = neighbors.KNeighborsClassifier(
                        **param_algo)
                else:
                    classifier = neighbors.KNeighborsClassifier()

How can I find out which value was used in my classification? I made it by default

dztsaka batch processing

I' a new user of dzetsaka algorithm, trying to do a svm classification using batch processing in qgis 3.16.0. I'm getting this log error messages. by the time when I use the classification dock it's run without problem with individual scenes
try fixing dzetsaka train algorithm

Seeking feedback: QEP 179, Turning Plugin Management into Actual Package Management

I hope this is the right place to ask - my apologies if it is not: I am currently running a QGIS Enhancement Proposal (QEP) for turning plugin management into actual package management. As part of this process, I am looking for existing QGIS plugins and plugin developers who could significantly benefit from the proposed ideas and concepts. In a nutshell, I am proposing to allow to package QGIS plugins as regular Python wheels and/or conda packages - with all relevant packaging features such as proper Python package dependencies and binary extensions. Looking at this project's source code, it appears to be a good candidate for greatly benefiting from such features. If you find this work interesting and potentially relevant for your plugin, I am rather curious about your opinion. Among other issues, there appears to be some serious doubt about the existence of actual use cases for the proposed changes in QGIS among its core developers. Besides, the proposed work may also "confuse plugin developers". Feedback is therefore highly welcome.

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.