deepstack-ui

deepstack-ui

Docker app from ndetar's Repository

Overview

UI for working with Deepstack. Allows uploading an image and performing object detection or face recognition with Deepstack. Also faces can be registered with Deepstack. The effect of various parameters can be explored, including filtering objects by confidence, type and location in the image. Created by robmarkcole. *I am not the creator or maintainer of this container I am merely providing the Unraid template.

deepstack-ui

UI for working with Deepstack. Allows uploading an image and performing object detection or face recognition with Deepstack. Also faces can be registered with Deepstack. The effect of various parameters can be explored, including filtering objects by confidence, type and location in the image.

Run deepstack

Run deepstack object detection:

docker run -e VISION-DETECTION=True -p 80:5000 deepquestai/deepstack:latest

You will need the ip address of the machine running deepstack, which in my case is 192.168.1.133.

Run deepstack-ui with Docker

The deepstack-ui is designed to be run in a docker container. The UI picks up the information about your deepstack instance from environment variables which are passed into the container using the -e VARIABLE=value approach. All environment variables that can be passed are listed below:

- DEEPSTACK_IP : the IP address of your deepstack instance, default "localhost"
- DEEPSTACK_PORT : the PORT of your deepstack instance, default 80
- DEEPSTACK_API_KEY : the API key of your deepstack instance, if you have set one
- DEEPSTACK_TIMEOUT : the timeout to wait for deepstack, default 30 seconds
- DEEPSTACK_CUSTOM_MODEL : the name of a custom model, if you wish to use one
- DEEPSTACK_UI_DEBUG_MODE : options `True` or `False` (default). Lowers the minimum confidence threshold to 1%

From the root dir, build the deepstack-ui container from source and then run the UI, passing the DEEPSTACK_IP environment variable:

    docker build -t deepstack-ui .
    OR
    docker pull robmarkcole/deepstack-ui:latest

    docker run -p 8501:8501 -e DEEPSTACK_IP='192.168.1.133' deepstack-ui

The UI is now viewable at http://localhost:8501 (not whatever ip address is shown in the logs, this is the internal docker ip)

Alternatively if you are running deepstack with non default parameters, an example would be:

docker run -p 8501:8501 \
-e DEEPSTACK_IP='192.168.1.133' \
-e DEEPSTACK_PORT=80 \
-e DEEPSTACK_TIMEOUT=20 \
-e DEEPSTACK_CUSTOM_MODEL=mask \
deepstack-ui

Docker-compose

An example docker-compose file is provided. For run commands see here but the main one you need is docker-compose up.

FAQ

Q1: I get the error: TypeError: cannot unpack non-iterable DeepstackException object

A1: You probably didn't pass the required environment variables (DEEPSTACK_IP etc.)


Development

  • Create and activate a venv: python3 -m venv venv and source venv/bin/activate
  • Install requirements: pip3 install -r requirements.txt
  • Export required environment variables: export DEEPSTACK_CUSTOM_MODEL='mask'
  • Run streamlit from app folder: streamlit run deepstack-ui.py

Install deepstack-ui on Unraid in a few clicks.

Find deepstack-ui in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for deepstack-ui Review the template variables and paths Click Install

Requirements

Deepstack

Download Statistics

580,825
Total Downloads
1,079
This Month
2,814
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Details

Repository
robmarkcole/deepstack-ui
Last Updated2021-09-03
First Seen2020-12-31

Runtime arguments

Web UI
http://[IP]:[PORT:8501]
Network
bridge
Shell
sh
Privileged
false

Template configuration

WebUIPorttcp

For access to the Web UI. Default is 8501.

Target
8501
Default
8501
Value
8501
Deepstack IPVariable

The IP address of your Deepstack instance. Default is localhost.

Target
DEEPSTACK_IP
Default
localhost
Value
localhost
Deepstack PortVariable

The PORT of your Deepstack instance. Default is 80.

Target
DEEPSTACK_PORT
Default
80
Value
80
Deepstack API KeyVariable

The API key of your Deepstack instance, if you have set one.

Target
DEEPSTACK_API_KEY
Deepstack TimeoutVariable

The timeout to wait for Deepstack. Default is 10 seconds.

Target
DEEPSTACK_TIMEOUT
Default
10
Value
10
Deepstack Custom ModelVariable

The name of a custom model, if you wish to use one.

Target
DEEPSTACK_CUSTOM_MODEL
Deepstack UI Debug ModeVariable

Lowers the minimum confidence threshold to 1%. Default is False.

Target
DEEPSTACK_UI_DEBUG_MODE
Default
False|True
Value
False