Open yafangna opened 1 year ago
Hi, B is defined in Eq. (2) as the bounding box, and B{x0}/B{x1} is the x coordinate of the left/right side of B.
Thank you for your reply
Thanks for the source code! What do lines 44 to 47 of the code stand for in "datasets.transforms.ContrastiveCrop.py" ?
ch0 = min(max(int(height * h0) - h//2, 0), height - h)
ch1 = min(max(int(height * h1) - h//2, 0), height - h)
cw0 = min(max(int(width * w0) - w//2, 0), width - w)
cw1 = min(max(int(width * w1) - w//2, 0), width - w)
Thanks for the source code! What do lines 44 to 47 of the code stand for in "datasets.transforms.ContrastiveCrop.py" ?
ch0 = min(max(int(height * h0) - h//2, 0), height - h) ch1 = min(max(int(height * h1) - h//2, 0), height - h) cw0 = min(max(int(width * w0) - w//2, 0), width - w) cw1 = min(max(int(width * w1) - w//2, 0), width - w)
16 & #17
These lines generate the operable region for box center. ch0 is the minimum h, ch1 is the maximum h, and similar for cw0, cw1. min(max(...)) is to ensure the whole box is fully inside the image.
Thank you for your reply!
Thanks for the source code! What do lines 44 to 47 of the code stand for in "datasets.transforms.ContrastiveCrop.py" ?
ch0 = min(max(int(height * h0) - h//2, 0), height - h) ch1 = min(max(int(height * h1) - h//2, 0), height - h) cw0 = min(max(int(width * w0) - w//2, 0), width - w) cw1 = min(max(int(width * w1) - w//2, 0), width - w)
16 & #17
These lines generate the operable region for box center. ch0 is the minimum h, ch1 is the maximum h, and similar for cw0, cw1. min(max(...)) is to ensure the whole box is fully inside the image.
Thank you for your reply!
What does Bx0 and Bx1 stand for in pseudocode