Add 3D semantic segmentation code example#2092
Closed
innat-asj wants to merge 1 commit intokeras-team:masterfrom
Closed
Add 3D semantic segmentation code example#2092innat-asj wants to merge 1 commit intokeras-team:masterfrom
innat-asj wants to merge 1 commit intokeras-team:masterfrom
Conversation
mattdangerw
reviewed
May 1, 2025
Member
mattdangerw
left a comment
There was a problem hiding this comment.
Looks good thanks! Just some comments on avoiding google drive.
|
|
||
| These region-wise groupings allow for evaluation across different tumor structures relevant for clinical assessment and treatment planning. A sample view is shown below, figure taken from [BraTS-benchmark](https://arxiv.org/pdf/2107.02314v1) paper. | ||
|
|
||
|  |
Member
There was a problem hiding this comment.
we should move any assets out of a personal drive. there should be examples of guide assets elsewhere on keras.io
| ) | ||
| from medicai.utils.inference import SlidingWindowInference | ||
|
|
||
| print( |
| In this [Kaggle notebook](https://www.kaggle.com/code/ipythonx/3d-brats-segmentation-in-keras-multi-gpu/) (version 2), we trained the model on the entire dataset for approximately 25 epochs. The resulting weights will be used for further evaluation. Note that the validation set used in both the Colab and Kaggle notebooks is the same: `training_shard_36.tfrec`, which contains `8` samples. We will be evaluating the model per-class and on average. | ||
| """ | ||
|
|
||
| model_weight = gdown.download(id="1b-DpZkMsAX6I-niuLu7h8_y3XiaSHFyN", quiet=False) |
Member
There was a problem hiding this comment.
could you just upload these to kaggle? nice than gdown here (and we are already using kaggle)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've built a medical ai toolkit for 3d segmentation using keras 3. https://github.com/innat/medic-ai (
medicai). Using this I've implemented a complete workflow for 3d medical imaging end-to-end training. Themedicaiis greatly inspired bymonai, which mainly works in torch ecosystem.Now, using this toolkit, I've implemented this code example for multi-modal brain tumor segmentation task. Please let me know if it is suitable to add in keras code example.