Assuming that the denoising3D notebooks in the parent folder have already been run.
cd ../denoising3D/
/home/uwe/research/csbdeep/examples/examples/denoising3D
%%bash
care_predict
usage: care_predict [-h] [--quiet ] [--gpu-memory-limit] [--input-dir] [--input-pattern] [--input-axes] [--norm-pmin] [--norm-pmax] [--norm-undo ] [--n-tiles [...]] [--model-basedir] [--model-name] [--model-weights] [--output-dir] [--output-name] [--output-dtype] [--imagej-tiff ] [--dry-run ] optional arguments: -h, --help show this help message and exit --quiet [] don't show status messages (default: False) --gpu-memory-limit limit GPU memory to this fraction (0...1) (default: None) input: --input-dir path to folder with input images (default: None) --input-pattern glob-style file name pattern of input images (default: *.tif*) --input-axes axes string of input images (default: None) --norm-pmin 'pmin' for PercentileNormalizer (default: 2) --norm-pmax 'pmax' for PercentileNormalizer (default: 99.8) --norm-undo [] 'do_after' for PercentileNormalizer (default: True) --n-tiles [ ...] number of tiles for prediction (default: None) model: --model-basedir path to folder that contains CARE model (default: None) --model-name name of CARE model (default: None) --model-weights specific name of weights file to load (located in model folder) (default: None) output: --output-dir path to folder where restored images will be saved (default: None) --output-name name pattern of restored image (special tokens: {file_path}, {file_name}, {file_ext}, {model_name}, {model_weights}) (default: {model_name}/{file_path}/{file_name}{file_ext}) --output-dtype data type of the saved tiff file (default: float32) --imagej-tiff [] save restored image as ImageJ-compatible TIFF file (default: True) --dry-run [] don't save restored images (default: False)
%%bash
care_predict \
--input-dir "./data" \
--input-pattern "tribolium/test/low/*.tif*" \
--input-axes "ZYX" \
--model-basedir "./models" \
--model-name "my_model" \
--output-dir "./predictions" \
--n-tiles 1 2 2
Arguments --------- {'dry_run': False, 'gpu_memory_limit': None, 'imagej_tiff': True, 'input_axes': 'ZYX', 'input_dir': './data', 'input_pattern': 'tribolium/test/low/*.tif*', 'model_basedir': './models', 'model_name': 'my_model', 'model_weights': None, 'n_tiles': [1, 2, 2], 'norm_pmax': 99.8, 'norm_pmin': 2, 'norm_undo': True, 'output_dir': './predictions', 'output_dtype': 'float32', 'output_name': '{model_name}/{file_path}/{file_name}{file_ext}', 'quiet': False} Loading network weights from 'weights_best.h5'. Finished processing 1 file -------------------------- 1. in : data/tribolium/test/low/nGFP_0.1_0.2_0.5_20_14_late.tif out: predictions/my_model/tribolium/test/low/nGFP_0.1_0.2_0.5_20_14_late.tif
2023-07-17 23:31:36.402930: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.403450: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.403822: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.404400: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-07-17 23:31:36.406013: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.406407: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.406775: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.887231: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.887626: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.887998: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:936] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2023-07-17 23:31:36.888349: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 6652 MB memory: -> device: 0, name: NVIDIA GeForce RTX 2070 SUPER, pci bus id: 0000:09:00.0, compute capability: 7.5 2023-07-17 23:31:38.247406: I tensorflow/stream_executor/cuda/cuda_dnn.cc:368] Loaded cuDNN version 8100 2023-07-17 23:31:38.547945: I tensorflow/core/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory 2023-07-17 23:31:38.548872: I tensorflow/core/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory 2023-07-17 23:31:38.548882: W tensorflow/stream_executor/gpu/asm_compiler.cc:80] Couldn't get ptxas version string: INTERNAL: Couldn't invoke ptxas --version 2023-07-17 23:31:38.549565: I tensorflow/core/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory 2023-07-17 23:31:38.549602: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] INTERNAL: Failed to launch ptxas Relying on driver to perform ptx compilation. Modify $PATH to customize ptxas location. This message will be only logged once. 100%|██████████| 4/4 [00:01<00:00, 2.39it/s]
%%bash
tree data predictions
data ├── my_training_data.npz └── tribolium ├── test │ ├── GT │ │ └── nGFP_0.1_0.2_0.5_20_14_late.tif │ └── low │ └── nGFP_0.1_0.2_0.5_20_14_late.tif └── train ├── GT │ └── nGFP_0.1_0.2_0.5_20_13_late.tif └── low └── nGFP_0.1_0.2_0.5_20_13_late.tif predictions └── my_model └── tribolium └── test └── low └── nGFP_0.1_0.2_0.5_20_14_late.tif 11 directories, 6 files