tomodrgn eval_vol#
Purpose#
Generate volumes from corresponding latent embeddings using a pretrained train_vae
model (i.e. evaluating decoder module only).
Sample usage#
The examples below are adapted from tomodrgn/testing/commandtest*.py
, and rely on other outputs from commandtest.py
to execute successfully.
# Warp v1 style inputs
tomodrgn \
eval_vol \
--weights output/vae_both_sim_zdim2/weights.pkl \
-c output/vae_both_sim_zdim2/config.pkl \
-o output/vae_both_sim_zdim2/eval_vol_allz \
--zfile output/vae_both_sim_zdim2/z.train.pkl \
-b 32
# WarpTools style inputs
tomodrgn \
eval_vol \
--weights output/vae_warptools_70S_zdim2/weights.pkl \
-c output/vae_warptools_70S_zdim2/config.pkl \
-o output/vae_warptools_70S_zdim2/eval_vol_allz \
--zfile output/vae_warptools_70S_zdim2/z.train.pkl \
-b 32
Arguments#
usage: eval_vol [-h] -w WEIGHTS -c CONFIG -o OUTDIR [--prefix PREFIX]
[--zfile ZFILE] [--flip] [--invert] [--downsample DOWNSAMPLE]
[--lowpass LOWPASS] [-b BATCH_SIZE] [--no-amp] [--multigpu]
Core arguments#
- -w, --weights
Model weights from train_vae
- -c, --config
config.pkl file from train_vae
- -o, --outdir
Output .mrc or directory
- --prefix
Prefix when writing out multiple .mrc files
Default:
'vol_'
Specify z values#
- --zfile
Text/.pkl file with z-values to evaluate
Volume arguments#
- --flip
Flip handedness of output volume
Default:
False
- --invert
Invert contrast of output volume
Default:
False
- --downsample
Downsample volumes to this box size (pixels)
- --lowpass
Lowpass filter to this resolution in Å. Requires settings –Apix.
Compute arguments#
- -b, --batch-size
Batch size to parallelize volume generation (32-64 works well for box64 volumes)
Default:
32
- --no-amp
Disable use of mixed-precision training
Default:
False
- --multigpu
Parallelize model evaluation across all detected GPUs. Specify GPUs i,j via export CUDA_VISIBLE_DEVICES=i,j
Default:
False