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

Improved GUI for training sample collection #467

Open
giswqs opened this issue May 8, 2021 · 5 comments
Open

Improved GUI for training sample collection #467

giswqs opened this issue May 8, 2021 · 5 comments
Labels
Feature Request New feature or request

Comments

@giswqs
Copy link
Member

giswqs commented May 8, 2021

The current implementation can be improved by creating all classes beforehand and users can select whatever class to create training samples.

62_training.mp4
@giswqs giswqs added the Feature Request New feature or request label May 8, 2021
@iamrajbhattarai
Copy link

Hello Professor,

I was trying of perform supervised classification inside Nepal.


Map = geemap.Map()

ROI = ee.Geometry.Polygon(
  [[[85.27443103361846,27.629026415947422],
    [85.41107348967314,27.629026415947422],
    [85.41107348967314,27.737866221318047],
    [85.27443103361846,27.737866221318047],
    [85.27443103361846,27.629026415947422]]])

image = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA') \
    .filterBounds(ROI) \
    .filterDate('2020-01-01', '2021-01-31') \
    .sort('CLOUD_COVER') \
    .first() \
    .select('B[1-7]') \
    .clip(ROI)  


vis_params = {
    'bands': ['B5', 'B4', 'B3']
}

Map.centerObject(ROI, 12)
Map.addLayer(image, vis_params, "Landsat-8")

Map

Then I started collecting samples as done in this video: https://www.youtube.com/watch?v=VWh5PxXPZw0
However, those features don't get stored.

image

But, when I draw casually (when not in collecting sample mode), it stores the object.
Please, do help me.

@giswqs
Copy link
Member Author

giswqs commented Jul 7, 2021

@iamrajbhattarai You can use Map.user_rois to return the training samples as a feature collection.

@iamrajbhattarai
Copy link

Yes, I did that. But, the objects are not returned as feature collection. I think there is problem in the version available on the website or git hub. Even the polygons are joint when we draw. The polygon drawn during interaction in sample collector does not seem to work as shown in your video. After we draw a polygon, next polygon also starts from the end point of last polygon. But, main problem is those features are not returned as feature collection when using Map.user_rois.getInfo() command.

@giswqs
Copy link
Member Author

giswqs commented Jul 7, 2021

I encountered this weird issue before. Try downgrading ipyleaflet to an earlier version, e.g., pip install -U ipyleaflet==0.13.3

@iamrajbhattarai
Copy link

Thank you professor. I made it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants