Trained model on a notebook#6
Open
SaiChamarty wants to merge 11 commits into
Open
Conversation
Added training loop and trained over 50 epochs for images with original resolution - 512x512
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.
Added training loop and trained over 50 epochs for images with original resolution - 512x512
This is implemented on u-net-initial-implementation.ipynb
Modified the following:
changed transforms to unet_transforms so that it does not conflict with the original transforms function from torchvision.
changed crop size to 512x512 instead of 256x256 and removed additional redundant crops, as we did not need it for 512.
changed number of channels to 1 instead of 3 in the unet definition. Our dataset does not have a color scheme - they are grayscale.
added weight initialization like on the paper - He initialization
used dice score and cross entropy loss instead of only cross entropy. Dice score is used on the paper.
To run, you would have to do the following:
have an env with all the existing dependencies shown in the first cell of the notebook.
I used pip as I felt it was more native for me, but I believe you could use uv as well.