Multi-arch Light Object Detect images with YOLO and SSD MobileNet models, tested with LightNVR
153
Multi-architecture Docker images based on opensensor/light-object-detectโ , packaged with multiple object detection models and tested as an external detection backend for LightNVRโ .
Supports AMD64 and ARM64 with two image variants:
| Tag | Runtime | Included Models |
|---|---|---|
multi-yolo | ONNX Runtime | YOLOv8n, YOLO11n, YOLO11s, YOLO26n, YOLO26s |
multi-mobilenet | LiteRT / TFLite | SSD MobileNet V1, SSD MobileNet V2 |
Model selection is done at runtime through environment variables, so switching between models in the same image does not require a rebuild.
linux/amd64 and linux/arm64Pull:
docker pull rizkybs70/light-object-detect:multi-yolo
Included models:
| Model | Type | Notes |
|---|---|---|
| YOLOv8n | yolov8 | Lightweight and mature |
| YOLO11n | yolo11 | Lightweight YOLO11 |
| YOLO11s | yolo11 | Better accuracy, higher CPU usage |
| YOLO26n | yolo26 | Lightweight YOLO26 |
| YOLO26s | yolo26 | Higher accuracy for stronger CPUs |
Example using YOLO26s:
docker run -d \
--name light-object-detect \
--restart unless-stopped \
--log-driver=json-file \
--log-opt max-size=5m \
--log-opt max-file=2 \
-p 9001:8000 \
-e TZ=Asia/Jakarta \
-e BACKEND=onnx \
-e ONNX_MODEL_PATH=backends/onnx/models/yolo26s.onnx \
-e ONNX_LABELS_PATH=backends/onnx/models/coco.txt \
-e ONNX_CONFIDENCE_THRESHOLD=0.35 \
-e ONNX_IOU_THRESHOLD=0.45 \
-e ONNX_MODEL_TYPE=yolo26 \
rizkybs70/light-object-detect:multi-yolo
YOLOv8n
ONNX_MODEL_PATH=backends/onnx/models/yolov8n.onnx
ONNX_MODEL_TYPE=yolov8
YOLO11n
ONNX_MODEL_PATH=backends/onnx/models/yolo11n.onnx
ONNX_MODEL_TYPE=yolo11
YOLO11s
ONNX_MODEL_PATH=backends/onnx/models/yolo11s.onnx
ONNX_MODEL_TYPE=yolo11
YOLO26n
ONNX_MODEL_PATH=backends/onnx/models/yolo26n.onnx
ONNX_MODEL_TYPE=yolo26
YOLO26s
ONNX_MODEL_PATH=backends/onnx/models/yolo26s.onnx
ONNX_MODEL_TYPE=yolo26
Pull:
docker pull rizkybs70/light-object-detect:multi-mobilenet
Included models:
| Model | Runtime | Notes |
|---|---|---|
| SSD MobileNet V1 | LiteRT / TFLite | Lightweight, tested for low-power ARM64 deployment |
| SSD MobileNet V2 | LiteRT / TFLite | Alternative model with higher model complexity |
Example using SSD MobileNet V1:
docker run -d \
--name light-object-detect \
--restart unless-stopped \
--log-driver=json-file \
--log-opt max-size=5m \
--log-opt max-file=2 \
-p 9001:8000 \
-e TZ=Asia/Jakarta \
-e BACKEND=tflite \
-e TFLITE_MODEL_PATH=backends/tflite/models/ssd_mobilenet_v1.tflite \
-e TFLITE_LABELS_PATH=backends/tflite/models/coco_labels.txt \
-e TFLITE_CONFIDENCE_THRESHOLD=0.35 \
-e TFLITE_INTERPRETER_POOL_SIZE=1 \
-e TFLITE_NUM_THREADS=0 \
rizkybs70/light-object-detect:multi-mobilenet
For SSD MobileNet V2, change:
TFLITE_MODEL_PATH=backends/tflite/models/ssd_mobilenet_v2.tflite
The multi-mobilenet image includes a thread-safe TFLite interpreter pool to handle concurrent detection requests without sharing one interpreter instance between multiple inference threads.
For low-power devices:
TFLITE_INTERPRETER_POOL_SIZE=1
TFLITE_NUM_THREADS=0
This serializes inference and provides natural backpressure when multiple cameras submit requests at the same time.
On more powerful systems, multiple independent interpreters can be enabled:
TFLITE_INTERPRETER_POOL_SIZE=2
TFLITE_NUM_THREADS=2
Always benchmark CPU usage and inference latency before increasing these values.
Tested with:
https://github.com/opensensor/lightNVRโ
Typical deployment:
IP Cameras
|
v
LightNVR
|
| HTTP Detection Request
v
Light Object Detect
|
+-- ONNX Runtime -> YOLO
|
+-- LiteRT -> SSD MobileNet
For multi-yolo:
API Detection URI:
http://<LOD-IP>:9001/api/v1/detect
API Detection Backend:
ONNX
For multi-mobilenet:
API Detection URI:
http://<LOD-IP>:9001/api/v1/detect
API Detection Backend:
TensorFlow Lite
Detection interval and confidence threshold can be configured per stream in LightNVR.
These images use LightNVR's external API Detection feature, not the Local LiteRT engine.
When both containers run on the same host:
docker network create nvrnet
docker network connect nvrnet lightnvr
docker network connect nvrnet light-object-detect
LightNVR can then use:
http://light-object-detect:8000/api/v1/detect
curl -s -X POST \
"http://127.0.0.1:9001/api/v1/detect?backend=onnx&confidence_threshold=0.35&return_image=false" \
-F "file=@/path/to/image.jpg"
curl -s -X POST \
"http://127.0.0.1:9001/api/v1/detect?backend=tflite&confidence_threshold=0.35&return_image=false" \
-F "file=@/path/to/image.jpg"
YOLO example:
curl -s -X POST \
"http://127.0.0.1:9001/api/v1/detect?backend=onnx&confidence_threshold=0.35&return_image=true" \
-F "file=@/path/to/image.jpg" \
| jq -r '.image.base64_data' \
| base64 -d > detected.jpg
For MobileNet simply change:
backend=onnx
to:
backend=tflite
Health check:
curl http://127.0.0.1:9001/health
Clone upstream:
git clone https://github.com/opensensor/light-object-detect.git
cd light-object-detect
Place ONNX models under:
backends/onnx/models/
Example:
backends/onnx/models/
โโโ coco.txt
โโโ yolov8n.onnx
โโโ yolo11n.onnx
โโโ yolo11s.onnx
โโโ yolo26n.onnx
โโโ yolo26s.onnx
Build:
docker build -t light-object-detect:multi-yolo .
Place TFLite models under:
backends/tflite/models/
Example:
backends/tflite/models/
โโโ coco_labels.txt
โโโ ssd_mobilenet_v1.tflite
โโโ ssd_mobilenet_v2.tflite
Build using a Dockerfile with LiteRT support:
docker build \
-f Dockerfile.mobilenet \
-t light-object-detect:multi-mobilenet \
.
Additional Ultralytics models can be exported to ONNX without installing Ultralytics directly on the host:
mkdir -p .model-export
docker run --rm \
-v "$PWD/.model-export:/work" \
-w /work \
ultralytics/ultralytics:latest-python-export \
yolo export \
model=yolo26m.pt \
format=onnx \
imgsz=640 \
simplify=True \
device=cpu
Move the generated model into:
backends/onnx/models/
Other examples include:
yolov8s
yolov8m
yolo11m
yolo11l
yolo26m
yolo26l
Use the correct ONNX_MODEL_TYPE for each family.
Additional TFLite models can be placed under:
backends/tflite/models/
but model compatibility depends on the output tensor format expected by the Light Object Detect TFLite backend.
Adding an arbitrary ONNX or TFLite model does not automatically guarantee compatibility.
Follow logs:
docker logs -f light-object-detect
Recommended production log rotation:
--log-driver=json-file
--log-opt max-size=5m
--log-opt max-file=2
Logging can be completely disabled with:
--log-driver=none
but docker logs will no longer be available.
For CCTV workloads, model speed alone is not enough. Camera count and detection interval directly affect request rate.
For example:
5 cameras @ 2 second interval
โ 2.5 requests/second
A smaller model may provide better overall system stability than a more accurate model when many cameras share the same inference host.
Monitor:
CPU usage
Load average
Memory
Temperature
Inference latency
HTTP errors
Request backlog
Benchmark with real camera frames before selecting a production model.
Based on:
This repository adds multi-model packaging, bundled YOLO and SSD MobileNet models, multi-architecture Docker images, and tested LightNVR deployment.
This image contains components and model weights from multiple upstream projects.
Review the licensing terms of Light Object Detect, Ultralytics, ONNX Runtime, LiteRT, and bundled model weights before redistribution or commercial use.
Content type
Image
Digest
sha256:4934cd927โฆ
Size
195.6 MB
Last updated
13 days ago
docker pull rizkybs70/light-object-detect:multi-mobilenet