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

[Feat] r.learn.ml2: Add support for semantic label #1259

Open
veroandreo opened this issue Dec 7, 2024 · 3 comments
Open

[Feat] r.learn.ml2: Add support for semantic label #1259

veroandreo opened this issue Dec 7, 2024 · 3 comments
Labels
enhancement New feature or request Python Related code is in Python

Comments

@veroandreo
Copy link
Contributor

r.learn.train and r.learn.predict would benefit from having semantic label support as i.svm or i.maxlik in GRASS core. Having semantic labels support in these tools would allow the transfer of trained models to other imagery/raster groups with the same semantic labels. Currently, since map names are part of the models, the prediction only works if map names match.

@ninsbl
Copy link
Member

ninsbl commented Dec 10, 2024

See also: OSGeo/grass#3756

And here is a case where I used that function in a similar context as @veroandreo asks for here:
https://github.com/NVE/actinia_modules_nve/tree/main/src/imagery/i.pytorch/i.pytorch.predict

That may serve for inspiration...

There the concept is to have a JSON config/metadata file for a model that tells the module in which order to apply the different maps with semanic labels. It allows also to use maps with equal semantic labels (think a reference image). However, what is currently not that good implemented is a time series of more than two points in time maps as model input (think change detection in a time series of many points in time...

@ninsbl ninsbl added enhancement New feature or request Python Related code is in Python labels Dec 10, 2024
@ninsbl
Copy link
Member

ninsbl commented Dec 10, 2024

And this is how this is handled in i.svm: https://github.com/OSGeo/grass/blob/main/imagery/i.svm.predict/main.c#L155-L241 where the signature file defines the band order based on semantic labels...

@stevenpawley
Copy link
Member

This would be a nice addition, should be fairly straightforward. I can try and take it on. The use of groups (but with the same raster names) was considered as the use case for transferring models to other images originally, but this was all before semantic labels, which is a nicer solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Python Related code is in Python
Projects
None yet
Development

No branches or pull requests

3 participants