Giter Site home page Giter Site logo

matlock08 / deepstream-python Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 82 KB

Sample application running in docker-compose to execute deepstream and read, publish messages from/to mqtt

Dockerfile 3.46% Python 83.84% Shell 12.29% Makefile 0.41%
nvidia deepstream mqtt

deepstream-python's Introduction

Deepstream 6.0.1 with Python on Docker Compose

This project uses deepstream 6.0.1 running on a docker compose environment with mqtt from mosquitto the project is developed in python and reads messages from mqtt to pause, play or stop the pipeline as well as to disable or enable inference.

To run this you need an Ubuntu 18.04, as well as an Nvidia CUDA 11.1 capable card.

Also support to add probe callback to get access to images in pipeline or to send messages

                   ┌ queue - valve - nvinfer -nvtracker - nvinfer - nvinfer -nvinfer ┐ 
                   |                                                                 |
src - streammux - tee                                                              funnel - nvvideoconvert - capsfilter - nvmultistreamtiler - nvvideoconvert - nvosd - nveglglessink
                   |                                                                 |
                   └ queue - valve --------------------------------------------------┘

Run project

To run the project you need to create a deepstream.env file with below keys.

STREAMS is an array of sources rtsp or files

MQTT_BROKER=mqtt
MQTT_PORT=1883
MQTT_TOPIC_COMMAND=/deepstream/command
MQTT_TOPIC_MESSAGES=/deepstream/message
STREAMS="rtsp://url:port/ rtsp://url:port"
SHOW_ON_SCREEN=1
PYTHONUNBUFFERED=1

Then you can build the images by running

docker-compose build

And finally run it by

xhost +
docker-compose up

Once the two instances are running you can connect to the mqtt server on localhost 1883 with any mqtt client and send commands

topics message description
/deepstream/command {"command": "play"} Sets play status to pipeline (Default state)
/deepstream/command {"command": "pause"} Sets pause status to pipeline
/deepstream/command {"command": "stop"} Sets stop status to pipeline
/deepstream/command {"inference": "enabled"} Enables the inference flow (Default state)
/deepstream/command {"inference": "disable"} Disable the inference flow still image visible on sync

deepstream-python's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.