Home ONNX SAGENet Driver Attention Estimation
Post
Cancel

Open In Github

Python scripts for performing driver attention estimation using the SAGENet model in onnx

SAGENet Driver Attention Estimation ONNX Original image:https://commons.wikimedia.org/wiki/File:Salt_transport_by_a_camel_train_on_Lake_Assale_(Karum)_in_Ethiopia.jpg

Requirements

  • Check the requirements.txt file.
  • Additionally, pafy and youtube-dl are required for youtube video inference.

Installation

1
2
pip install -r requirements.txt
pip install pafy youtube_dl=>2021.12.17

ONNX model

The original models were converted to different formats (including .onnx) by PINTO0309, download the models from his repository and save them into the models folder.

Original Repository

The original repository also contains code for estimating the driver’s attention in Pytorch.

Examples

  • Image inference:
1
 python image_attention_estimation.py
  • Video inference:
1
 python video_attention_estimation.py
  • Webcam inference:
1
 python webcam_attention_estimation.py

Inference video Example: https://youtu.be/2g-yWc_AsU0

SAGENet Driver Attention Estimation ONNX

Original video: https://youtu.be/MAj6y23vNuU

References:

This post is licensed under CC BY 4.0 by the author.