CNN with Multi channel input or CNN with Multi instance learning?

I have 500 Dicom images of medical scan of patients. These are 3 dimension scans , shape = [300 x 300 x 3]. From these I have extracted Front and side views. So, for each patient I have 2 images of shape [300 x 300].

In order to build a classifier, Should stack these 2 views and train a CNN {[300 x 300 x 2] x 500} -> Multi channel input,

Or should i pass each view as a new data altogether {[300 x 300 x 1000]} -> Multi instance learning?

Topic multi-instance-learning deep-learning

Category Data Science


One of the other approach you can try is multi input & single output approach in which passing these 2 images to 2 different layer from there different layer then concatenation of the layers to perform classification task.

It can be done using keras Functional API

input1 = keras.layers.Input(shape=(1,))
input2 = keras.layers.Input(shape=(1,))

cnn1   = keras.layers.Conv2D(32, 3, activation=keras.activation.relu)(input1)
cnn2   = keras.layers.Conv2D(32, 3, activation=keras.activation.relu)(input2)

merged = keras.layers.Concatenate(axis=1)([input1, input2])

dense1 = keras.layers.Dense(2, activation=keras.activations.relu)(merged)
output = keras.layers.Dense(1, activation=keras.activations.sigmoid)(dense1)
model10 = keras.models.Model(inputs=[input1, input2], output=output)

When passing data to model create separate arrays of input those 2 images set.

model0.fit([array_1, array_2],output, batch_size=16, epochs=100)

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.