GithubHelp home page GithubHelp logo

johnolafenwa / deepstack Goto Github PK

View Code? Open in Web Editor NEW
655.0 655.0 105.0 404.19 MB

The World's Leading Cross Platform AI Engine for Edge Devices

License: Apache License 2.0

Python 44.93% CSS 22.70% JavaScript 1.27% Go 20.32% HTML 2.14% SCSS 4.49% Shell 0.26% Inno Setup 0.61% PowerShell 3.28%
ai-engine computer-vision deepstack face-detection face-recognition object-detection scene-recognition

deepstack's People

Contributors

abimbolaoo avatar dependabot[bot] avatar johnolafenwa avatar olafenwamoses avatar robmarkcole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepstack's Issues

Jetson Docker Image - Low Confidence Levels

I have just switched to using the Jetson version (deepquestai/deepstack:jetpack) and I am finding that objects are not detected or have low confidence.
I was previously (and have gone back to) using the Windows CPU version which was downloaded from the Deepstack.cc website a few months ago.

Is this a known issue or genuine reason for the differences?

I posted an example image where you can see the greatly different confidence levels from the same image: https://ipcamtalk.com/threads/tool-tutorial-free-ai-person-detection-for-blue-iris.37330/post-513231

Errors in 2020.12.beta

Not sure if this was already posted someplace else but just started getting the following in the stderr.txtx file, in AI-tool I am running the 2020.12 beta of deepstack. I am running CPU not GPU
Here is the error:

Process Process-1:
Traceback (most recent call last):
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 297, in _bootstrap
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 99, in run
File "C:\DeepStack\intelligencelayer\shared\detection.py", line 138, in objectdetection
os.remove(img_path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\Users\baluc\AppData\Local\Temp\DeepStack\f28c9002-abb6-4e2e-a531-e7aa45b48e81'

DeepStack Windows Beta 2 - GPU version is CPU

I installed the new GPU beta 2 version and start 4 instances, and send them all a bunch of images to process.

If you watch GPU ram and CPU usage in Task Manager or Process Hacker as they load and run almost no GPU is being used.

But CPU usage spikes like crazy. So I think somehow platform.json > server.go, is not correctly setting the mode?

Jetson docker image consuming a lot of resources when idling

Awesome work!

Everything is running fine but I'm surprised the CPU is running this much when it's idling. I was looking at the code, guessing the main loop is not waiting for input but ran out of time finding where detection.py's objectdetection() was called and what delay param was used.

Running docker with:
sudo docker run --runtime nvidia --restart unless-stopped -e VISION-DETECTION=True -p 80:5000 deepquestai/deepstack:jetpack-x3-beta

image

CONTAINER ID    NAME         CPU %   MEM USAGE / LIMIT     MEM %   NET I/O         BLOCK I/O       PIDS
5f58358a348c    hopeful_gnu  31.63%  1.475GiB / 3.863GiB   38.18%  51.5MB / 305kB  254MB / 45.1kB  15

/v1/vision/face/register dont work on Windows GPU version

Hello, What a fantastic product!

I`m having issues with the GPU version for windows when it comes to register new faces.
I would love to give som logs but what happens is that the endpoint gets called, and thats that (looks like it hangs)

I`m using/testing the exact same code with docker:latest and docker:x5-cpu and there it works

Sometimes deepstack hangs on Docker aswell and needs a restart, looks for me like its stuck in a loop on one image.
Would it be a thing to ad timeout for the endpoints?

Model sharing

Hello, i made a model to get licence plates from cars so its ready to be used for OCR
On my 50 picture test it found 48 plates (many hard pictures i had never thouth it would get).

How can i share this .pt file with other deepstack users that needs to get licenceplates?

Traceback error

Getting the below error, running the newest beta of DS. Pulled this error from the stderr.txt in AI-Tool. I have uninstalled and reinstalled DS, running CPU not GPU. I am running 3 instances of DS, it will start up run for a short while then I get the error.

Process Process-1:
Traceback (most recent call last):
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 297, in _bootstrap
  File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\process.py", line 99, in run
  File "C:\DeepStack\intelligencelayer\shared\detection.py", line 138, in objectdetection
    os.remove(img_path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\baluc\\AppData\\Local\\Temp\\DeepStack\\b6a0a2d5-5c7e-4347-afb4-0ca00b80e3d4'

Windows GPU python closing down

I'm finding with this that when you start multiple instances of DeepStack all looks OK until you process the first image. When this happens all instances of Python close down.

I can see an error;

‘Key already registered with the same priority: GroupSpatialSoftmax’

Deepstack Windows - Remove outbound connections

I just noticed that upon startup, deepstack.exe connects to 138.197.226.196 for a while and disconnects.

I assume this is a licensing server connection, but since this is open source now it shouldnt be needed?

image

black format error

error: cannot format /Users/robin/Github/DeepStack/deepstack/intelligencelayer/shared/face.py: unindent does not match any outer indentation level (<tokenize>, line 394)

Possible mixing of spaces and tabs

Process delays Windows GPU version

If DeepStack hasn't processed an image for a few minutes the next image it receives takes longer to process.

/v1/vision/detection


v1/backup

v1/restore
[GIN] 2020/12/25 - 10:03:04 |←[97;42m 200 ←[0m| 1.2656734s | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:03:05 |←[97;42m 200 ←[0m| 109.999ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:03:07 |←[97;42m 200 ←[0m| 118.0029ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:03:09 |←[97;42m 200 ←[0m| 112.0003ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:03:11 |←[97;42m 200 ←[0m| 118.0003ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:33:43 |←[97;42m 200 ←[0m| 447.0139ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:42:44 |←[97;42m 200 ←[0m| 405.532ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:50:36 |←[97;42m 200 ←[0m| 430.1112ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:50:37 |←[97;42m 200 ←[0m| 118.0717ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection
[GIN] 2020/12/25 - 10:50:41 |←[97;42m 200 ←[0m| 208.5627ms | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/detection

Home Assistant Object Detection Requests Crashing DeepStack

Follow on from the issue over here:
robmarkcole/HASS-Deepstack-object#169

When I make requests from Home Assistant using a previously setup and working camera for object detection, Deepstack seems to crash (or significantly slow). It was previously working with around 200ms response time. Trying it now, Home Assistant times out, but from DeepStack logs I can see it's taking 4-15 minutes to process images.

If I use similar images through AI Tool, Deepstack works fine, however, once I send a request from Home Assistant, DeepStack seems to crash and stops working with either until the container is rebooted. I'm not seeing significant CPU usage after a request from Home Assistant.

Any ideas or logs/debugging I can do to try and work this out?

What are the plotting helpers for?

In /shared/utils/general.py there are many files for plotting, what are these for?

I am thinking we should try to report a code coverage (%) so the first step would be to remove all redundant code

Docs and tooling for custom models

I am currently researching the landscape of tools for creating datasets for custom object detection models. Is there any docs on this for generating models compatible with deepstack? If not can you provide some guidance or recommendation on how to get started, and I will do so :)

DeepStack Beta Testing

In light of recent bugs and issues with no-avx machines. We just pushed two new images for DeepStack

deepquestai/deepstack:gpu-x3-beta
and
deepquestai/deepstack:cpu-x3-beta

This images should be compatible with no-avx machines as well.

@robmarkcole kindly test this and let's use this thread to address issues ahead on this.
Will share this on the forum as well.

DeepStack UI updates

The deepstack-ui repo is on: https://github.com/robmarkcole/deepstack-ui

I did recently update this to latest streamlit version. Other changes I would like to make include:

  • Deepstack branding by putting the deepstack logo on the front page
  • Support for the face detection endpoint
  • Support for viewing the deepstack instance health metrics

Jetson Nano 2GB - Deepstack Face not responding after few API request

Dear DeepStack Team,
Thanks for great software, i have bought a Nvidia Jetson Nano 2GB to test it but i have some problem with Face Detection.
At the moment i have used the following docker image and enviroment:

docker run -d --runtime nvidia --gpus all -e VISION-FACE=True -e MODE=High -p 80:5000 deepquestai/deepstack:jetpack-2020.12

The problem comes after two face detection runs, the Jetson seems going on SWAP mode and the system is not responsible at all, i have wait 30 minutes to see if something was elaborated but nothing.
As you suggest in most of the thread i have look on the log but is blank, no errors.
I have tested the latest docker images (jetpack-2020.12,jetpack,jetpack-x3-beta) but without so much success.
Have you some idea? 2GB of RAM is not enough? What does it mean “MODE=Low/Medium/High”? From the doc is not so clear :slight_smile: “High” means High CPU/RAM power usage (Better inference)?

I have made some more test using an USB3 SSD drive and remove the ZSWAP, the system is going better and the docker deepstack is working much better but after some more API request the system is going in stale with KSWAPD near 100% of CPU. The problem i think is related to the 2GB of Ram.....

Thanks so much for the answers.

Demo application - Live dashboard for logs/inferences

One application I am interested in developing is a live dashboard that could show historical inferences on Deepstack. This could probably use Grafana for frontend and Postgres/influxdb + S3/minio for backend. The question is how to integrate with Deepstack? I thought about creating an app which proxies deepstack, i.e. redirect requests and captures all the image and inference data. Another idea would be to somehow integrate with the Deepstack logging, perhaps via Redis. Interested to get feedback and suggestions on this issue.

image

from Intel

Deepstack Windows 2020.12 Beta - 404 error

"GPU" version 2020.12:

After a day or so of running fine with AITOOL, the Deepstack url (http://localhost:85/v1/vision/detection in my case) starts giving a 404 page not found error, even in a browser.

This file was created about when it happened:
C:\DeepStack\redis\dump.rdb

And this was recently modified:
C:\Users\username\AppData\Local\DeepStack\logs\stderr.txt

As far as I can tell, the EXE's are all still running normally:
image

Just using built in Defender antivirus. I am running the latest Dev channel release of Windows 10 if it could be a factor.

I had closed/reopened AITOOL a little while before I noticed the error, so its at least possible that it was in the middle of a request to deepstack and the connection was abruptly disconnected.

Logs attached.
Thanks!
logs.zip

Jetson deployment

I mentioned before a desire to get deepstack running on a Jetson, and I think this could be a reference platform for home users. I think there is also an opportunity to make deepstack even more accessible by providing a disk image which can be flashed to an SD card, and then gives a nice UI for setting up the server. One tool to do this is Balena, and there is an example of its use here. One very appealing aspect of the Jetson is that training can also be performed on this platform. Any thoughts on this?

DeepStack Benchmark Script

Scope of this issue is to create a benchmarking procedure for comparing performance across deepstack versions & hardware. I created a script in the linked PR bellow, however this only process object detection images. If the PR below is merged this issue can be closed.

deepstack-lite?

I am not expecting this to be a high priority, but I mentioned I wanted fast inferencing from an RPi and didn't want to require a USB stick for accel. Well I achieved this using tensorflow-lite in the repo below. My thought was this could be rolled into deepstack or a branch at some point, possibly as a deepstack:lite container or similar. Any thoughts?

https://github.com/robmarkcole/tensorflow-lite-rest-server

Home Assistant Integration

There are currently 3 integrations, 1 face, 1 scene and 1 object:

None of these are yet 'official' integrations in Home Assistant, and we ultimately target a Gold integration level, but that will require significantly more work. I had been waiting for an official v1.0 open source of deepstack which should include comprehensive error codes. This will make deepstack far more appealing a platform to Home Assistant devs and hopefully we could get assistance on some of the following:

  1. Currently all integrations are leveraging https://github.com/robmarkcole/deepstack-python this needs to be updated to include asyncio functions
  2. Full test coverage
  3. Add features required for Platinum: see https://www.home-assistant.io/docs/quality_scale/

Collation of Existing Integrations

Benchmarking script

I will happily create a benchmarking script, to evaluate speed of deepstack on different platforms. It would do a batch job of say 30 detections and present the runtime. I don’t want to reinvent the wheel, perhaps you have a script already?

Mode switch doesnt work with Windows 2020.12.beta

I tried with both CPU and GPU versions:

C:\DeepStack>deepstack.exe --VISION-DETECTION True --MODE High --PORT 88
flag provided but not defined: -MODE

I also tried --MODE=High, --MODE and --mode

From the looks of shared.py, I can just use SET MODE=High at a command prompt before running the EXE?

I didnt see the source for deepstack.exe in this repository?

Add terraform/cloudformation script

For people that don't own a GPU of any kind, cloud hosting could be the best option. The scope of this ticket is to add a cloudformation or terraform script to securely expose a deepstack instance

WIN Version of Deepstack- Timeout error

John Been trying to figure out what is causing this error-
HTTPClient timeout at 65 seconds (Max=65 set in 'HTTPClientTimeoutSeconds' in aitool.settings.json): A task was canceled. [TaskCanceledException] Mod: d__48 Line:1575

Been working with the AI-Tool guys but I think it is coming from the Deepstack side? I am running the newest version CPU.2021.01.beta

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.