https://github.com/jayqi/sample-mapillary-detections
A proof-of-concept Python package for analyzing panoramic street view imagery from Mapillary
https://github.com/jayqi/sample-mapillary-detections
Last synced: 10 months ago
JSON representation
A proof-of-concept Python package for analyzing panoramic street view imagery from Mapillary
- Host: GitHub
- URL: https://github.com/jayqi/sample-mapillary-detections
- Owner: jayqi
- License: mit
- Created: 2025-03-02T23:39:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-02T23:57:05.000Z (over 1 year ago)
- Last Synced: 2025-07-19T00:41:27.116Z (11 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 122 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sample-mapillary-detections
A proof-of-concept Python package for analyzing panoramic street view imagery from Mapillary. Given an input geographical region as a polygon, it will:
- Sample locations in the region with a [low-discrepancy](https://en.wikipedia.org/wiki/Low-discrepancy_sequence) algorithm
- Query Mapillary for images near each sampled location and select the nearest image that has segmentation results
- Calculate the total proportion of view area for a select set of segmentation classes
See [`notebooks/demo.ipynb`](./notebooks/demo.ipynb) for an demonstration using [sample input data](./data/BeverlyHills.geojson).
This project was developed in association with [Civic Tech DC](https://www.civictechdc.org/).
## Installation
1. Clone this repository and set it as your working directory.
```bash
git clone https://github.com/jayqi/sample-mapillary-detections.git
cd sample-mapillary-detections
```
2. Install dependencies. Using [uv](https://docs.astral.sh/uv/) is recommended to reproduce the exact environment from the provided lockfile.
```bash
uv sync
```
Alternatively, you can install the package in any typical way, such as with Pip. **This approach is less reliable as it will not use locked dependency versions.** Using a virtual environment is recommended. This project was developed in Python 3.12.
```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .
```
3. Set up your Mapillary credentials. You will need to register an account with [Mapillary](https://www.mapillary.com/). You can find the "Client Token" on the [Developers dashboard](https://www.mapillary.com/dashboard/developers). Create a `.env` file from [`.env.example`](./.env.example) and set your token.