Vincentqyw/image-matching-webui

Hello, the output.pkl file cannot be opened or is garbled. How to solve it? Thank you.

wzj-888 opened this issue ยท 1 comments

Checklist

  • I've searched the project's [issues]

โ“ Question

How can I [...]?

Is it possible to [...]?

๐Ÿ“Ž Additional context

Please try the following script and verify that the output matches the image.

import pickle

import cv2

from common.viz import display_matches

with open("output.pkl", "rb") as f:
    pred = pickle.load(f)
print(pred.keys())

ransac_images, _ = display_matches(
    pred, titles="", tag="KPTS_RANSAC"
)

cv2.imwrite(
    str("ransac_images.jpg"), ransac_images[:, :, ::-1].copy()
)  # RGB -> BGR

If there are no further questions, please close the issue.