Instructions to use Rainy-fog/CerS-Path with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use Rainy-fog/CerS-Path with timm:
import timm model = timm.create_model("hf-hub:Rainy-fog/CerS-Path", pretrained=True) - Notebooks
- Google Colab
- Kaggle
CerS-Path
- Weight:
weights/CerS-Path.pth - Input: RGB pathology patches
- Output: 1024-dimensional features
Install
python -m pip install -r requirements.txt
Preprocessing
transforms.Compose([
transforms.Resize(
224,
interpolation=InterpolationMode.BILINEAR,
antialias=True,
),
transforms.ToTensor(),
transforms.Normalize(
mean=(0.485, 0.456, 0.406),
std=(0.229, 0.224, 0.225),
),
])
No random augmentation or stain normalization is used during feature extraction. The reported evaluation used 20X, 256 × 256 JPG patches.
Usage
python extract_features.py \
--input /path/to/patches \
--output features.pt
Patch filenames should follow x_y.jpg. The output tensor has shape
[number_of_patches, 1024].
- Downloads last month
- -