thomasht86/road-images-and-embeddings
Norwegian Road Images with Embeddings (Trondheim Area) A dataset of 34,908 road images from the Trondheim region of Norway (~40km radius), captured by Statens vegvesen (Norwegian Public Roads Administration) in 2025. Each image is paired with rich geospatial metadata, nearest address information, and a 3072-dimensional image embedding from Google's gemini-embedding-2-preview model. Dataset Structure Each example contains: Field Type Description image… See the full description on the dataset page: https://huggingface.co/datasets/thomasht86/road-images-and-embeddings.
Norwegian Road Images with Embeddings (Trondheim Area)
A dataset of 34,908 road images from the Trondheim region of Norway (~40km radius), captured by Statens vegvesen (Norwegian Public Roads Administration) in 2025. Each image is paired with rich geospatial metadata, nearest address information, and a 3072-dimensional image embedding from Google's gemini-embedding-2-preview model.
Dataset Description
- Source: Vegbilder WFS (OGC WFS 2.0.0)
- License: NLOD 2.0 (Norwegian Licence for Open Government Data) - free to use with attribution
- Attribution: Statens vegvesen / Norwegian Public Roads Administration
- Area: Trondheim, Norway (~40km radius, bbox: 63.07-63.79N, 9.61-11.19E)
- Spacing: Images sampled at ~100m intervals along each road segment
- Resolution: 4011 x 2018 pixels (planar road camera images)
- Embeddings: 3072-dimensional vectors from
gemini-embedding-2-preview
Dataset Structure
Each example contains:
Road Category Distribution
~82% of images have a resolved nearest address from Geonorge.
Usage
Load the dataset
from datasets import load_dataset
ds = load_dataset("thomasht86/road-images-and-embeddings", split="train")
# Access a single example
example = ds[0]
print(example["address_text"]) # "Kvamsveien 72, 7336 MELDAL, ORKLAND"
print(example["image"].size) # (4011, 2018)
print(len(example["embedding"])) # 3072Stream the dataset (recommended for large datasets)
from datasets import load_dataset
ds = load_dataset("thomasht86/road-images-and-embeddings", split="train", streaming=True)
for example in ds:
image = example["image"]
embedding = example["embedding"]
lat, lon = example["lat"], example["lon"]
# Process...Use embeddings for similarity search
import numpy as np
from datasets import load_dataset
ds = load_dataset("thomasht86/road-images-and-embeddings", split="train")
# Build embedding matrix
embeddings = np.array(ds["embedding"]) # (34908, 3072)
# Find similar images to the first one
query = embeddings[0]
similarities = embeddings @ query / (np.linalg.norm(embeddings, axis=1) * np.linalg.norm(query))
top_k = np.argsort(similarities)[-5:][::-1]
for idx in top_k:
print(f" {ds[int(idx)]['address_text']} (similarity: {similarities[idx]:.3f})")Filter by location or road type
# Only European highways
e_roads = ds.filter(lambda x: x["road_category"] == "E")
# Only images near Trondheim city center
import math
def near_center(example):
dlat = example["lat"] - 63.43
dlon = example["lon"] - 10.40
return math.sqrt(dlat**2 + dlon**2) < 0.05
city_center = ds.filter(near_center)Data Collection
- Image metadata was collected via the Vegbilder WFS endpoint, tiling the bounding box into 0.01-degree chunks
- Address enrichment was performed using the Geonorge punktsok API, with coordinate-grid caching at ~100m resolution
- Image thinning was applied at 100m minimum spacing along each road segment to reduce redundancy (original dataset: 243,418 images)
- Embeddings were generated using Google Gemini Batch API with the
gemini-embedding-2-previewmultimodal embedding model at 3072 dimensions
Intended Uses
- Visual road condition monitoring and analysis
- Geospatial image search and retrieval
- Multimodal search applications (text-to-image via shared embedding space)
- Training and evaluation of road scene understanding models
- Urban and infrastructure planning research
Limitations
- Images are from 2025 only (single year snapshot)
- Coverage is limited to the Trondheim area (~40km radius)
- ~18% of images lack address information (rural/remote areas)
- 186 images from the original selection could not be downloaded (0.5%)
- Embeddings are from a preview model (
gemini-embedding-2-preview) which may change
Citation
If you use this dataset, please credit the original data source:
Statens vegvesen (2025). Vegbilder. Norwegian Public Roads Administration.
Licensed under NLOD 2.0: https://data.norge.no/nlod/en/2.0