Skip to content

HoVerNet tutorial #1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 73 commits into from
Dec 8, 2022
Merged

HoVerNet tutorial #1027

merged 73 commits into from
Dec 8, 2022

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Nov 8, 2022

Fixes #4882.

Description

A torch version tutorial for HoVerNet training pipeline.

Checks

  • Notebook runs automatically ./runner [-p <regex_pattern>]

KumoLiu and others added 30 commits July 21, 2022 10:22
Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 23, 2022

The notebook includes a reference to the extract_patches.py file from TIA, but the problem is that this file depends on few other files from the same TIA repo, which make it a little difficult for a user, possibly running this in Colab (assuming from the embedded URL this is the intention). I wonder whether we can extract the code needed for this operation and put it in a cell in the notebook, so that it's a bit more self contained.

Hi @JHancox, in the beginning, following the way to crop patches from the original repo was only used to reproduce their performance, if the users wanted to use their own dataset, they could use RandCropByPosNegLabel or GridPatch these existing components in the MONAI, in which case, do we still need to add the extract the patch from the original repo?
What do you think? @drbeh
If you think it needs to be added, I will add it as soon as possible.
Thanks!

add terms of use

Signed-off-by: KumoLiu <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
@JHancox
Copy link

JHancox commented Nov 23, 2022

The notebook includes a reference to the extract_patches.py file from TIA, but the problem is that this file depends on few other files from the same TIA repo, which make it a little difficult for a user, possibly running this in Colab (assuming from the embedded URL this is the intention). I wonder whether we can extract the code needed for this operation and put it in a cell in the notebook, so that it's a bit more self contained.

Hi @JHancox, in the beginning, following the way to crop patches from the original repo was only used to reproduce their performance, if the users wanted to use their own dataset, they could use RandCropByPosNegLabel or GridPatch these existing components in the MONAI, in which case, do we still need to add the extract the patch from the original repo? What do you think? @drbeh If you think it needs to be added, I will add it as soon as possible. Thanks!

Thanks @KumoLiu - I certainly think it would be better to replace the reference to the TIA patch extractor with a Monai implementation within the notebook. It's not clear how to actually prepare the data at the moment.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 23, 2022

The notebook includes a reference to the extract_patches.py file from TIA, but the problem is that this file depends on few other files from the same TIA repo, which make it a little difficult for a user, possibly running this in Colab (assuming from the embedded URL this is the intention). I wonder whether we can extract the code needed for this operation and put it in a cell in the notebook, so that it's a bit more self contained.

Hi @JHancox, in the beginning, following the way to crop patches from the original repo was only used to reproduce their performance, if the users wanted to use their own dataset, they could use RandCropByPosNegLabel or GridPatch these existing components in the MONAI, in which case, do we still need to add the extract the patch from the original repo? What do you think? @drbeh If you think it needs to be added, I will add it as soon as possible. Thanks!

Thanks @KumoLiu - I certainly think it would be better to replace the reference to the TIA patch extractor with a Monai implementation within the notebook. It's not clear how to actually prepare the data at the moment.

Hi @JHancox, I will add it soon! Thanks!

Signed-off-by: KumoLiu <[email protected]>
@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 24, 2022

Hi @JHancox and @drbeh, I have added extract_patches.py in #999 and also update comments in the tutorials. Let me know if you have any other comments, if not maybe we can merge this PR, thanks in advance!

@bhashemian
Copy link
Member

@KumoLiu in the "Check first data shape and visualize" section, the figures can be a bit misleading for the user since raw image is 270x270 but output 80x80, so it looks like that they prediction is not right when comparing side-by-side. I suggest to change the figure sizes or put a 80x80 bounding box on the raw image so users can see the prediction is related to that area. Thanks

Also it would be great to add the input image to the last image too. Thanks

@bhashemian
Copy link
Member

bhashemian commented Nov 28, 2022

@KumoLiu, this notebook is still using extract_patches.py from the original repo despite the fact that you have already implemented prepare_patches.py in #999. Would you please update that? Thanks

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 29, 2022

@KumoLiu, this notebook is still using extract_patches.py from the original repo despite the fact that you have already implemented prepare_patches.py in #999. Would you please update that? Thanks

Hi @drbeh, not sure what did you mean, I have updated it in this way, "./prepare_patches.py" is pointing to the same file.
"
2. run ./prepare_patches.py to prepare patches from images. Referring to the implementation from the https://github.com/vqdang/hover_net/blob/master/extract_patches.py
"
Thanks!

@bhashemian
Copy link
Member

@KumoLiu, this notebook is still using extract_patches.py from the original repo despite the fact that you have already implemented prepare_patches.py in #999. Would you please update that? Thanks

Hi @drbeh, not sure what did you mean, I have updated it in this way, "./prepare_patches.py" is pointing to the same file. " 2. run ./prepare_patches.py to prepare patches from images. Referring to the implementation from the https://github.com/vqdang/hover_net/blob/master/extract_patches.py " Thanks!

Oh my bad! I thought you are "referring" the users to the implementation from the https://github.com/vqdang/hover_net/blob/master/extract_patches.py

Maybe we can say "(similar to https://github.com/vqdang/hover_net/blob/master/extract_patches.py)" instead. Thanks

Signed-off-by: KumoLiu <[email protected]>
@wyli wyli enabled auto-merge (squash) December 8, 2022 09:48
@wyli wyli merged commit a583b9a into Project-MONAI:main Dec 8, 2022
@KumoLiu KumoLiu deleted the hovernet-tutorial branch December 8, 2022 13:24
boneseva pushed a commit to boneseva/MONAI-tutorials that referenced this pull request Apr 21, 2024
Fixes [#4882.](Project-MONAI/MONAI#4882)

### Description
A torch version tutorial for HoVerNet training pipeline.

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [ ] Notebook runs automatically `./runner [-p <regex_pattern>]`

Signed-off-by: KumoLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pathology HoVerNet: Create the training tutorial notebook/markdown
5 participants