-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Running python -m vision.object_detect /home/personWithBoard.png with a 4-channel png will result in the below error:
(.venv) xxx:/home/examples# python -m vision.object_detect /home/personWithBoard.png
/home/examples/.venv/lib/python3.10/site-packages/synapRT/pipelines/__init__.py:16: UserWarning: Audio classification pipeline not available, please ensure all dependencies are installed:
librosa is required for audio classification pipelines, install with 'pip install librosa'.
warnings.warn(msg)
Starting Object Detection Stream.
E:SyNAP: assign():180: Unable to convert image from 4 to 3 channels
E:SyNAP: assign():371: Failed to assign data to input tensor 0
Traceback (most recent call last):
File "/home/examples/.venv/lib/python3.10/site-packages/synapRT/pipelines/base.py", line 185, in _execute_pipeline
self._runner.run()
File "/home/examples/.venv/lib/python3.10/site-packages/synapRT/pipelines/runners.py", line 482, in run
self._infer_func([image])
File "/home/examples/.venv/lib/python3.10/site-packages/synapRT/pipelines/base.py", line 208, in _infer
inputs = self.preprocess(data)
File "/home/examples/.venv/lib/python3.10/site-packages/synapRT/pipelines/base.py", line 506, in preprocess
self._assigned_rect = self.preprocessor.assign(
RuntimeError: Error while preprocessing data
In the above test, the format of the picture is RGBA.
If I manually convert this png to 3 channels and retry, the command will work well.
I think we should optimize the code to support the 4-channel picture.
Attach the test pictures, one is with 4 channels, the other is with 3:


Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels