hed icon indicating copy to clipboard operation
hed copied to clipboard

There is a black line in some train images, why do that?

Open idealwei opened this issue 7 years ago • 4 comments

like 100080.jpg under folder HED-BSDS/train/0.0_1_1/100080.jpg

idealwei avatar Jan 19 '18 06:01 idealwei

I have the same problem with you.There is a strange offset for the output image when i use the pretrained model.

LemonMi avatar Mar 08 '18 16:03 LemonMi

Same problem. I think there are some problems in the pretrained model. An easy solution is modify your input, test it, and then modify it again. Different lay has different padding. For example, My input is 512x512, and output is from out3 (around 35pixel black line on the top and left). To solve it, first, I modify my input as 547x547(add blank to the right and bottom of original input). Then use HED. Store the [35:547, 35:547] as result. I think it is one of best choices. More tips: in your original input, you'd better leave some empty space. That's due to HED will diffuse the original image mildly. For me, l resize the 512 to 496 and leave 8pixel around.

arthur-qiu avatar Mar 18 '18 15:03 arthur-qiu

@here, its pretty annoying indeed, but you can meet the algorithm half way, it's fortunately just a translation, by ~33 pixels along the x and y axes. So running the output from the net like this net.blobs['sigmoid-dsn1'].data[0][0][33:][:,33:] should get rid of the border and give you your output array.

ghost avatar Mar 19 '18 06:03 ghost

Thanks for your advice, I meet the same problem. It does works.

kzq666666 avatar Nov 17 '22 02:11 kzq666666