FAQ
Common questions grouped by topic.
Installation and setup
Section titled “Installation and setup”Do I need to train a model?
Section titled “Do I need to train a model?”No. PhenoMe is zero-shot: it uses pre-trained AI models like DINOv2 out-of-the-box. You point the pipeline at your images and run. No training, fine-tuning, or manual annotation is required.
Do I need a GPU?
Section titled “Do I need a GPU?”A GPU is strongly recommended for reasonable speed. The pipeline works on CPU, but processing thousands of images will be slow. For small datasets (hundreds of images), CPU is feasible. See Best practices - performance.
conda / pip failed or PyTorch is wrong - what should I try?
Section titled “conda / pip failed or PyTorch is wrong - what should I try?”- Use the pinned env files under
envs/(see Getting started - installation). - For GPU, ensure your driver matches the CUDA wheel you install; see PyTorch get started.
- If
pykeopsfails on your OS, omit it and use the default backends (see Best practices - performance).
I get a [KeOps] Warning : CUDA libraries not found or could not be loaded; Switching to CPU only error, what should I do?
Section titled “I get a [KeOps] Warning : CUDA libraries not found or could not be loaded; Switching to CPU only error, what should I do?”This happens if pykeops is installed but cannot find your system’s CUDA toolkit or compiler. In most cases, you can ignore this: PhenoMe will automatically fall back to standard PyTorch or Scikit-Learn backends for visualizing patterns (using PCA, t-SNE, or UMAP), which is fast enough for most datasets.
If you are working with very large datasets (e.g., >100,000 images) and need the memory efficiency of KeOps, ensure you have a functional C++ compiler and that your CUDA_HOME environment variable is set. For standard usage, you can safely ignore the warning or simply uninstall pykeops.
If you have a working CUDA setup but still see the error, try clearing the cache:
import pykeopspykeops.clean_pykeops()How do I verify the install?
Section titled “How do I verify the install?”See the verification steps in Getting started — Installation.
Do I need masks?
Section titled “Do I need masks?”- For embeddings: No. These are extracted directly from images.
- For classical properties: Depends on the preset. The
intensitypreset works on images only (no masks). Presets likebasic,shape,standard, andcompleterequire masks for shape-based features (see Select properties — Presets). See Understanding properties.
How long does processing take?
Section titled “How long does processing take?”Rough order of magnitude (GPU, ViT-B/14, batch_size=32):
- ~1–5 seconds per 100 images (embedding extraction)
- PCA/t-SNE/UMAP: seconds to minutes depending on sample count
- For tens of thousands of images, expect minutes to hours; use checkpointing to resume if interrupted.
Data and metadata
Section titled “Data and metadata”What folder structure should I use?
Section titled “What folder structure should I use?”The pipeline is flexible:
- Flat: All images in one folder. Use
pheno.find_files("path/to/images"). - By condition:
data/Control/img1.tif,data/Drug1/img1.tif. Use a path template (get_metadata_from_path) or custommetadata_fn.
See Preparing your data and Adding experiment info.
I use a CSV for metadata—why don’t my CSV row count and file_df row count match?
Section titled “I use a CSV for metadata—why don’t my CSV row count and file_df row count match?”find_files first scans your images folder, then matches those images to your CSV. Only the overlap is used: image files must exist in both the folder and the CSV to be processed. Extra rows in your CSV are ignored, and images without a CSV row are skipped by default. See Adding experiment info — Using a spreadsheet.
My filter returns no images. Why?
Section titled “My filter returns no images. Why?”Check that:
- The metadata keys exist (
pheno.get_available_metadata_keys()). - The filter values match your data exactly (case-sensitive).
- The column values are as expected (
df['condition'].unique()).
See Best practices - data organization.
Analysis and compute
Section titled “Analysis and compute”I get “CUDA out of memory.” What do I do?
Section titled “I get “CUDA out of memory.” What do I do?”- Reduce
batch_size(e.g., from 32 to 16 or 8). - Use a smaller model (e.g., ViT-S instead of ViT-g).
- Clear GPU memory between runs:
gc.collect(); torch.cuda.empty_cache().
See Best practices - performance.
Processing is very slow. How can I speed it up?
Section titled “Processing is very slow. How can I speed it up?”- Ensure you are using a GPU (
wrapper.deviceshould showcuda:X). - Increase
batch_sizeif GPU memory allows. - Increase
num_workersfor data loading. - Use the
intensitypreset instead ofcompleteif you do not need all properties.
Results differ between runs. Why?
Section titled “Results differ between runs. Why?”t-SNE and UMAP have random elements (they are stochastic). For reproducibility, set seed=42 when creating the pipeline: PhenoMe(seed=42). Also use use_gpu_for_dr=False if you need exact match with CPU sklearn/umap-learn. For large datasets on GPU, install pykeops to avoid OOM. See Best practices - reproducibility and Best practices - performance.
Results and interpretation
Section titled “Results and interpretation”What is the “correlation engine” (linking AI to biology) and how do I use it?
Section titled “What is the “correlation engine” (linking AI to biology) and how do I use it?”The correlation engine links the abstract AI descriptions to classical physical properties (like size or shape). It answers: “What physical trait does this AI pattern represent?” For example, a certain axis might represent how elongated a cell is. See Explaining AI results.
How do I choose channel mode (split vs combined)?
Section titled “How do I choose channel mode (split vs combined)?”- Split: Fluorescence images with distinct channels (DAPI, GFP, etc.). Each channel is processed separately.
- Combined: Brightfield, phase contrast, or RGB images. Channels are treated as a single color image.
See Core concepts — channel modes.
Which property preset should I use?
Section titled “Which property preset should I use?”| You have… | Use preset |
|---|---|
| No masks | intensity |
| Masks, lightweight stats | basic |
| Masks, shape only | shape |
| Masks, rings + axis lengths (recommended default) | standard |
| Masks, texture + QC + extended shape | complete |
See Select properties — Presets and Understanding properties — choosing properties.
Extending PhenoMe
Section titled “Extending PhenoMe”What is the relationship between PhenoMe and the phenome package?
Section titled “What is the relationship between PhenoMe and the phenome package?”PhenoMe is the project name. The installable Python package is phenome (pip install phenome; import phenome).
Where do I add custom models, properties, or plugins?
Section titled “Where do I add custom models, properties, or plugins?”See Extending PhenoMe, Select properties, Plugins, and notebook 05 - Extending.
