/driver-monitor-system

driver-monitor-system

Primary LanguagePythonMIT LicenseMIT

driver-monitor-system

driver monitor system

UI

screenshot

Dataset

Uploaded on Kaggle, see here for details.

Pretrained Models

See release to get pretrained models.

Environment

  • Train Lightweight-Openpose on Kaggle
  • Train ST-GCN on PC with CPU (training on GPU is not recommended which is even slower than on CPU)

Kaggle Notebook is here

On PC, see dependences in Pipfile.

Install environment

pip install pipenv
pipenv install

Train Lightweight-Openpose Model

export annotation_path=$annotation_path
export img_root_path=$img_root_path
export model_save_dir=$model_save_dir
pipenv run python train_body.py

Train ST-GCN Model

export annotation_path=$annotation_path
export model_save_dir=$model_save_dir
pipenv run python train_body_class.py

Launch app

See release to get video.

export video_path=$video_path
export model_load_path=$model_load_path
export class_model_load_path=$class_model_load_path
pipenv run python app.py