detect-baseball-diamonds
detect-baseball-diamonds copied to clipboard
Detect swimming pools, too!
Baseball diamonds are hard because they vary in color, size, and shape. Swimming pools tend to have a consistent color so it might make more sense to start there.
What say you, @lyzidiamond??
I'm really excited about this. It seems like a pretty neat use case!
What can I do to help?
I'm thinking we could use the existing code to find swimming pools and figure out what sort of color range they have. Then we could look around in imagery tiles for clumps of enough pixels of the same color. Take the center point for the clump of color and mark it as a possible pool for someone to map.
Bumping this because it's cool and I want it to happen. @iandees can I crank on this?
I just quickly tweaked the tags that seed_area.py to look for leisure=swimming_pool
. It turns out (at least in Minnesota) the pools all have way different colors and shapes:
Maybe this isn't as easy as I thought it would be...
In Florida (where aerial imagery can be shot when it's sunny and not icy like in Minneapolis) the pools have the more uniform blue color that I was thinking about:
JFYI there is also amenity=swimming_pool
. I think iD defaults to leisure=swimming_pool
so more modern edits have that tag, whereas older edits have the amenity
tag.
For further interesting(?) reading: http://wiki.openstreetmap.org/wiki/Proposed_features/Swimming_pool
:+1:
What about sport=baskbetall
, sport=tennis
, or more generally leisure=pitch
? I guess you'd run into similar issues with the RGB spectrum although they should pretty much always be rectangular.
Yea, I played with some other tag combinations back in January after the pools and I don't think we can rely on color thresholding for detection. We're going to have to use shape detection of some kind.
I wonder what blob detection + knocking out the blobs that are mostly green (trees) would look like. Then you could look for blobs that have sharp corners?
@iandees let's pick this up again. What can I do? Is this work happening elsewhere, maybe with help from @morganherlocker?
The next step for me is to figure out how to train a neural network/classifier (like this) using satellite images rather than normal photographs. I haven't found any decent tutorials or guides for how to set up such a thing – all existing guides want you to do use existing, pre-trained models. I'm hoping someone will write such a tutorial...
And I guess I should point out that I've tried using the same sort of method that Mapillary uses (I documented my setup here) but that method relies on the classification subjects being similarly aligned, where swimming pools and baseball diamonds will be rotated and have different shapes.