jackersson / gst-plugins-tf

MIT License
17 stars 14 forks source link

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

pip install tensorflow-gpu==1.15

Usage

Run example

./run_example.sh

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 ...}

License

MIT License