1

I want to ask the problem about Deeplab with mobilenetv2 output all black(0) array, and confirm it is all zero not 0~1. I have seen so many people have the same problem, but I couldn't find the solution yet. 1. My segmentation data is 1D array(removed color map), so I think It shouldn't be the problem, and the label are between 0~1, according to the classes. 2. I have set the right number of classes, train, val, trainval data number. 3.I can train the model with out any problem, and the loss value is good. my train config:

export PYTHONPATH=$PYTHONPATH:pwd:pwd/deeplab
WORK_DIR="deeplab"
DATASET_DIR="datasets"

# Set up the working directories.
PQR_FOLDER="eye2"
EXP_FOLDER=${WORK_DIR}/"exp/train_on_trainval_set"
INIT_FOLDER=${WORK_DIR}/"init_models"
TRAIN_LOGDIR="${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/${EXP_FOLDER}/train"
DATASET="${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/tfrecord"

mkdir -p "${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/exp"
mkdir -p "${TRAIN_LOGDIR}"

NUM_ITERATIONS=10000
python3 deeplab/train.py \
  --logtostderr \
  --train_split="train" \
  --model_variant="mobilenet_v2" \
  --train_crop_size=513,513 \
  --train_batch_size=4 \
  --training_number_of_steps="${NUM_ITERATIONS}" \
  --fine_tune_batch_norm=true \
  --tf_initial_checkpoint="${INIT_FOLDER}"/model.ckpt-30000\
  --train_logdir="${TRAIN_LOGDIR}" \
  --dataset_dir="${DATASET}" \
  --initialize_last_layer=false

vis config:

  export PYTHONPATH=$PYTHONPATH:pwd:pwd/deeplab
WORK_DIR="deeplab"
DATASET_DIR="datasets"

# Set up the working directories.
PQR_FOLDER="eye2"
EXP_FOLDER=${WORK_DIR}/"exp/train_on_trainval_set"
INIT_FOLDER=${WORK_DIR}/"init_models"
TRAIN_LOGDIR="${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/${EXP_FOLDER}/train"
DATASET="${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/tfrecord"

#mkdir -p "${WORK_DIR}/${DATASET_DIR}/${PQR_FOLDER}/exp"
#mkdir -p "${TRAIN_LOGDIR}"
 #--min_resize_value=1080\
  #--max_resize_value=1351\
  #--vis_crop_size=513,513\
NUM_ITERATIONS=20000
python3 deeplab/vis.py \
  --logtostderr \
  --vis_split="val" \
  --model_variant="mobilenet_v2" \
  --vis_crop_size=1080,1351\
  --dataset_dir="deeplab/datasets/eye2/tfrecord/"\
  --vis_logdir="${TRAIN_LOGDIR}/vis" \
  --checkpoint_dir="deeplab/datasets/eye2/deeplab/exp/train_on_trainval_set/train"\
  --max_number_of_iterations=1\

Can anyone help me with this, or please tell me your successful setting, just like your config or you dataset.

icoicqico
  • 21
  • 4
  • Can you try setting a color map in your vis configuration, to see if something changes? For example: --colormap_type="cityscapes" \ – ThiagoRTK Jun 08 '20 at 21:20

0 Answers0