Skip to content

Nuclick train#772

Merged
SachidanandAlle merged 8 commits intomainfrom
nuclick_train
May 8, 2022
Merged

Nuclick train#772
SachidanandAlle merged 8 commits intomainfrom
nuclick_train

Conversation

@SachidanandAlle
Copy link
Copy Markdown
Collaborator

@SachidanandAlle SachidanandAlle commented May 8, 2022

  • Support NuClick training
  • Use MONAI BUNET

Following is the comparison for BasicUNET (bunet) vs NuClick UNET (nunet) trained over PanNuke dataset (40k+ nuclei for 10 epochs)

image

This is the log for original training using everything from: https://github.com/mostafajahanifar/nuclick_torch over the same dataset

INFO: Using device cuda
INFO: Network:
	5 input channels
	1 output channels (classes)

INFO: Creating dataset with 44741 examples
INFO: Starting training:
        Network:         UNet
        Epochs:          10
        Batch size:      64
        Learning rate:   0.001
        Training size:   35793
        Validation size: 8948
        Loss function:   Weighted_BCE_Dice
        Checkpoints:     True
        Device:          cuda
        Images scaling:  1
        Mixed Precision: False
    
Epoch 1/10: 100%|################################################################################################| 35793/35793 [02:47<00:00, 213.25img/s, loss (batch)=0.346]
INFO: Validation Dice score: 0.6948385834693909                                                                                                                                                                                                                  
INFO: Checkpoint 1 saved!
Epoch 2/10: 100%|################################################################################################| 35793/35793 [06:08<00:00, 97.15img/s, loss (batch)=0.317]
INFO: Validation Dice score: 0.7801803350448608                                                                                                                                                                                                                  
INFO: Checkpoint 2 saved!
Epoch 3/10: 100%|################################################################################################| 35793/35793 [06:11<00:00, 96.34img/s, loss (batch)=0.284]
INFO: Validation Dice score: 0.813300371170044                                                                                                                                                                                                                   
INFO: Checkpoint 3 saved!
Epoch 4/10: 100%|################################################################################################| 35793/35793 [06:08<00:00, 97.07img/s, loss (batch)=0.262]
INFO: Validation Dice score: 0.8261093497276306                                                                                                                                                                                                                  
INFO: Checkpoint 4 saved!
Epoch 5/10: 100%|################################################################################################| 35793/35793 [06:03<00:00, 98.45img/s, loss (batch)=0.142]
INFO: Validation Dice score: 0.8319364190101624                                                                                                                                                                                                                  
INFO: Checkpoint 5 saved!
Epoch 6/10: 100%|################################################################################################| 35793/35793 [06:00<00:00, 99.33img/s, loss (batch)=0.266]
INFO: Validation Dice score: 0.8355947136878967                                                                                                                                                                                                                  
INFO: Checkpoint 6 saved!
Epoch 7/10: 100%|################################################################################################| 35793/35793 [05:59<00:00, 99.51img/s, loss (batch)=0.175]
INFO: Validation Dice score: 0.8366557955741882                                                                                                                                                                                                                  
INFO: Checkpoint 7 saved!
Epoch 8/10: 100%|################################################################################################| 35793/35793 [05:54<00:00, 101.03img/s, loss (batch)=0.331]
INFO: Validation Dice score: 0.842056930065155                                                                                                                                                                                                                   
INFO: Checkpoint 8 saved!
Epoch 9/10: 100%|################################################################################################| 35793/35793 [05:48<00:00, 102.58img/s, loss (batch)=0.142]
INFO: Validation Dice score: 0.8373238444328308                                                                                                                                                                                                                  
INFO: Checkpoint 9 saved!
Epoch 10/10: 100%|################################################################################################| 35793/35793 [05:55<00:00, 100.70img/s, loss (batch)=0.184]
INFO: Validation Dice score: 0.8469359278678894                                                                                                                                                                                                                  
INFO: Checkpoint 10 saved!

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Sachidanand Alle <[email protected]>
@SachidanandAlle SachidanandAlle added the 0.4.0 Targeted to Release version 0.4 label May 8, 2022
Copy link
Copy Markdown
Collaborator

@diazandr3s diazandr3s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great

@SachidanandAlle SachidanandAlle merged commit a1ca8ff into main May 8, 2022
@SachidanandAlle SachidanandAlle deleted the nuclick_train branch May 8, 2022 21:03
markus-hinsche pushed a commit to rAIdiance/MONAILabel that referenced this pull request May 12, 2022
* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>
SachidanandAlle added a commit that referenced this pull request May 19, 2022
* Only Hide Training area when zero tasks configured (#769)

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Nuclick train (#772)

* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add unit test for NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>

* Polish

Signed-off-by: Markus Hinsche <[email protected]>

* Add labels to data object, Check for label list

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* update docstrings

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* change writer selection

write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* polish

write_seg_nrrd() will only be used for 4D multi-channel label arrays. Thus, removed unnecessary code.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix typo

Signed-off-by: Markus Hinsche <[email protected]>

* Add pynrrd==0.4.2 to setup.cfg

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* fix check for multi-channel label

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* fix unit test

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix multichannel problem

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* Reformat code

Signed-off-by: Markus Hinsche <[email protected]>

* Make mypy happy

Signed-off-by: Markus Hinsche <[email protected]>

* Fix merge conflict

Signed-off-by: Markus Hinsche <[email protected]>

* Use logger.warning instead logger.debug

Signed-off-by: Markus Hinsche <[email protected]>

* Add Active Learning strategies to DeepEdit (#782)

* Add Active Learning strategies to DeepEdit

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update readme - commands Active Learning strategies

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Prepare MONAI Label for new monai - DeepEdit transforms (#781)

* Prepare MONAI Label for new monai - DeepEdit transforms

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Add deprecated messages - DeepEdit transforms - interaction

Signed-off-by: Andres Diaz-Pinto <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Mention python versions which are supported (#786)

Signed-off-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add original labels option Slicer UI (#785)

* Add original labels option Slicer UI

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update Slicer module

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix: Check first dimension for multichannel

Signed-off-by: Markus Hinsche <[email protected]>

* Polish unit test to be more specific about dimensions

Signed-off-by: Markus Hinsche <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Co-authored-by: Andres Diaz-Pinto <[email protected]>
DaoMaoDuc pushed a commit to jlvahldiek/MONAILabel that referenced this pull request Jun 1, 2022
* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Duc <[email protected]>
DaoMaoDuc pushed a commit to jlvahldiek/MONAILabel that referenced this pull request Jun 1, 2022
* Only Hide Training area when zero tasks configured (Project-MONAI#769)

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Nuclick train (Project-MONAI#772)

* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add unit test for NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>

* Polish

Signed-off-by: Markus Hinsche <[email protected]>

* Add labels to data object, Check for label list

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* update docstrings

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* change writer selection

write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* polish

write_seg_nrrd() will only be used for 4D multi-channel label arrays. Thus, removed unnecessary code.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix typo

Signed-off-by: Markus Hinsche <[email protected]>

* Add pynrrd==0.4.2 to setup.cfg

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* fix check for multi-channel label

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* fix unit test

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix multichannel problem

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* Reformat code

Signed-off-by: Markus Hinsche <[email protected]>

* Make mypy happy

Signed-off-by: Markus Hinsche <[email protected]>

* Fix merge conflict

Signed-off-by: Markus Hinsche <[email protected]>

* Use logger.warning instead logger.debug

Signed-off-by: Markus Hinsche <[email protected]>

* Add Active Learning strategies to DeepEdit (Project-MONAI#782)

* Add Active Learning strategies to DeepEdit

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update readme - commands Active Learning strategies

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Prepare MONAI Label for new monai - DeepEdit transforms (Project-MONAI#781)

* Prepare MONAI Label for new monai - DeepEdit transforms

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Add deprecated messages - DeepEdit transforms - interaction

Signed-off-by: Andres Diaz-Pinto <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Mention python versions which are supported (Project-MONAI#786)

Signed-off-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add original labels option Slicer UI (Project-MONAI#785)

* Add original labels option Slicer UI

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update Slicer module

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix: Check first dimension for multichannel

Signed-off-by: Markus Hinsche <[email protected]>

* Polish unit test to be more specific about dimensions

Signed-off-by: Markus Hinsche <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Co-authored-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Duc <[email protected]>
Douwe-Spaanderman pushed a commit to Douwe-Spaanderman/MONAILabel that referenced this pull request Dec 9, 2022
* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Douwe-Spaanderman pushed a commit to Douwe-Spaanderman/MONAILabel that referenced this pull request Dec 9, 2022
* Only Hide Training area when zero tasks configured (Project-MONAI#769)

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Nuclick train (Project-MONAI#772)

* Draft Training workflow for NuClick

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* Fix nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* rename transform

Signed-off-by: Sachidanand Alle <[email protected]>

* Sync up changes for nuclick training

Signed-off-by: Sachidanand Alle <[email protected]>

* use monai bunet for nuclick

Signed-off-by: Sachidanand Alle <[email protected]>

* fix log

Signed-off-by: Sachidanand Alle <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add unit test for NRRD writer

Signed-off-by: Markus Hinsche <[email protected]>

* Polish

Signed-off-by: Markus Hinsche <[email protected]>

* Add labels to data object, Check for label list

Signed-off-by: Markus Hinsche <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* update docstrings

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* change writer selection

write_seg_nrrd() is only needed for 4D multi-channel label arrays. Everything else can be handled by ITK of nifty writer.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* polish

write_seg_nrrd() will only be used for 4D multi-channel label arrays. Thus, removed unnecessary code.

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix typo

Signed-off-by: Markus Hinsche <[email protected]>

* Add pynrrd==0.4.2 to setup.cfg

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* fix check for multi-channel label

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* fix unit test

Signed-off-by: Janis Vahldiek <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix multichannel problem

Signed-off-by: Markus Hinsche
Signed-off-by: Markus Hinsche <[email protected]>

* Reformat code

Signed-off-by: Markus Hinsche <[email protected]>

* Make mypy happy

Signed-off-by: Markus Hinsche <[email protected]>

* Fix merge conflict

Signed-off-by: Markus Hinsche <[email protected]>

* Use logger.warning instead logger.debug

Signed-off-by: Markus Hinsche <[email protected]>

* Add Active Learning strategies to DeepEdit (Project-MONAI#782)

* Add Active Learning strategies to DeepEdit

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update readme - commands Active Learning strategies

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Prepare MONAI Label for new monai - DeepEdit transforms (Project-MONAI#781)

* Prepare MONAI Label for new monai - DeepEdit transforms

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Add deprecated messages - DeepEdit transforms - interaction

Signed-off-by: Andres Diaz-Pinto <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Mention python versions which are supported (Project-MONAI#786)

Signed-off-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Add original labels option Slicer UI (Project-MONAI#785)

* Add original labels option Slicer UI

Signed-off-by: Andres Diaz-Pinto <[email protected]>

* Update Slicer module

Signed-off-by: Andres Diaz-Pinto <[email protected]>
Signed-off-by: Markus Hinsche <[email protected]>

* Fix: Check first dimension for multichannel

Signed-off-by: Markus Hinsche <[email protected]>

* Polish unit test to be more specific about dimensions

Signed-off-by: Markus Hinsche <[email protected]>

Co-authored-by: SACHIDANAND ALLE <[email protected]>
Co-authored-by: Janis Vahldiek <[email protected]>
Co-authored-by: Andres Diaz-Pinto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.4.0 Targeted to Release version 0.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants