Sync worker-safety-detection from metro-analytics-catalog
Browse files
README.md
CHANGED
|
@@ -108,7 +108,9 @@ Gst.init(None)
|
|
| 108 |
MODEL_XML = "models/worker-safety-gear-detection/deployment/Detection/model/model.xml"
|
| 109 |
INPUT_VIDEO = "test_video.avi"
|
| 110 |
|
| 111 |
-
# For GPU: change device=CPU to device=GPU
|
|
|
|
|
|
|
| 112 |
# For NPU: change device=CPU to device=NPU (batch-size=1, nireq=4 recommended).
|
| 113 |
pipeline_str = (
|
| 114 |
f"filesrc location={INPUT_VIDEO} ! decodebin3 ! "
|
|
@@ -168,7 +170,7 @@ The annotated video is saved to `output.mp4` with bounding boxes drawn by
|
|
| 168 |
**Device targets:**
|
| 169 |
|
| 170 |
- `device=CPU` -- default in the sample code.
|
| 171 |
-
- `device=GPU` -- add `vapostproc` after `
|
| 172 |
- `device=NPU` -- use `batch-size=1` and `nireq=4` for best NPU utilization.
|
| 173 |
|
| 174 |
---
|
|
|
|
| 108 |
MODEL_XML = "models/worker-safety-gear-detection/deployment/Detection/model/model.xml"
|
| 109 |
INPUT_VIDEO = "test_video.avi"
|
| 110 |
|
| 111 |
+
# For GPU: change device=CPU to device=GPU, add vapostproc !
|
| 112 |
+
# video/x-raw(memory:VASurface) after decodebin3, and set
|
| 113 |
+
# pre-process-backend=vaapi-surface-sharing on gvadetect.
|
| 114 |
# For NPU: change device=CPU to device=NPU (batch-size=1, nireq=4 recommended).
|
| 115 |
pipeline_str = (
|
| 116 |
f"filesrc location={INPUT_VIDEO} ! decodebin3 ! "
|
|
|
|
| 170 |
**Device targets:**
|
| 171 |
|
| 172 |
- `device=CPU` -- default in the sample code.
|
| 173 |
+
- `device=GPU` -- add `vapostproc ! video/x-raw(memory:VASurface)` after `decodebin3` and set `pre-process-backend=vaapi-surface-sharing` on `gvadetect`.
|
| 174 |
- `device=NPU` -- use `batch-size=1` and `nireq=4` for best NPU utilization.
|
| 175 |
|
| 176 |
---
|