GithubHelp home page GithubHelp logo

abd-demo's Introduction

Ditto AI Table Top Demo On-Board UxV Software

This repo contains two components necessary for the Ditto AI Table Top Demo.

  1. Common Operational Database (COD) Stub Service (NodeJS)
  2. Automatic Target Recognition (ATR) Service

These services are meant to be deployed as a component of the larger table top demo Infrastructure as Code (IaC), however can be operated on a local machine for testing!

How does it work?

In order to showcase ditto's integration with AI capabilities we have taken one of the most common languages, Python, and combined it with Ditto running inside NodeJS.

COD Stub Features

Insert Contact Report

This call will insert a provided contact report into the TAK Chat ditto collection and a processed image (+ thumbnail) into the TAK Attachments ditto collection.

  • URL: /model/insert
  • Method: POST
  • Sample Call:
    curl -X POST http://yourserver.com/model/insert/ \
          -H "Content-Type: application/json" \
          -d @sampleData.json
    
  • Sample Data
      {
          "confidence": "<float>",
          "bbox": "Array<[xmin, ymin, xmax, ymax]>",
          "class": "<string>",
          "lat": "<float>",
          "long": "<float>",
          "image_path": "<string>",
          "thumb_path": "<string>",
          "image_size": "<float>",
          "thumb_size": "<float>"
      }

Start ATR Ditto Update

This call will trigger the startATR() function which will invoke a ditto update with a status property of "start".

  • URL: /model/start
  • Method: POST
  • Sample Call:
    curl -X POST http://yourserver.com/model/start/ 
    

Stop ATR Ditto Update

This call will trigger the stopATR() function which will invoke a ditto update with a status property of "stop".

  • URL: /model/stop
  • Method: POST
  • Sample Call:
    curl -X POST http://yourserver.com/model/stop/ 
    

๐Ÿšง Update ATR Model ๐Ÿšง

This call will reprogram the onboard computer vision model with the provided updates. The existing model parameters will be mapped and replace with provided parameters.

  • URL: /model/update/:id
  • URL Params: id=[string]
  • Method: POST
  • Sample Call:
    curl -X POST http://yourserver.com/model/insert/ \
          -H "Content-Type: application/json" \
          -d @sampleData.json
    
  • Sample Data
    {
      "param1": "<float>",
      "paramN": "<float>"
    }

ATR Features

The ATR will consume a video feed from connected cameras and use a computer vision model to detect objects within the frame. In the current implementation it will count the number of Person detections that are made and will send a contact report and image via the COD Stub API every count of 25.

The frame will include all detection boxes + (label and confidence) drawn by the algorithm.

Start ATR

This call will start the ATR process.

  • URL: /run
  • Method: GET
  • Sample Call:
    curl -X GET "http://127.0.0.1:5000/run"
    

Stop ATR

This call will stop the ATR process.

  • URL: /run
  • Method: GET
  • Sample Call:
    curl -X GET "http://127.0.0.1:5000/stop"
    

Video Feed

This call will present a video feed for images processed by the ATR. index.html has been provided for example.

  • URL: /video_feed
  • Method: GET
  • Sample Call: In browser: http://127.0.0.1:5000/video_feed

Authentication Configuration

How to Install

To install COD_Stub dependencies:

npm install

This will install the packages defined in the package.json file in the repo.

To install ATR dependencies:

python -m pip install -r requirements.txt

This assumes that you have a python virtual environment (don't install globally ๐Ÿ˜…).

How to Run

To start COD_Stub:

node ditto_api.js

To start ATR:

python v8_detector.py

To run a quick sanity check run:

python run_demo.py

This will the start status via the COD_Stub API which will start the ATR via the ATR API. It will run for five seconds with the local camera being used to process frames.

Contact reports will be logged into the NodeJS terminal session, and images will be save to the local directory.

abd-demo's People

Contributors

rutheferd avatar

Watchers

 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.