ezerbib / gst-plugins-tf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gst-plugins-tf

Installation

python3 -m venv venv
source venv/bin/activate

pip install --upgrade wheel pip setuptools
pip install --upgrade --requirement requirements.txt

export GOOGLE_APPLICATION_CREDENTIALS=$PWD/credentials/gs_viewer.json
dvc pull

Install Tensorflow

  • Tested on TF-GPU==1.5

TF-CPU

pip install tensorflow==1.15
pip install tensorflow-gpu==1.15

Usage

Run example

./run_example.sh

Run from youtube

assume you have installed youtube-dl

pip install youtube-dl
./run_youtube <youtube url>

To enable plugins implemented in gst/python

export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/venv/lib/gstreamer-1.0/:$PWD/gst/

Plugins

gst_tf_detection

gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! videoconvert ! \
video/x-raw,format=RGB ! gst_tf_detection config=data/tf_object_api_cfg.yml ! videoconvert ! gtksink sync=False
Parameters

gst_detection_overlay

gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! videoconvert ! \
video/x-raw,format=RGB ! gst_tf_detection config=data/tf_object_api_cfg.yml ! videoconvert ! \
gst_detection_overlay ! videoconvert ! gtksink sync=False

Utils

Additional

Enable/Disable TF logs

export TF_CPP_MIN_LOG_LEVEL={0,1,2,3,4,5 ...}

Enable/Disable Gst logs

export GST_DEBUG=python:{0,1,2,3,4,5 ...}

Enable/Disable Python logs

export GST_PYTHON_LOG_LEVEL={0,1,2,3,4,5 ...}

About


Languages

Language:Python 95.5%Language:Shell 4.5%