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

Grayscale Image Datasets #351

Open
gsaltintas opened this issue Sep 11, 2023 · 2 comments
Open

Grayscale Image Datasets #351

gsaltintas opened this issue Sep 11, 2023 · 2 comments

Comments

@gsaltintas
Copy link

Hello,
First of all thank you for this package, it is a game changer! I was wondering if there is a preferred way of using grayscale image datasets, like MNIST, with FFCV. Since torchvision dataset yields PIL images, I don't think it is suitable to use BytesField or NDArrayField in the DatasetWriter. I was able to use ffcv with MNIST by manually adding a num_channels parameter to image decoders and commenting out this line in the RGBImageField but I was wondering if there was a built-in way that I am missing.

Thanks

@andrewilyas
Copy link
Contributor

Hi @gsaltintas ! We are still working on merging this in but there is a grayscale fork pending a PR Review here: #176. I think that should suit your needs!

@gsaltintas
Copy link
Author

Thank you! I was not aware of the PR, it looks similar to my local patch. I will refer to it.

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

2 participants