Algorithm 1: The proposed fine-tuned DL model |
1 |
Input LC25000 dataset
|
2 |
Output Fine-tuned DL model for lung and colon prediction |
3 |
BEGIN |
4 |
STEP 1: Pre-Processing of HIs
|
5 |
FOR EACH image IN the
DO
|
6 |
Resize HI to 224 × 224 |
7 |
Normalize HI pixel values from [0, 255] to [0, 1] |
8 |
END FOR
|
9 |
STEP 2: DL Splitting
|
10 |
SPLIT INTO
|
11 |
Training se 9
|
12 |
Testing set
|
13 |
Validation set
|
14 |
STEP 3: Model Pre-Training
|
15 |
FOR EACH ML IN [ResNet-101V2, NASNetMobile, EfficientNet-B0] DO
|
16 |
Load and pre-train ML on the ImageNet dataset |
17 |
Remove the layer of classification from ML for feature extraction |
18 |
END FOR
|
19 |
FOR EACH pre-trained ML DO
|
20 |
Feed ML with 224 × 224 × 3 HIs |
21 |
Feed GlobalAveragePooling2D with the features of ML to smooth them into vectors |
22 |
END FOR
|
23 |
Connect the smoothed feature vectors from the three models into one vector |
24 |
Add a SoftMax layer for classification to the connected vector |
25 |
STEP 4: Proposed Model Training and Validating
|
26 |
FOR I = 1 to
where
|
27 |
FOR EACH I DO
|
28 |
Fine-tune the connected feature vector on the training set |
29 |
Use a validation set for early halting, according to the best model performance |
30 |
Assess the performance on the test set |
31 |
Record the test accuracies |
32 |
END FOR
|
33 |
Get the average of the recorded test accuracies |
34 |
END FOR
|
35 |
STEP 5: Proposed Model Evaluation
|
36 |
Evaluate the accuracy of the proposed DL model using the average test accuracies |
37 |
END |