Skip to content

Add pytorch's Dataset support and improve augmentation support#8

Merged
Obi-Wan merged 4 commits intomainfrom
datasets_and_agumentation
Nov 19, 2025
Merged

Add pytorch's Dataset support and improve augmentation support#8
Obi-Wan merged 4 commits intomainfrom
datasets_and_agumentation

Conversation

@Obi-Wan
Copy link
Copy Markdown
Contributor

@Obi-Wan Obi-Wan commented Nov 16, 2025

Description / Context

Pytorch's Dataset class enables creating an abstraction layer for various kinds of datasets, including on-disk and in-memory data. This PR adds support for using derived classes from the Dataset class in the training of the Supervised and Noise2Noise algorithms. Moreover, it adds support for Augmentation classes. These classes include random flips, random rotations, and the addition of random noise in the form of Gaussian and Poisson noise.

For the moment, we focus on the in-memory behavior. We will open a dedicated PR for the on-disk handling of the training/inference data.

TODO

  • Implement feature:
    • Add support for the Dataset-derived classes
    • Add support for the Augmentation-derived classes
    • Move algorithms to use the new Dataset classes (in-memory API)
  • Add/update tests

Notes

This is a much less over-engineered version of the previous implementation of the Dataset classes. For the moment, the DataLoader class is not used. It might be added in the future if the on-disk usage becomes popular.

@Obi-Wan Obi-Wan self-assigned this Nov 16, 2025
@Obi-Wan Obi-Wan added the enhancement New feature or request label Nov 16, 2025
@Obi-Wan Obi-Wan force-pushed the datasets_and_agumentation branch from 2797c35 to b6ab18c Compare November 16, 2025 19:05
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
…or (for reproducibility)

Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
Signed-off-by: Nicola VIGANÒ <nicola.vigano@cea.fr>
@Obi-Wan Obi-Wan force-pushed the datasets_and_agumentation branch from b6ab18c to 8e135e0 Compare November 16, 2025 23:43
@Obi-Wan
Copy link
Copy Markdown
Contributor Author

Obi-Wan commented Nov 19, 2025

This seems to pass all tests. I'm going to merge.

@Obi-Wan Obi-Wan merged commit 8b7844d into main Nov 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant