• Paper
This is a simple implementation of the Noise2Noise paper (Lehtinen et al., 2018). Trains a U-Net-style denoising network using pairs of noisy images — no clean targets needed.
This project uses uv for dependency management.
uv syncI used 32x32 images from ImageNet with random gaussian noise. The images are available in the form of pickle files for PyTorch. Pretrained weights are also available on this Drive.
uv run n2n-train --train-data train_data.pkl --epochs 10Options:
--batch-size— batch size (default: 8)--lr— learning rate (default: 0.001)--num-workers— data loading workers (default: 2)--output— path to save model (default: model_pytorch.pth)--pretrained— resume from pretrained weights
uv run n2n-predict --model model_pytorch.pth --input val_data.pklOptions:
--output— save denoised images to a pickle file
A demo Jupyter Notebook is also available: .
uv run python -m pytest tests/A full report on this implementation can be found here.