keras_rmac
keras_rmac copied to clipboard
What do you mean, b and idx in the code?
def rmac_regions(W, H, L):#这里L使用的是3 #w=32,h=21 ovr = 0.4 # desired overlap of neighboring regions steps = np.array([2, 3, 4, 5, 6, 7], dtype=np.float) # possible regions for the long dimension
w = min(W,H)
b = (max(H,W) - w)/(steps-1)
idx = np.argmin(abs(((w ** 2 - w*b)/w ** 2)-ovr)) # steps(idx) regions for long dimension
# region overplus per dimension
Wd, Hd = 0, 0
if H < W:
Wd = idx + 1
elif H > W:
Hd = idx + 1
What do you mean,step, b and idx,Wd,Hd in the code?