Last active
April 22, 2025 01:03
-
-
Save fiddyschmitt/87e2feb92d43886e10a50ffb01dd8cc6 to your computer and use it in GitHub Desktop.
Object detection in satellite images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Download tiles. | |
| Zoom 20 is adequate for tennis courts. Zoom 22 is ideal, with diminishing returns. | |
| C:\Users\Smith\Desktop\dev\cs\QldGlobeApps | |
| Convert tiles to geotiff | |
| C:\Users\Smith\Desktop\dev\cs\QldGlobeApps | |
| Run geotiff through geodeep | |
| https://github.com/uav4geo/GeoDeep | |
| pip install -U geodeep | |
| Detect tennis courts: | |
| geodeep "E:\data\QldGlobe\2025-04-20 - 4 - QldGlobe exportImage\2025-04-20 - 4 - QldGlobe exportImage (Zoom 20).tiff" aerovision --classes tennis-court -t geojson -o "E:\data\QldGlobe\2025-04-20 - 4 - QldGlobe exportImage\2025-04-20 - 4 - QldGlobe exportImage (Zoom 20).geojson" | |
| Post-processing for Tennis Courts | |
| Remove polygons smaller than tennis courts (typically 260 sq m) | |
| Layer -> right-click -> Open Attribute Table | |
| Click 'Select features using express' | |
| $area < 200 | |
| Click 'Select Features', Close | |
| Click Pencil to edit | |
| Click 'Delete selected features' | |
| To reduce the number of features (to stay within Google My Maps 2000 feature limit) | |
| //Aggregate combines all items into one feature | |
| Aggregate | |
| Processing -> Toolbox -> Aggregate | |
| Remove all items in Aggregates list | |
| Run | |
| //Dissolve connects neighbouring items (so only somewhat reduces features) | |
| Dissolve (Note: displays a single confidence score for all items in Google Earth) | |
| Vector -> Geoprocessing Tools -> Dissolve | |
| Run | |
| Convert geojson to kml: | |
| Open in QGIS | |
| Layer -> right-click -> Properties | |
| Choose a style such as 'outline red' | |
| Layer -> right-click -> Export -> Save feature as | |
| Set 'Format' to KML | |
| Set 'Symbology export' to 'Symbol Layer Symbology' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment