OctopusUp is a high-performance upsampling library. This project provides efficient CUDA-accelerated implementations of upsampling algorithms suitable for computer vision and deep learning tasks. (Work in Progress)
OctopusUp/
├── setup.py # Project installation configuration
├── OctopusUp/ # Main package directory
│ ├── __init__.py # Package initialization file
│ └── functions/ # Core function implementations
│ ├── __init__.py # Function initialization file
│ └── octopusup_func.py # Main functionality implementation
├── src/ # Source code directory
│ ├── vision.cpp # C++ implementation
│ ├── octopusup.h # Header file
│ └── cuda/ # CUDA-accelerated code
│ ├── octopusup_cuda.h # CUDA header file
│ └── octopusup_im2col_cuda.cuh # CUDA kernel implementation
└── scripts/ # Scripts and examples
├── octopusup_eval.py # Evaluation script
└── speed_test.py # Speed test script
python setup.py installfrom OctopusUp import OctopusUpFunction
import torch
# Prepare input data
b, c, h, w = 1, 256, 64, 64
H, W = 256, 256
input = torch.randn(b, h, w, c).cuda()
feat = torch.randn(b, H, W, 32).cuda()
offsets = (torch.rand(b, H, W, 16).cuda() * 2 - 1)
# Use OctopusUpFunction
output = OctopusUpFunction.apply(input, feat, offsets, 8, 32)- High-performance CUDA-accelerated implementation
- Support for variable number of neighbor samples
- Adaptive sampling offsets
- Compatible with PyTorch's automatic differentiation mechanism