Find repeated objects in street-level photos and browse them as a map or a wall of image crops. The current study covers A Coruña: shop signs, street names, graffiti, street furniture, people, and pets.
The pipeline detects objects, extracts crops, reads sign text, and proposes conservative duplicate groups for review. The viewer supports category, barrio, source, and capture-date filters, with links to individual objects and downloads of the filtered records. Detections and OCR are experimental, not verified labels.
Linked from the site header:
- Visual wandering follows saved visual matches between real street photos, holding the detected object at a fixed screen position during each crossfade. The graph samples up to 15,000 objects, rejects weak and differently proportioned matches, and offers shape or shape-and-colour browsing. Reliable local feature matches refine rotation, scale and position; other pairs use centred object boxes. No model runs while browsing.
- Coruña alphabet composes text from an editable starter of recognized letters on real signs. Alphabet setup and limitations.
- Living typology book creates printable A4 contact sheets with category, date, source and neighbourhood filters, editable captions, object links and PDF output through browser print.
- Graffiti generator (retired 2026-10-31; no longer linked or served). It ran distilled FLUX.2 klein 4B with a Coruña LoRA on this server's GPU. Code, training data and notes remain.
Private Hugging Face datasets and model exports preserve the archive metadata, reviewed graffiti datasets and the completed SD 1.5 and FLUX.2 adapters.
Build the wandering graph from an existing query index and locally cached DINOv2 model:
uv run python explore/build_wander.py --per-category 3000The graph is written to ignored data/coruna/site/wander-data.json; crop descriptors are cached under ~/.local/state/typology-machine/wander-features. Rebuilding does not rerun detection. The default cosine threshold is 0.65, with at most eight neighbours per mode and an aspect-ratio difference capped at 1.6×. Colour ranks only those visually eligible matches. SIFT/RANSAC fits are computed for the six visible alternatives per mode; crop padding is removed using the saved detection geometry. Fits require distributed inliers and modest transforms, with further cumulative limits in the viewer to prevent drift. Full street photos use the existing context service and decode on first access. The map and wall do not load experiment assets.
Python 3.12+ and uv are required.
git clone https://github.com/mateo19182/typology-machine.git
cd typology-machine
uv sync
cp .env.example .envAdd a Mapillary token to .env only if using the Mapillary scripts. Detection
and model experiments may need a compatible GPU and access to the selected model.
Credentials, downloaded imagery, model weights, and generated datasets are not
included. A fresh clone does not contain the data needed to run the viewer.
With an existing exported dataset under data/coruna/site, build the query index
and start the API:
uv run explore/object_api.py build
uv run explore/object_api.py serveIn another terminal, from the repository root, run Caddy:
caddy run --config site/Caddyfile --adapter caddyfileOpen http://127.0.0.1:8790. See deployment for exports,
full-image support, background services, custom paths, R2 delivery, and the
Cloudflare publish step (explore/deploy_cloudflare.sh).
explore/contains acquisition, detection, OCR, review, and export scripts.data/holds local inputs and generated outputs. It is ignored by Git and can be a symlink to a larger disk.explore/object_api.pyserves map counts, paginated records, and downloads from SQLite. Its index lives outside the image archive.site/is a plain HTML/CSS/JavaScript viewer. Locally, Caddy serves its exported copy and proxies the API. The public viewer serves it from a Cloudflare Worker, crops from R2, and only the API and full street images from this server.
Research notes describe individual experiments and their run IDs. NOTES.md, LOG.md, IDEAS.md, and PRIOR_ART.md retain the project notebook and references.
These checks use temporary fixtures and do not need the city dataset or a GPU:
uv run python -m unittest discover -s explore -p test_object_api.py
uv run python -m unittest discover -s explore -p test_export_layers.py
uv run python -m unittest discover -s explore -p test_publish_crops_r2.py
node --test site/test-crop-storage.cjsProject code is licensed under MIT. External imagery, map data, and model weights are separate. See data sources and scope, including the municipal barrio boundaries bundled with the viewer.