-
Notifications
You must be signed in to change notification settings - Fork 284
2D Prostate Segmentation with Improved UNet - Student 47222610 #272
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
base: topic-recognition
Are you sure you want to change the base?
2D Prostate Segmentation with Improved UNet - Student 47222610 #272
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
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. |
|
<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:
|
Marking
Marked as per the due date and changes after which aren't necessarily allowed to contribute to grade for fairness. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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)