orsic / swiftnet

GNU General Public License v3.0
251 stars 54 forks source link

Fail to train model, Num images: 0 #35

Open rod409 opened 3 years ago

rod409 commented 3 years ago

When I try to train the model on cityscapes I get an error that the num_samples is zero. The script will print that the "Num images: 0" during execution. I am not sure what I need to change. One thing I found is in line 48 of cityscapes.py.

self.images = list(sorted(self.images_dir.glob('/.ppm')))

What files do the .ppm refer to in the cityscapes data? I only see .png files when downloading the cityscapes dataset.

And1210 commented 3 years ago

I am having the same issue, I believe it is an issue of not knowing the correct directory structure for the dataset. The documentation is confusing, anyone who has gotten it working, can you walk through how the file structure is supposed to work?

isunLt commented 3 years ago

The README is confusing. It says that files in datasets/Cityscapes/rgb/train is expected to be png files. But the code expects it to be .ppm files. And the pretrained weights also do not perfectly suit for the model.

PineApple777 commented 3 years ago

Does any one know this same problem? I think "PPM" file format change to jpg and Datasets directory structures must be recontructed. If I changed ppm to png, The error was caused at ColorizeLabels and I think this may causes uncorrected label, rgb paths.

isunLt commented 3 years ago

Does any one know this same problem? I think "PPM" file format change to jpg and Datasets directory structures must be recontructed. If I changed ppm to png, The error was caused at ColorizeLabels and I think this may causes uncorrected label, rgb paths. Try this repo. It works, although a little different from the original one. https://github.com/lxtGH/Fast_Seg

3305638048 commented 1 year ago

root = Path.home()/Path( ) Path issues