Dear GRASS developers,
Today I finished a first attempt at writing a GRASS script in python for probabilistic label relaxation.
The script uses a given sigfile to run i.maxlik for _every_ given signature and save the reject threshold results.
These results are used as input for the relaxation process.
This first version is v e r y slow (~ 2 min) for a 150x200 cell region and also the assignment of probabilities for 2 classes being next to each other is still very basic (1.0 if the classes are the same, 0.5 if not). But anyway, it seems to be working!
This will be part of my diploma thesis and I would like to hear your comments. Naturally I am very interested in speeding up the whole process...
This is my first self-made script for GRASS (not counting small helper-scripts), so please be kind
best regards,
Georg
On Fri, Sep 11, 2009 at 5:25 PM, Georg Kaspar <georg@muenster.de> wrote:
Dear GRASS developers,
Today I finished a first attempt at writing a GRASS script in python for
probabilistic label relaxation.
The script uses a given sigfile to run i.maxlik for _every_ given signature
and save the reject threshold results.
These results are used as input for the relaxation process.
This first version is v e r y slow (~ 2 min) for a 150x200 cell region and
also the assignment of probabilities for 2 classes being next to each other
is still very basic (1.0 if the classes are the same, 0.5 if not). But
anyway, it seems to be working!
This will be part of my diploma thesis and I would like to hear your
comments. Naturally I am very interested in speeding up the whole process...
This is my first self-made script for GRASS (not counting small
helper-scripts), so please be kind
Congratulations to your first script!
Perhaps you could post an example here (ideally based on the North Carolina
data set) to facilitate testing?
you will find a small documentation including examples from the NC data set.
I also attached an updated version of the code which contained some nasty bugs - apart from being slow it should work now
best regards,
Georg
I had hoped for some feedback... Is there generally no interest in the functionality of the script or is it the lack of speed (or something else?)
I'm interested in improving the implementation but a few hints would be useful. Here are some ideas I came up wirh:
- At the moment, probabilities are being extracted by running i.maxlik for each class. Maybe this could also be achieved by changing the i.maxlik module. However, this step should be taken out of the script to be performed seperately.
- Of course, an implementation in C would improve speed...
- As far as I know, python will load the whole image into memory - is there some python package that improves the handling of large image files?
Georg Kaspar wrote:
I also attached an updated version of the code which contained some nasty bugs - apart from being slow it should work now
I had hoped for some feedback... Is
there generally no interest in the functionality of the
script or is it the lack of speed (or something else?)
I'm interested in improving the implementation but a few
hints would be useful. Here are some ideas I came up wirh:
maybe a page on the grass wiki with screenshots and examples
(using the standard sample datasets) could encourage interest?
ie a little advertising glitz.
maybe a page on the grass wiki with screenshots and examples
(using the standard sample datasets) could encourage interest?
ie a little advertising glitz.
Thanks for the suggestion. If you are interested, I already posted a pdf with some examples. Guess I will work on a wiki-version now
maybe a page on the grass wiki with screenshots and examples
(using the standard sample datasets) could encourage interest?
ie a little advertising glitz.