iandees / detect-baseball-diamonds

Various attempts at scanning aerial imagery to detect baseball diamonds.
MIT License
17 stars 1 forks source link

Detect swimming pools, too! #1

Open iandees opened 9 years ago

iandees commented 9 years ago

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??

lyzidiamond commented 9 years ago

I'm really excited about this. It seems like a pretty neat use case!

What can I do to help?

iandees commented 9 years ago

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.

lyzidiamond commented 9 years ago

Bumping this because it's cool and I want it to happen. @iandees can I crank on this?

iandees commented 9 years ago

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:

montage

Maybe this isn't as easy as I thought it would be...

iandees commented 9 years ago

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:

montage

lyzidiamond commented 9 years ago

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.

lyzidiamond commented 9 years ago

For further interesting(?) reading: http://wiki.openstreetmap.org/wiki/Proposed_features/Swimming_pool

todrobbins commented 9 years ago

:+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.

iandees commented 9 years ago

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?

lyzidiamond commented 8 years ago

@iandees let's pick this up again. What can I do? Is this work happening elsewhere, maybe with help from @morganherlocker?

iandees commented 8 years ago

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...

iandees commented 8 years ago

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.