lishen / end2end-all-conv

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

AUC is 0.5 #3

Open zccoder opened 6 years ago

zccoder commented 6 years ago

hi,this is my script below to run image_clf_train.py using subset of the data from DREAM challenge and h5 files that you have given in this project.

#!/bin/bash

TRAIN_DIR="./dream_data/train"
VAL_DIR="./dream_data/val"
TEST_DIR="./dream_data/test"
# PATCH_STATE="CBIS-DDSM/Combined_patches_im1152_224_s10/vgg16_prt_best1.h5"
RESUME_FROM="s10_resnet50.h5"
BEST_MODEL="./dream_data/mam_image_train.h5"
FINAL_MODEL="NOSAVE"

#export NUM_CPU_CORES=4

# 255/65535 = 0.003891.
python image_clf_train.py \
    --patch-model-state $RESUME_FROM \
    --no-resume-from \
    --img-size 288 224 \
    --no-img-scale \
    --rescale-factor 0.003891 \
    --featurewise-center \
    --featurewise-mean 44.33 \
    --no-equalize-hist \
    --patch-net resnet50 \
    --block-type resnet \
    --top-depths 512 512 \
    --top-repetitions 2 2 \
    --bottleneck-enlarge-factor 2 \
    --no-add-heatmap \
    --avg-pool-size 7 7 \
    --add-conv \
    --no-add-shortcut \
    --hm-strides 1 1 \
    --hm-pool-size 5 5 \
    --fc-init-units 64 \
    --fc-layers 2 \
    --batch-size 4 \
    --train-bs-multiplier 0.5 \
    --augmentation \
    --class-list pos neg \
    --nb-epoch 0 \
    --all-layer-epochs 50 \
    --load-val-ram \
    --load-train-ram \
    --optimizer adam \
    --weight-decay 0.001 \
    --hidden-dropout 0.0 \
    --weight-decay2 0.01 \
    --hidden-dropout2 0.0 \
    --init-learningrate 0.0001 \
    --all-layer-multiplier 0.01 \
    --lr-patience 2 \
    --es-patience 10 \
    --auto-batch-balance \
    --pos-cls-weight 1.0 \
    --neg-cls-weight 1.0 \
    --best-model $BEST_MODEL \
    --final-model $FINAL_MODEL \
    $TRAIN_DIR $VAL_DIR $TEST_DIR

The result is below:

>>>>>>>>>>>>
 - Epoch:49, AUROC:0.5, mean=0.5000
275s - loss: 24.6970 - acc: 0.4172 - val_loss: 19.0071 - val_acc: 0.5000
Epoch 50/50
enter cal_test_auc
auc 0.5
>>>>>>>>>>>>
 - Epoch:50, AUROC:0.5, mean=0.5000
274s - loss: 23.6646 - acc: 0.4934 - val_loss: 18.9252 - val_acc: 0.5000

>>> Found best AUROC: 0.5000 at epoch: 1, saved to: ./dream_data/mam_image_train.h5 <<<
>>> AUROC for all cls: 0.5 <<<
Done.

==== Training summary ====
Minimum val loss achieved at epoch: 50
Best val loss: 18.9251747131
Best val accuracy: 0.5

==== Predicting on test set ====
Found 100 images belonging to 2 classes.
Test samples = 100
Load saved best model: ./dream_data/mam_image_train.h5. Done.
enter cal_test_auc
auc [ 0.5]
AUROC on test set: [ 0.5]

It is Inappropriate that the result is 0.5. I am sure that the data is ok, so is there any problem of my config in the script? Waiting for your answer

danieltao commented 5 years ago

I have the same issue, and I dont know why the invalid tag is added