Skip to content

Project for vehicle signals recognition for Master Degree Paper, Russia, Moscow, MISIS 2021-2022

License

Notifications You must be signed in to change notification settings

nevertheless-ui/vehicles-visual-signals-processing

Repository files navigation

vehicles-visual-signals-processing

Title Project for vehicles signals recognition for Master Degree Paper, Russia, Moscow, MISIS 2021-2022

- Python version: 3.9.10

  • Annotation tool: CVAT
  • Project is CLOSED

USAGE

There are 2 types of NN in this repository:

  1. CNN for single image classification - train_cnn_model.py
  2. LSTM for sequence classification - train_lstm_model.py

HINT: use key -h to check arguments to check parameters of learning

DATASETS

  1. Single images (854 items)
  2. Difference betwen first and last frame (838 items)
  3. Sequence of 5 image as AVI files (807 items)

Example of sequences

MODEL RESULTS

  1. LSTM results LSTM
  2. CNN with single images Singleimages
  3. CNN with difference Differences

DATASET COOKBOOK:

To start video chunks from video:

usage: dataset_generator.py [-h] [-i INPUT] [-o OUTPUT] [-m {sequence,singleshot}] [--overwrite] [--debug]

optional arguments: -h, --help show this help message and exit

-i INPUT, --input INPUT Input directory with videos and annotation archive

-o OUTPUT, --output OUTPUT Output directory for dataset

-m {sequence,singleshot}, --mode {sequence,singleshot} Dataset generator mode. Sequence for MJPG and singleshot for JPG

--overwrite Overwrite current dataset directory if exists

--debug Enable debug log writing

Example: raw_data

Extractor description:

  1. Default directory for input video files: "data\raw_data" (can be changed in .\utils\constants.py)
  2. Natively supported video file format:
  • ".TS" with 30 FPS.
  • Example: "REC25915.ts"
  1. Annotation support type:
  • XML (CVAT v.1.1)
  • Must be track with 2 points
  • Must be placed "as is" in native ZIP archive from CVAT export
  • Must be named natively with CVAT export name
  • Example: "task_rec25915.ts_cvat for video 1.1.zip"
  1. Extracted video chunks are placed in new dataset directory
  2. Extractor creates MJPG chunk from each availible track annotation:
  • format: "{file}{label_name}{class_type}_{class_name}_tr{track_num}_seq{chunk_num}_fr{frame_num}.mjpg"

HINTS:

  1. Creating virtual environment:
  • python -m venv .venv
  1. Activating virtual environment:
  • CMD: ..venv\Scripts\activate.bat
  • PowerShell: ..venv\Scripts\Activate.ps1
  • Linux Terminal: source .venv/bin/activate
  1. Installation requirements:
  • pip3 install -r requirements.txt
  1. Installation CUDA for Windows

  2. Installation PyTorch docs

About

Project for vehicle signals recognition for Master Degree Paper, Russia, Moscow, MISIS 2021-2022

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages