--- library_name: transformers pipeline_tag: image-feature-extraction tags: - pytorch - vision-transformer - 3d - medical-imaging - manekko inference: false --- # Manekko_PanCancerCT **Manekko Small** is a 3D volume encoder for the PanCancerCT release, with 12 transformer blocks, 6 attention heads, and 384-dimensional features. **Weights are not uploaded yet.** Pretrained loading reports “weights unavailable” until they are added. The example below is ready to use once weights are available. Input is a preprocessed, single-channel float tensor `[B,1,D,H,W]`. Each spatial dimension must be divisible by **8**, with at least two patches overall. Rectangular volumes are supported. The model preserves axis order and does not resize or normalize intensities automatically. `forward_features` returns: | Output | Shape | |---|---| | `latent` | `[B,384]` | | `patch_latent` | `[B,384,D/8,H/8,W/8]` | | `patch_tokens` | `[B,N,384]`, where `N=(D/8)(H/8)(W/8)` | Patch tokens flatten the last spatial axis fastest. The encoder components are accessible through `patch_embed`, `eva`, `blocks`, and `norm`. ```python import numpy as np import torch from transformers import AutoModel model = AutoModel.from_pretrained( "Tenbatsu2424/Manekko_PanCancerCT", trust_remote_code=True ).eval() x = torch.from_numpy(np.load("preprocessed_volume.npy", allow_pickle=False)).float()[None, None] with torch.inference_mode(): features = model.forward_features(x) latent, patch_latent = features["latent"], features["patch_latent"] ```