This repo contains 3D version of original Pixel Shuffle idea from: Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network, implemented in PyTorch.
Visual intuition of how 3D (un)-shuffle operator works
-
Clone the repo
git clone git@github.com:scalyvladimir/pixel_shuffle3d.git
-
Install all the demanded packages with:
pip3 install torch numpy
-
PixelUnshuffle3d
from pixel_shuffle3d import PixelUnshuffle3d import torch pixel_unshuffle = PixelUnshuffle3d(3) input = torch.randn(1, 1, 12, 12, 12) output = pixel_unshuffle(input) print(output.size()) # torch.Size([1, 27, 4, 4, 4])
-
PixelShuffle3d
from pixel_shuffle3d import PixelShuffle3d import torch pixel_shuffle = PixelShuffle3d(3) input = torch.randn(1, 27, 4, 4, 4) output = pixel_shuffle(input) print(output.size()) # torch.Size([1, 1, 12, 12, 12])
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request