Skip to content

About

GPU-accelerated Maximum Intensity Projection of the Stanford Bunny CT volume (512×512×361) with CUDA: threshold, 3×3×3 Gaussian blur and backward-mapped MIP, bit-exact vs the CPU reference and ~93–165× faster end-to-end. Renders N rotated views in a single kernel call for spin videos. CLE @ University of Aveiro.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Practical Assignment 3 — Volumetric MIP with CUDA

Porting the Maximum Intensity Projection pipeline of the Stanford Bunny CT scan (512×512×361 uint16 volume) to the GPU with CUDA: thresholding, 3×3×3 Gaussian blur, and MIP with backward mapping. Group cle08.

The full deliverable documentation — build/run, kernel design, validation, speedup tables, the innovation feature and references — is in bunnyMIP/README.md (this is the README that ships in the group's ~/bunnyMIP home on banana). This top-level file is the repository / development-workflow guide.

Highlights

  • Full GPU pipeline (threshold → blur → MIP) bit-stable vs the CPU gold standard (0.00 % differing pixels).
  • ~93–165× end-to-end speedup over the sequential reference (~143–287× kernels-only) on the banana GTX 1660 Ti.
  • Innovation: N rotated MIPs in a single CUDA kernel call (--frames N), ready to assemble into a spin video with ffmpeg.

Where it runs

Everything is compiled and executed on the banana.ua.pt server (Ubuntu 18.04, CUDA 10.2, GeForce GT 710 + GTX 1660 GPUs), reachable via the UA VPN. Do not use VSCode Remote-SSH (shared server) — develop locally and sync.

Structure

bunnyMIP/        local copy of the code (without data/, which stays on banana)
  src/           main.cpp, bunnyMIP.cpp (gold standard), device-bunnyMIP.cu (CUDA kernels)
  include/       headers
  output/        generated rasters / frames / perf-results (git-ignored)
  makefile       build with nvcc (-arch=sm_75)
  README.md      ← deliverable documentation
docs/            assignment brief, TODO, base-code analysis, VPN guide
scripts/         helpers (see below)

Workflow

# 1) connect to the server (see docs/VPN-SETUP.md)
#    browser: https://go.ua.pt   ->   sudo bash scripts/vpn-up.sh   ->   ssh banana

# 2) edit locally in bunnyMIP/ and sync to banana (does not send data/)
bash scripts/sync-up.sh

# 3) build and run on banana (accepts CLI args)
bash scripts/build-run.sh [--threshold N --sigma S --roll R --pitch P --yaw Y]

# 4) bring the result images back and view them (output/bunnyMIP_{cpu,gpu}.pgm)
bash scripts/sync-down.sh

# 5) speedup analysis: sweeps sigma/rotations, writes output/perf-results.txt
bash scripts/bench.sh [REPEAT]            # REPEAT default = 10

# 6) spinning-bunny video: N MIPs in ONE kernel call (Innovation) -> bunny-spin.mp4
#    --axis picks the spin axis; --tilt-* tilt it into an orbit
bash scripts/make-video.sh --frames 120 --fps 30 --axis yaw
bash scripts/make-video.sh --frames 120 --fps 30 --axis yaw --tilt-pitch 30   # tilted orbit

See bunnyMIP/README.md for the complete CLI (incl. --repeat and the --frames innovation mode) and the local ffmpeg step for the spin video.

Script Purpose
scripts/vpn-up.sh Fixes the VPN after connecting (split tunnel + DNS + NAT). Run on every connection.
scripts/sync-up.sh rsync the local code → banana (excludes the dataset).
scripts/sync-down.sh rsync the results (output/) banana → local.
scripts/build-run.sh Build with nvcc and run on banana.
scripts/bench.sh Speedup sweep on banana → output/perf-results.txt.
scripts/make-video.sh Orchestrates the rotation video: generate N frames on banana, encode via bunnyMIP/viz/, fetch bunny-spin.mp4 back.

Status

Core pipeline, CLI, validation, speedup analysis, the single-kernel multi-MIP innovation and documentation are complete. Remaining: optional polish, the presentation, and the final delivery to ~ on banana. Item-by-item state in docs/TODO.md.

About

GPU-accelerated Maximum Intensity Projection of the Stanford Bunny CT volume (512×512×361) with CUDA: threshold, 3×3×3 Gaussian blur and backward-mapped MIP, bit-exact vs the CPU reference and ~93–165× faster end-to-end. Renders N rotated views in a single kernel call for spin videos. CLE @ University of Aveiro.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages