Command Line Interface Reference
cov3d
cov3d [OPTIONS] COMMAND [ARGS]...
Options
- -v, --version
Prints the current version.
- --install-completion <install_completion>
Install completion for the specified shell.
- Options
bash | zsh | fish | powershell | pwsh
- --show-completion <show_completion>
Show completion for the specified shell, to copy it or customize the installation.
- Options
bash | zsh | fish | powershell | pwsh
bibliography
cov3d bibliography [OPTIONS]
bibtex
cov3d bibtex [OPTIONS]
infer
cov3d infer [OPTIONS]
Options
- --gpu, --no-gpu
Whether or not to use a GPU for processing if available.
- Default
True
- --mc-samples <mc_samples>
The number of Monte Carlo samples of the results to get.
- Default
0
- --mc-dropout, --no-mc-dropout
Whether or not to use Monte Carlo dropout if doing MC sampling.
- Default
False
- --pretrained <pretrained>
The location (URL or filepath) of a pretrained model.
- --reload, --no-reload
Should the pretrained model be downloaded again if it is online and already present locally.
- Default
False
- --scan <scan>
A directory of a CT scan.
- --scan-dir <scan_dir>
A directory with CT scans in subdirectories. Subdirectories must start with ‘ct_scan’ or ‘test_ct_scan’.
- --directory <directory>
- --output-csv <output_csv>
A path to output the results as a CSV.
- --output-mc <output_mc>
A path to output all MC inference runs as a PyTorch tensor.
- --covid-txt <covid_txt>
A path to output the names of the predicted COVID positive scans.
- --noncovid-txt <noncovid_txt>
A path to output the names of the predicted COVID negative scans.
- --mild-txt <mild_txt>
A path to output the names of the predicted mild COVID scans.
- --moderate-txt <moderate_txt>
A path to output the names of the predicted moderate COVID scans.
- --severe-txt <severe_txt>
A path to output the names of the predicted severe COVID scans.
- --critical-txt <critical_txt>
A path to output the names of the predicted critical COVID scans.
lr-finder
cov3d lr-finder [OPTIONS]
Options
- --plot-filename <plot_filename>
- --start-lr <start_lr>
- Default
1e-07
- --end-lr <end_lr>
- Default
10
- --iterations <iterations>
- Default
100
- --fp16, --no-fp16
Whether or not the floating-point precision of learner should be set to 16 bit.
- Default
True
- --output-dir <output_dir>
The location of the output directory.
- Default
./outputs
- --weight-decay <weight_decay>
The amount of weight decay. If None then it uses the default amount of weight decay in fastai.
- --presence-smoothing <presence_smoothing>
- Default
0.1
- --severity-smoothing <severity_smoothing>
- Default
0.1
- --neighbour-smoothing, --no-neighbour-smoothing
- Default
False
- --mse, --no-mse
- Default
False
- --emd-weight <emd_weight>
- Default
0.1
- --directory <directory>
The data directory.
- --batch-size <batch_size>
The batch size.
- Default
4
- --splits-csv <splits_csv>
The path to a file which contains the cross-validation splits.
- --split <split>
The cross-validation split to use. The default (i.e. 0) is the original validation set.
- Default
0
- --training-severity <training_severity>
The path to the training Excel file with severity information.
- --validation-severity <validation_severity>
The path to the validation Excel file with severity information.
- --width <width>
The width to convert the images to.
- Default
128
- --height <height>
The height to convert the images to. If None, then it is the same as the width.
- --depth <depth>
The depth of the 3d volume to interpolate to.
- Default
128
- --normalize, --no-normalize
Whether or not to normalize the pixel data by the mean and std of the dataset.
- Default
False
- --severity-factor <severity_factor>
- Default
0.5
- --flip, --no-flip
- Default
False
- --brightness <brightness>
- Default
0.0
- --contrast <contrast>
- Default
0.0
- --distortion, --no-distortion
- Default
True
- --autocrop, --no-autocrop
- Default
True
- --max-scans <max_scans>
- Default
0
- --model-name <model_name>
- Default
r3d_18
- --pretrained, --no-pretrained
- Default
True
- --penultimate <penultimate>
- Default
512
- --dropout <dropout>
- Default
0.5
- --max-pool, --no-max-pool
- Default
False
- --severity-regression, --no-severity-regression
- Default
False
- --final-bias, --no-final-bias
- Default
False
- --fine-tune, --no-fine-tune
- Default
False
- --flatten, --no-flatten
- Default
False
- --even-stride, --no-even-stride
- Default
False
- --positional-encoding, --no-positional-encoding
- Default
False
- --cov3d-trained <cov3d_trained>
- --severity-everything, --no-severity-everything
- Default
False
show-batch
cov3d show-batch [OPTIONS]
Options
- --output-path <output_path>
A location to save the HTML which summarizes the batch.
- --directory <directory>
The data directory.
- --batch-size <batch_size>
The batch size.
- Default
4
- --splits-csv <splits_csv>
The path to a file which contains the cross-validation splits.
- --split <split>
The cross-validation split to use. The default (i.e. 0) is the original validation set.
- Default
0
- --training-severity <training_severity>
The path to the training Excel file with severity information.
- --validation-severity <validation_severity>
The path to the validation Excel file with severity information.
- --width <width>
The width to convert the images to.
- Default
128
- --height <height>
The height to convert the images to. If None, then it is the same as the width.
- --depth <depth>
The depth of the 3d volume to interpolate to.
- Default
128
- --normalize, --no-normalize
Whether or not to normalize the pixel data by the mean and std of the dataset.
- Default
False
- --severity-factor <severity_factor>
- Default
0.5
- --flip, --no-flip
- Default
False
- --brightness <brightness>
- Default
0.0
- --contrast <contrast>
- Default
0.0
- --distortion, --no-distortion
- Default
True
- --autocrop, --no-autocrop
- Default
True
- --max-scans <max_scans>
- Default
0
train
cov3d train [OPTIONS]
Options
- --distributed, --no-distributed
If the learner is distributed.
- Default
False
- --fp16, --no-fp16
Whether or not the floating-point precision of learner should be set to 16 bit.
- Default
True
- --output-dir <output_dir>
The location of the output directory.
- Default
./outputs
- --weight-decay <weight_decay>
The amount of weight decay. If None then it uses the default amount of weight decay in fastai.
- --presence-smoothing <presence_smoothing>
- Default
0.1
- --severity-smoothing <severity_smoothing>
- Default
0.1
- --neighbour-smoothing, --no-neighbour-smoothing
- Default
False
- --mse, --no-mse
- Default
False
- --emd-weight <emd_weight>
- Default
0.1
- --directory <directory>
The data directory.
- --batch-size <batch_size>
The batch size.
- Default
4
- --splits-csv <splits_csv>
The path to a file which contains the cross-validation splits.
- --split <split>
The cross-validation split to use. The default (i.e. 0) is the original validation set.
- Default
0
- --training-severity <training_severity>
The path to the training Excel file with severity information.
- --validation-severity <validation_severity>
The path to the validation Excel file with severity information.
- --width <width>
The width to convert the images to.
- Default
128
- --height <height>
The height to convert the images to. If None, then it is the same as the width.
- --depth <depth>
The depth of the 3d volume to interpolate to.
- Default
128
- --normalize, --no-normalize
Whether or not to normalize the pixel data by the mean and std of the dataset.
- Default
False
- --severity-factor <severity_factor>
- Default
0.5
- --flip, --no-flip
- Default
False
- --brightness <brightness>
- Default
0.0
- --contrast <contrast>
- Default
0.0
- --distortion, --no-distortion
- Default
True
- --autocrop, --no-autocrop
- Default
True
- --max-scans <max_scans>
- Default
0
- --model-name <model_name>
- Default
r3d_18
- --pretrained, --no-pretrained
- Default
True
- --penultimate <penultimate>
- Default
512
- --dropout <dropout>
- Default
0.5
- --max-pool, --no-max-pool
- Default
False
- --severity-regression, --no-severity-regression
- Default
False
- --final-bias, --no-final-bias
- Default
False
- --fine-tune, --no-fine-tune
- Default
False
- --flatten, --no-flatten
- Default
False
- --even-stride, --no-even-stride
- Default
False
- --positional-encoding, --no-positional-encoding
- Default
False
- --cov3d-trained <cov3d_trained>
- --severity-everything, --no-severity-everything
- Default
False
- --epochs <epochs>
The number of epochs.
- Default
20
- --freeze-epochs <freeze_epochs>
The number of epochs to train when the learner is frozen and the last layer is trained by itself. Only if fine_tune is set on the app.
- Default
3
- --learning-rate <learning_rate>
The base learning rate (when fine tuning) or the max learning rate otherwise.
- Default
0.0001
- --project-name <project_name>
The name for this project for logging purposes.
- --run-name <run_name>
The name for this particular run for logging purposes.
- --run-id <run_id>
A unique ID for this particular run for logging purposes.
- --notes <notes>
A longer description of the run for logging purposes.
- --tag <tag>
A tag for logging purposes. Multiple tags can be added each introduced with –tag.
- --wandb, --no-wandb
Whether or not to use ‘Weights and Biases’ for logging.
- Default
False
- --wandb-mode <wandb_mode>
The mode for ‘Weights and Biases’.
- Default
online
- --wandb-dir <wandb_dir>
The location for ‘Weights and Biases’ output.
- --wandb-entity <wandb_entity>
An entity is a username or team name where you’re sending runs.
- --wandb-group <wandb_group>
Specify a group to organize individual runs into a larger experiment.
- --wandb-job-type <wandb_job_type>
Specify the type of run, which is useful when you’re grouping runs together into larger experiments using group.
- --mlflow, --no-mlflow
Whether or not to use MLflow for logging.
- Default
False
tune
cov3d tune [OPTIONS]
Options
- --runs <runs>
The number of runs to attempt to train the model.
- Default
1
- --engine <engine>
The optimizer to use to perform the hyperparameter tuning. Options: wandb, optuna, skopt.
- Default
skopt
- --id <id>
The ID of this hyperparameter tuning job. If using wandb, then this is the sweep id. If using optuna, then this is the storage. If using skopt, then this is the file to store the results.
- Default
- --name <name>
An informative name for this hyperparameter tuning job. If empty, then it creates a name from the project name.
- Default
- --method <method>
The sampling method to use to perform the hyperparameter tuning. By default it chooses the default method of the engine.
- Default
- --min-iter <min_iter>
The minimum number of iterations if using early termination. If left empty, then early termination is not used.
- --seed <seed>
A seed for the random number generator.
- --distributed, --no-distributed
If the learner is distributed.
- Default
False
- --fp16, --no-fp16
Whether or not the floating-point precision of learner should be set to 16 bit.
- Default
True
- --output-dir <output_dir>
The location of the output directory.
- Default
./outputs
- --weight-decay <weight_decay>
The amount of weight decay. If None then it uses the default amount of weight decay in fastai.
- --presence-smoothing <presence_smoothing>
- Default
0.1
- --severity-smoothing <severity_smoothing>
- Default
0.1
- --neighbour-smoothing, --no-neighbour-smoothing
- Default
False
- --mse, --no-mse
- Default
False
- --emd-weight <emd_weight>
- Default
0.1
- --directory <directory>
The data directory.
- --batch-size <batch_size>
The batch size.
- Default
4
- --splits-csv <splits_csv>
The path to a file which contains the cross-validation splits.
- --split <split>
The cross-validation split to use. The default (i.e. 0) is the original validation set.
- Default
0
- --training-severity <training_severity>
The path to the training Excel file with severity information.
- --validation-severity <validation_severity>
The path to the validation Excel file with severity information.
- --width <width>
The width to convert the images to.
- Default
128
- --height <height>
The height to convert the images to. If None, then it is the same as the width.
- --depth <depth>
The depth of the 3d volume to interpolate to.
- Default
128
- --normalize, --no-normalize
Whether or not to normalize the pixel data by the mean and std of the dataset.
- Default
False
- --severity-factor <severity_factor>
- Default
0.5
- --flip, --no-flip
- Default
False
- --brightness <brightness>
- Default
0.0
- --contrast <contrast>
- Default
0.0
- --distortion, --no-distortion
- Default
True
- --autocrop, --no-autocrop
- Default
True
- --max-scans <max_scans>
- Default
0
- --model-name <model_name>
- Default
r3d_18
- --pretrained, --no-pretrained
- Default
True
- --penultimate <penultimate>
- Default
512
- --dropout <dropout>
- Default
0.5
- --max-pool, --no-max-pool
- Default
False
- --severity-regression, --no-severity-regression
- Default
False
- --final-bias, --no-final-bias
- Default
False
- --fine-tune, --no-fine-tune
- Default
False
- --flatten, --no-flatten
- Default
False
- --even-stride, --no-even-stride
- Default
False
- --positional-encoding, --no-positional-encoding
- Default
False
- --cov3d-trained <cov3d_trained>
- --severity-everything, --no-severity-everything
- Default
False
- --epochs <epochs>
The number of epochs.
- Default
20
- --freeze-epochs <freeze_epochs>
The number of epochs to train when the learner is frozen and the last layer is trained by itself. Only if fine_tune is set on the app.
- Default
3
- --learning-rate <learning_rate>
The base learning rate (when fine tuning) or the max learning rate otherwise.
- Default
0.0001
- --project-name <project_name>
The name for this project for logging purposes.
- --run-name <run_name>
The name for this particular run for logging purposes.
- --run-id <run_id>
A unique ID for this particular run for logging purposes.
- --notes <notes>
A longer description of the run for logging purposes.
- --tag <tag>
A tag for logging purposes. Multiple tags can be added each introduced with –tag.
- --wandb, --no-wandb
Whether or not to use ‘Weights and Biases’ for logging.
- Default
False
- --wandb-mode <wandb_mode>
The mode for ‘Weights and Biases’.
- Default
online
- --wandb-dir <wandb_dir>
The location for ‘Weights and Biases’ output.
- --wandb-entity <wandb_entity>
An entity is a username or team name where you’re sending runs.
- --wandb-group <wandb_group>
Specify a group to organize individual runs into a larger experiment.
- --wandb-job-type <wandb_job_type>
Specify the type of run, which is useful when you’re grouping runs together into larger experiments using group.
- --mlflow, --no-mlflow
Whether or not to use MLflow for logging.
- Default
False
validate
cov3d validate [OPTIONS]
Options
- --gpu, --no-gpu
Whether or not to use a GPU for processing if available.
- Default
True
- --pretrained <pretrained>
The location (URL or filepath) of a pretrained model.
- --reload, --no-reload
Should the pretrained model be downloaded again if it is online and already present locally.
- Default
False
- --directory <directory>
The data directory.
- --batch-size <batch_size>
The batch size.
- Default
4
- --splits-csv <splits_csv>
The path to a file which contains the cross-validation splits.
- --split <split>
The cross-validation split to use. The default (i.e. 0) is the original validation set.
- Default
0
- --training-severity <training_severity>
The path to the training Excel file with severity information.
- --validation-severity <validation_severity>
The path to the validation Excel file with severity information.
- --width <width>
The width to convert the images to.
- Default
128
- --height <height>
The height to convert the images to. If None, then it is the same as the width.
- --depth <depth>
The depth of the 3d volume to interpolate to.
- Default
128
- --normalize, --no-normalize
Whether or not to normalize the pixel data by the mean and std of the dataset.
- Default
False
- --severity-factor <severity_factor>
- Default
0.5
- --flip, --no-flip
- Default
False
- --brightness <brightness>
- Default
0.0
- --contrast <contrast>
- Default
0.0
- --distortion, --no-distortion
- Default
True
- --autocrop, --no-autocrop
- Default
True
- --max-scans <max_scans>
- Default
0