Giter Club home page Giter Club logo

visionai's Introduction

VisionAI Toolkit by Visionify

VisionAI Apps for Workplace Safety. Pretrained & Ready to deploy.

Documentation Test Status Package version


Documentation: https://docs.visionify.ai


Overview

VisionAI offers a collection of pre-trained apps tailored for workplace safety use cases. Developed by Visionify as part of the Workplace Safety suite, VisionAI is ready for production deployment and accessible through both CLI and web-based GUI.

Key features of VisionAI include:

  • No hardware installation: Works with any IP/security cameras using RTSP streams. No need to install any new cameras, sensors, or other hardware.

  • User-friendly: Easy-to-use web and CLI interfaces for managing cameras and associated apps, catering to both technical and non-technical users.

  • Production-ready: Apps are trained on diverse, carefully curated datasets from industrial and academic sources, ensuring out-of-the-box functionality.

  • Azure Marketplace Solution: Supports Azure VMs, Azure ARC VMs, Azure IoTEdge, and Azure AKS service, enabling scalable enterprise installations for numerous cameras and apps.

  • Customizable: Allows app customization and model fine-tuning with a flexible architecture based on the NVIDIA Triton server. Refer to customization documentation for more details.

  • Integrations: Seamlessly integrates with Azure Event Hubs, Redis PubSub, and InfluxDB for reporting, alerts, and notifications, with plans to support additional message brokers.

  • Integrations: VisionAI currently integrates with Azure Event hubs, Redis PubSub and InfluxDB time-series database for reporting, alerts and notifications. We have roadmap plans to add support for other message brokers as well.

VisionAI offers a variety of workplace health and safety scenarios, with continuous development of new use cases. View the complete list of over 60 VisionAI Apps here. If you require a specific scenario not listed here, feel free to contact us.

Our primary focus is on workplace health and safety models, but we are expanding our scope to include Quality Inspection, Food Safety/Debris Detection, and more. These additional scenarios are available to customers on a case-by-case basis.

VisionAI Scenarios

Quick Start

  • Install VisionAI through PyPI:
$ pip install visionai
  • Update to the latest version, if already installed:
$ pip install --upgrade --force-reinstall visionai
  • Initialize VisionAI to download and install dependencies (Docker, Pytorch, NVIDIA Triton, etc.):
$ visionai init
  • Upon successful initialization, you should be able to see the following services running:

Service Port Purpose
Web UI http://localhost:3001 VisionAI Web-app
Web API http://localhost:3002 VisionAI API service
Triton HTTP http://localhost:8000 Triton Model server (http)
Triton GRPC grpc://localhost:8001 Triton Model server (grpc)
Triton Metrics http://localhost:8002 Triton Model metrics server (prometheus)
Redis redis://localhost:6379 Redis server, currently supports PUBSUB
Grafana http://localhost:3003 Grafana server for charting & graphing

VisionAI CLI

Cameras

  • List cameras
$ visionai camera list
  • Add/remove cameras through the following commands.
$ visionai camera add --name OFFICE-01 --url rtsp://192.168.0.1:554/1
$ visionai camera remove --name OFFICE-01

VisionAI Apps

  • List available VisionAI Apps:
$ visionai scenario list

VisionAI Scenarios CLI Output

  • Run a VisionAI App:
$ visionai scenario run ppe-detection                          # Web-cam
$                           --camera rtsp://192.168.0.1:554/1   # RTSP camera
$                           --video /path/to/video.mp4          # Video file/youtube link
  • Get details about an app:
$ visionai scenario details ppe-detection

VisionAI Models

VisionAI models are automatically started & stopped as needed. You may want to see their status for debug purposes, you can use the following commands.

  • List models being served by VisionAI:
$ visionai models list

VisionAI Models List CLI Output

  • Start or stop serving models.
$ visionai models serve
$ visionai models stop

VisionAI Pipelines

Pipelines allow running multiple scenarios on a group of cameras. You can use the following commands to manage pipelines.

  • List pipelines:
$ visionai pipeline list
  • Create a pipeline
$ visionai pipeline create --name test-pipeline
  • Add cameras to a pipeline
$ visionai pipeline add-camera --name test-pipeline --camera OFFICE-01
$ visionai pipeline add-camera --name test-pipeline --camera OFFICE-02
  • Add scenarios to a pipeline
$ visionai pipeline add-scenario --name test-pipeline --scenario ppe-detection
$ visionai pipeline add-scenario --name test-pipeline --scenario face-blur
$ visionai pipeline add-scenario --name test-pipeline --scenario smoke-and-fire-detection
  • Start a pipeline
$ visionai pipeline start --name test-pipeline

Get help on any command

You can get help on any command by using the --help flag.

$ visionai pipeline --help

 Usage: visionai pipeline [OPTIONS] COMMAND [ARGS]...

 Manage pipelines
 Pipeline is a sequence of preprocess routines and
 scenarios to be run on a given set of cameras. Each
 pipeline can be configured to run specific scenarios -
 each scenario with their own customizations for event
 notifications. This module provides robust methods for
 managing pipelines, showing their details, adding/remove
 cameras from pipelines and running a pipeline.

╭─ Options ────────────────────────────────────────────────╮
│ --help          Show this message and exit.              │
╰──────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────╮
│ add-camera      Add a camera to a pipeline               │
│ add-preprocess  Add a preprocess routine to a pipeline   │
│ add-scenario    Add a scenario to a pipeline             │
│ create          Create a named pipeline                  │
│ remove-camera   Remove a camera from a pipeline          │
│ reset           Reset the pipeline to original state.    │
│ run             Run a pipeline of scenarios on given     │
│                 cameras                                  │
│ show            Show details of a pipeline               │
╰──────────────────────────────────────────────────────────╯

VisionAI Web-App

  • VisionAI also supports a web-based option for managing cameras, scenarios and pipeline. You can run the following command to start the web-based GUI. Once the web-based GUI is started, you can access it at http://localhost:3001.
$ visionai web start

Web service API available at: http://localhost:3002
Web app available at: http://localhost:3001
  • This would show an initial screen similar to this:

VisionAI Web Application.

  • You can manage cameras, scenarios, pipelines, see events etc., directly on the web-app. The web-app is running your own local compute instance. All the data is saved in your machine, and it is persistent as long as VisionAI application is not uninstalled.

Azure Managed App

Deploy a fully configured and tested solution directly from Azure Marketplace.

VisionAI runs computer vision models, most of which run orders of magnitude faster if executed on a GPU machine. Our Azure Marketplace offer VisionAI Community Edition is available through Azure Marketplace here. The community edition deploys a fully configured Virtual Machine with the recommended hardware and software options.

Deploy to Azure

Events

VisionAI supports a variety of events that can be used to trigger actions. Our primary mode of events is through PubSub mechanism. VisionAI supports redis pubsub, and Azure Event Hub for posting events. These can be later extended to support emails alerts, SMS alerts, and other mechanisms.

Each event is in the form of a JSON object. The following is an example of an event that is posted when a smoke is detected by the smoke-and-fire-detection scenario.

{
    "camera": "camera-01",
    "scenario": "smoke-and-fire-detection",
    "event_name": "smoke-detected",
    "event_details": {
        "camera": "camera-01",
        "date": "2023-01-04 11:05:02",
        "confidence": 0.92
    }
}

To listen to events, you can subscribe to the redis pubsub mechanism as follows:

import redis
r = redis.Redis(host='localhost', port=6379, db=0)
p = r.pubsub()
p.subscribe('visionai')
for message in p.listen():
    print(message)

Redis/Grafana

  • VisionAI supports out-of-box integration with Redis, Prometheus, Grafana and Azure Event Hub. Once the web-app is started, you can view the Grafana dashboard at: http://localhost:3003. The default username and password is admin/admin.
Grafana server is at: http://localhost:3003
Redis server is at: redis://localhost:6379

Next steps

Congratulations! You have successfully configured and used VisionAI toolkit. Now go through Tutorials to learn about how to run multiple scnearios, how to configure each scenario for the events you need, how to set up pipelines with multiple cameras and scenarios.

Or you can also browse through our scenarios section to understand different use-cases that are supported currently. If you have a need for a scenario, do not hesitate to submit a request here.

visionai's People

Contributors

harikavaddadi avatar saiqa-djsanghvi avatar sumanthvisionify avatar hmurari avatar akil-visionify avatar

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.