fyu / drn

Dilated Residual Networks
https://www.vis.xyz/pub/drn
BSD 3-Clause "New" or "Revised" License
1.1k stars 219 forks source link

on saving test images error #8

Closed ZzzjzzZ closed 6 years ago

ZzzjzzZ commented 7 years ago

Hi! Following your introduction, I achieved the testing. But I found that it saves the predicted images into the original images folder --"test", and overwrites the original test images. It does not create the folder as the "save_colorful_images" & "save_output_images" function described. Can your tell me why. Thanks!

jiaxue-ai commented 6 years ago

change line 460 and 474 into: fn = os.path.join(output_dir, filenames[ind].split('/')[-1][:-4] + '.png')

fyu commented 6 years ago

The current code is supposed to store the generated images in a local directory. The folder name is '{}_{:03d}_{}'.format(args.arch, start_epoch, phase) if not suffix is specified. What is the problem with that?

jiaxue-ai commented 6 years ago

I think the problem he met is similar as what I met, that filenames[ind] starts with home, like: home/../cityscape/.., if the data is saved in this way, the generated path with command fn = os.path.join(output_dir, filenames[ind][:-4] + '.png') will keeps starting with home/../.., which means the output fn will be the same as os.path.join(filenames[ind][:-4] + '.png'), so my advise to fix it is to split the filenames and find what you need to preserve

wldeephi commented 6 years ago

hello, @mrxue1993 ,when I do evaluation on the validation dataset, it always out of memory, Can your tell me why. Thanks!
My gnu memory is 12G.

wldeephi commented 6 years ago

when I run as follows with the released pretrained model: python segment.py test -d ./dataset/cityscapes/ -c 19 --arch drn_d_105 --pretrained output/drn-d-105_ms_cityscapes.pth --phase val --batch-size 1 --ms

it gives the a lower mIou(53%) than the performance in paper ,Can your tell me why. Thanks!

ZzzjzzZ commented 6 years ago

@fyu thx!

ZzzjzzZ commented 6 years ago

@mrxue1993 thanks