Skip to content

Latest commit

 

History

History
186 lines (157 loc) · 8.04 KB

README.md

File metadata and controls

186 lines (157 loc) · 8.04 KB

yolo4motion - 👀yolo listening for 🎬motion

Provides entity count information as micro-service; updates periodically (default 0 seconds). This container may be run locally using Docker, pushed to a Docker registry, and published to any Open Horizon exchange.

Status

CPU only

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

GPU accelerated

Supports cuda Architecture Docker Pulls

Supports tegra Architecture Docker Pulls

Service discovery

  • org - [email protected]
  • url - com.github.dcmartin.open-horizon.yolo4motion
  • version - 0.1.2

Service variables

  • YOLO_CONFIG - configuration: tiny|tiny-v2, tiny-v3, v2, v3; default: tiny
  • YOLO_SCALE - width and height to scale image; defaults to none
  • YOLO_ENTITY - entity to count; defaults to all
  • YOLO_THRESHOLD - entity to count; defaults to 0.25
  • YOLO_PERIOD - seconds between updates; defaults to 60
  • MQTT_HOST - hostname or IP address of MQTT broker; defaults to mqtt
  • MQTT_PORT - port for MQTT; defaults to 1883
  • MQTT_USERNAME - username for MQTT access; default "" (empty string)
  • MQTT_PASSWORD - password for MQTT access; default "" (empty string)
  • YOLO4MOTION_GROUP - topic group; default + (all)
  • YOLO4MOTION_DEVICE - topic device; default + (all)
  • YOLO4MOTION_CAMERA - topic camera; default + (all)
  • YOLO4MOTION_TOPIC_EVENT - topic event; default 'event/end'
  • YOLO4MOTION_TOPIC_PAYLOAD - topic payload; default image
  • YOLO4MOTION_TOO_OLD - events older in seconds are ignored; default 300
  • YOLO4MOTION_USE_MOCK - generate mock events for testing
  • LOG_LEVEL - specify level of logging; default info; options include (debug and none)

How To Use

Copy this repository, change to the yolo4motion directory, then use the make command; see below:

% mkdir ~/gitdir
% cd ~/gitdir
% git clone https://github.com/dcmartin/open-horizon
% cd open-horizon/yolo4motion
% make
...
{
  "yolo4motion": null,
  "date": 1554317838,
  "hzn": {
    "agreementid": "",
    "arch": "",
    "cpus": 0,
    "device_id": "",
    "exchange_url": "",
    "host_ips": [
      ""
    ],
    "organization": "",
    "ram": 0,
    "pattern": null
  },
  "config": null,
  "service": {
    "label": "yolo4motion",
    "version": "0.0.4.3"
  }
}

The yolo4motion service will not operate successfully without an attached camera; when the service is deployed in conjunction with another service, the status output:

{
  "yolo4motion": {
    "date": 1548702367,
    "device": "test-cpu-2",
    "log_level": "info",
    "debug": "false",
    "period": 0,
    "entity": "person",
    "time": 38.565109,
    "count": 0,
    "width": 320,
    "height": 240,
    "scale": "320x240",
    "mock": "false",
    "image": "<redacted>"
  },
  "date": 1554174883,
  "hzn": {
    "agreementid": "",
    "arch": "arm",
    "cpus": 1,
    "device_id": "test-cpu-3",
    "exchange_url": "http://exchange:3090/v1/",
    "host_ips": [
      "127.0.0.1",
      "192.168.160.1",
      "192.168.1.167",
      "172.17.0.1"
    ],
    "organization": "[email protected]",
    "ram": 0,
    "pattern": "[email protected]/motion2mqtt"
  },
  "config": null,
  "service": {
    "label": "yolo4motion",
    "version": "0.0.4.3"
  }
}

Sample

sample.png

Changelog & Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Authors & contributors

David C Martin ([email protected])