Skip to content

Conversation

@Alex605268
Copy link

Alexander Renkin-Perry
s43971125
Implementation of Task 1: Segmentation of 2D_OASIS dataset using improved UNet.
Adds 4 required python files, README and a documentation folder that contains 5 images used in the README

Train.py by default creates a model titled "improved_best.pth". predict.py expects that file to be in the same directory when it runs.
Train.py contains print statements to check the models process, they have been commented out. Predict.py saves all the plots
it generates to pngs in the same folder.

s4397112 added 16 commits October 20, 2025 18:32
…le.py.

Implemented very basic UNet model in module.py, including a test script for a forward pass
without any data to ensure that the input will pass through all layers without error
Updated README.md to list all the current files used in the project
Added functions for loading 2D data provided by assignment - Realised after
that they aren't necessary for the OASIS dataset, but as I hope to tackle the HipMRI
dataset if I can complete this task, I have left them in for now. Will remove before submission
if they are still unused.
…comments - more needed.

Added get_dataloaders function to dataset.py. Added DiceLoss coefficient calculation functionality
to train.py - currently only works for binary segmentation - may need to be changed.
…rected functions, missing variable initialisations).

Tested to find that 2D_OASIS data has 4 segmentation classes, so updated DiceLoss functionality accordingly
Ran a quick test with one epoch, and confirmed that it created a "best.pth" file with no errors - now ready to test
with multiple epochs, adjusted parameters, etc
…op works

Added functionality to print out results of each epoch to log file. Fixed a few
minor errors. Making this commit before running a longer test to see if results
improve between training loops.
Previously it was calibrated for Binary segmentation, so it gave a totally
incorrect answer. Should be working correctly now.
… run train.py

Existed beforehand, forgot to commit it earlier.
Not many changes here - attempted to get HIPMri working but was having issues
loading the data, eventually just reverted to the 2D_OASIS, so eventually just reverted
back to what I had before, with a couple of improvements made to check progress during training
Currently loads model and one image, does a prediction for that image, and visualises results
May update again batch over all test images.
Only changes to train.py are in the parameters (batch size and epoch number)
Adds some comments to modules.py explaining improved UNet implementation - more to come
Adjusted predict.py functionality to export visualisation to png
Adjusted parameters in train.py
Adds skeleton to README.md that includes all potential Headers and hyperlinks
…will be linked to

in the README file. Adds information about the problem and model to the READme file.
Adjusts the parameters of train.py.
Updates README with information about training the model
…he model and

the fuction that provides visualisation.
Adds a second visualisation function that shows the per-class visualisation
…ection

Final adjustment to train.py so default parameters match those in README
Fixed the function in predict.py to properly graph the dice scores
Adds the image of the dice scores to the documentation
@wangzhaomxy
Copy link
Collaborator

wangzhaomxy commented Nov 21, 2025

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

File Organizing: Well-organized files.

Problem Solving:

  • The algorithm solves the problem appropriately.
  • Accuracy in testing dataset (Dice): min 0.95. However, the evidence figure failed to display.

Model and functions:

  • It correctly uses PyTorch to construct the improved UNet 2D models and functions.
  • NO data augmentation.
  • Properly use the train/validation/test datasets.

Code design: Good.

Code comment and docstring:

  • Good code comments
  • Good function docstrings
  • Good header block

Difficulty: Easy.

Additional Comments:

  • Minimal commits, consisting mostly of generic messages such as ‘update’ or ‘add function.’ More meaningful and descriptive commit messages are expected.
  • The README design can be more structured and provide more comprehensive content. Since this is a report, a proper Discussion and Conclusion section is also expected to clearly summarize your project.
  • A training/validation curve is expected to illustrate and monitor the training process.

@gayanku
Copy link
Collaborator

gayanku commented Nov 24, 2025

Marking

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants