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?


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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.