2D Prostate Segmentation with Improved UNet - Student 47222610#272
Open
ChiaJouLu wants to merge 61 commits intoshakes76:topic-recognitionfrom
Open
2D Prostate Segmentation with Improved UNet - Student 47222610#272ChiaJouLu wants to merge 61 commits intoshakes76:topic-recognitionfrom
ChiaJouLu wants to merge 61 commits intoshakes76:topic-recognitionfrom
Conversation
- Use provided utility functions from assignment Appendix B - Implement load_data_2D with Z-score normalization - Implement to_channels for one-hot encoding - Support large dataset: 11,460 train, 660 val, 540 test images - Add comprehensive documentation and test script - Verified on Rangpur with actual HipMRI data
- Implemented the standard Conv2d -> BatchNorm2d -> ReLU sequence repeated twice. - Ensures dimensions are preserved using padding=1. - This serves as the fundamental building unit for the later Encoder and Decoder paths.
- Integrates MaxPool2d (2x2, stride 2) for downsampling. - After downsampling, use DoubleConv to expand channels and refine features (C -> 2C). - Ensures data shape transformation: (N, C, H, W) -> (N, 2C, H/2, W/2).
- Implements the upsampling to double H/W dimensions of the deep features. - Integrates the skip connection by concatenating the upsampled features with the corresponding encoder features. - Applies DoubleConv after concatenation to fuse high-level semantics and low-level detail, while halving the number of channels.
- Implemented a 1×1 convolution layer to map final feature maps to output classes - No activation applied; handled by loss function - Input shape: (N, C_in, H, W) - Output shape: (N, num_classes, H, W)
…dical image segmentation - Implemented full encoder–decoder structure with skip connections - Includes DoubleConv, Downsampling, Upsampling, and OutConv components - Supports variable input/output channels (e.g. 1→4 for HipMRI prostate segmentation) - Forward pass outputs raw logits
…tion, and new training loop - Added 'load_data_with_resive()' and 'load_labels_with_resive()' to debug and preprocess input images and labels with resizing support. - Updated Dice metric: replaced 'dice_coefficient' with 'dice_coefficient_per_class()' to compute Dice score separately for each class. - Implemented 'train_one_epoch()' function for training loop structure. - Minor refactoring and cleanup for debugging consistency.
…tate segmentation
- simplify runner output and final checkpoint; improve the entire things; keep core training logic unchanged
…tatements to README for clarity
…tch_0.png Correcting classes names
…tch_1.png Correcting classes names
…tch_2.png Correcting classes names
…tch_3.png Correcting classes names
…tch_4.png Correcting classes names
Author
Important Update: Corrected Class LabelsI have corrected an error in the class descriptions after my initial submission. Corrections made:
Files updated:
Note: These are documentation corrections only. Model implementation and results remain unchanged. Turnitin: Unable to resubmit PDF. Please review the corrected version here on GitHub. |
Collaborator
|
<This is an initial inspection, no action is required at this point.> File Organizing: Well-organized files. Problem Solving:
Model and functions:
Code design: Good. Code comment and docstring:
Difficulty: Normal. Additional Comments:
|
Collaborator
Marking
Marked as per the due date and changes after which aren't necessarily allowed to contribute to grade for fairness. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Project Summary
Student ID: 47222610
Project: #3 - HipMRI 2D Prostate Segmentation with Improved UNet
Difficulty: Normal
Implementation
Implemented Improved UNet architecture for automated prostate segmentation from 2D MRI images.
Key Features:
Files:
modules.py- Model architecturedataset.py- Data loadingtrain.py- Training scriptpredict.py- Testing scriptREADME.md- DocumentationResult_Images/- VisualizationsResults
Test Performance:
Requirement: ≥ 0.75
Achieved: 0.9552 (27.4% above requirement)