From: MyungJoo Ham Date: Wed, 21 Nov 2018 06:11:22 +0000 (+0900) Subject: [Example] ObjectDetection(SSD) with Gst-Launch X-Git-Tag: v0.0.3~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cebf7da8f7fc6ae7707e751a5bbf2100f87e3745;p=platform%2Fupstream%2Fnnstreamer.git [Example] ObjectDetection(SSD) with Gst-Launch With the new decoder/bounding-box, we can do object-detection + labeling in gst-launch with visualization. Signed-off-by: MyungJoo Ham --- diff --git a/nnstreamer_example/example_object_detection/get_model.sh b/nnstreamer_example/example_object_detection/get_model.sh new file mode 100755 index 0000000..4d5447e --- /dev/null +++ b/nnstreamer_example/example_object_detection/get_model.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +wget https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/ssd_mobilenet_v2_coco.tflite +wget https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/coco_labels_list.txt +wget https://github.com/nnsuite/testcases/raw/master/DeepLearningModels/tensorflow-lite/ssd_mobilenet_v2_coco/box_priors.txt diff --git a/nnstreamer_example/example_object_detection/gst-launch-object-detection.sh b/nnstreamer_example/example_object_detection/gst-launch-object-detection.sh new file mode 100755 index 0000000..2b2256f --- /dev/null +++ b/nnstreamer_example/example_object_detection/gst-launch-object-detection.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +gst-launch-1.0 \ + v4l2src name=cam_src ! videoscale ! videoconvert ! video/x-raw,width=640,height=480,format=RGB,framerate=30/1 ! tee name=t \ + t. ! queue leaky=2 max-size-buffers=2 ! videoscale ! video/x-raw,width=300,height=300,format=RGB ! tensor_converter ! \ + tensor_transform mode=arithmetic option=typecast:float32,add:-127,mul:0.007843 ! \ + tensor_filter framework=tensorflow-lite model=ssd_mobilenet_v2_coco.tflite ! \ + tensor_decoder mode=bounding_boxes option1=ssd option2=coco_labels_list.txt option3=box_priors.txt option4=640:480 option5=300:300 ! \ + compositor name=mix sink_0::zorder=2 sink_1::zorder=1 ! videoconvert ! ximagesink \ + t. ! queue leaky=2 max-size-buffers=10 ! mix.