Git Product home page Git Product logo

vanishing-point-detection's Introduction

Vanishing-point-detection

This repository contains code written for a competition in vanishing point detection in images using Hough transform.

Project Description

The task of detecting the vanishing point in images is of great importance and has a wide range of applications. It arises in the development of systems for autonomous vehicles (localization on the road surface, self-calibration), in the analysis of scene lighting (analysis of color histograms), and in correcting projective distortions.

800 labeled images of the road surface from a vehicle camera, containing coordinates of the vanishing point, are used as data for constructing and testing the algorithm. During testing, the images are augmented by rotation.

Response Format

As a result, the algorithm returns a JSON file in the format:

{
    "file1.jpg": [x1, y1], 
    "file2.jpg": [x2, y2]
}

Test Sample Generation

The test sample is generated using the script test_generation/test_generation.py:

python test_generation/test_generation.py --s path_to_dataset --d path_to_save_new_dataset --num num_of_imgs_to_generate --seed seed

It is assumed that the data folder is structured as follows:

├── dataset
    ├── markup.json
    ├── source

Solution Quality Assessment

The quality of the solution is assessed using an angular metric. The proximity of the predicted point $A$ to the true value $B$ is determined by the angle $\alpha$ between the vectors $\xi$ and $\eta$ drawn to these points from the point $O$, as demonstrated in the figure below.

$$\alpha = \arccos \frac{\left \langle \xi, , \eta \right \rangle}{|\xi||\eta|},$$

where

$$\xi = \begin{bmatrix} A_x \\ A_y \\ 0 \end{bmatrix} - \begin{bmatrix} n/2 \\ m/2 \\ \sqrt{\left( n/2 \right)^2 + \left( m/2 \right)^2} \end{bmatrix}, \quad \eta = \begin{bmatrix} B_x \\ B_y \\ 0 \end{bmatrix} - \begin{bmatrix} n/2 \\ m/2 \\ \sqrt{\left( n/2 \right)^2 + \left( m/2 \right)^2} \end{bmatrix}.$$

Metrics

vanishing-point-detection's People

Contributors

xndrleib avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.