zjuzhk / MCNet

Official implementation of CVPR2024 - MCNet: Rethinking the Core Ingredients for Accurate and Efficient Homography Estimation
19 stars 2 forks source link

example on a pair of images #3

Open gnousias opened 2 months ago

gnousias commented 2 months ago

Hello! Thank you for sharing your implementation and make it easy for comparison. Could you please provide a snippet of code where an example of inference for a pair of images (image_A, image_B) is given as input arguments??

Looking forward to your answer!!

kdelimpasis commented 2 months ago

Hello. I would also be interested to know how to apply your network to just a pair of images. Thanks in advance

zjuzhk commented 2 months ago

The inference process is initiated at the line pred_h4p_12 = homo_model(data_batch) within test.py. Subsequently, the visualization of the results occurs at visualize_predict_image(args, data_batch, pred_h4p_12, glob_iter).

If you wish to perform inference on a single pair of images, you can adjust the batch size in args to 1 and modify the image root in dataset.py accordingly.

gnousias commented 1 month ago

Thank you for your answer. But how can this be possible when the network expects two patches? How is this possible if the input images are size of i.e. [570,320]? Also the homo_dataset that you refer to datasets.py is it a custom dataset or a known one?