[ERROR] AssertionFailed: inputs.size() == 1 with OpenVINO™ Toolkit on Raspbian* OS
What am I seeing?
Error: AssertionFailed: inputs.size() == 1 generated when running openvino_fd_myriad.py sample code. The sample is found under the Run Inference of Face Detection Model Using OpenCV* API section in Install OpenVINO™ toolkit for Raspbian* OS guide.
Why am I seeing it?
The error is related to a missed initialization of OpenVINO™ Toolkit environment variables when running the sample code.
How to fix it.
To troubleshoot the issue, try the following steps:
- In line 10: frame = cv.imread('/path/to/image') of the openvino_fd_myriad.py sample code, add the path to your image (i.e. '/home/pi/Pictures/face.png')
- Include the model files (i.e. 'face-detection-adas-0001.xml' and 'face-detection-adas-0001.bin') in the same directory as the openvino_fd_myriad.py file
- Initialize environment variables with command source /<your-path-to>/openvino/bin/setupvars.sh ("i.e. source /opt/intel/openvino/bin/setupvars.sh")
As an Optional step, permanently set the environment variables so it initializes every time a new terminal window/tab is used. To do so, execute echo "source <your-path-to>/openvino/bin/setupvars.sh" >> ~/.bashrc
Note | Verify the .bashrc file includes a single entry for variable setup of the OpenVINO release. |
CORRECT | # single entry source <your-path-to-latest>/intel/openvino/bin/setupvars.sh |
INCORRECT | # multiple entries source /older-release/openvino/bin/setupvars.sh source <your-path-to-latest>/openvino/bin/setupvars.sh |