Tensorflow_PersonLab icon indicating copy to clipboard operation
Tensorflow_PersonLab copied to clipboard

bilinear interpolation in accumulate_votes

Open AlonMendelson opened this issue 4 years ago • 0 comments

Hi, thanks a lot for the implementation. there's something that i couldn't figure out after reading the paper and reviewing the code. during the computation of the heatmaps the accumulate_votes function is called and some sort of bilinear interpolation is made. could someone please clarify which function is interpolated (in the code it seems to me that the values of this function are stored in the variable ps) and where do the interpolation weights come from (dx,dy) and what do they mean? i'm referring to the following part of the code in the post_proc.py: def accumulate_votes(votes, shape): xs = votes[:,0] ys = votes[:,1] ps = votes[:,2] tl = [np.floor(ys).astype('int32'), np.floor(xs).astype('int32')] tr = [np.floor(ys).astype('int32'), np.ceil(xs).astype('int32')] bl = [np.ceil(ys).astype('int32'), np.floor(xs).astype('int32')] br = [np.ceil(ys).astype('int32'), np.ceil(xs).astype('int32')] dx = xs - tl[1] dy = ys - tl[0] tl_vals = ps*(1.-dx)(1.-dy) tr_vals = psdx*(1.-dy) bl_vals = psdy(1.-dx) br_vals = psdydx

AlonMendelson avatar May 14 '20 10:05 AlonMendelson