Deepstack UI

I created a streamlit app for exploring the predicitons of Deepstack object detection, allowing a user can upload an image and filter objects by class, confidence (%) and location in the image. These are configurable parameters for my deepstack-object integration, so it is useful to have an app to explore the effect of these parameters. The app is running in a docker container so no need to install anything in order to run it (assuming you have docker installed). Created this thread to discuss this app, whilst we have a seperate thread for discussion of the integration.
Cheers

12 Likes

It would be awesome having this UI within a add-on, on Home Assistant.

Since this is already build for docker, could you provide this said add-on, please? :smiley:

Thanks .

1 Like

I did spend an hour on making this into an addon, but but found the experience quite frustrating, and gave up (for now). Frustrations are (1) limited docs/examples on addons at the right level of detail, (2) sloooow build times on RPi

1 Like

I hope this helps someone using docker-compose, but I banged my head against the wall for a while before realising that you need to enter the IP address without the single quotes, like this:

environment:
  - DEEPSTACK_IP=10.1.2.3
1 Like

@salle do you want to create a PR adding a docker-compose? Thanks

I can try that a bit later!

1 Like

This is awesome! Perfect for testing / tuning, so thanks!

One question I do have (other than why my cat is being detected as a bird :slight_smile: ) is why the bounding box seems to always be below the object detected:

Any troubleshooting suggestions appreciated!

Is it a very high resolution image? If you can send it to me via DM I will look into it

Thanks - will send DM shortly!

Got this running with the tip about no single quotes from salle.
I was looking forward to this since I was asking questions about my ROI and getting no latest jpg generated.
So this tells me exactly how much of my driveway camera can be used to scan for detection when my vehicle is parked at the top of my driveway.
Unfortunately I see no change after making sure my parked vehicle is entirely outside the ROI that I set.
If I enable the ROI factors in my configuration.yaml I get no detection jpg made. If I comment out all the ROI factors I get detections and the latest jpg as expected.

Anybody else have any issues like this?

The ROI is for detecting objects within the ROI, not outside

Sorry I guess I’m not explaining this well…so I reduce the ROI so my parked vehicle is outside of it and isn’t constantly detected. So it ends up being about 70% of the image is my modified ROI.
Problem is that whenever I put the values for the ROI in to configuration.yaml I don’t get a jpg of the latest detection even when something is detected inside my modified ROI. Confirmed by checking dev tools- states.
The only way I get the latest jpg is to have the values commented out.
I hope this makes sense.
Thanks

@danbutter use the deepstack-ui to see what is going on. My guess is that the confidence is lower within your ROI. Else you can DM me an image and I will take a look

Hi I followed instructions for installing Deepstack object detection on docker. but timeout is not ok (default : 10s). I would install these command

docker run -p 8501:8501 \
-e DEEPSTACK_IP='192.168.1.133' \
-e DEEPSTACK_PORT=80 \
-e DEEPSTACK_API_KEY='My_api_key' \
-e DEEPSTACK_TIMEOUT=20 \
robmarkcole/deepstack-ui:latest`

but i dont know where i do write these commands ?

Regards
Giloris

That is the command to run the ui, enter in your terminal…

Hi Thank you but what is the real format , i need write under one line , i need write IP into ’ ', i need use \ ?
This format not run like this ?
Can you give me the command do i use ?
Regards
Giloris

Please complete a tutorial on docker, this is quite elementary stuff.
Cheers

Hi
Sorry, but my know are well on home assistant (YAML syntax), but i discovery docker syntax and it’s very strong for me.
Regards

Hi my Docker config is ok , deepstack and deepstack ui (steamlit) runs . I have change timing to 20s on deepstack ui container, but i always have these errors on browser :

File "/usr/local/lib/python3.8/site-packages/streamlit/ScriptRunner.py", line 322, in _run_script
    exec(code, module.__dict__)

File "/app/streamlit-ui.py", line 88, in <module>
    predictions = process_image(pil_image, dsobject)

File "/usr/local/lib/python3.8/site-packages/streamlit/caching.py", line 591, in wrapped_func
    return get_or_create_cached_value()

File "/usr/local/lib/python3.8/site-packages/streamlit/caching.py", line 575, in get_or_create_cached_value
    return_value = func(*args, **kwargs)

File "/app/streamlit-ui.py", line 38, in process_image
    dsobject.detect(image_bytes)File "/usr/local/lib/python3.8/site-packages/deepstack/core.py", line 124, in detect
    response = post_image(url, image_bytes, self._api_key, self._timeout)

File "/usr/local/lib/python3.8/site-packages/deepstack/core.py", line 89, in post_image
    raise DeepstackException(

Regards
Giloris

yes, I also get the same error