Update for compatibility
Browse files- README.md +28 -7
- requirements.txt +93 -2
README.md
CHANGED
|
@@ -1,16 +1,13 @@
|
|
| 1 |
-
|
| 2 |
-
title: building_footprint_segmentation
|
| 3 |
-
app_file: demo.py
|
| 4 |
-
sdk: gradio
|
| 5 |
-
sdk_version: 4.24.0
|
| 6 |
-
---
|
| 7 |
A U-Net model for segmenting buildings from satellite imagery
|
| 8 |
|
| 9 |
A binary segmentation mask (of the same height and width with the input image) should be created The segmentation mask should have a value of 1 at pixels where there is a building and 0 at other pixels.
|
| 10 |
|
| 11 |
The figure below showcases the input and output image expected. In the mask pixels that correspond to pixels in the input image are white and background is black.
|
| 12 |
|
| 13 |
-
 with the following citation:
|
|
@@ -26,3 +23,27 @@ The data used in this project is sourced from [Road and Building Detection Datas
|
|
| 26 |
```
|
| 27 |
|
| 28 |
For the ease of use, relevant parts of this dataset was sourced from [kaggle.com](https://www.kaggle.com/datasets/balraj98/massachusetts-buildings-dataset)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Building Footprint Segmentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
A U-Net model for segmenting buildings from satellite imagery
|
| 3 |
|
| 4 |
A binary segmentation mask (of the same height and width with the input image) should be created The segmentation mask should have a value of 1 at pixels where there is a building and 0 at other pixels.
|
| 5 |
|
| 6 |
The figure below showcases the input and output image expected. In the mask pixels that correspond to pixels in the input image are white and background is black.
|
| 7 |
|
| 8 |
+

|
| 9 |
+
|
| 10 |
+
The training and Machine-learning related code is found at [the Notebook](https://github.com/gunaykrgl/buildingSegmentation/blob/main/Notebook/Building_Segmentation.ipynb).
|
| 11 |
|
| 12 |
# Data
|
| 13 |
The data used in this project is sourced from [Road and Building Detection Datasets](https://www.cs.toronto.edu/~vmnih/data/) with the following citation:
|
|
|
|
| 23 |
```
|
| 24 |
|
| 25 |
For the ease of use, relevant parts of this dataset was sourced from [kaggle.com](https://www.kaggle.com/datasets/balraj98/massachusetts-buildings-dataset)
|
| 26 |
+
|
| 27 |
+
# Remote Running
|
| 28 |
+
You can try the application without installation by navigating to the following link:
|
| 29 |
+
[Building Footprint Segmentation](https://huggingface.co/spaces/gunayk3/building_footprint_segmentation)
|
| 30 |
+
|
| 31 |
+
## Screenshots
|
| 32 |
+
<img src="https://raw.githubusercontent.com/gunaykrgl/buildingSegmentation/main/screenshots/scr1.png" width="600">
|
| 33 |
+
<img src="https://raw.githubusercontent.com/gunaykrgl/buildingSegmentation/main/screenshots/scr2.png" width="600">
|
| 34 |
+
<img src="https://raw.githubusercontent.com/gunaykrgl/buildingSegmentation/main/screenshots/scr3.png" width="600">
|
| 35 |
+
|
| 36 |
+
# Local Installation
|
| 37 |
+
```
|
| 38 |
+
gh repo clone gunaykrgl/buildingSegmentation
|
| 39 |
+
cd buildingSegmentation
|
| 40 |
+
pip install -r requirements.txt
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Running Locally
|
| 44 |
+
After local installation, the application can be run by the following command:
|
| 45 |
+
```
|
| 46 |
+
gradio run demo.py
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
After this command is run, there will be a localhost url be generated at the end of the outputs. Later, the application can be used by navigating to the url in a web browser.
|
requirements.txt
CHANGED
|
@@ -1,5 +1,96 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
keras==2.15.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
matplotlib==3.7.1
|
|
|
|
|
|
|
|
|
|
| 4 |
numpy==1.23.5
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
absl-py==2.1.0
|
| 2 |
+
aiofiles==23.2.1
|
| 3 |
+
altair==5.5.0
|
| 4 |
+
annotated-types==0.7.0
|
| 5 |
+
anyio==4.8.0
|
| 6 |
+
astunparse==1.6.3
|
| 7 |
+
attrs==25.1.0
|
| 8 |
+
cachetools==5.5.2
|
| 9 |
+
certifi==2025.1.31
|
| 10 |
+
charset-normalizer==3.4.1
|
| 11 |
+
click==8.1.8
|
| 12 |
+
contourpy==1.3.0
|
| 13 |
+
cycler==0.12.1
|
| 14 |
+
exceptiongroup==1.2.2
|
| 15 |
+
fastapi==0.115.11
|
| 16 |
+
ffmpy==0.5.0
|
| 17 |
+
filelock==3.17.0
|
| 18 |
+
flatbuffers==25.2.10
|
| 19 |
+
fonttools==4.56.0
|
| 20 |
+
fsspec==2025.3.0
|
| 21 |
+
gast==0.6.0
|
| 22 |
+
google-auth==2.38.0
|
| 23 |
+
google-auth-oauthlib==1.2.1
|
| 24 |
+
google-pasta==0.2.0
|
| 25 |
+
gradio==4.44.1
|
| 26 |
+
gradio_client==1.3.0
|
| 27 |
+
grpcio==1.71.0
|
| 28 |
+
h11==0.14.0
|
| 29 |
+
h5py==3.13.0
|
| 30 |
+
httpcore==1.0.7
|
| 31 |
+
httpx==0.28.1
|
| 32 |
+
huggingface-hub==0.29.3
|
| 33 |
+
idna==3.10
|
| 34 |
+
importlib_metadata==8.6.1
|
| 35 |
+
importlib_resources==6.5.2
|
| 36 |
+
Jinja2==3.1.6
|
| 37 |
+
jsonschema==4.23.0
|
| 38 |
+
jsonschema-specifications==2024.10.1
|
| 39 |
keras==2.15.0
|
| 40 |
+
kiwisolver==1.4.7
|
| 41 |
+
libclang==18.1.1
|
| 42 |
+
Markdown==3.7
|
| 43 |
+
markdown-it-py==3.0.0
|
| 44 |
+
MarkupSafe==2.1.5
|
| 45 |
matplotlib==3.7.1
|
| 46 |
+
mdurl==0.1.2
|
| 47 |
+
ml-dtypes==0.3.2
|
| 48 |
+
narwhals==1.30.0
|
| 49 |
numpy==1.23.5
|
| 50 |
+
oauthlib==3.2.2
|
| 51 |
+
opt_einsum==3.4.0
|
| 52 |
+
orjson==3.10.15
|
| 53 |
+
packaging==24.2
|
| 54 |
+
pandas==2.2.3
|
| 55 |
+
pillow==10.4.0
|
| 56 |
+
protobuf==4.25.6
|
| 57 |
+
pyasn1==0.6.1
|
| 58 |
+
pyasn1_modules==0.4.1
|
| 59 |
+
pydantic==2.10.6
|
| 60 |
+
pydantic_core==2.27.2
|
| 61 |
+
pydub==0.25.1
|
| 62 |
+
Pygments==2.19.1
|
| 63 |
+
pyparsing==3.2.1
|
| 64 |
+
python-dateutil==2.9.0.post0
|
| 65 |
+
python-multipart==0.0.20
|
| 66 |
+
pytz==2025.1
|
| 67 |
+
PyYAML==6.0.2
|
| 68 |
+
referencing==0.36.2
|
| 69 |
+
requests==2.32.3
|
| 70 |
+
requests-oauthlib==2.0.0
|
| 71 |
+
rich==13.9.4
|
| 72 |
+
rpds-py==0.23.1
|
| 73 |
+
rsa==4.9
|
| 74 |
+
ruff==0.9.10
|
| 75 |
+
semantic-version==2.10.0
|
| 76 |
+
shellingham==1.5.4
|
| 77 |
+
six==1.17.0
|
| 78 |
+
sniffio==1.3.1
|
| 79 |
+
starlette==0.46.1
|
| 80 |
+
tensorboard==2.15.2
|
| 81 |
+
tensorboard-data-server==0.7.2
|
| 82 |
+
tensorflow==2.15.1
|
| 83 |
+
tensorflow-estimator==2.15.0
|
| 84 |
+
tensorflow-io-gcs-filesystem==0.37.1
|
| 85 |
+
termcolor==2.5.0
|
| 86 |
+
tomlkit==0.12.0
|
| 87 |
+
tqdm==4.67.1
|
| 88 |
+
typer==0.15.2
|
| 89 |
+
typing_extensions==4.12.2
|
| 90 |
+
tzdata==2025.1
|
| 91 |
+
urllib3==2.3.0
|
| 92 |
+
uvicorn==0.34.0
|
| 93 |
+
websockets==11.0.3
|
| 94 |
+
Werkzeug==3.1.3
|
| 95 |
+
wrapt==1.14.1
|
| 96 |
+
zipp==3.21.0
|