hi
i was able to run a stream with a module i created from
https://github.com/NXP/eiq-model-zoo/blob/main/tasks/vision/object-detection/ssdlite-mobilenetv2/REA.... the problems is that it seems to enable the npu but i see 2 cores on 100% usage and the fps is 5.
gst-launch-1.0 -v \
v4l2src device=$VIDEO_DEVICE ! \
video/x-raw,format=YUY2,width=1280,height=1024,framerate=25/1 ! \
videoconvert ! \
video/x-raw,format=RGB ! \
tee name=t allow-not-linked=true \
- ! queue max-size-buffers=30 ! \
videoconvert ! \
waylandsink sync=false async=true name=sink1 \
- ! queue leaky=downstream max-size-buffers=2 ! \
videoscale ! \
video/x-raw,width=$INPUT_WIDTH,height=$INPUT_HEIGHT ! \
videorate ! \
video/x-raw,framerate=8/1 ! \
tensor_converter ! \
tensor_transform mode=arithmetic option=typecast:float32,add:-127.5,div:127.5 ! \
tensor_filter framework=tensorflow2-lite model=$MODEL_PATH accelerator=true:npu ! \
queue leaky=downstream max-size-buffers=2 ! \
tensor_decoder mode=bounding_boxes option1=mobilenet-ssd option2=$LABELS_PATH option3=0.5 option4=1280:1024 option5=300:300 ! \
fakesink sync=false
the output is:
./nnstreamer_detector.sh
Starting NNStreamer object detection pipeline...
Model: ssdlite-mobilenetv2.tflite
Device: /dev/video3
Processing every 3 frames with NPU
Press Ctrl+C to stop
** Message: 10:04:49.170: accl = npu
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, colorimetry=(string)1:4:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, colorimetry=(string)1:4:5:1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_0: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_1: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstTee:t.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert1.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)BGRx, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstWaylandSink:sink1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)BGRx, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstWaylandSink:sink1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)BGRx, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstVideoConvert:videoconvert1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)12/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:src: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)12/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstTensorConverter:tensorconverter0.GstPad:src: caps = other/tensor, framerate=(fraction)12/1, dimension=(string)3:300:300:1, type=(string)uint8
/GstPipeline:pipeline0/GstTensorTransform:tensortransform0.GstPad:src: caps = other/tensor, framerate=(fraction)12/1, dimension=(string)3:300:300:1, type=(string)float32
/GstPipeline:pipeline0/GstTensorFilter:tensorfilter0.GstPad:src: caps = other/tensors, format=(string)static, num_tensors=(int)2, framerate=(fraction)12/1, dimensions=(string)"4:1:1917:1\,91:1917:1:1", types=(string)"float32\,float32"
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = other/tensors, format=(string)static, num_tensors=(int)2, framerate=(fraction)12/1, dimensions=(string)"4:1:1917:1\,91:1917:1:1", types=(string)"float32\,float32"
/GstPipeline:pipeline0/GstTensorDec:tensordec0.GstPad:src: caps = video/x-raw, format=(string)RGBA, width=(int)1280, height=(int)1024, framerate=(fraction)12/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, format=(string)RGBA, width=(int)1280, height=(int)1024, framerate=(fraction)12/1
/GstPipeline:pipeline0/GstTensorDec:tensordec0.GstPad:sink: caps = other/tensors, format=(string)static, num_tensors=(int)2, framerate=(fraction)12/1, dimensions=(string)"4:1:1917:1\,91:1917:1:1", types=(string)"float32\,float32"
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = other/tensors, format=(string)static, num_tensors=(int)2, framerate=(fraction)12/1, dimensions=(string)"4:1:1917:1\,91:1917:1:1", types=(string)"float32\,float32"
/GstPipeline:pipeline0/GstTensorFilter:tensorfilter0.GstPad:sink: caps = other/tensor, framerate=(fraction)12/1, dimension=(string)3:300:300:1, type=(string)float32
/GstPipeline:pipeline0/GstTensorTransform:tensortransform0.GstPad:sink: caps = other/tensor, framerate=(fraction)12/1, dimension=(string)3:300:300:1, type=(string)uint8
/GstPipeline:pipeline0/GstTensorConverter:tensorconverter0.GstPad:sink: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)12/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter3.GstPad:sink: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)12/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-raw, width=(int)300, height=(int)300, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1, pixel-aspect-ratio=(fraction)5/4
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, format=(string)RGB, colorimetry=(string)1:1:5:1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, colorimetry=(string)1:4:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)1024, framerate=(fraction)25/1, views=(int)1, interlace-mode=(string)progressive, colorimetry=(string)1:4:5:1
Redistribute latency...
Redistribute latency...
0:00:00.9 / 99:99:99.
(gst-launch-1.0:5011): GLib-CRITICAL **: 10:04:50.627: g_array_remove_index: assertion 'index_ < array->len' failed
0:00:01.1 / 99:99:99.
(gst-launch-1.0:5011): GLib-CRITICAL **: 10:04:50.895: g_array_remove_index: assertion 'index_ < array->len' failed
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:02:17.174674500
Setting pipeline to NULL ...
Total showed frames (664), playing for (0:02:17.174697875), fps (4.841).
Freeing pipeline ...