Updated deprecated path

This commit is contained in:
ldy 2025-06-13 15:15:24 +08:00
parent 47b9279725
commit 70b9a14b2b

View File

@ -6,8 +6,8 @@ from sklearn.metrics.pairwise import cosine_similarity
from embedder import ImageEmbedder from embedder import ImageEmbedder
# ——— Load stored embeddings & mapping ——— # ——— Load stored embeddings & mapping ———
vecs = np.load("processed_images/image_vectors.npy") # (N, D) vecs = np.load("imgVecs/image_vectors.npy") # (N, D)
with open("processed_images/index_to_file.pkl", "rb") as f: with open("imgVecs/index_to_file.pkl", "rb") as f:
idx2file = pickle.load(f) # dict: idx → filepath idx2file = pickle.load(f) # dict: idx → filepath
# ——— Specify query image ——— # ——— Specify query image ———