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

Add "label_area" attribute to classification.geojson #128

Closed
wants to merge 1 commit into from

Conversation

wouellette
Copy link

On top of the "label" attribute indicating the presence or absence of a given class in the classification.geojson output, a new attribute called "label_area" was integrated which indicates the surface area of the present classes in a given tile. This is particularly useful as an indicator of class abundance.

On top of the "label" attribute indicating the presence or absence of a given class in the classification.geojson output, a new attribute called "label_area" was integrated which indicates the surface area of the present classes in a given tile. This is particularly useful as an indicator of class abundance.
@drewbo
Copy link
Contributor

drewbo commented Jan 31, 2019

@wouellette can you describe the use case here (and could it also be accomplished by using segmentation labels)?

@wouellette
Copy link
Author

Hi Drew,

I use the label-maker to filter on the following classes:

  "classes": [
	{ "name": "Woody", "filter": ["any", ["in","natural","wood"], ["in","landuse","forest"]] },
	{ "name": "Herbaceous", "filter": ["all",["any", ["in","natural","grassland"], ["in","landuse","grass"],["in","surface","grass"]],["!has", "highway"]] },
	{ "name": "Cropland", "filter": ["in","landuse","farmland"] },
	{ "name": "Bare Soil", "filter": ["in","natural","scree","bare_rock","shingle"] },
	{ "name": "Sand", "filter": ["all",["any", ["in","natural","beach","sand"], ["in","surface","sand"]],["!has", "highway"]] },
	{ "name": "Built-Up", "filter": ["all",["any", ["in","landuse","residential","commercial","industrial","retail"], ["in","surface","paved","asphalt","concrete"]],["!has", "highway"]] },
    	{ "name": "Permanent Water", "filter": ["any", ["in","natural","water"], ["in","water","pond","lake","reservoir"]] },
	{ "name": "Intermittent Water", "filter": ["any", ["in","water","intermittent"], ["in", "natural", "wetland"]] },
	{ "name": "Ice and Snow", "filter": ["in","natural","glacier"] }

And for me, knowing absence/presence of the feature per zoom level tile is not enough, I also want to know the abundance. The idea is that OSM QA tiles containing the largest surfaces areas of the above mapped classes are higher priority tiles to be used for training.

I was initially using a postgis load of OSM to do this, but using the OSM QA tile set is much more efficient, and the label-maker interface to those tiles works wonderfully well for me.

Moreover, since OSM data is often not good enough for training models due to its inaccuracy/inconsistency, tiles with higher class abundances are more likely to contain the features of interest, and therefore a subset of the generated tiles containing the classes of interest in "large" amounts could be revised/realigned (in the case of segmentation) or simply moderated (in the case of classification).

I am not currently using the label-maker further than the download and labels functionalities, because I use the classification.geojson output as part of another process which does pretty much what I describe above. My fork of the label-maker has this implemented for the classification, but the exact same thing could be done for the segmentation procedure (and would probably be even more relevant for that case).

@drewbo
Copy link
Contributor

drewbo commented Feb 1, 2019

Sounds great @wouellette. Can you update the test fixtures so that this passes and then I'll merge? Let me know if you need any help with that

@wouellette
Copy link
Author

Closing it as this pull request has been taken up into #135

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

Successfully merging this pull request may close these issues.

2 participants