Skip to content

Bcai0797/PathINR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PathINR: An Efficient and Differentiable Implicit Representation for Gigapixel Pathological Images in Artificial Intelligence

Official code for PathINR, an Implicit Neural Representation method for flexible, differentiable and parallel reconstruction in computational pathology. PathINR supports the multi-resolution hash grid from InstantNGP.

This repository is built on Kaolin Wisp and its extension for compression SHACIRA.

Setup

  1. Clone
git clone https://github.com/Bcai0797/PathINR.git
cd PathINR
  1. Setup environment
conda create -n "pathinr" python=3.9.5
conda activate pathinr
  1. Install Pytorch packages along with Kaolin Wisp packages
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
pip install kaolin==0.13.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.1_cu113.html

See installation instructions of Kaolin Wisp for more details.

  1. Build and install other dependencies as well as CUDA kernels for grid interpolation
pip install -r requirements.txt
pip install -r requirements_app.txt
python setup.py develop

Dataset

We use dataset CAMELYON17 for evaluation and put data under the folder data.

Usage

The scripts for training and testing PathINR are contained under the folder eval.

  • eval/batch_inr.sh: training PathINR.
  • eval/batch_inr_eval.sh: PSNR evaluation.
  • eval/batch_inr_crop.sh: sampling tile / patch.
  • eval/batch_inr_inversion_adam.sh: model inversion and gradient calculation.
  • eval/eval_grd: gradient visualization.

About

An Efficient and Differentiable Implicit Representation for Gigapixel Pathological Images in Artificial Intelligence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages