Computer Vision News - June 2022

52 Medical Imaging AI tool Building Architecture model = Sequential() model.add(Conv2D(32,kernel_size=(3,3),activation="relu",input_shape=(224,224,3))) model.add(Conv2D(64,(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)) model.add(Conv2D(128,(3,3),activation="relu")) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Dropout(0.25)) model.add(Conv2D(128,(3,3),activation="relu")) model.add(MaxPooling2D(pool_size=(2,2))) model.add(Dropout(0.25)) model.add(Flatten()) model.add(Dense(64,activation="relu")) model.add(Dropout(0.5)) model.add(Dense(1,activation="sigmoid")) model.compile(loss=keras.losses.binary_crossentropy,optimizer = "adam",metrics=["accuracy"]) model.summary() This is an exercise left for the reader: feel free to perform data augmentation! Found 50 images belonging to 2 classes. Fit The Model hist = model.fit_generator( train_generator, steps_per_epoch = 8, epochs = 10, validation_data = validation_generator, validation_steps = 2 ) Epoch 1/10 8/8 [==============================] - 179s 22s/step - loss: 0.8587 - accuracy: 0.5261 - val_loss:

RkJQdWJsaXNoZXIy NTc3NzU=