GithubHelp home page GithubHelp logo

balena-io-experimental / sense-people Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alwaysai/people-counter

7.0 2.0 2.0 172.25 MB

Count people passing by, display it nicely with a Grafana dashboard.

Dockerfile 0.40% Python 84.43% Shell 15.18%
balena balenacloud balenaos balena-sense alwaysai computer-vision aai

sense-people's Introduction

People counter + balenaSense demo

This project combines balenaSense with the people counter demo from alwaysAI. It creates a grafana dashboard that shows the video stream from alwaysAI with aditional metrics.

Required hardware

Before you start

  1. Plug the USB webcam (unless you are using an IP camera) and the USB WiFi dongle into the Jetson Nano
  2. Fit a jumper to J48 on the Jetson Nano board (instructions)
  3. Flash the SD card, and you are good to go!

Usage: Visualization

To visualize statistics and a video stream:

Note that the grafana dashboard will show both stats and the alwaysAI stream so it's better for a live demo.

Usage: Change object detection model

You can change the model that is used to perform object detection via the OBJECT_DETECTION_MODEL environment variable:

Neural Network Framework Dataset Model OBJECT_DETECTION_MODEL value  Reference inference time
caffe COCO MobileNet SSD mobilenet_ssd (default) 400 msec
darknet COCO Yolo v2 tiny yolo_v2_tiny 60 msec
darknet VOC0712 Yolo v2 tiny yolo_v2_tiny_voc 70 msec
darknet COCO Yolo v3 tiny yolo_v3_tiny 60 msec

Usage: Use an IP camera

You can add an RSTP feed url via the IP_CAMERA_FEED environment variable. Examples:

rtsp://192.168.1.10:88

With a video stream defined:

rtsp://192.168.1.10:88/mainVideo

Feed with authentication:

rtsp://username:[email protected]

sense-people's People

Contributors

chrisys avatar jalakoo avatar phil-d-wilson avatar tmigone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

juanengml kekenny

sense-people's Issues

update project to use newest edgeiq:1.8.0 release?

https://alwaysai.co/docs/edgeiq_api/edgeiq_release_notes.html#release-1-8-0

My attempt to update the edgeiq version from alwaysai/edgeiq:nano-0.11.0 to alwaysai/edgeiq:jetson-1.8.0 was not successful

Any plans to update this project to use jetpack4.6 and alwaysai/edgeiq:jetson-1.8.0 ?

Here is my modified Dockerfile

#FROM alwaysai/edgeiq:nano-0.11.0
FROM alwaysai/edgeiq:jetson-1.8.0
WORKDIR /usr/src

COPY . .
RUN apt update && apt install -y python3-pip
RUN pip3 install paho-mqtt

CMD [ "python3", "app.py" ]

My attempt resulted in the following error. Does this have anything to do with not incorporating the alwaysai venv which seems to want python3.7 instead of python3.6?

people-counter-1.8_1  | Traceback (most recent call last):
people-counter-1.8_1  |   File "app.py", line 10, in <module>
people-counter-1.8_1  |     import edgeiq
people-counter-1.8_1  |   File "</usr/local/lib/python3.7/site-packages/edgeiq/__init__.py>", line 3, in <module>
people-counter-1.8_1  |   File "<frozen edgeiq>", line 12, in <module>
people-counter-1.8_1  | Exception: Invalid token! Please run "aai app configure" or "aai user login" to refresh the token. (Error code: 219)

eclipse-mosquitto:1.6.15 mqtt image seems to work

Thanks for this wonderful project and associated blog post https://www.balena.io/blog/build-an-ai-driven-object-detection-algorithm-with-balenaos-and-alwaysai/
I had to make the following changes to the docker-compose file to get this running on a jetson-nano
arm32v6/eclipse-mosquitto:latest seems to not work. When I switched to eclipse-mosquitto:1.6.15, that did the trick
balena-labs-projects/balena-sense@48b75a8

mike@nano159:~/IOTstack/sense-people$ git diff docker-compose.yml
diff --git a/docker-compose.yml b/docker-compose.yml
index f5aeec9..2425988 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -11,11 +11,11 @@ services:
     restart: always
     build: ./balena-sense/grafana
     ports:
-      - "80"
+            - "3000:3000"
     volumes:
       - 'sense-data:/data'
     environment:
-        - 'GF_SERVER_HTTP_PORT=80'
+        - 'GF_SERVER_HTTP_PORT=3000'
         - 'GF_PATHS_PROVISIONING=/usr/src/app/provisioning'
         - 'GF_SESSION_PROVIDER=memory'
   telegraf:
@@ -24,7 +24,7 @@ services:
     cap_add:
       - SYS_ADMIN
   mqtt:
-    image: arm32v6/eclipse-mosquitto
+    image: eclipse-mosquitto:1.6.15
     ports:
       - "1883:1883"
     restart: always

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.