Usually, you just take the image )say as numpy array from OpenCV), convert to a tensor and unsqueeze the batch dimension. You need to apply the same transformations, for OpenCV you might also have to shuffle the channels BGR->RGB.
Best regards
Thomas