ZebraRehab is a Python application that uses data from OpenStreetMap, orthophotos from the National Aerial Orthophotography Plan [PNOA], and a convolutional neural network (CNN) to identify, classify, and visualize pedestrian crosswalks in poor condition in the Valencian Community.
- 🔎 Data query (pedestrian crosswalks) from the Overpass API (OpenStreetMap)
- 🧩 Creation of regions of interest (ROIs) from the retrieved data
- 🚶 Extraction of aerial imagery of pedestrian crosswalks (PNOA)
- 🧠 Classification of crosswalk condition using a trained CNN model (test_acc: 84.9%)
- 🗺️ Visualization of results within the search region
- 💻 Interactive interface built with Streamlit
ZebraRehab/
│
├── data/
│ ├── icon/
│ ├── model/
│ │ └── CNN.h5 # Trained classification model
│ └── to_predict/ # Images pending classification
│
├── info/
│ ├── __init__.py
│ └── info.py # Sidebar
│
├── Logica/
│ ├── __init__.py
│ ├── folders.py # Folder and path management
│ ├── GetMap.py # Image download/retrieval
│ ├── map.py # Map rendering
│ ├── OSM.py # Overpass API / OpenStreetMap queries
│ ├── predict.py # Inference with the CNN model
│ └── ROIs.py # Extraction of regions of interest (crosswalks)
│
├── misc/ # Screenshots
├── main.py
├── requirements.txt
└── README.md
git clone https://github.com/jrvalza/ZebraRehab.git
cd ZebraRehab
pip install -r requirements.txt💡 It is recommended to use a virtual environment (
venvorconda) to avoid dependency conflicts.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtstreamlit run main.pyThe application will open automatically in your browser at http://localhost:8501.
| Technology | Use |
|---|---|
| 🐍 Python | Main language |
| 🎈 Streamlit | User interface |
| 🌐 Requests | HTTP requests to the Overpass API |
| 🗺️ PNOA / OpenStreetMap / Overpass API | Geographic data source |
| 🧠 TensorFlow / Keras | CNN model for crosswalk condition classification (CNN.h5) |
- The Overpass API may limit the number of requests if the service is overused.
- Analyzing smaller regions provides better performance when generating results.




