uoft-cs/cifar10
Viewer • Updated • 60k • 381k • 114
This repository contains a PyTorch implementation of a deep U-Net with Residual Blocks, trained to perform image inpainting on the CIFAR-10 dataset. The model takes a 32x32 image with a masked (blacked-out) region and reconstructs the missing part.
| Original | Masked Input | Reconstructed Output |
|---|---|---|
![]() |
![]() |
![]() |
Note: The images above are illustrative examples. You can generate your own by running the code below.
The model is a ComplexUNet, a variant of the standard U-Net architecture, designed to be deeper and wider for improved performance.
96 for higher capacity.The following code snippet provides a complete example of how to load the model, process an image from the CIFAR-10 test set, and visualize the inpainting result.
First, ensure you have the necessary libraries installed:
pip install torch torchvision numpy matplotlib Pillow