Advertisement
cyanamide

Untitled

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