Code Monkey home page Code Monkey logo

tod2d's Introduction

Introduction

In this project, we propose an approach for data preprocessing based on nuImages database.

Installation

Environment requirements

  • Ubuntu 20.04
  • Python 3.8
  • Pytorch 2.1.2
  • CUDA 12.1

The following installation guild suppose Ubuntu=20.04 python=3.8 pytorch=2.1.2 and cuda=12.1. You may change them according to your system, but linux is mandatory.

  1. Create a conda virtual environment and activate it.
conda create -n TOD2D python=3.8
conda activate TOD2D
  1. Clone the repository.
git clone https://github.com/LuckyMax0722/TOD2D.git
  1. Install the PyTorch and PyTorch Lightning
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install pytorch-lightning==2.1.4
  1. Install the dependencies.
pip install opencv-python
pip install easydict
pip install matplotlib
pip install pandas
pip install ipython
pip install psutil
pip install seaborn
  1. Install the visualization
pip install tensorboard
pip install protobuf==3.19.6

Data Preparation

  1. First, you need to register/login on DriveU to download the DriveU Traffic Light Dataset (DTLD).

The dataset divides the data according to German cities. You can download the data and labels for individual cities, e.g. DTLD/Berlin, or the entire dataset DTLD.

For detail information, please refer to DTLD

Your folder should look like this:

data
├── Berlin
│   ├── Berlin1
│       ├── 2015-04-17_10-50-05  
│           ├── DE_..._k0.tiff
│           ├── DE_..._nativeV2.tiff
│           ├── .......
│       ├── .......
│   ├── Berlin2
├── Bochum
│   ├── .......
├── DTLD_Labels_v2.0
  1. Before processing the data, please set the base path of the project in lib/config.py.
# Main Path
...
CONF.PATH.BASE = '.../TOD2D'  # TODO: change this
...
CONF.PATH.LABELS = os.path.join(CONF.PATH.DATA, 'DTLD_Labels_v2.0/v2.0/DTLD_all.json') # TODO: change this if use different data
  1. First you need to use a data converter to convert the DTLD into a Classifier format dataset.
cd TOD2D
python tools/converter_dtld2cls.py

Your folder should look like this:

dataset_cls
├── dtld_cls
│   ├── images
│       ├── DE_..._k0_0.jpg     
│       ├── DE_..._k0_1.jpg    
│       ├── .......
│   ├── labels
│       ├── dtld_cls.txt     
  1. We manually divided the labels into the categories shown in the table below:
Traffic light color Class number
Red 0
Yellow 1
Green 2
Off 3
Traffic light type Class number
Circle 0
Left 1
Right 2
Straight 3
Other 4

In this work, the label of each image consists of color and type. Based on the above table, some examples can be given, e.g. RedStraight = 0,3, Yellow = 1,4 and Greenbicycle = 2,4

tod2d's People

Contributors

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