yas-sim / openvino-sound-classification-demo-rt

Real-time version of sound_classification_demo in OpenVINO toolkit. Captures audio from microphone, do classification, and display result on the screen with illustration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Real-time version of 'sound_classification_demo.py'

Description:

This is a real-time version of sound_classificatioin_demo in the OpenVINO toolkit. The original demo takes an audio file and show the classification result to the console. I modified the demo program. Now the demo program can capture audio stream from microphone and show the classified result on the display with illustration in real-time.
OpenVINO付属のsound_classification_demoを改造してリアルタイム版にしたデモです。オリジナルのデモはフィルから音声データを読み込み、推論結果を画面に表示するものでした。これを改造し、マイクから音声を読み込み、リアルタイムに分類し、結果を(ヘタクソな)イラストとともに画面に表示するようにしました。

image1

Prerequisites:

  • OpenVINO 2021.4
  • Python modules: pyaudio, numpy, opencv-python
  • (Ubuntu) portaudio : portaudio19-dev

How to run:

  1. Install Intel OpenVINO toolkit 2021.4
    Download
    Get Started Guide

  2. Install Python prerequisites

python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.in

Note: Ubuntu may need to install portaudio library. sudo apt install portaudio19-dev

  1. Download required DL models
python %INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\tools\downloader\downloader.py ^
 --list models.lst
python %INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\tools\downloader\converter.py ^
 --list models.lst --precisions FP16
  1. Run the demo
python sound_classification_demo-rt.py ^
 -m aclnet.xml ^
 --labels .\data\aclnet_53cl.txt ^
 --illustration_dir .\data\acl_img

Note: Python 3.6 may cause an error on load_network().

Note:

Tested on OpenVINO 2021.4 (Win10, Ubuntu 20.04)

About

Real-time version of sound_classification_demo in OpenVINO toolkit. Captures audio from microphone, do classification, and display result on the screen with illustration.


Languages

Language:Python 100.0%