Skip to content
Deepdetect jpeg streamer predictor
Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Usage example of gluedd, inspired from livedetect.

It reads JPEG streams and webcam and passes to Deepdetect. It creates a webserver that can be used to debug the models. It also allows to update Items of an OpenHab instance, allowing to connect DeepDetect models with


To follow this example case you need (on a rpi3):

  • Docker (to run the DeepDetect API)
  • Golang (to build this project)


1) Setup Deepdetect API server:

(See also the livedetect step-by-step guide)

Starts the Deepdetect API (on a rpi3 with ncnn in this example):

$> docker run --restart=always --name deepdetect -d -p 8890:8080 -v $HOME/models:/opt/models jolibrain/deepdetect_ncnn_pi3

Fixup model folder permissions:

$> sudo chown -R $(id -u ${USER}):$(id -g ${USER}) $HOME/models 

Create a service:

$> curl -X PUT http://localhost:8890/services/squeezenet_ssd_voc -d '{
    "description": "Squeezenet SSD",
    "model": {
        "repository": "/opt/models/squeezenet_ssd_voc",
        "create_repository": true,
    "mllib": "ncnn",
    "type": "supervised",
    "parameters": {
        "input": {
            "connector": "image"

2) Build the project (you need go)

$> go get
$> pushd $GOPATH/src/
$> make build

3) Create config file

# Deep detect configs
api_server: "http://localhost:8080/" # Deep detect api
service: "squeezenet_ssd_voc"
buffer_size: 1 # 0 to disable fixed-buffering
preview: true
confidence: 0.3

# Stream
base_url: "" # live preview stream url
stream_url: "" # Remote Jpeg stream
client_timeout: 30

# Openhab
vehicle_item: "Camera1VehicleDetection" 
person_item: "Camera1HumanDetection"
animal_item: "Camera1AnimalDetection"
openhab_url: "http://openhabianpi:8080"

# Resize options

## Webcam
webcam_width: 300
webcam_height: 300

## Jpeg stream resize
image_width: 300
image_height: 300

## General resizing options
resize: true # Enable image resizing
approx: true # Resize approximation

4) Run it

Against a local webcam:

$> ./gluedd-cli --config config.yaml webcam 0

Predict from a JPEG stream:

$> ./gluedd-cli --config config.yaml stream

Predict from a JPEG stream and send Item updates to openhab:

$> ./gluedd-cli --config config.yaml openhab

If you configured preview: true you can point your browser to base_url to see the prediction live stream. (e.g. http://localhost:4000/ in the following example)

You can’t perform that action at this time.