{"id":16742605,"url":"https://github.com/mchudy/spacenet-building-detection","last_synced_at":"2026-05-16T23:16:32.007Z","repository":{"id":87747793,"uuid":"111227347","full_name":"mchudy/spacenet-building-detection","owner":"mchudy","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-14T18:25:32.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T00:27:04.809Z","etag":null,"topics":["machine-learning","spacenet-dataset","tensorflow"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mchudy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-18T18:03:34.000Z","updated_at":"2023-03-19T18:51:24.000Z","dependencies_parsed_at":"2023-02-28T10:45:47.536Z","dependency_job_id":null,"html_url":"https://github.com/mchudy/spacenet-building-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mchudy/spacenet-building-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchudy%2Fspacenet-building-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchudy%2Fspacenet-building-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchudy%2Fspacenet-building-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchudy%2Fspacenet-building-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mchudy","download_url":"https://codeload.github.com/mchudy/spacenet-building-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchudy%2Fspacenet-building-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33121900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","spacenet-dataset","tensorflow"],"created_at":"2024-10-13T01:24:20.021Z","updated_at":"2026-05-16T23:16:31.991Z","avatar_url":"https://github.com/mchudy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Klasyfikacja pokrycia terenu na zdjęciach satelitarnych - instrukcja techniczna\n\n## Środowisko\nProgram jest napisany w Pythonie 3.6 i był uruchamiany na systemie Ubuntu 17.10.\n\n## Struktura projektu\n- `data`\n  - `3band` - zdjęcia RGB\n  - `8band` - zdjęcia multispektralne\n  - `dist_transforms` - transformaty odległościowe\n  - `masks` - maski binarne (ground truth)\n  - `scaled` - przeskalowane zdjęcia (256x256)\n  - `vectordata` - oryginalne wektorowe dane testowe (wielokąty)\n- `image_plots` - wykresy porównujące zdjęcia wyjściowe sieci z oryginalnymi danymi\n- `models` - zapisane modele sieci\n- `output` - testowe dane wyjściowe sieci w formacie gotowym do porównania\n- `results` - pliki csv z danymi zawierającymi koszty dla zbioru treningowego i testowego w ilości epok\n- `scripts` - pomocnicze skrypty w bashu\n- `src` - kod aplikacji\n\n## Instalacja zależności\nInstalacja bibliotek Pythonowych:\n```\nmake requirements\n```\nInstalacja GDAL:\n```bash\nsudo apt-get install libgdal1-dev python3-gdal\nexport CPLUS_INCLUDE_PATH=/usr/include/gdal\nexport C_INCLUDE_PATH=/usr/include/gdal\npip3 install gdal\n```\nPobranie pomocniczych narzędzi SpaceNet:\n```bash\ngit clone https://github.com/SpaceNetChallenge/utilities.git utilities\ngit clone https://github.com/SpaceNetChallenge/BuildingDetectorVisualizer.git visualizer\n```\n\nNapisany program jest przystosowany do uruchamiania na GPU (wykorzystuje `tensorflow-gpu`). Można go uruchamiać także na CPU (wtedy należy zainstalować `tensorflow` zamiast `tensorflow-gpu`), ale w przypadku posiadania karty graficznej NVidii będzie to zdecydowanie wolniejsze. Uruchomienie Tensorflow na GPU wymaga instalacji CUDA Toolkit 8.0 oraz cuDNN v6.0 (szczegóły odnośnie wsparcia dla GPU można znaleźć na stronie https://www.tensorflow.org/install/install_linux, cały proces jest niestety dość skomplikowany).\n\n## Pobranie danych\n\nDane ze SpaceNet znajdują się w bucketach AWS S3. Do ich pobrania potrzebne jest konto na AWSie i skonfigurowanie AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.\nNastępnie dane można pobrać następująco:\n```\nmake download-data city={miasto}\n```\nDostępne miasta: `rio`, `vegas`, `paris`, `paris2`, `shanghai`, `khaortum`.\nProgram jest przystosowany do pracy na danych z Rio, użycie danych z innych miast może wymagać niewielkich zmian w kodzie (inna struktura folderów).\n\n## Preprocessing\nNa proces preprocessingu składają się:\n- losowe przemieszanie danych\n- przeskalowanie obrazków\n- generacja masek\n- generacja transformat odległościowych\n\nCałość zawiera się w skrypcie `preprocess.py` i można go uruchomić za pomocą make'a:\n```\nmake preprocess\n```\n\n## Uczenie\nDefinicja sieci znajduje się w pliku `unet.py`, a skrypt do trenowania i testowania sieci w pliku `train.py` (w tym pliku zdefiniowane są także parametry do uczenia sieci). Uczenie można uruchomieć poleceniem:\n```\nmake train\n```\n\n## Testowanie i postprocessing\nDo obliczenia F1-score i wizualizacji rezultatów można użyć narzędzia SpaceNetVisualizer:\n```\njava -jar ./visualizer/visualizer-1.1/visualizer.jar -truth ./output/geojson/truth.csv -solution ./output/geojson/result{data_obliczen}.csv -image3-dir ./data/rio/3band -image8-dir ./data/rio/8band -band-triplets ./visualizer/visualizer-1.1/data/band-triplets.txt\n```\nAby narysować wykres kosztu na zbiorze treningowym i testowym w funkcji epok można wywołać:\n```\npython3 ./src/visualize.py cost --file ./results/csv/{data_eksperymentu}.csv --output {ścieżka_pliku_wynikowego} --title {tytuł_wykresu}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchudy%2Fspacenet-building-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmchudy%2Fspacenet-building-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchudy%2Fspacenet-building-detection/lists"}