Hi,
I am using the board i.MX 8M PLUS PEVK and have been going through the machine learning user guide. I am having 2 issues with running the power measurement tool on the provided gstnninference-demos provided
by the guide.
1) Running the profiler (through SSH per the guide recommendation) with gstnninferencedemo-mobilenet-ssd-camera work as expected for about 100-150 seconds after which the power measurement tool does no longer work and produces the following error.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/gandree/Documents/imx8mplus/pmt/drv_ftdi.py", line 643, in get_data
voltage, current = self.block_read(rail, index, rail_per_pac[rail['pac'][2]])
File "/home/gandree/Documents/imx8mplus/pmt/drv_ftdi.py", line 578, in block_read
curr = self.process_current((((data[8 + (2 * channel) - 2] <<
IndexError: index out of range
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/gandree/Documents/imx8mplus/pmt/server.py", line 70, in client_thread
local_rail['voltage'] = np.append(local_rail['voltage'], np.array(rail['voltage'], dtype=np.float16),
File "<__array_function__ internals>", line 5, in append
File "/usr/local/lib/python3.8/dist-packages/numpy/lib/function_base.py", line 4671, in append
return concatenate((arr, values), axis=axis)
File "<__array_function__ internals>", line 5, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 1 dimension(s)
2) Running the profiler with gstnninferencedemo-mobilenet-ssd-video with a .m4v fileformat does not work at all. I have tested different types of fileformat and encodings, none of the different combination of the two fixes the problem. The application crashes after 1-3 frames into the video. I tried attaching the flags for debug logging into a file by adding: GST_DEBUG_FILE=demoVideo.log GST_DEBUG=9 gst-launch-1.0 ...
However upon running this new pipeline the application instantly crashes with the pipeline error "GST_DEBUG_FILE=demoVideo.log: command not found". Why does this not work for the inference video demo pipeline but work for other pipelines? For example running the pipeline:
GST_DEBUG_FILE=test123.log GST_DEBUG=9 gst-launch-1.0 videotestsrc ! waylandsink
works without any problem. As per the userguide the power measurement tool should work fine with the inference demo application provided by the guide itself. In order to attempt some type of debugging I modified one of the pipelines provided by the userguide:
GST_DEBUG_NO_COLOR=1 GST_DEBUG_FILE=testscriptVidv2.log GST_DEBUG=9 gst-launch-1.0 --no-position filesrc location=vtest.yuv ! videoparse width=1280 height=720 framerate=25/1 ! \
tee name=t t. ! queue max-size-buffers=2 ! imxvideoconvert_g2d ! video/x-raw,width=300,height=300,format=RGBA ! \
videoconvert ! video/x-raw,format=RGB ! tensor_converter ! \
tensor_filter framework=tensorflow-lite model=ssd_mobilenet_v2_coco_quant_postprocess.tflite custom=Delegate:NNAPI ! \
tensor_decoder mode=bounding_boxes option1=tf-ssd option2=coco_labels.txt \
option3=0:1:2:3,50 option4=1280:720 option5=300:300 ! mix. t. ! queue max-size-buffers=2 ! \
imxcompositor_g2d name=mix sink_0::zorder=2 sink_1::zorder=1 ! waylandsink sync=false
Which by grepping the log file for errors gave the following output:
0:00:00.170288306 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistrychunks.c:582:gst_registry_chunks_load_feature: Plugin 'geometrictransform' feature 'waterripple' typename : 'GstElementFactory'
0:00:00.170577561 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistry.c:589:gst_registry_add_feature:<registry0> adding feature 0xaaaaef957c00 (waterripple)
0:00:00.170592686 2540 0xaaaaef887200 DEBUG GST_REFCOUNTING gstobject.c:708:gst_object_set_parent:<waterripple> set parent (ref and sink)
0:00:00.170610936 2540 0xaaaaef887200 TRACE GST_REFCOUNTING gstobject.c:292:gst_object_ref_sink:<waterripple> 0xaaaaef957c00 ref_sink 1->2
0:00:00.170627062 2540 0xaaaaef887200 LOG GST_REGISTRY gstregistry.c:607:gst_registry_add_feature:<registry0> emitting feature-added for waterripple
0:00:00.170645062 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistrychunks.c:740:gst_registry_chunks_load_feature: Added feature waterripple, plugin 0xaaaaef956060 geometrictransform
0:00:00.181058226 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistrychunks.c:582:gst_registry_chunks_load_feature: Plugin 'debugutilsbad' feature 'errorignore' typename : 'GstElementFactory'
0:00:00.181348105 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistry.c:589:gst_registry_add_feature:<registry0> adding feature 0xaaaaef95eb00 (errorignore)
0:00:00.181363356 2540 0xaaaaef887200 DEBUG GST_REFCOUNTING gstobject.c:708:gst_object_set_parent:<errorignore> set parent (ref and sink)
0:00:00.181382606 2540 0xaaaaef887200 TRACE GST_REFCOUNTING gstobject.c:292:gst_object_ref_sink:<errorignore> 0xaaaaef95eb00 ref_sink 1->2
0:00:00.181398981 2540 0xaaaaef887200 LOG GST_REGISTRY gstregistry.c:607:gst_registry_add_feature:<registry0> emitting feature-added for errorignore
0:00:00.181417357 2540 0xaaaaef887200 DEBUG GST_REGISTRY gstregistrychunks.c:740:gst_registry_chunks_load_feature: Added feature errorignore, plugin 0xaaaaef9568b0 debugutilsbad
0:00:00.348073856 2540 0xaaaaef887200 LOG GST_PLUGIN_LOADING gstplugin.c:1603:gst_plugin_ext_dep_direntry_matches: stderr does not match video, flags=0x0008
0:00:00.351404783 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin192> g_dir_open(/dev/v4l2) failed: Error opening directory “/dev/v4l2”: No such file or directory
0:00:00.352491175 2540 0xaaaaef887200 LOG GST_PLUGIN_LOADING gstplugin.c:1700:gst_plugin_ext_dep_scan_path_with_filenames:<plugin16> stat: /usr/share/gvfs/mounts (error: No such file or directory)
0:00:00.357686382 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/home/root/.frei0r-1/lib) failed: Error opening directory “/home/root/.frei0r-1/lib”: No such file or directory
0:00:00.357716882 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/lib/frei0r-1) failed: Error opening directory “/usr/lib/frei0r-1”: No such file or directory
0:00:00.357746383 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/local/lib/frei0r-1) failed: Error opening directory “/usr/local/lib/frei0r-1”: No such file or directory
0:00:00.357774383 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/lib32/frei0r-1) failed: Error opening directory “/usr/lib32/frei0r-1”: No such file or directory
0:00:00.357802259 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/local/lib32/frei0r-1) failed: Error opening directory “/usr/local/lib32/frei0r-1”: No such file or directory
0:00:00.357830384 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/lib64/frei0r-1) failed: Error opening directory “/usr/lib64/frei0r-1”: No such file or directory
0:00:00.357858010 2540 0xaaaaef887200 DEBUG GST_PLUGIN_LOADING gstplugin.c:1624:gst_plugin_ext_dep_scan_dir_and_match_names:<plugin191> g_dir_open(/usr/local/lib64/frei0r-1) failed: Error opening directory “/usr/local/lib64/frei0r-1”: No such file or directory
0:00:00.363348471 2540 0xaaaaef887200 LOG GST_PLUGIN_LOADING gstplugin.c:1603:gst_plugin_ext_dep_direntry_matches: stderr does not match media, flags=0x0008
0:00:00.439766174 2540 0xaaaaef887200 DEBUG GST_PADS gstpad.c:5859:gst_pad_send_event_unchecked:<sink:proxypad0> sent event, ret error
0:00:00.955857673 2540 0xaaaaef887200 DEBUG basesrc gstbasesrc.c:3723:gst_base_src_start_wait:<filesrc0> got error
0:01:00.334085969 2540 0xaaaaef887200 DEBUG GST_BUS gstbus.c:340:gst_bus_post:<bus2> [msg 0xaaaaefbd7240] posting on bus application message: 0xaaaaefbd7240, time 99:99:99.999999999, seq-num 135, element 'pipeline0', GstLaunchInterrupt, message=(string)"Pipeline\ interrupted";
0:01:00.334502975 2540 0xaaaaef887200 DEBUG GST_BUS gstbus.c:848:gst_bus_source_dispatch:<bus2> source 0xaaaaefb2c830 calling dispatch with application message: 0xaaaaefbd7240, time 99:99:99.999999999, seq-num 135, element 'pipeline0', GstLaunchInterrupt, message=(string)"Pipeline\ interrupted";
Any help, hints or pointers would be greatly appreciated.
Hi,
Can you give more details about PMT please ? Which OS are you using, which rails are you probing ?
Thanks