Kaminyou / Kernelized-Instance-Normalization

[ECCV 2022] Official implementation of "Ultra-high-resolution unpaired stain transformation via Kernelized Instance Normalization"
https://kaminyou.com/Kernelized-Instance-Normalization/
MIT License
34 stars 2 forks source link

Excuse me, may I ask how to name the images in testA to obtain the correct idx? #21

Open ZzzTD opened 1 week ago

ZzzTD commented 1 week ago
def __get_boundary(self):
    self.y_anchor_num = 0
    self.x_anchor_num = 0
    for X_image in self.X_images:
        y_idx, x_idx, _, _ = Path(X_image).stem.split("_")[:4]
        y_idx = int(y_idx)
        x_idx = int(x_idx)
        self.y_anchor_num = max(self.y_anchor_num, y_idx)
        self.x_anchor_num = max(self.x_anchor_num, x_idx)
Kaminyou commented 1 week ago

If your original image has a size of HxW, then the divided patches should have a name of ZZZZZZ_Yidx_Xidx_Ypos_Xpos.png, where Ypos and Xpos are the top-left corner coordinate corresponding to the original image and Yidx and Xidx are Ypos/patch_size and Xpos/patch_size.