Skip to content
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

Segmenting MRI images using 2D Unet #142

Open
wants to merge 24 commits into
base: topic-recognition
Choose a base branch
from

Conversation

NicMarchant
Copy link

This pull request implements a 2D Unet to create binary class segmentation of hip MRI images.

Deb and others added 24 commits October 7, 2024 12:51
…t was just the unsegmented data, added import calls to train.py to access each dataset
The encoder computes conv's and max pooling and saves the skip connections
The bottleneck computes two convolutions with 1024 features
The decoder apply upconv's, adds the skip connections and does convolutions
The unet function groups each of these together and makes a model
Modified the input shape in modules.py, the model sucessfully runs epochs.
Going to add the valdation and testing to modules.py as well as dice similarity
… the training,

validation and testing of the model to the train.py.
Added imports and plots to the predict.py so that the results of the model could be visualised.
Going to add prints of the true mask vs the predicted mask to show in the readme
Havent successfully tested the model yet
…RANGPUR.

Going to impliment a custom dice function to calculate the dice score.
After the results from Rangpur are found I will tweak the model accordingly
true segmentation and predicted segmentations
Current predictions are very poor, however only 1/10 of the data is being used to train
as my local machine is running the code. going to modify the train.py to include working dice
Added dice to train.py referenced it aswell
Increased the learning rate to 0.0001
cleaned up unuesd imports
Removed mid function comments from modules to make it less busy
Tried multiple different loss functions however I cannot get better dice than around 0.4
If dice loss is used then the preducted segmentation is black
I added data sorting as per someones ed post and it made the model
significantly better, also changedd the folder layout to suit the spec
Changed to dice and binary cross entropy, getting 65 dice off 3 epochs of all the data
Accidently removed files from github thinking they were duplicates.
going to run with the full dataset now to get the performance and then will work on readme
@yexincheng
Copy link
Collaborator

This is an initial inspection, no action is required at this point

  1. Solves problem: The average DICE socre is around 0.68 from Unet_images/12epochs/everyTestImageDice.png. Although the sudent uploaded the dice plots and prediction figures, they were not intserted to readme. The dependency versions are not specified.
  2. Implementation: The network is implemented in function not class. Hpyerparameters were hard-coded. Otherwise all good
  3. Design: Good
  4. Comment: Sufficient but not in docstring format
  5. Difficulty: Easy

Note
Pull request comments should be more informative.

@hanemma7moud hanemma7moud added the PDF PDF submitted label Nov 13, 2024
@hanemma7moud
Copy link
Collaborator

Nicholas Marchant

@gayanku
Copy link
Collaborator

gayanku commented Nov 14, 2024

Marking

Good/OK/Fair Practice (Design/Commenting, TF/Torch Usage)
Good design and implementation.
Spacing and comments.
No Header blocks. -1
Recognition Problem
OK solution to problem. -1
Driver Script present.
File structure present.
Good Usage & Demo & Visualisation & Data usage.
Module present.
Commenting present.
No Data leakage found.
Difficulty : Easy. UNet2D (Easy Difficulty)-10
Commit Log
Good Meaningful commit messages.
Good Progressive commits.
Documentation
Readme :Acceptable. Missing plots/figures. -3
Model/technical explanation :Acceptable. -1
Description and Comments :Good.
Markdown used and PDF submitted. PDF checked.
Pull Request
Successful Pull Request (Working Algorithm Delivered on Time in Correct Branch). Submitted on time.
No Feedback required.
Request Description is adequate. -1
TOTAL-17

Marked as per the due date and changes after which aren't necessarily allowed to contribute to grade for fairness.
Subject to approval from Shakes

@gayanku gayanku added the Preliminary Grade To be confirmed after review. label Nov 14, 2024
@hanemma7moud
Copy link
Collaborator

Nicholas Marchant

@shakes76
Copy link
Owner

Cant merge because of conflicting changes to main repo files. Please update for merge, doesn't affect grade.

@NicMarchant
Copy link
Author

NicMarchant commented Nov 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB Completed PDF PDF submitted Preliminary Grade To be confirmed after review. _UNet2D
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants