Giter Club home page Giter Club logo

cognitive-services-spatial-analysis's Introduction

Project Name

Computer Vision for Spatial Analysis

Features

This project framework provides the following features:

  • Sample web application for People Counting Accelerator with spatial analysis

Getting Started

Prerequisites

  • Create an Azure subscription.
  • Create a Computer Vision resource in the Azure portal.
  • Deploy an Azure IoT Hub resource in the Azure portal.
  • Install the spatial analysis container on Azure IoT Hub and Azure IoT Edge.
  • Configure the spatialanalysis operations as documented in this article.
  • Get familiar with the JSON output schema for the spatial analysis events at this article.

For a tutorial on how to use this application see this article.

Installation

Demo

Spatial Analysis Accelerator App

Use the web application in this project to integrate the output of the spatial analysis container and understand the count of people occupying a physical space. The application parses the AI Insight JSON output by the spatial analysis container and determine different counts based on configured operations and “latency”, then it updates a chart UI. To determine the latency, the app inspects the AI Insight timestamp which indicates when the AI Insight event has been generated on the edge device and calculates the latency.

To run the demo, follow these steps:

  1. Setup the spatial analysis module using guide
  2. Use deployment manifest to run all scenarios with pre-configured videos and zones
  3. Clone the repository
  4. Open the SpatialAnalysisAcceleratorApp forlder from the cloned repository folder in VScode
  5. Press ctrl+shift+b and select the "npm install" task to install dependencies
  6. Retrieve the EventHubConsumerGroup and IotHubConnectionString from your Azure IoT Hub resource on Azure portal.
  7. Enter the values in the "EventHubConsumerGroup" and "IotHubConnectionString" fields at .vscode/launch.json
  8. Press [F5] to launch the app
  9. Navigate to localhost:3000 in your browser to see the app in action

Docker Image

  1. Navigate to SpatialAnalysisAcceleratorApp folder (e.g. cd SpatialAnalysisAcceleratorApp)
  2. docker build -t <your_ACR_name>.azurecr.io/spatialanalysisacceleratorapp .
  3. docker push <your_ACR_name>.azurecr.io/spatialanalysisacceleratorapp

Resources

cognitive-services-spatial-analysis's People

Contributors

libwander avatar linndaqun avatar microsoft-github-operations[bot] avatar microsoftopensource avatar patrickfarley avatar srasool avatar

Stargazers

 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

cognitive-services-spatial-analysis's Issues

Spatial Analysis container is running but not sending messages to IoT Hub

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Reproduce steps from Deploy a People Counting web application tutorial
https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/spatial-analysis-web-app

Container is installed and managed as IoT Edge device run on Azure Stack Edge.
IoT Edge agent returns valid "running" status for Spatial Analysis container.

Any log messages given by the failure

logfile.log
deployment.txt

Expected/desired behavior

IoT Edge module sends notifications to IoT Hub

OS and Version?

Azure Stack Edge Pro - 2 GPU

Versions

Azure Stack Edge 2103 (2.2.1540.2890)

Mention any other details that might be useful

Despite container showing "running" status, no messages are sent to IoT Hub.
From attached logs, it looks like Graph cannot be resolved by module.

Logs and deployment which I used are attached as files due to their size.

After deploying test module to check connection between Stack Edge and IoT Hub, like SimulatedTemperatureSensor from marketplace, all telemetry is sent properly from IoT Edge module on Stack Edge to IoT Hub.

Thanks.

Deployment.json Video SAS URL expired

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

In the file Deployment.json there are video example URLs and theirs SAS are expired

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Following Readme results in error

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Follow steps outlined at : https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/spatial-analysis-web-app.
When you reach step 8, of the README here: https://github.com/Azure-Samples/cognitive-services-spatial-analysis/blob/main/README.md#docker-image, you will get the following log error message:

/usr/bin/node ./server.js
Cannot read property 'createFromIotHubConnectionString' of undefined
server-event-reader.js:38
Listening on 3000.
server.js:39

Any log messages given by the failure

See above

Expected/desired behavior

Looks like the module isn't being imported correctly, but why do we not get an error from the require in server-event-reader.js:4 ?

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Ubuntu 20.04

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Deploying to Azure Percept DK

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Deploy mcr.microsoft.com/azure-cognitive-services/vision/spatial-analysis:latest to Azure Percept DK

Any log messages given by the failure

"failed to register layer: Error processing tar file(exit status 1): write /usr/lib/[some kind of .so lib, changes each time]: no space left on device"

Expected/desired behavior

Docker image being pulled and working with Azure IoT Edge

OS and Version?

Mariner

Versions

1.5.4

Mention any other details that might be useful

I suppose that this issue could be fixed by optimizing the image size, to be able to choose which application in advance, weither it's PersonCrossingLine, PersonCrossingPolygon, PersonCount, etc.


Thanks! We'll be in touch soon.

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.