xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.67k stars 1.5k forks source link

training data? #9

Closed urimerhav closed 4 years ago

urimerhav commented 4 years ago

I'm interested to retrain the model from scratch. It looks like the code expects a train_datafolder, which doesn't exist. The readme mentions a bunch of datasets that you've trained on, but it seems like the code expects a different format than the one available e.g. here.

Can you please confirm that the expectation is jpg images as input, and a png encoded in uint8 where the entire object takes the value 255 and all other pixels are 0?

xuebinqin commented 4 years ago

please check the file "data_loader.py". The following 53 and 54 lines in u2net_train.py indicate the format of input images. You can modify them to fit your data. image_ext = '.jpg' label_ext = '.png' As for the training data, DUTS-TR and DUTS-TE is here: http://saliencydetection.net/duts/ (There may have 2 or 3 mismatches between images and masks, you have to correct them). For other datasets, pls check our BASNet paper: http://openaccess.thecvf.com/content_CVPR_2019/html/Qin_BASNet_Boundary-Aware_Salient_Object_Detection_CVPR_2019_paper.html. We are not authorized to redistribute these datasets.

On Mon, May 11, 2020 at 12:52 PM Uri Merhav notifications@github.com wrote:

I'm interested to retrain the model from scratch. Looks like the code expects a train_datafolder, which doesn't exist. The readme mentions a bunch of datasets that you've trained on, but it seems like the code expects a different format than the one available e.g. here http://elderlab.yorku.ca/SOD/.

Can you please confirm that the expectation is jpg images as input, and a png encoded in uint8 where the entire object is takes the value 255 and all other pixels are 0?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NathanUA/U-2-Net/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORMCHYVIMFFJAZROK7TRRBCQBANCNFSM4M6FBOPQ .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/