chshin10 / epinet

EPINET: A Fully-Convolutional Neural Network using Epipolar Geometry for Depth from Light Field Images
MIT License
88 stars 39 forks source link

A bug in boolmask #11

Open alex04072000 opened 5 years ago

alex04072000 commented 5 years ago

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): ?

mneira10 commented 4 years ago

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.