Releases: JordiCorbilla/ocular-disease-intelligent-recognition-deep-learning
Releases · JordiCorbilla/ocular-disease-intelligent-recognition-deep-learning
Inception ResNetV2 Model for ODIR challenge
This release contains the training log, results, and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- All layers are trained.
- Optimizer = SGD lr=0.001, decay=1e-6, momentum=0.9, nesterov=False
The results of this model are as follows:
Inception ResNetV2
Training:
- loss: 0.3823
- accuracy: 0.8906
- precision: 0.5723
- recall: 0.4950
- AUC: 0.8347
Validation:
- loss : 0.3409378457069397
- accuracy : 0.890625
- precision : 0.57225436
- recall : 0.495
- auc : 0.8346987
Final Score:
- Kappa score: 0.46929492039423804
- F-1 score: 0.890625
- AUC value: 0.8381830357142857
- Final Score: 0.7327009853695078
Changes in the model:
# Metrics
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
# Added a new dense layer
x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(num_classes, activation='sigmoid')(x)
sgd = SGD(lr=0.001, decay=1e-6, momentum=0.9, nesterov=True)
x.compile(optimizer=sgd, loss='binary_crossentropy', metrics=defined_metrics)
VGG-19 Model for ODIR challenge
This release contains the training log, results, and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- All layers are trained.
- Optimizer = SGD lr=0.001, decay=1e-6, momentum=0.9, nesterov=False
The results of this model are as follows:
VGG-19
Training:
- loss: 0.2320
- accuracy: 0.8988
- precision: 0.7241
- recall: 0.5074
- AUC: 0.9240
Validation:
- loss : 0.32848785161972044
- accuracy : 0.8746875
- precision : 0.49753696
- recall : 0.2525
- AUC : 0.78385717
Final Score:
- Kappa score: 0.2738795835219556
- F-1 score: 0.8746875
- AUC value: 0.7862857142857143
- Final Score: 0.6449509326025565
Changes in the model:
# Transfer learning, load previous weights
x.load_weights(r'C:\temp\vgg19_weights_tf_dim_ordering_tf_kernels.h5')
# Remove the last layer
x.pop()
# Metrics
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
# Added a new dense layer
x.add(layers.Dense(8, activation='sigmoid'))
sgd = SGD(lr=0.001, decay=1e-6, momentum=0.9, nesterov=False)
x.compile(optimizer=sgd, loss='binary_crossentropy', metrics=defined_metrics)
Xception Model for ODIR challenge
This release contains the training log, results, and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- All layers are trained.
- Optimizer = SGD lr=0.01, decay=1e-6, momentum=0.9, nesterov=True
The results of this model are as follows:
Xception:
Training:
- loss: 0.0201
- accuracy: 0.9934
- precision: 0.9838
- recall: 0.9713
- AUC: 0.9996
Validation:
- loss : 0.4635940623283386
- accuracy : 0.8875
- precision : 0.5531915
- recall : 0.52
- AUC : 0.8395691
Final Score:
- Kappa score: 0.47214076246334313
- F-1 score: 0.8875
- AUC value: 0.8611830357142858
- Final Score: 0.740274599392543
Changes in the model:
base_model = xception.Xception
base_model = base_model(weights='imagenet', include_top=False)
x = base_model.output
x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(num_classes, activation='sigmoid')(x)
model = Model(inputs=base_model.input, outputs=predictions)
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='binary_crossentropy',
optimizer=sgd,
metrics=defined_metrics)
ResNet50 Model for ODIR challenge
This release contains the training log, results, and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- All layers are trained.
- Optimizer = SGD lr=0.0001, decay=1e-6, momentum=0.9, nesterov=True
The results of this model are as follows:
ResNet50:
Training:
- loss: 0.1591
- accuracy: 0.9344
- precision: 0.8432
- recall: 0.6823
- AUC: 0.9678
Validation:
- loss : 0.30101956367492677
- accuracy : 0.8834375
- precision : 0.543131
- recall : 0.425
- AUC : 0.8420562
Final Score:
- Kappa score: 0.41236707365104375
- F-1 score: 0.8834375
- AUC value: 0.843525
- Final Score: 0.7131098578836812
Changes in the model:
base_model = resnet50.ResNet50
base_model = base_model(weights='imagenet', include_top=False)
x = base_model.output
x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(num_classes, activation='sigmoid')(x)
model = Model(inputs=base_model.input, outputs=predictions)
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
sgd = SGD(lr=0.0001, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='binary_crossentropy',
optimizer=sgd,
metrics=defined_metrics)
VGG-16 Model for ODIR challenge
This release contains the training log, results and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- Only classifier layer is trained.
- Optimizer = SGD lr=0.001, decay=1e-6, momentum=0.9, nesterov=True
- No Dropout
The results of this model are as follows:
VGG-16
Training:
- loss: 0.7054
- accuracy: 0.8929
- precision: 0.6998
- recall: 0.4799
- AUC: 0.9168
Validation:
- loss : 0.31377036929130553
- accuracy : 0.8871875
- precision : 0.57768923
- recall : 0.3625
- AUC : 0.8140241
Final Score:
- Kappa score: 0.38631534211644714
- F-1 score: 0.8871875
- AUC value: 0.8176205357142858
- Final Score: 0.6970411259435777
Changes in the model:
# Transfer learning, load previous weights
x.load_weights(r'C:\temp\vgg16_weights_tf_dim_ordering_tf_kernels.h5')
# Remove the last layer
x.pop()
# Metrics
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
# Added a new dense layer
x.add(layers.Dense(8, activation='sigmoid'))
sgd = SGD(lr=0.001, decay=1e-6, momentum=0.9, nesterov=True)
x.compile(optimizer=sgd, loss='binary_crossentropy', metrics=defined_metrics)
Included in this release:
- Figures and test run output for comparison.
- Model weights of the trained model for inference testing.
Inception V3 Model for ODIR challenge
This release contains the training log, results and also the model weight in h5 format.
Training Conditions:
- Data Augmentation.
- Transfer learning using ImageNet weights.
- All layers are trained.
- Optimizer = SGD lr=0.01, decay=1e-6, momentum=0.9, nesterov=True
The results of this model are as follows:
Inception v3:
Training:
- loss: 0.0485
- accuracy: 0.9812
- precision: 0.9460
- recall: 0.9252
- AUC: 0.9969
Validation:
- loss : 0.37697273850440977
- accuracy : 0.8984375
- precision : 0.6021798
- recall : 0.5525
- AUC : 0.85563624
Final Score:
- Kappa score: 0.5186967789707515
- F-1 score: 0.8984375
- AUC value: 0.8838098214285715
- Final Score: 0.7669813667997744
Changes in the model:
base_model = inception_v3.InceptionV3
base_model = base_model(weights='imagenet', include_top=False)
x = base_model.output
x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(num_classes, activation='sigmoid')(x)
model = Model(inputs=base_model.input, outputs=predictions)
defined_metrics = [
tf.keras.metrics.BinaryAccuracy(name='accuracy'),
tf.keras.metrics.Precision(name='precision'),
tf.keras.metrics.Recall(name='recall'),
tf.keras.metrics.AUC(name='auc'),
]
sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='binary_crossentropy',
optimizer=sgd,
metrics=defined_metrics)