A question about pseudocode
yafangna opened this issue · comments
What does Bx0 and Bx1 stand for in pseudocode
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)
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)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!