swiftnet icon indicating copy to clipboard operation
swiftnet copied to clipboard

Fail to train model, Num images: 0

Open rod409 opened this issue 4 years ago • 5 comments

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.

rod409 avatar Oct 19 '20 19:10 rod409

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?

And1210 avatar Mar 04 '21 21:03 And1210

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.

isunLt avatar Mar 09 '21 13:03 isunLt

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.

PineApple777 avatar Mar 16 '21 17:03 PineApple777

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

isunLt avatar Mar 20 '21 09:03 isunLt

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

3305638048 avatar Apr 19 '23 09:04 3305638048