Coder Social home page Coder Social logo

carspeed's Introduction

DashCamp_CarSpeed

Introduction

This repos is an attempt to address the commaai challenge. The challenge is to predict the car speed with recorded videos from Dash Cam located under the mirror in front of a car. Check this link for more details about the challenge and downloading the data: speedchallenge.

Optical Flow

Based on previous attempts, one of the fastest approach in terms of training and performance is to apply the Optical flow concept.

Optical flow is one of the most basic concepts in computer vision, and refers to the apparent motion of objects in the image due to the relative motion between camera and scene.

Using Optical flow, we can calculate the two components of speed(u,v) using the following equations:

equation

where V and w are the linear and angular velocities of the camera and h is the distance between the camera and the plane(road).

In this approach the angular velocity is neglected. for more details, can take a look at this blog and its references:Car speed estimation from a windshild camera.

Performance

The train dataset(train.mp4) is divided into the data into train(95%) and validation(5%). The mean squared error for train and validation are as follows:

  • Training dataset - 4.7
  • Validation dataset - 2.66

Plot

The training graph:

Train Graph

The valiation graph:

Validation Graph

Test speed prediction(the ground truth is not released publicly)

The speed prediction for test video(test.mp4) is generated and saved in this repo as test.txt.

Running the code

First, download the data folder from speedchallenge. Then just run the speed_challenge.py (make sure tools.py and data folder are available in the same directory).

Future Improvement

The model does not currently predict the car's speed accurately where there is no lane lines. This issue is most obvious in the testset and should be addressed in the future improvements.

carspeed's People

Contributors

alnaeini 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.