Skip to content

Commit

Permalink
rm plip
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldoucet committed Nov 13, 2024
1 parent d26a0b6 commit 2e8fba2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
21 changes: 0 additions & 21 deletions src/hest/bench/cpath_model_zoo/inference_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,6 @@ def forward_features(self, x):
return out


class PlipInferenceEncoder(InferenceEncoder):
def _build(self, _):
from transformers import CLIPImageProcessor, CLIPVisionModel

model_name = "vinid/plip"
img_transforms_clip = CLIPImageProcessor.from_pretrained(model_name)
model = CLIPVisionModel.from_pretrained(
model_name) # Use for feature extraction
def _eval_transform(img): return img_transforms_clip(
img, return_tensors='pt')['pixel_values'].squeeze(0)
eval_transform = _eval_transform
precision = torch.float32

return model, eval_transform, precision

def forward(self, x):
return self.model(x).pooler_output


class RemedisInferenceEncoder(InferenceEncoder):
def _build(self, weights_path):
from .remedis.remedis_models import resnet152_remedis
Expand Down Expand Up @@ -317,8 +298,6 @@ def inf_encoder_factory(enc_name):
return CTransPathInferenceEncoder
elif enc_name == 'phikon':
return PhikonInferenceEncoder
elif enc_name == 'plip':
return PlipInferenceEncoder
elif enc_name == 'remedis':
return RemedisInferenceEncoder
elif enc_name == 'resnet50':
Expand Down
1 change: 0 additions & 1 deletion src/hest/bench/local_ckpts.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"ctranspath": "fm_v1/ctranspath/ctranspath.pth",
"remedis": "fm_v1/remedis/path-152x2-remedis-m_torch.pth",
"phikon": "",
"plip": "",
"resnet50": "",
"gigapath": "",
"virchow": "",
Expand Down
1 change: 0 additions & 1 deletion src/hest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ def enc_results_to_table(path) -> str:
'ctranspath': 'CTransPath',
'remedis': 'Remedis',
'phikon': 'Phikon',
'plip': 'PLIP',
'uni_v1': 'UNI',
'conch_v1': 'CONCH',
'gigapath': 'gigapath'
Expand Down

0 comments on commit 2e8fba2

Please sign in to comment.