I would like to use a pretrained Siamese network model (saved as a .pb Tensorflow model) for measuring similarity comparison between pairs of images (Comparing images for similarity using siamese networks, Keras, and TensorFlow - PyImageSearch) in OpenCV (C++).
I understand I can load the model using cv::dnn::readNetFromTensorflow. But how would I actually use this model to make an inference on a pair of images? In Keras it would be model.predict(imageA, imagB). What would be the equivalent function on OpenCV C++?