lishen / end2end-all-conv

Deep Learning to Improve Breast Cancer Detection on Screening Mammography
Other
367 stars 126 forks source link

Patch Classifier testing results in 0.25 AUC #13

Open MohammedAdelFahmi opened 5 years ago

MohammedAdelFahmi commented 5 years ago

Hello Shen, first congratulations on the great effort. I have tested two of your patch models on 400 jpg patches from CBIS-DDSM patches but I have gained an accuracy of 0.25 I have 100 images per class (calcification benign - calcification malignant - mass benign - mass malignant), so I was wondering what is the wrong that I am doing in the prediction?


test_generator = test_imgen.flow_from_directory(
                                                     directory=test_dir,
                                                     target_size=(500, 500),
                                                     color_mode="rgb",
                                                     batch_size=1,
                                                     class_mode=None,
                                                     shuffle=False)
test_generator.reset()
model = load_model("s30_resnet50.h5")
model.compile(loss='categorical_crossentropy',
              optimizer='adam',
              metrics=['accuracy'])
pred=model.predict_generator(test_generator,verbose=1,steps=nb_test_samples)
predicted_class_indices=np.argmax(pred,axis=1)```