jyhjinghwang / SegSort

SegSort: Segmentation by Discriminative Sorting of Segments
https://jyhjinghwang.github.io/projects/segsort.html
MIT License
158 stars 24 forks source link

What data we need as the input #5

Closed yuchan-san closed 4 years ago

yuchan-san commented 4 years ago

Hi

I have tried unsupervised segmentation using your codes, and confirmed working with VOC2012 dataset. Thanks for great attempt and source codes.

Im trying them with own dataset. The question is 'What data should we exactly need to prepare?'. When VOC2012, I prepared raw images, segcls, hed, pretrained weight, sbd_clsimg by downloading. However, I cannot prepare some of them because segcls are, for example, made by Matlab codes. When I tried with only use raw images, the code is working. Is that correct?

jyhjinghwang commented 4 years ago

Hi @yuchan-san,

Thanks for your interest in trying out the code!

For unsupervised segmentation, training would require raw images, hed, and trained weights. Others would not be necessary. However, if you'd like to obtain a quantitative evaluation, you'd need segcls as well, which is simply the ground truth encoded in the grayscale UINT8 format.

I hope this helps.

Best, Jyh-Jing

yuchan-san commented 4 years ago

Hi @jyhjinghwang Thank you very much for your quick reply. I now understood that. Although it has written 'segcls' on the used image path 'train+.txt', but you are replacing 'hed' in image_reader.py. right? eg1, 'VOC2012/JPEGImages/2007_000032.jpg VOC2012/segcls/2007_000032.png' in train+.txt eg2. 'seg = mask.replace('segcls', 'hed')' on line 172, in image_reader.py.

So, we need Matlab to calculate hed. Can I replace it to other method instead of 'gPb-owt-ucm'? Additionally, hed means contours of grayscale right?, not edge detection. If so, we can use SLIC functions for it at skyimage library.

Do you have any idea for that?

jyhjinghwang commented 4 years ago

Yes, generally you can replace the HED-owt-ucm oversegmentations with any other masks. I've also tried SLIC which would work.

yuchan-san commented 4 years ago

Perfect! Thanks so much.