This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp_1, mask_1 = explanation.get_image_and_mask(explanation.top_labels[0], positive_only=True, num_features=5, hide_rest=True) | |
temp_2, mask_2 = explanation.get_image_and_mask(explanation.top_labels[0], positive_only=False, num_features=10, hide_rest=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preds = model.predict(images) | |
prediction_class = model.predict_classes(images) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
explainer = lime_image.LimeImageExplainer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hist = model.fit_generator( | |
train_generator, | |
epochs = 10, | |
validation_data = validation_generator, | |
validation_steps=2 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = Sequential() | |
model.add(Conv2D(32,kernel_size=(3,3),activation='relu',input_shape=(224,224,3))) | |
model.add(Conv2D(128,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) | |
model.add(Conv2D(64,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
train_generator = train_datagen.flow_from_directory( | |
'/content/drive/MyDrive/CovidDataset/Train', | |
target_size = (224,224), | |
batch_size = 32, | |
class_mode = 'binary') | |
validation_generator = test_datagen.flow_from_directory( | |
'/content/drive/MyDrive/CovidDataset/Val', | |
target_size = (224,224), | |
batch_size = 32, | |
class_mode = 'binary') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
train_datagen = image.ImageDataGenerator(rescale = 1./255, shear_range = 0.2,zoom_range = 0.2, horizontal_flip = True) | |
test_datagen = image.ImageDataGenerator(rescale=1./255) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = Sequential() | |
model.add(Conv2D(32,kernel_size=(3,3),activation='relu',input_shape=(224,224,3))) | |
model.add(Conv2D(128,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) | |
model.add(Conv2D(64,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = Sequential() | |
model.add(Conv2D(32,kernel_size=(3,3),activation='relu',input_shape=(224,224,3))) | |
model.add(Conv2D(128,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) | |
model.add(Conv2D(64,(3,3),activation='relu')) | |
model.add(MaxPooling2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) |
NewerOlder