本家様 https://github.com/apeck12/denoiset
「An implementation of Noise2Noise for cryoET data」
source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh
(pyenv/anacondaが未構築なら下記で構築)
git clone https://github.com/yyuu/pyenv.git /apps/pyenv
export PYENV_ROOT=/apps/pyenv
export PATH=$PYENV_ROOT/bin:$PATH
pyenv install anaconda3-2024.10-1
source /apps/pyenv/versions/anaconda3-2024.10-1/etc/profile.d/conda.sh
(その後に)
cd /apps
git clone https://github.com/apeck12/denoiset.git
cd denoiset
conda create --name denoiset python=3.11.4
conda activate denoiset
pip install .
事前学習済みモデルも同封されている様子
denoise3d --help
usage: denoise3d [-h] --input INPUT [--model MODEL] --output OUTPUT [--pattern PATTERN] [--metrics_file METRICS_FILE] [--min_selected MIN_SELECTED]
[--max_selected MAX_SELECTED] [--sort_by SORT_BY] [--tilt_axis TILT_AXIS] [--thickness THICKNESS] [--global_shift GLOBAL_SHIFT]
[--bad_patch_low BAD_PATCH_LOW] [--bad_patch_all BAD_PATCH_ALL] [--ctf_res CTF_RES] [--ctf_score CTF_SCORE] [--odd_pattern ODD_PATTERN]
[--odd_extension ODD_EXTENSION] [--n_extract N_EXTRACT] [--seed SEED] [--optimizer OPTIMIZER] [--learning_rate LEARNING_RATE]
[--batch_size BATCH_SIZE] [--val_fraction VAL_FRACTION] [--n_epochs N_EPOCHS] [--n_denoise N_DENOISE] [--length LENGTH] [--train_only]
[--ch_threshold CH_THRESHOLD] [--train_all_epochs] [--exclude_tags EXCLUDE_TAGS [EXCLUDE_TAGS ...]] [--inf_length INF_LENGTH]
[--inf_padding INF_PADDING] [--live] [--t_interval T_INTERVAL] [--t_exit T_EXIT]
options:
-h, --help show this help message and exit
--input INPUT Input directory of tomograms or a text file specifying their full path (minus extension)
--model MODEL Pre-trained UNet3d model file
--output OUTPUT Output directory for denoised volumes
--pattern PATTERN Glob pattern for file basename
--metrics_file METRICS_FILE
AreTomo3 TiltSeries_Metrics.csv file
--min_selected MIN_SELECTED
Minimum number of selected tomograms if in_path is a metrics file
--max_selected MAX_SELECTED
Maximum number of selected tomograms if in_path is a metrics file
--sort_by SORT_BY Metric for sorting tomograms if selected set exceeds max_selected
--tilt_axis TILT_AXIS
Maximum deviation from median tilt axis in degrees
--thickness THICKNESS
Minimum sample thickness in Angstrom
--global_shift GLOBAL_SHIFT
Maximum global shift in Angstrom
--bad_patch_low BAD_PATCH_LOW
Maximum fraction of bad patches at low tilt angles
--bad_patch_all BAD_PATCH_ALL
Maximum fraction of bad patches across the full tilt range
--ctf_res CTF_RES Maximum resolution of CTF score in Angstrom
--ctf_score CTF_SCORE
Minimum CTF score
--odd_pattern ODD_PATTERN
Glob pattern for ODD tomograms
--odd_extension ODD_EXTENSION
suffix for ODD tomograms
--n_extract N_EXTRACT
Number of subvolumes to extract per tomogram
--seed SEED Fixed random seed value
--optimizer OPTIMIZER
Optimizer
--learning_rate LEARNING_RATE
Learning rate
--batch_size BATCH_SIZE
Number of paired subvolumes per batch
--val_fraction VAL_FRACTION
Fraction of tomograms for validation
--n_epochs N_EPOCHS Number of training epochs
--n_denoise N_DENOISE
Number of tomograms to denoise per epoch for visual inspection
--length LENGTH Side length of cubic subvolumes to extract in pixels
--train_only Only perform training and not inference on the full dataset
--ch_threshold CH_THRESHOLD
Checkerboard metric threshold for terminating training
--train_all_epochs Continue training past ch_threshold for diagnostic purposes
--exclude_tags EXCLUDE_TAGS [EXCLUDE_TAGS ...]
Volumes containing these substring(s) will not be denoised
--inf_length INF_LENGTH
Side length of cubic subvolumes to extract in pixels during inference
--inf_padding INF_PADDING
Padding length in pixels during inference
--live Live processing mode to denoise tomograms on-the-fly
--t_interval T_INTERVAL
Interval in seconds between checking for new files
--t_exit T_EXIT Exit after this period in seconds if new files are not found