plismbench.models.owkin module
Models from Owkin, Inc. company.
-
class plismbench.models.owkin.Phikon(device: int | list[int] | None = -1, mixed_precision: bool = False)[source]
Bases: Extractor
Phikon model developped by Owkin available on Hugging-Face (1).
- Parameters:
device (int | list[int] | None = DEFAULT_DEVICE,) – Compute resources to use.
If None, will use all available GPUs.
If -1, extraction will run on CPU.
mixed_precision (bool = True) – Whether to use mixed_precision.
-
process(image) → Tensor[source]
Process input images.
-
property transform: Lambda
Transform method to apply element wise.
-
class plismbench.models.owkin.PhikonV2(device: int | list[int] | None = -1, mixed_precision: bool = False)[source]
Bases: Extractor
Phikon V2 model developped by Owkin available on Hugging-Face (1).
You will need to be granted access to be able to use this model.
- Parameters:
device (int | list[int] | None = DEFAULT_DEVICE,) – Compute resources to use.
If None, will use all available GPUs.
If -1, extraction will run on CPU.
mixed_precision (bool = True) – Whether to use mixed_precision.
-
process(image) → Tensor[source]
Process input images.
-
property transform: Lambda
Transform method to apply element wise.