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

i.segment.uspo produces empty output #5

Open
mwicht opened this issue Dec 2, 2018 · 7 comments
Open

i.segment.uspo produces empty output #5

mwicht opened this issue Dec 2, 2018 · 7 comments

Comments

@mwicht
Copy link

mwicht commented Dec 2, 2018

Hi @tgrippa,
I am trying to use your code for a project of mine. I am working with pleiades imagery for optical and LiDAR for nDSM.
So far the first part runs smoothly but I started encountering problems when running i.segment.uspo. It produces an empty *.csv file, no matter the parameters (thresholds/minsize).
I can see that all datasets and subsets are created within the GRASS Mapset TEST_USPO.

I have a shapefile with one polygon per landcover class which is used as regions in i.segment.uspo.
training_areas
The regions are printed correctly as well:
subset_uspo_1@TEST_USPO,subset_uspo_10@TEST_USPO,subset_uspo_11@TEST_USPO,subset_uspo_12@TEST_USPO,subset_uspo_2@TEST_USPO,subset_uspo_3@TEST_USPO,subset_uspo_4@TEST_USPO,subset_uspo_5@TEST_USPO,subset_uspo_6@TEST_USPO,subset_uspo_7@TEST_USPO,subset_uspo_8@TEST_USPO,subset_uspo_9@TEST_USPO

Am I assuming right, that the single polygons are supposed to define one class each?
Or could something else be an issue here?

Did you encounter issues like this during the development? Any hints on debugging this issue?

@tgrippa
Copy link
Owner

tgrippa commented Dec 3, 2018

Hi @mwicht,
Did you try to run i.segment.uspo directly in the GRASS GUI, with the same parameters as in your jupyter notebook ? Is it also producing a empty .csv ? If yes, are you sure the range of thresholds you ask i.segment.uspo to look into is adapted to you data ? Be sure that the 'threshold_start' and 'threshold_stop' well correspond to situations of under and over-segmentation, respectively.
Also, I see that you have some regions that are very small. Maybe the problem come from that and you should consider to increase a bit their area.

@mwicht
Copy link
Author

mwicht commented Dec 9, 2018

Hi @tgrippa,
yes, I tried running i.segment.uspo in the GRASS GUI and still obtaining empty outputs. The same happens with i.segment.
I am running i.segment.uspo with a wide range of parameter thresholds. As I understand, this function will obtain the best settings for segmentation (i.segment) by iterating through the thresholds using the threshold step. So if I start at a threshold of e.g. 0.05 and stop at 0.99 with a step of 0.05, I should get results at some point, right?
If I just run i.segment it will tell me at the end at the command output how many segments are created. But the obtained raster map is always empty (visually, histogram).
How can I adapt the parameters to my data? What would be the least restrictive settings which HAVE to produce some output which I can base my refinement on? The mentioned thresholds in the i.segment documentation of 0.01 to 0.05 did not work either.

Attached you can find a small subset of my data which will not produce any output. Could you please have a look at this, if you can spare the time? Thank you!

test_area.zip

@tgrippa
Copy link
Owner

tgrippa commented Dec 10, 2018

I just tried and it works on my computer. The best threshold according to i.segment.uspo is 0.10. I ask to test the following range : 0.02 until 0.30 with a step of 0.02. I fixed the minsize to 15. The result looks great.
test
I'm wondering if your problem doesn't come to the fact that your regions in which you ask i.segment.uspo to test are badly set at some point of the processing.
What is the result of the following command ? g.region -p region=subset_uspo_1 ?

@tgrippa
Copy link
Owner

tgrippa commented Jan 23, 2020

Hi @mwicht,
Did you solve your issue since your last comment ? Can we consider this issue close ?

@Doctor-Who
Copy link

Hi everyone,
Same error : with GRASS GUI it works on a Linux Laptop but when trying launch into a docker instance on a computing instance, empty output (volume, etc. everything is ok as i.segment is working)

@tgrippa
Copy link
Owner

tgrippa commented Jun 18, 2021

Hi @Doctor-Who ! I'm not familiar at all with Docker so I could not help you :/

@Doctor-Who
Copy link

Thanks for your reply, I will try in Jupiter Notebook

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

3 participants