Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training failed due to num_samples should be a positive integer value, but got num_samples=0: #337

Open
andrea-aleardi opened this issue Oct 28, 2024 · 3 comments

Comments

@andrea-aleardi
Copy link

Hello. I am encountering error "Training failed due to num_samples should be a positive integer value, but got num_samples=0:" when running the train.py script on my custom images. The folder with my data exists and is recognized in the script at the path I indicate in the yaml location file.
I checked online and some suggested training sample may be too small. However it is around 4,400 images in my case.
Any idea what this issue may be caused by?
Many thanks in advance.

@0322HYT
Copy link

0322HYT commented Nov 14, 2024

I also encountered this problem. Have you solved it?

@andrea-aleardi
Copy link
Author

Hi. Yes, the problem was that my training images were png, like those val and test, but instead they should have been jpg.

@JunbongJang
Copy link

Thank you for the hint!
I solved the same problem by changing *.jpg to *.png in the lama/saicinpainting/training/data/datasets.py file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants