Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i, idx in enumerate(indices[0]):
- matched_filename_index, patch_idx = image_patch_mapping[idx]
- matched_filename = image_filenames[matched_filename_index]
- matched_image = cv2.imread(os.path.join(db_path, matched_filename))
- x, y = image_positions[matched_filename_index][patch_idx]
- cv2.rectangle(matched_image, (x, y), (x + 64, y + 64), (255, 0, 0), 3)
- cv2.imwrite(os.path.join("./op/", matched_filename), matched_image)
- print(f"Results Saved in {round(time.time() - start, 2)} seconds.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement