Giter Site home page Giter Site logo

penglu-washu / imc_denoise Goto Github PK

View Code? Open in Web Editor NEW
57.0 12.0 18.0 45.07 MB

IMC_Denoise: a software package to enhance Imaging Mass Cytometry - Nature Communications

License: Other

Python 8.15% Dockerfile 0.01% Jupyter Notebook 91.84%
tensorflow image-denoising self-supervised-learning

imc_denoise's Introduction

GitHub repo size GitHub release (latest by date) Python version Suggestions

IMC-Denoise: a content aware denoising pipeline to enhance Imaging Mass Cytometry

Logo

Imaging Mass Cytometry (IMC) is an emerging multiplexed imaging technology for analyzing complex microenvironments that has the ability to detect the spatial distribution of at least 40 cell markers. However, this new modality has unique image data processing requirements, particularly when applying this technology to patient tissue specimens. In these cases, signal-to-noise ratio (SNR) for particular markers can be low despite optimization of staining conditions, and the presence of pixel intensity artifacts can deteriorate image quality and the performance of downstream analysis. Here we demonstrate a content aware pipeline, IMC-Denoise, to restore IMC images. Specifically, we deploy (i) a Differential Intensity Map-based Restoration (DIMR) algorithm for removing hot pixels and (ii, iii) a self-supervised Deep learning algorithm for Shot Noise image Filtering (DeepSNiF). IMC-Denoise enables adaptive hot pixel removal without loss of resolution and delivers significant SNR improvement to a diverse set of IMC channels and datasets. Here we show how to implement IMC-Denoise and develop the software package IMC_Denoise. We hope this package could help the researchers in the field of mass cytometry imaging.

Examples of denoising results from human bone marrow IMC dataset

Denoise lymphocyte antibody-stained images

Logo

Denoise other antibody-stained images

Logo

Contents

Directory structure of IMC_Denoise

IMC_Denoise
|---IMC_Denoise
|---|---IMC_Denoise_main
|---|---|---DIMR.py
|---|---|---DeepSNiF.py
|---|---|---DeepSNiF_model.py
|---|---|---loss_functions.py
|---|---DeepSNiF_utils
|---|---|---DeepSNiF_DataGenerator.py
|---|---|---DeepSNiF_TrainGenerator.py
|---|---Anscombe_transform
|---|---|---Anscombe_transform_functions.py
|---|---|---Anscombe_vectors.mat
|---Jupyter_Notebook_examples
|---|---IMC_Denoise_Train_and_Predict.ipynb
|---|---IMC_Denoise_Train.ipynb
|---|---IMC_Denoise_Predict.ipynb
|---scripts
|---|---Data_generation_DeepSNiF_script.py
|---|---Training_DeepSNiF_script.py
|---|---Generate_data_and_training_DeepSNiF_script.py
|---|---Predict_DIMR_script.py
|---|---Predict_IMC_Denoise_script.py
  • IMC_Denoise implements DIMR and DeepSNiF algorithms to remove hot pixels and filter shot noise in IMC images, respectively.
  • Jupyter Notebooks and scripts include several examples to implement IMC_Denoise algorithms.

Customize environment for IMC_Denoise

Our IMC_Denoise environment

  • Windows 10 64bit
  • Python 3.6
  • Tensorflow 2.2.0
  • Keras 2.3.1
  • NVIDIA GPU + CUDA
  • Note that Linux also works with such configurations

Installation

  • Create a virtual environment and install tensorflow-gpu and keras (we run all the codes in a Anaconda Powershell Prompt).
$ conda create -n 'IMC_Denoise' python=3.6
$ conda activate IMC_Denoise (some systems recommend: source activate IMC_Denoise)
$ conda install -c anaconda brotlipy
$ pip install tensorflow==2.2.0 keras==2.3.1
$ conda install -c anaconda cudnn=7.6.5 cudatoolkit=10.1.243
$ pip install jupyter
  • In case above commends do not work, please try:
$ conda create -n IMC_Denoise python=3.6 anaconda
$ conda activate IMC_Denoise (some systems recommend: source activate IMC_Denoise)
$ pip install tensorflow==2.2.0 keras==2.3.1
$ conda install -c anaconda cudnn=7.6.5 cudatoolkit=10.1.243
  • Download the source code and install the package in your folder.
$ git clone https://github.com/PENGLU-WashU/IMC_Denoise.git
$ cd IMC_Denoise
$ pip install -e .

Encountering NaN loss

  • In case the training losses are NaN, please install the following cuda libraries:
conda install -c anaconda cudnn=8.1 cudatoolkit=11.2

Docker

  • Use dockerfile provided to build reproducible environment with IMC_Denoise.
$ git clone https://github.com/PENGLU-WashU/IMC_Denoise.git
$ cd IMC_Denoise
$ docker build -t imc_denoise:1.0 . --platform linux/amd64
  • On LSF cluster to run scripts or jupyter notebooks, respectively:
$ LSF_DOCKER_PORTS="8888:8888" bsub -Is -R 'select[gpuhost,port8888=1]' -gpu "num=1:gmodel=TeslaV100_SXM2_32GB" -a 'docker(imc_denoise:1.0)' /bin/bash
$ cd /IMC_Denoise

$ LSF_DOCKER_PORTS="8888:8888" PATH="/opt/conda/bin:$PATH" bsub -Is -R 'select[gpuhost,port8888=1]' -gpu "num=1:gmodel=TeslaV100_SXM2_32GB" -a 'docker(imc_denoise:latest)' jupyter-notebook --ip=0.0.0.0 --NotebookApp.allow_origin=*

Implement IMC_Denoise

Directory structure of raw IMC images

In order to generate a training set for DeepSNiF, the directory structure of raw IMC images must be arranged as follows. Note that the Channel_img names should contain the specific isotope names. For example, "141Pr" in "141Pr-CD38_Pr141.tiff" and "144Nd" in "144Nd-CD14_Nd144.tiff". We define the isotope names as the channel names of the IMC images.

|---Raw_image_directory
|---|---Tissue1_sub_directory
|---|---|---Channel1_img.tiff
|---|---|---Channel2_img.tiff
             ...
|---|---|---Channel_n_img.tiff
|---|---Tissue2_sub_directory
|---|---|---Channel1_img.tiff
|---|---|---Channel2_img.tiff
             ...
|---|---|---Channel_n_img.tiff
             ...
|---|---Tissue_m_sub_directory
|---|---|---Channel1_img.tiff
|---|---|---Channel2_img.tiff
             ...
|---|---|---Channel_n_img.tiff

Steinbock Multichannel tiff Alternative Directory Structure

IMC_Denoise can now also be run with multi-channel .tiffs, originally intended as a way of smoothly integrating the package with the Steinbock pipeline from the Bodenmiller group (https://github.com/BodenmillerGroup/steinbock).

Multi-channel Directory Structure:

|--- Raw_image_directory           
|---|---MCD1_ROI_1.tiff
|---|---MCD1_ROI_2.tiff
|---|---MCD2_ROI_1.tiff
...
...
|---|---MCDn_ROI_n.tiff

This is the structure naturally produced by Steinbock, with the /img directory produced by steinbock being the "Raw_image_directory".

How to use:

  • The DeepSNiF_DataGenerator Class now has an additional attribute: run_type. Set run_type = 'multi_channel_tiff' in the DeepSNiF_DataGenerator() call to allow ingestion of multi-channel tiffs.
  • The default behavior remains the same, requiring the single-channel directory structure given above this section. This can be explicitly called with run_type = 'single_channel_tiff'.
  • Channel Names with the multi_channel_tiff option MUST BE CALLED AS AN INTEGER, which corresponds to the channel's numbered order in the images, and NOT by isotope name. This is different than the procedure with single channel tiffs. This also means that the order of channels needs to be the same for images to be succesfully processed in one batch, although this should usually be the case for an experiment.
  • There is an example jupyter notebook showing an example of how to use the steinbock integration / multi-channel option. Notice in the notebook how the training directory can be set to be a different folder than the directory of the images that you process, or they can be the same. Both, though, need to have the directory structure shown above.

IMC_Denoise_Steinbock.py

For user-friendly use of the Steinbock Jupyter script we now also provide a CLI version with some options to be directly called from the CLI. Note, that this script is provided for the Steinbock multichannel TIFF Version and currently does not support singlechannel.

Option Description Optional
-t, --train Path to the training directory No
-i, --input Path to the input directory where raw multichannel tiffs are located No
-o, --output Path to the directory where denoised images will be saved. If not specified, denoised images will overwrite the original images in the input directory. Yes
-c, --channels Comma-separated list of channels to denoise (e.g., '1,2,3'). If not provided, all channels will be used. Yes
-b, --batch_size Batch size for training of DeepSNIF, default is 128 Yes
-e, --epochs Number of Epochs for training, default is 100 Yes
-l, --learning_rate Initial learning rate, default is 1e-3 Yes

Download example data

  • Please go to https://doi.org/10.5281/zenodo.6533905 and download Raw_IMC_dataset_for_training_supp_table5.zip. Then unzip this file as the folder Raw_IMC_dataset_for_training_supp_table5. This folder contains all the images for DeepSNiF training.

  • We also provide all the images of this human bone marrow IMC dataset, which are compressed in Raw_IMC_dataset_all_supp_table5 and can also be downloaded from https://doi.org/10.5281/zenodo.6533905.

  • Previously generated training sets and trained weights can be accessed from https://doi.org/10.5281/zenodo.7101454. Please refer to our paper for more details.

Network structure (new)

Now we have added one more hyper-parameter "network_size" (please refer to the hyper-parameter table and the code).

  • When setting the parameter as "normal", the original network structure using Resnet and UNet will be applied in training and prediction.
  • When setting the parameter as "small", a much smaller network only using UNet will be applied, so that the total parameters decrease from 33,136,320 to 243,488, and the training time decreases by approximately 80%.
  • The small network is fit for small datasets (all of our cases work well!). Nevertheless, the normal one can be applied if you have a much larger dataset or the performance of the small one is not ideal.
  • We set "small" as the default setting for the parameter "network_size" for all the cases. However, all the trained weights in Zenodo applied "normal" network setting.
  • You can even define your own network structure by changing the code in "IMC_Denoise/IMC_Denoise_main/DeepSNiF_model".

Commonly used hyper-parameters of the algorithm

Parameter Description Default Value Data type
n_neighbours The number of adjacent pixels used to compare with center pixel in DIMR algorithm. 4 int
n_iter The iteration number of DIMR algorithm. 3 int
slide_window_size The sliding window size in DIMR algorithm. 3 int
ratio_thresh The threshold of the sparsity of the generated patch, which is range from 0 to 1. If the percentage of zero-value pixel is larger than this threshold, the corresponding patch will not be saved in the generated training set. 0.8 float
train_epoches The training epoches in DeepSNiF. 200 int
train_batch_size The training batch size in DeepSNiF. Try smaller value if memory is not enough. 128 int
lambda_HF The parameter for Hessian regularization. We recommend to set it as 3e-6. 3e-6 float
train_initial_lr Initial training rate. 1e-3 float
truncated_max_rate The max_val of the channel is 1.1*(truncated_max_rate*100)-th pixel values, which is used to mitigate the impact of extremely large pixel values. Normally set as 0.99999, 0.9999 or 0.999. 0.99999 float
val_set_percent The percentage of patches used as validation set, which ranges from 0 to 1. 0.15 float
network_size Decide whether normal (33,136,320 parameters) or small (243,488 parameters) network to be used. small str

IMC_Denoise tutorials with Jupyter Notebook

  • To start Jupyter Notebooks and run the examples.
$ conda activate IMC_Denoise
$ jupyter notebook --notebook-dir=your_folder_of_notebook_examples

Implement IMC_Denoise with scripts

  • Activate the IMC_Denoise environment.
$ conda activate IMC_Denoise
  • Here we take the images with marker CD38 as an example. For our dataset, CD38 is conjucted with 141Pr. In this case, the "channel_name" should be set as its corresponding isotope name "141Pr".
  • Generating training set and train a DeepSNiF model.
    • Generate training set of a specific marker channel for DeepSNiF. The generated training data will be saved in a sub-directory "Generated_training_set" of the current folder other than setting a customized folder. For CD38, the saved name will be "training_set_141Pr.npz".
    python scripts/Data_generation_DeepSNiF_script.py --channel_name '141Pr' --Raw_directory 'Your_raw_img_directory' --Save_directory 'your_generated_training_set_directory'  --n_neighbours '4' --n_iter '3' --slide_window_size '3' --ratio_thresh '0.8'
    
    • Train a DeepSNiF network. The generated training set will be loaded from a default folder other than choosing a customized folder. The trained weights will be saved in a sub-directory "trained_weights" of the current folder other than setting a customized folder. Hyper-parameters can be adjusted. Note that when implementing prediction, input the same "trained_weights" name. If your GPU has smaller memory so that it cannot afford a large "train_batch_size" such as 128 or 256, please use a smaller one, e.g. 64, 32.
    python scripts/Training_DeepSNiF_script.py --train_set_name 'training_set_141Pr.npz' --train_data_directory 'directory_of_your_training_set' --weights_name 'weights_141Pr-CD38.hdf5' --train_epoches '200' --train_batch_size '128' --val_set_percent '0.15' --lambda_HF '3e-6' --train_initial_lr '1e-3' --truncated_max_rate '0.99999' --network_size 'small'
    
    • Generate training set for a specific marker channel and then train a DeepSNiF network. In this process, the generated training set will not be saved in a directory.
    python scripts/Generate_data_and_training_DeepSNiF_script.py --channel_name '141Pr' --weights_name 'weights_141Pr-CD38.hdf5' --Raw_directory 'Your_raw_img_directory' --train_epoches '200' --train_batch_size '128' --val_set_percent '0.15' --n_neighbours '4' --n_iter '3' --slide_window_size '3' --ratio_thresh '0.8' --lambda_HF '3e-6' --train_initial_lr '1e-3' --truncated_max_rate '0.99999' --network_size 'small'
    
  • Combine multiple generated training sets from different channels into a single training set.
    python scripts/Combine_multiple_datasets.py --load_directory 'the_folder_of_the_training_sets_to_be_combined' --save_directory 'the_folder_to_save_the_combined_training_set' --saved_training_set_name" 'the_name_of_the_combined_training_set'
    
  • Implement IMC_Denoise to enhance IMC images.
    • Implement DIMR for a single IMC image if the SNR of the image is good.
    python scripts/Predict_DIMR_script.py --Raw_img_name 'your_raw_img_name(.tiff)' --Denoised_img_name 'your_denoised_img_name(.tiff)' --n_neighbours '4' --n_iter '3' --slide_window_size '3'
    
    • Implement DIMR for multiple IMC images if the SNR of the image is good.
    python scripts/Predict_DIMR_batch.py --channel_name '141Pr' --load_directory 'raw_image_folders (please refer to Section: Directory structure of IMC_Denoise)' --save_directory 'DIMR_processed_image_folders' --n_neighbours '4' --n_iter '3' --slide_window_size '3'
    
    • Implement IMC_Denoise including DIMR and DeepSNiF for a single IMC image if the image is contaminated by hot pixels and suffers from low SNR. The trained weights will be loaded from the default directory other than choosing a customized folder.
    python scripts/Predict_IMC_Denoise_script.py --Raw_img_name 'your_raw_img_name(.tiff)' --Denoised_img_name 'your_denoised_img_name(.tiff)' --weights_name 'weights_141Pr-CD38.hdf5' --weights_save_directory 'your_directory_to_save_trained_weights' --n_neighbours '4' --n_iter '3' --slide_window_size '3'  --network_size 'small'
    
    • Implement IMC_Denoise including DIMR and DeepSNiF for multiple IMC imagse if the images are contaminated by hot pixels and suffers from low SNR. The trained weights will be loaded from the default directory other than choosing a customized folder.
    python scripts/Predict_IMC_Denoise_batch.py --channel_name '141Pr' --load_directory 'raw_image_folders (please refer to Section: Directory structure of IMC_Denoise)' --save_directory 'IMC_Denoise_processed_image_folders' --weights_name 'weights_141Pr-CD38.hdf5' --weights_save_directory 'your_directory_to_save_trained_weights' --n_neighbours '4' --n_iter '3' --slide_window_size '3' --network_size 'small'
    
  • More specific parameters can also be added and adjusted. Please refer to the scripts files.

Contact

Peng Lu - @penglu10 - [email protected]
Project Link: https://github.com/PENGLU-WashU/IMC_Denoise
Lab Website: Thorek Lab WashU

Acknowledgement

Thanks the contributions of BenCaiello and LukasHats on this project, who help modify the code on Steinbock.

References

If you find our work useful in your research or if you use parts of this code please consider citing our paper:

Lu P, Oetjen K, Bender D, et al. IMC-Denoise: a content aware pipeline to enhance Imaging Mass Cytometry. Nature Communications, 14(1), 1601, 2023. https://www.nature.com/articles/s41467-023-37123-6

@article{lu2023imc,
  title={IMC-Denoise: a content aware denoising pipeline to enhance Imaging Mass Cytometry},
  author={Lu, Peng and Oetjen, Karolyn A and Bender, Diane E and Ruzinova, Marianna B and Fisher, Daniel AC and Shim, Kevin G and Pachynski, Russell K and Brennen, W Nathaniel and Oh, Stephen T and Link, Daniel C and others},
  journal={Nature Communications},
  volume={14},
  number={1},
  pages={1601},
  year={2023},
  publisher={Nature Publishing Group UK London}
}

imc_denoise's People

Contributors

bencaiello avatar koetjen avatar penglu-washu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imc_denoise's Issues

Updating tensorflow, cudnn and cudatoolkit

Hi,

There are newer versions of tensorflow, cudnn and cudatoolkit compared to what IMC_Denoise uses. Could updating these packages in the script make the process of training go faster?

Logics behind data preprocessing

Hi,

I am interested in using IMC Denoise to preprocess my IMC data. Particularly, I plan applying the DIMR algorithm to remove hot pixels, but am still open to options on which approach to use for background noise removal (due to absence of an NVIDIA GPU at the moment). My question is whether it it technically logical to use DIMR for hot pixel removal but to couple it with another background noise removal strategy (ie. Ilastik binary classification)?

In addition, I was also wondering whether it is recommended to perform hot pixel filtration, background noise, and lastly spillover compensation in this order, regardless of the algorithms picked for data pre-processing.

Thank you so much for your help!

Isotype not found

Hi, so when i use the jupyter notebook and download the supplementary table 5, and it says the metal is not found and i can not run the demo. am I not pointing to the right directory?

The channel names follow the "144Nd-CD14_Nd144.tiff" format from the Zenodo deposit. is there a issue to fix this? is this a naming convention issue?

if 'generated_patches' in globals():
    del generated_patches
    
channel_name = "144Nd"
Raw_directory = "C:/Users/antho/Documents/GithubRepos/supplemental data/IMC_Denoise/Raw_IMC_dataset_for_training_supp_table5/Raw_IMC_dataset/local-implementation-test" # change this directory to your Raw_image_directory.

Save_directory = None

n_neighbours = 4 # Larger n enables removing more consecutive hot pixels. 
n_iter = 3 # Iteration number for DIMR

DataGenerator = DeepSNiF_DataGenerator(channel_name = channel_name, n_neighbours = n_neighbours, n_iter = n_iter)
generated_patches = DataGenerator.generate_patches_from_directory(load_directory = Raw_directory)
if DataGenerator.save_patches(generated_patches, save_directory = Save_directory):
    print('Data generated successfully!')

Question about how to train DeepSNiF properly & integration with steinbock

Hello!

I have started working with the package and it seems to be working well so far! It looks like it could be very helpful for my work.
I was wondering two things:

  1. How should DeepSNiF typically be trained? For a given experiment, I had just been training fresh for each new experiment with patches generated from the entire experiment / all ROIs -- which means a lot of patches and can take a long time for a large experiment -- and then denoising the experiment. This seems not correct to me, although the output appears to be working well. Is it more typical to choose a subset of images from an experiment and train on those, then denoise the rest of the images from the experiment? Or is it more usual to train a single version of DeepSNiF, save the weights, and then re-use that trained model for multiple experiments?

  2. I have been analyzing .mcd files and IMC images using the steinbock docker pipeline from the Bodenmiller lab, which produces a single folder with multi-channel .tiff files. This files structure, of course, does not work with how y'all originally designed with package. I have successfully modified the DeepSNiF_DataGenerator.py script and one of the example jupyter notebook file to be able to take in multi-channel tiffs housed in a single file folder for training (as steinbock outputs), then denoise selected channels, and finally export updated multi-channel tiffs with the selected channels replaced with the denoised output. Would you be interested adding this functionality into IMC_denoise? The edits required seem to be fairly small, and while my jupyter notebook script is only designed to do the whole-dataset-training-then-denoise method I have been employing, that is easily changed. I'd be happy to share my scripts / edits if you like!

IMC Denoising is too aggresive for certain channels

Hi,

Thanks very much for releasing this tool. It is proving to be very useful for our projects. For the majority of markers, the denoising performs nicely with the default parameters. However, in a channel where the majority of the field is true positive pixels, I see the the denoising actually erodes some of the real signal.

Raw:
image

Denoised (Default parameters, color scale is same as above):
image

Do you have any suggestions for optimization of the denoising procedure for this particular issue?

Softplus activation function compatible for subsequent data normalisation?

Hi,

Great work on the development of DIMR and DeepSNiF for noise removal on IMC data. In the article, it says that the final layer of the U-Net uses softplus as it's activation function (log(1+exp(x))), which I believe this means that the denoised images will be log-transformed. On this basis, do I have to perform normalisation (percentile-method) on the pixel values prior inputting into DIMR and DeepSNiF? Or can I input raw images for DIMR and DeepSNiF, and from this, is it still suitable to perform log normalisation on the single cell data after segmentation?

These ideas might not make sense at all, as I am still relatively new to IMC data processing. Nevertheless, thanks for your help!

Image format

Hi and thanks for this exciting package! Im trying to implement and test IMC denoise to a huge IMC dataset Im working on. How did generate the image files that are used for the example data?

Val_loss

Hi. I`m running a 4090 RTX card with the script, but it gives me na values during Deep SNIF training. Which settings can I adjust for getting a value?

Issue generated patches from MIBI-TOF tiff data

Hey! Thank you for the great paper and package, I am keen to try this on my MIBI data. Unfortunately I get empty arrays when running the generate_patches_from_directory function. Images load okay but all values are changed to 0 at this step: patch_collect_sub = self.extract_patches_from_img(Img_DIMR, Row_range, Col_range)

The data is 1024x1024 and I get this output array([], shape=(0, 64, 64), dtype=float32)

Thank you so much for your help, I would appreciate any tips on running this type of data. Thanks!

Demo data produces NaN loss on multiple systems

Dear Peng,

We are keen to use IMC-Denoise for our IMC data. To get a feel for the tool we have downloaded and unzipped Raw_IMC_dataset_for_training_supp_table5.zip from https://doi.org/10.5281/zenodo.6533905.

IMC-Denoise installation was performed on Linux Mint 19.3 (NVIDIA GTX 3060), Ubuntu 20.04 (NVIDIA A40) and Debian 12 (NVIDIA GTX 3060 Ti) systems using the following commands:

conda create -n 'IMC' python=3.6
conda activate IMC
conda install -c anaconda brotlipy
conda install -c anaconda cudnn=7.6.5 cudatoolkit=10.1.243
pip install tensorflow==2.2.0 keras==2.3.1
pip install jupyter

Installation went without errors/problems on all systems. GPUs are visible in Python. We followed the Jupyter notebook IMC_Denoise_Train.ipynb. However, all 3 systems produce NaN loss values during training on the provided training data:

One example

Epoch 1/50
124/124 [==============================] - 235s 2s/step - loss: nan - val_loss: nan

Epoch 00001: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5
Epoch 2/50
124/124 [==============================] - 79s 634ms/step - loss: nan - val_loss: nan

Epoch 00002: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5
Epoch 3/50
124/124 [==============================] - 78s 633ms/step - loss: nan - val_loss: nan

Epoch 00003: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5
Epoch 4/50
124/124 [==============================] - 78s 632ms/step - loss: nan - val_loss: nan

Epoch 00004: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5
Epoch 5/50
124/124 [==============================] - 78s 632ms/step - loss: nan - val_loss: nan

Epoch 00005: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5
Epoch 6/50
124/124 [==============================] - 78s 632ms/step - loss: nan - val_loss: nan

Epoch 00006: saving model to /home/thijs/trained_weights/weights_144Nd-CD14.hdf5

Could you please advise how to proceed? Is it possible that there is a NaN value in the training data?

Problems running on GPU (NVIDIA A40)

I am trying to run IMC_Denoise with Steinbock Jupyter Notebook. Initially, I encountered NaNs so I updated the cudNN and cudatoolkit accordingly. This solved the problem, however the training was very slow on our HPC.
This is my environment:

(IMC_Denoise2) [hd_bm327@o06c02(Singularity) Jupyter_Notebook_examples]$ conda list
# packages in environment at /home/hd/hd_hd/hd_bm327/.conda/envs/IMC_Denoise2:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
absl-py                   1.4.0                    pypi_0    pypi
argon2-cffi               21.3.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
async-generator           1.10                     pypi_0    pypi
attrs                     22.2.0                   pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
bleach                    4.1.0                    pypi_0    pypi
brotlipy                  0.7.0           py36h8f6f2f9_1001    conda-forge
ca-certificates           2024.3.11            h06a4308_0  
cachetools                4.2.4                    pypi_0    pypi
certifi                   2021.5.30        py36h5fab9bb_0    conda-forge
cffi                      1.14.6           py36hc120d54_0    conda-forge
charset-normalizer        2.0.12                   pypi_0    pypi
comm                      0.1.4                    pypi_0    pypi
cuda-version              11.2                 hb11dac2_3    conda-forge
cudatoolkit               11.2.2              hc23eb0c_13    conda-forge
cudnn                     8.1.0.77             h90431f1_0    conda-forge
cycler                    0.11.0                   pypi_0    pypi
dataclasses               0.8                      pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
entrypoints               0.4                      pypi_0    pypi
gast                      0.3.3                    pypi_0    pypi
google-auth               1.35.0                   pypi_0    pypi
google-auth-oauthlib      0.4.6                    pypi_0    pypi
google-pasta              0.2.0                    pypi_0    pypi
grpcio                    1.48.2                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
idna                      3.6                      pypi_0    pypi
imc-denoise               0.0.0                     dev_0    <develop>
importlib-metadata        4.8.3                    pypi_0    pypi
ipykernel                 5.5.6                    pypi_0    pypi
ipython                   7.16.3                   pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
ipywidgets                7.8.1                    pypi_0    pypi
jedi                      0.17.2                   pypi_0    pypi
jinja2                    3.0.3                    pypi_0    pypi
joblib                    1.1.1                    pypi_0    pypi
jsonschema                3.2.0                    pypi_0    pypi
jupyter                   1.0.0                    pypi_0    pypi
jupyter-client            7.1.2                    pypi_0    pypi
jupyter-console           6.4.3                    pypi_0    pypi
jupyter-core              4.9.2                    pypi_0    pypi
jupyterlab-pygments       0.1.2                    pypi_0    pypi
jupyterlab-widgets        1.1.7                    pypi_0    pypi
keras                     2.3.1                    pypi_0    pypi
keras-applications        1.0.8                    pypi_0    pypi
keras-preprocessing       1.1.2                    pypi_0    pypi
kiwisolver                1.3.1                    pypi_0    pypi
ld_impl_linux-64          2.38                 h1181459_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 13.2.0               h807b86a_5    conda-forge
libgomp                   13.2.0               h807b86a_5    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_5    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
markdown                  3.3.7                    pypi_0    pypi
markupsafe                2.0.1                    pypi_0    pypi
matplotlib                3.3.4                    pypi_0    pypi
mistune                   0.8.4                    pypi_0    pypi
nbclient                  0.5.9                    pypi_0    pypi
nbconvert                 6.0.7                    pypi_0    pypi
nbformat                  5.1.3                    pypi_0    pypi
ncurses                   6.4                  h6a678d5_0  
nest-asyncio              1.6.0                    pypi_0    pypi
notebook                  6.4.10                   pypi_0    pypi
numpy                     1.19.5                   pypi_0    pypi
oauthlib                  3.2.2                    pypi_0    pypi
openssl                   1.1.1w               hd590300_0    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
packaging                 21.3                     pypi_0    pypi
pandocfilters             1.5.1                    pypi_0    pypi
parso                     0.7.1                    pypi_0    pypi
pexpect                   4.9.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    8.4.0                    pypi_0    pypi
pip                       21.2.2           py36h06a4308_0  
prometheus-client         0.17.1                   pypi_0    pypi
prompt-toolkit            3.0.36                   pypi_0    pypi
protobuf                  3.19.6                   pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pyasn1                    0.5.1                    pypi_0    pypi
pyasn1-modules            0.3.0                    pypi_0    pypi
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.14.0                   pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
pyrsistent                0.18.0                   pypi_0    pypi
python                    3.6.13               h12debd9_1  
python-dateutil           2.9.0.post0              pypi_0    pypi
python_abi                3.6                     2_cp36m    conda-forge
pyyaml                    6.0.1                    pypi_0    pypi
pyzmq                     25.1.2                   pypi_0    pypi
qtconsole                 5.2.2                    pypi_0    pypi
qtpy                      2.0.1                    pypi_0    pypi
readline                  8.2                  h5eee18b_0  
requests                  2.27.1                   pypi_0    pypi
requests-oauthlib         2.0.0                    pypi_0    pypi
rsa                       4.9                      pypi_0    pypi
scikit-learn              0.24.2                   pypi_0    pypi
scipy                     1.4.1                    pypi_0    pypi
send2trash                1.8.3                    pypi_0    pypi
setuptools                58.0.4           py36h06a4308_0  
six                       1.16.0                   pypi_0    pypi
sqlite                    3.41.2               h5eee18b_0  
tensorboard               2.2.2                    pypi_0    pypi
tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
tensorflow                2.2.0                    pypi_0    pypi
tensorflow-estimator      2.2.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
terminado                 0.12.1                   pypi_0    pypi
testpath                  0.6.0                    pypi_0    pypi
threadpoolctl             3.1.0                    pypi_0    pypi
tifffile                  2020.9.3                 pypi_0    pypi
tk                        8.6.12               h1ccaba5_0  
tornado                   6.1                      pypi_0    pypi
traitlets                 4.3.3                    pypi_0    pypi
typing-extensions         4.1.1                    pypi_0    pypi
urllib3                   1.26.18                  pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
werkzeug                  2.0.3                    pypi_0    pypi
wheel                     0.37.1             pyhd3eb1b0_0  
widgetsnbextension        3.6.6                    pypi_0    pypi
wrapt                     1.16.0                   pypi_0    pypi
xz                        5.4.6                h5eee18b_0  
zipp                      3.6.0                    pypi_0    pypi
zlib                      1.2.13               hd590300_5    conda-forge

I then transformed the jupyter notebook into a .py file and just ran it from the CLI, and this is the Issues I am getting:

(IMC_Denoise2) [hd_bm327@o06c02(Singularity) Jupyter_Notebook_examples]$ python IMC_Denoise_Steombock.py 
Using TensorFlow backend.
2024-04-10 10:10:01.130639: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2024-04-10 10:10:01.456994: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:01:00.0 name: NVIDIA A40 computeCapability: 8.6
coreClock: 1.74GHz coreCount: 84 deviceMemorySize: 44.35GiB deviceMemoryBandwidth: 648.29GiB/s
2024-04-10 10:10:01.457149: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-04-10 10:10:01.457200: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-04-10 10:10:01.458161: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2024-04-10 10:10:01.458575: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2024-04-10 10:10:01.458637: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-04-10 10:10:01.458687: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-04-10 10:10:01.458732: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-04-10 10:10:01.458738: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...

Image data loading completed!
The generated patches augmented.
The generated patches shuffled.
The shape of the generated training set for channel 6 is (10344, 64, 64).
2024-04-10 10:10:05.892646: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2024-04-10 10:10:05.907950: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2600225000 Hz
2024-04-10 10:10:05.908304: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1481b4000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2024-04-10 10:10:05.908331: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2024-04-10 10:10:05.909459: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2024-04-10 10:10:05.909469: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      
The range value to the corresponding model is 86.11091079711915.
Input Channel Shape => (10344, 64, 64, 1)
Number of Training Examples: 8792
Number of Validation Examples: 1552
Each training patch with shape of (64, 64) will mask 8 pixels.
Training model...
Epoch 1/25
 3/69 [>.............................] - ETA: 1:11 - loss: 0.6549^CTraceback (most recent call last):

It runs, but not on GPU. Our GPU is an NVIDIA A40.
I also tried to update cudNN and cudatoolkit to the latest versions, same error occurred.

Percentage of masked pixels

Hi,

Thank you for your great work. I'm curious about the percentage of masked pixels in each patch—specifically, the rationale behind 0.2% (~8 pixels within a 64x64 patch). Any insights you can share on this?

Kind regards,
Rahil

Demo training data generates NaN for loss

hi, so i have the DeNoise jupyter notebook running, i can generate the training images, and visualize the plots. however when i look at the loss functions, the NaN values are computed using the training data from the jupyter notebooks. is this correct? i can't reproduce the Github version ?

The range value to the corresponding model is 68.200004196167.
Input Channel Shape => (18608, 64, 64, 1)
Number of Training Examples: 15816
Number of Validation Examples: 2792
Each training patch with shape of (64, 64) will mask 8 pixels.
Training model...
Epoch 1/50
124/124 [==============================] - 909s 7s/step - loss: nan - val_loss: nan

Epoch 00001: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 2/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00002: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 3/50
124/124 [==============================] - 72s 581ms/step - loss: nan - val_loss: nan

Epoch 00003: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 4/50
124/124 [==============================] - 72s 581ms/step - loss: nan - val_loss: nan

Epoch 00004: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 5/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00005: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 6/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00006: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 7/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00007: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 8/50
124/124 [==============================] - 72s 581ms/step - loss: nan - val_loss: nan

Epoch 00008: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 9/50
124/124 [==============================] - 72s 581ms/step - loss: nan - val_loss: nan

Epoch 00009: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 10/50
124/124 [==============================] - 72s 581ms/step - loss: nan - val_loss: nan

Epoch 00010: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 11/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00011: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 12/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00012: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 13/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00013: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 14/50
124/124 [==============================] - 72s 584ms/step - loss: nan - val_loss: nan

Epoch 00014: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 15/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00015: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 16/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00016: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 17/50
124/124 [==============================] - 72s 584ms/step - loss: nan - val_loss: nan

Epoch 00017: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 18/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00018: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 19/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00019: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 20/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00020: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5

Epoch 00020: ReduceLROnPlateau reducing learning rate to 0.0005000000237487257.
Epoch 21/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00021: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 22/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00022: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 23/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00023: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 24/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00024: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 25/50
124/124 [==============================] - 74s 601ms/step - loss: nan - val_loss: nan

Epoch 00025: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 26/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00026: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 27/50
124/124 [==============================] - 73s 586ms/step - loss: nan - val_loss: nan

Epoch 00027: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 28/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00028: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 29/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00029: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 30/50
124/124 [==============================] - 73s 588ms/step - loss: nan - val_loss: nan

Epoch 00030: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 31/50
124/124 [==============================] - 73s 587ms/step - loss: nan - val_loss: nan

Epoch 00031: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 32/50
124/124 [==============================] - 73s 588ms/step - loss: nan - val_loss: nan

Epoch 00032: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 33/50
124/124 [==============================] - 73s 585ms/step - loss: nan - val_loss: nan

Epoch 00033: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 34/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00034: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 35/50
124/124 [==============================] - 72s 585ms/step - loss: nan - val_loss: nan

Epoch 00035: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 36/50
124/124 [==============================] - 72s 584ms/step - loss: nan - val_loss: nan

Epoch 00036: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 37/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00037: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 38/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00038: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 39/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00039: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 40/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00040: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5

Epoch 00040: ReduceLROnPlateau reducing learning rate to 0.0002500000118743628.
Epoch 41/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00041: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 42/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00042: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 43/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00043: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 44/50
124/124 [==============================] - 72s 583ms/step - loss: nan - val_loss: nan

Epoch 00044: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 45/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

Epoch 00045: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 46/50
124/124 [==============================] - 72s 584ms/step - loss: nan - val_loss: nan

Epoch 00046: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 47/50
124/124 [==============================] - 72s 584ms/step - loss: nan - val_loss: nan

Epoch 00047: saving model to C:\Users\antho\Documents\GithubRepos\IMC_Denoise\Jupyter_Notebook_examples\trained_weights\weights_144Nd-CD14.hdf5
Epoch 48/50
124/124 [==============================] - 72s 582ms/step - loss: nan - val_loss: nan

multi markers training

Hi,

I am interested in using the DIMR and DeepSNiF algorithms for my IMC data. I'd like to ask if the result is the same if I did training using a single marker or multi markers such as 30 or 40 markers?

Best regards

About the issue of GPU usage efficiency

Hello, your work is very excellent, but I have encountered a problem when conducting experiments using your code. I found that the GPU utilization is not high when running the code, and most of it is being used by the CPU. The GPU efficiency is shown in the image.

image

IMC_Denoise on M1 Mac

Hi,

I am interested in using the DIMR and DeepSNiF algorithms to pre-process my IMC data. However, I have a M1 MacBook and can only use CPU locally to process the data and will not have access to an NVIDIA gpu. In this case, will I still be able to use the DIMR algorithm, and if there is an option to run DeepSNiF on a local gpu or cpu?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.