| Algorithm 1 TN Classification Algorithm | |
| 1: function LoadDatasets | |
| 2: Dataset ← DDTI | ▹ 134 images: 14 benign, 62 malignant |
| 3: return Dataset | |
| 4: end function | |
| 5: function Preprocess(Dataset) | |
| 6: Benign ← GetBenignImages(Dataset) | ▹ 14 images |
| 7: Malignant ← GetMalignantImages(Dataset) | ▹ 62 images |
| 8: New_Benign ← SMOTE (Benign, target = 28) | ▹ Oversample benign |
| 9: Balanced_Dataset ← Combine(New_Benign, Malignant[0:28]) | |
| 10: Augmented_Dataset ← Augment(Balanced_Dataset, Techniques = {Brightness, Flip, Rotate, Resise_to_512 × 512}) | |
| 11: return Augmented_Dataset | ▹ Target: 2048 images |
| 12: end function | |
| 13: function ExtractFeatures(Augmented_Dataset) | |
| 14: Features ← [] | |
| 15: for each image in Augmented_Dataset do | |
| 16: Bandelet_Features ← ApplyBandeletTransform(image) | |
| 17: Features ← Add(Bandelet_Features) | |
| 18: end for | |
| 19: return Features | |
| 20: end function | |
| 21: function Classify(Augmented_Dataset, Features) | |
| 22: Train_Data ← Take80Percent(Augmented_Dataset) | ▹ 1638 images |
| 23: Val_Data ← Take20Percent(Augmented_Dataset) | ▹ 410 images |
| 24: Models ← {VGG16} | ▹ Simplified list |
| 25: for each model in Models do | |
| 26: LoadPretrained(model) | |
| 27: FineTune(model, Train_Data, Features) | |
| 28: Predictions ← Test(model, Val_Data) | |
| 29: Save(Predictions) | |
| 30: end for | |
| 31: return Predictions | |
| 32: end function | |
| 33: function Evaluate(Predictions, Val_Data) | |
| 34: for each model in Predictions do | |
| 35: Accuracy ← CalculateAccuracy(Predictions, Val_Data) | |
| 36: Sensitivity ← CalculateSensitivity(Predictions, Val_Data) | |
| 37: Display(model, Accuracy, Sensitivity) | |
| 38: end for | |
| 39: end function | |
| 40: function Main | |
| 41: Dataset ← LoadDatasets() | |
| 42: Augmented_Dataset ← Preprocess(Dataset) | |
| 43: Features ← ExtractFeatures(Augmented_Dataset) | |
| 44: Predictions ← Classify(Augmented_Dataset, Features) | |
| 45: Evaluate(Predictions, Augmented_Dataset) | |
| 46: end function | |