visionify / visionai Goto Github PK
View Code? Open in Web Editor NEWVisionAI library
Home Page: https://docs.visionify.ai
License: GNU General Public License v3.0
VisionAI library
Home Page: https://docs.visionify.ai
License: GNU General Public License v3.0
Currently all scenarios are maintained in visionai-scenarios repo. Even though it is a public repo - it is difficult to have scenarios in a difficult experience for the end-user than having all of them in a single place.
Also having scenarios in a single repo - would give us options to create a new scenario browser web-app that can be launched from the web-app directly.
Scenario module currently supports adding/deleting new scenarios. It would be good to add a support for following type of command. This would make development easier, and also for new folks to contribute to the scenarios.
$ pip install visionai
$ visionai scenarios list # list available scenarios
$ visionai scenario download smoke-and-fire-detection # download smoke-and-fire-detection scenario
$ visionai models serve # serve available models
$ visionai scenario test smoke-and-fire-detection # test with available camera.
This type of flow would provide an easy & intuitive approach for an end-user to try out the scenario independently & quickly.
test
or validate
Include images, annotation examples on main page README.
Check for the working commands
Update documentation in such a way that it reflects the latest working CLI commands
when run visionai init it fails asking for env file
Cameras
GET /cameras - get all cameras available
POST /cameras - add a camera
PUT /cameras/<camera_name> - Update a camera
DELETE /cameras/<camera_name> - Delete a camera
POST /cameras/<camera_name>/start-live-stream
POST /cameras/<camera_name>/stop-live-stream
Scenarios for cameras
GET /cameras/<camera_name>/scenarios - Get all scenarios for cameras
POST /cameras/<camera_name>/scenarios - Add a scenario to a camera
DELETE /cameras/<camera_name>/scenarios/<scenario_name> - Delete a scenario from camera
Model server start/stop
POST /model-server/start - Start all available models
POST /model-server/stop - Stop all available models
POST /model-server/restart - Restart model server
GET /model-server/status - Get different models running as well as server status
Running visionai out of box should be quick and have very minimal dependencies.
Pipelines are a natural extension of what we are doing right now. We are directly managing scenarios & cameras currently. We can apply a scenario to a camera. We can apply multiple scenarios to a camera.
However, there seems to be a missing logical abstraction here. People tend to think in terms of pipelines nowadays - and I think it is a great way to make our solution much more usable.
Following sequence of steps indicate how one might enable running pipelines.
visionai pipeline create --name pipe1
visionai pipeline add-camera --pipeline pipe1 --camera OFFICE-01
visionai pipeline add-camera --pipeline pipe1 --camera OFFICE-02
visionai pipeline add-scenario --piepeline pipe1 --scenario smoke-and-fire-detection
events = [minimal]/[all]? [all]
duration = [always]/[schedule]? [always]
focus_area = [full-frame]/[bounding-box] [full-frame]
visionai pipeline test pipe1 # validate pipeline on usb-camera
visionai pipeline start pipe1 # start command
visionai pipeline start-daemon pipe1 # start in background
visionai pipeline stop pipe1 # stop
visionai pipeline disable pipe1 # disable a pipeline
visionai pipeline enable pipe1 # enable a pipeline
Since people privacy is very critical to any Vision AI solution - we first need to protect any person's faces. To implement this - we need to detect any faces identified and blur them before we run them through additional pipelines.
This is different than other models since the output of this model needs to be fed to subsequent stages of the pipeline.
We will utilize yolov5-face module. This will allow us to use something that is pre-trained, already validated with several different types of images (day vs night, male vs female vs children, indoor vs outdoor scenarios).
visionai models serve
model serve
application. This would ensure that models being served are same as the new models that are downloaded. This would be more intuitiveResolve conflicts after pull main branch
Including dependency on these two packages is causing the installation time go through the roof. This is also true during CI/CD tests when package needs to be built.
util/general.py
that allows you to install a package on demand: check_requirements('torch', install=True)
. This would allow us to reduce the size of the package significantly and make our testing efforts easier.A lot of people are still using Python 3.6 and Python 3.7 models. Need to add support for this.
We need to implement pipeline changes in Poetry - so we can compile and test the build for all these versions and push them in. We can do this only when a PR is created to be merged to main branch. Changes will be primarily for the Azure pipelines yml file. There might be some cases where things might break for Python 3.6, 3.7 -- in those cases we need to make sure to fix our code to support them.
After installation API is not running.
executing visionai init
prompts about Env file.
Where I can find any docs about configuration and running demo with external camera?
Almost every command fails with error:
VisionAI API Failed to establish a connection to the server. Please check if the server is running and reachable.
I managed to execute some demos with webcam, but unable to connect to my rtsp cam or video from file.
Add support for visionai models serve
in CI/CD tests. Right now we have not added any of these test cases to CI/CD because it involves pulling triton docker image which may be too large. Try to optimize this process as much as possible so we can run this as part of CI/CD on occasions (likely weekly once etc).
Work through these items for discovery of this package at PyPi. These stats were obtained from here.
Basic info present? 0
Source repository present? 0
Readme present? 0
License present? 1
Has multiple versions? 1
Follows SemVer? 1
Recent release? 1
Not brand new? 0
1.0.0 or greater? 0
Dependent Packages 0
Dependent Repositories 0
Stars 0
Contributors 0
Libraries.io subscribers 0
Once the web-app support is implemented - next enhancement on the web-app & edge-application would be the ability to stream from the device or any running scenario to the cloud.
Use case would be something like this:
At a high-level, I want to use rtsp-streamer application. Since it provides support for majority of different IP cameras, it would be an ideal source to build upon.
However, after that I am not very sure how this would be implemented overall. Several questions remain:
We have some codebase available at https://github.com/visionify/opencv-livestream
This implements opencv based livestream to a web-app. I think some portions of this might be usable.
Currently all the activity for configuring pipelines, running scenarios etc happens through the CLI. Need support to implement it through web-app. We have a high-level web-app built which shows available scenarios, and allows to create/delete cameras & adding scenarios for them. We need to support opening the web-app through the CLI.
For example:
visionai webapp start # start the web-app.
and
visionai webapp stop # stop the web-app, save any pending states
Use Docker compose type of architecture where we can just bring up couple of containers and web-app will be available at some end-point for us locally. Need to come up with exact architecture definition for this.
When we open the web-app, it needs an API to talk to. This API needs to provide basic functionality with the following:
We need a REST API based framework for this.
I think this needs to be done through some Docker magic. Say port 3001 will be for front-end application, port 3002 will be for the API application. API application itself will be a Dockerhub image that anyone can pull and use.
JSON file is sufficient for version 1. For any organization - even if we have 1000 cameras, it is still managed easily with JSON files. Later we can add support for some other database. For now let's stick with JSON
visionai-grafana | mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
version: '3.4'
services:
redis:
container_name: visionai-redis
image: redis
ports:
- '6379:6379'
grafana:
container_name: visionai-grafana
image: grafana/grafana
ports:
- '3000:3000'
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
- GF_ENABLE_GZIP=true
- GF_USERS_DEFAULT_THEME=dark
- GF_DEFAULT_APP_MODE=development
- GF_INSTALL_PLUGINS=redis-datasource
volumes:
- ./provisioning/datasources:/etc/grafana/provisioning/datasources
- ./data:/var/lib/grafana
user: "$UID:$GID"
Add user to grafana service
Hi, something about shoplifting detection ?
There is a Github action which uses a NPM package that can check for any broken links on our website. We want to integrate support for this in our CI/CD pipeline.
For example, neptune-ai package has this support. We need to go through how they have implemented it and do the same changes for our documentation modules as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.