chshin10/epinet

A bug in boolmask

alex04072000 opened this issue · 1 comments

line 121 in func_generate_traindata.py
if(image_id==4 or 6 or 15): this statement will always be True.
Maybe you want something like this? if(image_id==4 or image_id==6 or image_id==15):

And for line 128-132,
if( np.sum(a_tmp[idx_start+scale*crop_half1: idx_start+scale*crop_half1+scale*label_size:scale, idy_start+scale*crop_half1: idy_start+scale*crop_half1+scale*label_size:scale])>0 or np.sum(a_tmp[idx_start: idx_start+scale*input_size:scale, idy_start: idy_start+scale*input_size:scale])>0 ): valid=0
Should this code fragment be also in if(image_id==4): and if(image_id==6): ?

Also, the boolmask is asigned to a_tmp which is never used (lines 122-127 in epinet/epinet_fun/func_generate_traindata.py):

if(image_id==4):
    a_tmp=boolmask_img4
if(image_id==6):
    a_tmp=boolmask_img6    
if(image_id==15):
    a_tmp=boolmask_img15                            
    .
    .
    .

This effectively means that the boolean masks are never actually taken into account in the code. This is worrying given that the paper states that this step is crucial in its training: "We exclude some training data that contains reflection and refraction regions such as glass, metal and textureless regions, which result in incorrect correspondences." Not taking the boolean masks into account changes everything in the training phase.