Image Feature Extraction
Transformers
Safetensors
flexict
feature-extraction
medical-imaging
ct
vision
custom_code
Instructions to use ricklisz123/FlexiCT-3D with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ricklisz123/FlexiCT-3D with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="ricklisz123/FlexiCT-3D", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ricklisz123/FlexiCT-3D", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
FlexiCT-3D
FlexiCT-3D is the whole-volume CT encoder in the FlexiCT family.
Input and preprocessing
Default processor output shape is [B, 1, 160, 160, 160].
The default preset orients/resamples path inputs to LPS at 2 mm spacing when spacing is available, clips HU to [-1000, 1000], z-score normalizes, pads with the tensor minimum to at least 160^3, and center crops to 160^3.
Optional presets:
local_path: pad to a cube, then trilinear-resize to160^3for arbitrary local CT files.retrieval_roi: crop an ROI from coordinates, a mask, or a bounding box, pad boundary crops, then resize to160^3.
from transformers import AutoImageProcessor, AutoModel
processor = AutoImageProcessor.from_pretrained("ricklisz123/FlexiCT-3D", trust_remote_code=True)
model = AutoModel.from_pretrained("ricklisz123/FlexiCT-3D", trust_remote_code=True)
inputs = processor("/path/to/ct.nii.gz", return_tensors="pt")
outputs = model(**inputs)
cls_token = outputs.cls_token
patch_tokens = outputs.patch_tokens
Outputs
cls_token is a global volume embedding. patch_tokens are 3D patch embeddings.
Limitations
This model is a research feature extractor. The local_path and retrieval_roi presets are convenience paths and may not match training or evaluation preprocessing exactly.
- Downloads last month
- 17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support