We release the codes of 2D DCT with Numpy and PyTorch.
Our deployment can process a batch of square images with [B, N, N]
shape, rather than process image one by one.
- Original mask images:
- transformed by cv2.dct:
- transformed by our Numpy deployment:
- transformed by our PyTorch deployment:
- Recover by cv2.idct:
- Recover by our Numpy deployment:
- Recover by our PyTorch deployment: