Skip to content

Conversation

@lgyts
Copy link

@lgyts lgyts commented Nov 6, 2025

Hi team,

This pull request contains my solution to the Siamese classification problem (Hard Difficulty Task 9)
After training, the model achieves an average test accuracy of around 81%, with balanced precision and recall (≈ 0.80).

README.md – Comprehensive documentation of the entire project including dataset, preprocessing, training procedure, results, and discussion.

dataset.py – Handles the ISIC 2020 dataset: metadata loading, patient-grouped splitting, augmentation, and data loaders.

modules.py – Contains model architectures: SiameseEncoder (ResNet-50) and BinaryClassifier (4-layer MLP).

utils.py – Helper utilities for plotting, feature extraction, saving sample images, and ensuring reproducibility.

params.py – Centralized configuration for all hyperparameters, paths, and augmentations.

train.py – Trains both the Siamese encoder (Triplet Margin Loss) and classifier (CrossEntropyLoss).

predict.py – Loads trained models to evaluate the test set and generate confusion matrix and metrics.

.gitignore – Excludes generated weights and datasets for clean repository submission.

/images/ – Contains figures used in the README (loss curves, confusion matrix, input samples).

lgyts added 30 commits October 29, 2025 15:43
@lgyts
Copy link
Author

lgyts commented Nov 6, 2025

Please ignore the README uploaded to Gradescope — that version was incomplete and has been abandoned.

@hanemma7moud
Copy link
Collaborator

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

Well Done!
Recognition Problem : total : 19.5

  1. Solves problem: The solution is appropriate for the problem (4.5)
  • Strong attempt, clear Siamese + classifier pipeline, proper explanation of triplet loss, classification stage, evaluation, and justification of augmentation + splitting.
    Minor issue (-0.5):
    Missing an embeddings visualization (t-SNE / UMAP).
  1. Implementation functions : The code appears to be functional (3)

Good design: design is fairly strong(1)
Commenting: good(1)
Difficulty: Hard (10)

Great work , Thanks

@gayanku
Copy link
Collaborator

gayanku commented Nov 24, 2025

Marking

Good/OK/Fair Practice (Design/Commenting, TF/Torch Usage)
Adequate design and implementation. -1
Spacing and comments.
Header blocks.
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 : Hard. Hard Difficulty : Siamese
Commit Log
Good Meaningful commit messages.
Good Progressive commits.
Documentation
Readme :Acceptable. -1
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-3

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