mapbox / robosat

Semantic segmentation on aerial and satellite imagery. Extracts features such as: buildings, parking lots, roads, water, clouds
MIT License
2.02k stars 383 forks source link

The message is not clear :"Parking lot post-processing thresholds are tuned for z18" #89

Closed toren77 closed 6 years ago

toren77 commented 6 years ago

1) I received the message when executed rs features for parking . I guess it means "zoom 18" 2) What happened if I used zoom 20 for parking till now (by mistake or lack of knowledge on the particular issue)? Do I need to execute all process from the beginning with zoom 18 , specially rs train ?

daniel-j-h commented 6 years ago

The thresholds for post-processing are currently bound to pixels. And because the thresholds are tuned for zoom level 18 they need to be adapted for other zoom levels:

https://github.com/mapbox/robosat/blob/6c7f547d2dd303f8a68b4fbd2ba60583348d7816/robosat/features/parking.py#L11-L14

I just quickly prototyped a changeset in https://github.com/mapbox/robosat/pull/88 to base these thresholds on meters and then calculate the pixel equivalent based on the zoom level and the tiles. It's untested but that's where we want to go with it in the future.

Right now what you can do is change the pixel based thresholds and remove the following line

https://github.com/mapbox/robosat/blob/6c7f547d2dd303f8a68b4fbd2ba60583348d7816/robosat/features/parking.py#L20-L21

Zoom level 20 is a bit high for parking lots to be honest; internally we are running with zoom level 18 on aerial imagery and that is already more than enough to get really precise results. It could be that your results on z20 from the model are even worse than on lower zoom levels.

If you want to re-start the pipeline with zoom level 18 you have to start all the way from creating a dataset since you will need both images and masks on zoom level 18.

himanshu-sikaria commented 4 years ago

@daniel-j-h I see that in branch issue/51 this issue is resolved, however in the master branch and the docker image post-processing is only optimised for z18. So a little confused here if this issue is resolved for not.

Currently want to use this for building detection at z19.

daniel-j-h commented 4 years ago

@himanshu-sikaria you will need pull request https://github.com/mapbox/robosat/pull/88 which it not in master yet. If you find it useful maybe you can test it, finish it, and then we can bring it into master?