Could not use "Stereo Disparity Estimator" with OFA backend


Jetson Orin NX supports OFA backend in VPI.
So, I tried to use “Stereo Disparity Estimator” sample script with OFA backend.
But, I got the following error.

ValueError: VPI_ERROR_INVALID_IMAGE_FORMAT: Unsupported disparity format


  • Jetson Orin NX(16GB)
  • JetPack 5.1
  • VPI 2.2.4
    • I used Python API

Steps to reproduce

$ cd /opt/nvidia/vpi2/samples/02-stereo_disparity
$ python3 ofa ../assets/chair_stereo_left.png ../assets/chair_stereo_right.png
Traceback (most recent call last):
  File "", line 123, in <module>
    disparity = vpi.stereodisp(left, right, downscale = downscale, out_confmap=confidenceMap, window=5, maxdisp=maxDisparity)
ValueError: VPI_ERROR_INVALID_IMAGE_FORMAT: Unsupported disparity format


Please use ofa-pva-vic instead.


@AastaLLL Thank you for your reply.

Please use ofa-pva-vic instead.

It works fine.

This script has the following backend option for OFA backend.

  • ofa
  • ofa-pva-vic

But, the user needs to convert image format to use vpi.stereodisp with OFA backend.
And, this conversion supports only VIC backend.

Therefore, I think that ofa-vic is more appropriate than ofa.
Is my understanding correct?

And, I found that the behavior of backend option is different between C++ sample code and python sample code.
So, the C++ sample code works fine with ofa option.


Thanks for reporting this.

This looks like a bug in our python sample.
We are checking this with our internal team to fix this.


This issue is fixed in VPI 2.2.6.
You can find the package in the recently released JetPack5.1.1


Thank you for your information! I’ll use the latest VPI.

I checked that this problem was fixed in VPI 2.2.6.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.