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.
org
-[email protected]
url
-com.github.dcmartin.open-horizon.yolo
version
-0.1.2
YOLO_CONFIG
- configuration of YOLO;tiny-v2
,tiny-v3
,v2
, orv3
YOLO_ENTITY
- entity to count; defaults toall
YOLO_PERIOD
- seconds between updates; defaults to0
YOLO_THRESHOLD
- minimum probability; default0.25
; range0.0
to1.0
LOG_LEVEL
- specify level of logging; defaultinfo
; options include (debug
andnone
)DEBUG
- turn on debugging output;true
orfalse
; defaultfalse
There are two version of this service which are enabled with nVidia GPU capabilities, drastically reducing the time required to perform a prediction.
yolo-cuda
- For AMD/Intel 64-bit systems with nVidia GPU supporting CUDA version 10yolo-tegra
- For nVidia Jetson Nano and othertegra
devices with JetPack v3.2
For both services the default container run-time for Docker must be the nvidia-container-runtime
. The /etc/docker/daemon.json
file must contain the following:
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
Copy this repository, change to the yolo
directory, then use the make command; see below:
% mkdir ~/gitdir
% cd ~/gitdir
% git clone http://github.com/dcmartin/open-horizon
% cd open-horizon/yolo
% make
...
{
"yolo": null,
"date": 1554316177,
"hzn": {
"agreementid": "",
"arch": "",
"cpus": 0,
"device_id": "",
"exchange_url": "",
"host_ips": [
""
],
"organization": "",
"ram": 0,
"pattern": null
},
"config": {
"log_level": "info",
"debug": false,
"date": 1554316177,
"period": 0,
"entity": "all",
"scale": "none",
"config": "tiny",
"device": "/dev/video0",
"threshold": 0.25,
"services": null,
"names": [
"person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed", "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"
]
},
"service": {
"label": "yolo",
"version": "0.0.8"
}
}
The yolo
payload will be incomplete until the service completes; subsequent make check
will return complete; see below:
{
"yolo": {
"mock": "eagle",
"info": {
"type": "JPEG",
"size": "773x512",
"bps": "8-bit",
"color": "sRGB"
},
"time": 0.861101,
"count": 1,
"detected": [
{
"entity": "bird",
"count": 1
}
],
"image": "<redacted>",
"date": 1554316261
},
"date": 1554316177,
"hzn": {
"agreementid": "",
"arch": "",
"cpus": 0,
"device_id": "",
"exchange_url": "",
"host_ips": [
""
],
"organization": "",
"ram": 0,
"pattern": null
},
"config": {
"log_level": "info",
"debug": false,
"date": 1554316177,
"period": 0,
"entity": "all",
"scale": "none",
"config": "tiny",
"device": "/dev/video0",
"threshold": 0.25,
"services": null,
"names": [
"person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed", "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"
]
},
"service": {
"label": "yolo",
"version": "0.0.8"
}
}
The Pi’s camera has a discrete set of input modes. On the V2 camera these are as follows:
Number | Resolution | Aspect Ratio | Framerates | Video | Image | FoV | Binning |
---|---|---|---|---|---|---|---|
1 | 1920x1080 | 16:9 | 0.1-30fps | x | Partial | ||
2 | 3280x2464 | 4:3 | 0.1-15fps | x | x | Full | None |
3 | 3280x2464 | 4:3 | 0.1-15fps | x | x | Full | None |
4 | 1640x1232 | 4:3 | 0.1-40fps | x | Full | ||
5 | 1640x922 | 16:9 | 0.1-40fps | x | Full | ||
6 | 1280x720 | 16:9 | 40-90fps | x | Partial | ||
7 | 640x480 | 4:3 | 40-90fps | x | Partial |
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.