Git Product home page Git Product logo

sdc-project-1's Introduction

Object Detection in an Urban Environment

I. Project Overview

In this project, the below items are covered.

  • Download dataset using the provided script(download_process.py)
  • Implement a script(create_split.py) splitting the downloaded dataset into three sets(train, validation, and test)
  • Implement a script(Exploratory Data Analysis.ipynb) analyzing the downloaded dataset
  • Train/Evaluate the reference model using the provided scripts
  • Improve the reference model by changing the training configurations
  • Generate a video showing the working of the improved model

II. CAUTION !!!

I've not modified the provieded Dockerfile. However, it seems that the ToT Dockerfile is not working properly(raising a lot of exceptions). So, after building the docker image, I've modified the below manually:

  • Replace keras package: link
    • The dataset download script didn't work without this modification
  • Replace function base script: link
    • The evaluation script didn't work without this modification

III. Setup

III.1. Clone repository

mkdir {PRJ_TOP_DIR}
cd {PRJ_TOP_DIR}
git clone https://github.com/aram-father/SDC-Project-1.git

III.2. Build docker image & Start container

cd {PRJ_TOP_DIR}/SDC-Project-1/build
docker build -t project-dev -f Dockerfile .
docker run --gpus all -v {PRJ_TOP_DIR}/SDC-Project-1/:/app/project/ --network=host -ti project-dev bash

III.3. Download dataset

cd {PRJ_TOP_DIR}/SDC-Project-1
mkdir ./data
python download_process.py --data_dir ./data

Dataset

Exploratory Data Analysis.ipynb explores the downloaded dataset. As the below figure shows, the dataset has a lot of images containing vehicle, pedestrian, and cyclist labels.

eda_ex0.png

Furthermore, I've sub-sampled the images from the dataset and visualized the label distribution as below. I could see that there is a relatively smaller number of labels for cyclists than vehicles and pedestrians.

eda_ex1.png

Cross validation

create_split.py splits the downloaded dataset(III.3) into the below three sets.

  • train: 80% of the dataset
  • val(idataion): 10% of the dataset
  • test: 10% of the dataset

Reference experiment

loss_ref.png

I could see that the loss didn't reach to the plateau. So, it might be possible to improve the model by increasing the training epoch.

Improve on the reference

My finding from the result of the reference model was that the loss didn't reach to plateau. So, I've increased the trainig epoch.

I found that there is an augmentation called ssd_random_crop which is recommended for the ssd resnet. So, I've used it.

Lastly, I found that a alot of images are dark and the labels are occuluded frequently. So, I've added the below data augmentations.

  • random_rgb_to_gray
  • random_adjust_brightness
  • random_black_patches

The resulting pipeline config file is ./experiments/experiment2/pipeline_new.config.

The below figure shows the result of the implroved model.

loss_improved

reference_model improved_model improvement(%)
classification_loss 0.535 0.382 -28.614
localization_loss 0.514 0.384 -25.229
regularization_loss 0.452 0.442 -2.211
total_loss 1.501 1.208 -19.520

Model export

I've exported the improved model at ./experiments/experiment2/exported/saved_model

Inference video

Here is the resulting inference video.

animation.gif

sdc-project-1's People

Contributors

mvirgo avatar abhiojha8 avatar aram-father avatar sudkul avatar defqoon avatar uanjali avatar ssubbotin avatar

Watchers

James Cloos 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.