Hi,
I’m trying to modify the visual output of the instance segmentation template. I am also doing it directly in the pipeline as to now have to use the --use-frame arg, as this seems to cause great performance issues.
The goal is to have an output akin to an alpha mask (black for all un segmented parts of the image (the background), and white for all segmented parts). All other coloured masks and bounding boxes should be removed, hence why I am trying to alter the post-process. See below for an example:
This would then be processed further for different visual outputs, but I am having trouble even getting to the alpha mask stage.
Am I correct in believing that to achieve this I would have to create my own post-processing file to replace the one used by default in the ‘instance_segmentation_pipeline.py’ file in the inference pipeline when the ‘get_pipeline_string()’ function is called.
I tried following the guide here` but have encountered the errors:
‘Cannot load lib (path to file)/postprocess_custom.py: invalid ELF header’
and
‘Cannot load symbol: /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so: undefined symbol: run’
For context, the custom py post process file is stored in the same directory as the default one. The undefined symbol being flagged is the name as the function. The code that directs to this custom post process file is as follows:
post_process_so= os.path.join(self.current_path, ‘…/resources/postprocess_custom.py’),
post_function_name=‘run’,
Am I mistaken in where to attach this post processing file to the pipeline? Am I wrong to define the post_function_name as the function included in the file?
I am trying to avoid the --use-frame argument as mentioned earlier to prevent a second window being opened, and frame rate issues. Can I add post processing to another part of the pipeline? I’m open, and appreciative, to any suggestions at all!
Thanks in advance