Skip to content

Commit 6f09680

Browse files
committed
research
1 parent b661b3c commit 6f09680

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

make_buildings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def mil(fp):
3030
ways = q.query_buildings(*box_minsk)
3131

3232
IMZ = 18
33-
LIMIT = 10000
33+
LIMIT = 5000
3434
count = 0
3535
target = helpers.cleandir(f"buildings/yes")
3636
for wayid,nodes in ways:
@@ -52,6 +52,9 @@ def mil(fp):
5252
mp = helpers.MercatorPainter(layers.maxar, *box_minsk, IMZ)
5353
for _, nodes in ways:
5454
mp.add_polyline_wgs(nodes)
55+
# FIXME: painter expands area to a whole number of tiles
56+
# and marks the border tile free even if there are
57+
# buildings in the expansion band
5558
for poly in outdated_polys:
5659
mp.add_fillpoly_wgs(poly)
5760

make_buildings_except.wkt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ POLYGON ((27.52163171768188 53.906335460705726, 27.520623207092285 53.9039083441
44
POLYGON ((27.55069077014923 53.90880983675384, 27.551409602165222 53.90785233697202, 27.552316188812256 53.90823786757667, 27.55150616168976 53.909008918110516, 27.55069077014923 53.90880983675384))
55
POLYGON ((27.600810527801514 53.837841738845775, 27.60177612304687 53.83675282848474, 27.60791301727295 53.83719599309501, 27.609500885009766 53.83904457202817, 27.61707544326782 53.83989286518068, 27.61662483215332 53.84076646255469, 27.604007720947262 53.83910787808068, 27.600810527801514 53.837841738845775))
66
POLYGON ((27.542606592178345 53.8908601761207, 27.546662092208862 53.887951598930506, 27.550975084304806 53.88825511209557, 27.54966616630554 53.88931739081768, 27.542606592178345 53.8908601761207))
7-
POLYGON ((27.558270692825317 53.89635430547624, 27.562283277511597 53.89519105182811, 27.56191849708557 53.89751120497534, 27.558270692825317 53.89635430547624))
7+
POLYGON ((27.558270692825317 53.89635430547624, 27.562283277511597 53.89519105182811, 27.56191849708557 53.89751120497534, 27.558270692825317 53.89635430547624))
8+
POLYGON ((27.52547264099121 53.886863991991156, 27.524195909500122 53.88621900241597, 27.526330947875977 53.88435985913297, 27.529045343399048 53.88544120763294, 27.528047561645508 53.8863960593688, 27.52653479576111 53.88588385684488, 27.52547264099121 53.886863991991156))

readme.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,30 @@ Task: classify tiles with any type of building(s) vs. tiles with no buildings at
131131

132132
![Buildings: yes/no](readme-images/buildings_yes_no.png)
133133

134-
Input: 5700 images of both categories, 20% validation.
134+
135135

136136
## First attempt
137137

138-
For every node of every building, fetch the tile it belongs to. Don't use the tile if the node is closer than 16px to the edge (that would present only a tiny part of the building).
138+
For every node of every building, fetch the tile it belongs to. Don't use the tile if the node is closer than 16px to the edge (that would present only a tiny part of the building). This script also accepts "excluded areas" input where satellite imagery is outdated, to minimize false training examples.
139+
140+
Input: 5700 images of both categories, 20% validation.
139141

140-
| | Frozen, 4 epoch train | Unfreeze, 6 epochs | 8 more epochs |
141-
| -------------------------------- | --------------------- | ------------------ | ------------- |
142-
| size=256, no flip, max_rotate=0 | 3.0% | 3.0% | |
143-
| size=256, no flip, max_rotate=20 | 2.3% | 2.7% | |
144-
| size=256, no flip, max_rotate=40 | 3.3% | 3.3% | |
145-
| size=256, no flip, max_rotate=20 | 2.5% | | |
146-
| | | | |
147-
| | | | |
142+
| | Frozen, 4 epoch train | Unfreeze, 4 epochs |
143+
| -------------------------------- | --------------------- | ------------------ |
144+
| size=256, no flip, max_rotate=0 | | |
145+
| size=256, no flip, max_rotate=20 | | |
146+
| size=256, no flip, max_rotate=40 | 2.1% | 1.9% |
147+
| | | |
148+
| | | |
149+
150+
Input: 10000 images of both categories, 20% validation.
151+
152+
| | Frozen, 4 epoch train | Unfreeze, 4 epochs |
153+
| -------------------------------- | --------------------- | ------------------ |
154+
| size=256, no flip, max_rotate=0 | | |
155+
| size=256, no flip, max_rotate=20 | | |
156+
| size=256, no flip, max_rotate=40 | 1.3% | 1.3% |
157+
| | 2.0 | 2.0 |
158+
| | 1.9 | 1.7 |
159+
| | 2.0 | 1.9 |
160+
| | 1.8 | 1.6 |

0 commit comments

Comments
 (0)