How We Used AI to Detect Distances in 2D Images

AI and synthetic data revolutionize 3D distance estimation from 2D images.

Scroll Down


Project Timeline



Increased in ROI revenue

How We Used AI to Detect Distances in 2D Images

Project Overview

In the realm of autonomous vehicle technology and road scene analysis, accurately estimating distances from 2D images presents a significant challenge. Traditional methods, such as manual annotation or reliance on expensive technologies like LiDAR, are either impractical or cost-prohibitive. The key difficulties we faced included:

  • Inefficiency of Manual Annotation: Annotating 3D distances on 2D images is inherently limited and time-consuming.
  • High Costs of Advanced Sensors: Technologies like LiDAR are effective but involve substantial financial and time investments.
  • Lack of Ground Truth for Supervised Learning: Developing a reliable algorithm for 3D distance detection requires accurate, annotated 3D data, which is challenging to obtain.

Project Execution

Our approach combined innovative AI techniques and synthetic data generation to overcome these challenges. The steps involved in our solution were:

  • Synthetic Data Generation: We leveraged simulation environments and 3D rendering tools to create synthetic datasets with accurately annotated distances.
  • Domain Adaptation: Using techniques like CycleGAN, we adapted these synthetic datasets to resemble real-world data, bridging the gap between simulation and reality.
  • Supervised Learning Algorithm Development: We developed a supervised learning algorithm capable of estimating distances in 3D space from 2D images.

Key aspects of our methodology included:

  • Virtual Environment Creation: We used the Carla tool to simulate various road scenarios.
  • Domain Translation with CycleGAN: This allowed for transforming synthetic data into realistic data representations.
  • VGG-based Convolutional Neural Network for Distance Estimation: Combining feature extraction and regression-focused layers for accurate distance estimation.


The implementation of our methodology yielded impressive results, demonstrating the efficacy of our approach:

  • Comparable Accuracy to LiDAR-Based Data: Our synthesized dataset achieved accuracy levels on par with those derived from LiDAR data.
  • Significant Cost and Time Efficiency: The use of synthetic data generation and domain adaptation methods substantially reduced the costs and time associated with data acquisition.
  • Enhanced Model Generalization: The model showed a strong ability to generalize to diverse road scene environments.
  • Effective Domain Translation: The realism of the domain-translated synthetic data was confirmed through various qualitative assessments.

Key Performance Metrics:

  • Distance Estimation Accuracy: High accuracy in 3D distance estimation from 2D images.
  • Efficiency in Dataset Generation: Reduced time and resources compared to traditional data acquisition methods.
  • Generalization Across Varied Environments: Proven adaptability of the model to different road scenes.

Our innovative approach successfully addressed the challenges of distance estimation in road scenes, paving the way for more advanced and cost-effective autonomous vehicle technologies and road safety analyses.

Looking to advance your business with AI?

Get in Touch