Project for vehicles signals recognition for Master Degree Paper, Russia, Moscow, MISIS 2021-2022
- Annotation tool: CVAT
- Project is CLOSED
There are 2 types of NN in this repository:
- CNN for single image classification - train_cnn_model.py
- LSTM for sequence classification - train_lstm_model.py
HINT: use key -h to check arguments to check parameters of learning
- Single images (854 items)
- Difference betwen first and last frame (838 items)
- Sequence of 5 image as AVI files (807 items)
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:
- Default directory for input video files: "data\raw_data" (can be changed in .\utils\constants.py)
- Natively supported video file format:
- ".TS" with 30 FPS.
- Example: "REC25915.ts"
- 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"
- Extracted video chunks are placed in new dataset directory
- 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"
- Creating virtual environment:
- python -m venv .venv
- Activating virtual environment:
- CMD: ..venv\Scripts\activate.bat
- PowerShell: ..venv\Scripts\Activate.ps1
- Linux Terminal: source .venv/bin/activate
- Installation requirements:
- pip3 install -r requirements.txt