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.43k stars 1.45k forks source link

ValuerError num_samples should be positive #130

Open mack156890 opened 3 years ago

mack156890 commented 3 years ago

Hello, I am trying to train this code on my own Dataset. But while running u2net_train code, I am getting following error in init method of sampler class ValueError: num_samples should be a positive integer value, but got num_samples=0 Note :- I am getting this error on this line salobj_dataloader = DataLoader(salobj_dataset, batch_size=batch_size_train, shuffle=True, num_workers=1) on u2net_train code. Than you in advance!

xuebinqin commented 3 years ago

please check your image directory to see if the path of the input images are correct.

On Wed, Dec 23, 2020 at 4:39 AM mack156890 notifications@github.com wrote:

Hello, I am trying to train this code on my own Dataset. But while running u2net_train code, I am getting following error in init method of sampler class ValueError: num_samples should be a positive integer value, but got num_samples=0 Note :- I am getting this error on this line salobj_dataloader = DataLoader(salobj_dataset, batch_size=batch_size_train, shuffle=True, num_workers=1) on u2net_train code. Than you in advance!

— 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/130, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORL2ONOX6JJ6YK7YME3SWHJHDANCNFSM4VG4I24A .

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