How amsterdam-ai-team/geolocalization_of_street_objects works
Project Type and Purpose
• This is a data-processing pipeline/project combining a deep-learning object-detection stage (Faster R-CNN) with a geospatial triangulation stage (MRF-based).
• Purpose: automatically detect stationary objects (bicycle symbols) in Street-View-style panoramic images and estimate their real-world coordinates.
Top-Level Components
A. Data Ingestion & Storage
– “data/” folder: raw CSV detections, raw panoramas (downloaded via Street-View API)
– “output/” folder: final geolocated CSVs
B. Object Detection
– models/test.py: Python code fine-tuning + running Faster R-CNN
– scripts/YOLO_to_COCO_converter.py: format conversion
C. Postprocessing
– scripts/postprocessing.py: enriches raw detection output with camera RD-coords, viewpoint angles, depths
D. Geolocation Engine
– main.py: orchestrates the MRF triangulation procedure
– src/geometry.py: implements MRF solver, intersection math
– src/api_request.py: retrieves metadata (e.g. panorama positions) from external API
E. Visualization Examples
– examples/visualize_viewpoints.py, visualize_intersections.py
Data-Flow & Interactions
1. (Optional) Panoramic images & metadata ←→ External Street-View API (via src/api_request.py)
2. Raw images → models/test.py (Faster R-CNN) → raw detection CSV (data/faster_r-cnn_output/)
3. raw CSV → scripts/postprocessing.py → enriched CSV (data/postprocessing_output/)
4. enriched CSV → main.py → MRF triangulation (uses src/geometry.py) → output CSV in output/
5. output CSV → examples/visualize_*.py → visual plots
Architectural Patterns & Design Principles
• Pipeline / Batch Processing: clear sequential stages, each persisting intermediate results to disk
• Modularity / Separation of Concerns: detection, postprocessing, triangulation, visualization all live in distinct folders/modules
• Reusability / Extensibility:
– scripts folder holds converters and helper transforms
– src folder holds utility libraries (geometry, API wrappers)
• Data-Driven: all inputs/outputs are CSVs, making it easy to swap detection or triangulation stages
Important Technologies & Dependencies
• Python 3.x
• PyTorch + TorchVision (Faster R-CNN)
• NumPy, Pandas
• Shapely or custom geometry code for MRF intersections
• External HTTP requests (requests or similar for api_request.py)
• Visualization: Matplotlib, possibly GeoPandas (used in examples)