vagheshpatel commited on
Commit
2667e45
·
verified ·
1 Parent(s): ca15802

Sync worker-safety-detection from metro-analytics-catalog

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -110,7 +110,7 @@ pipeline_str = (
110
  f"filesrc location={INPUT_VIDEO} ! decodebin3 ! "
111
  f"gvadetect model={MODEL_XML} device=CPU threshold=0.4 ! queue ! "
112
  f"gvawatermark ! videoconvert ! video/x-raw,format=I420 ! "
113
- f"openh264enc ! h264parse ! "
114
  f"mp4mux ! filesink name=sink location=output.mp4"
115
  )
116
  pipeline = Gst.parse_launch(pipeline_str)
@@ -139,6 +139,22 @@ bus.timed_pop_filtered(
139
  pipeline.set_state(Gst.State.NULL)
140
  ```
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  **Device targets:**
143
 
144
  - `device=CPU` -- default in the sample code.
 
110
  f"filesrc location={INPUT_VIDEO} ! decodebin3 ! "
111
  f"gvadetect model={MODEL_XML} device=CPU threshold=0.4 ! queue ! "
112
  f"gvawatermark ! videoconvert ! video/x-raw,format=I420 ! "
113
+ f"x264enc ! h264parse ! "
114
  f"mp4mux ! filesink name=sink location=output.mp4"
115
  )
116
  pipeline = Gst.parse_launch(pipeline_str)
 
139
  pipeline.set_state(Gst.State.NULL)
140
  ```
141
 
142
+ ### Try It on a Sample Video
143
+
144
+ The `export_and_quantize.sh` script downloads `test_video.avi` automatically.
145
+ Run the DLStreamer sample above.
146
+ The buffer probe prints one line per detected safety item per frame.
147
+
148
+ Expected console output (representative):
149
+
150
+ ```text
151
+ [PPE] safety_helmet conf=0.87
152
+ [PPE] safety_jacket conf=0.82
153
+ ```
154
+
155
+ The annotated video is saved to `output.mp4` with bounding boxes drawn by
156
+ `gvawatermark` around each detected `safety_helmet` and `safety_jacket`.
157
+
158
  **Device targets:**
159
 
160
  - `device=CPU` -- default in the sample code.