deeplab预测黑色面具

时间:2019-06-10 14:08:47

标签: deeplab

我在自定义数据集上训练了deeplab模型,并且无法预测任何黑色背景,我不知道出了什么问题

-数据= RGB图像+(0-1)标签:400 * 300

-classe = 2

-转换为记录格式:

培训步骤:

==>损失= 0.2〜0.1

python train.py \ --logtostderr \ --vis_split = "train" \ --model_variant = "xception_65" \ --atrous_rates = 6 \ --atrous rates = 12 \ --atrous rates = 18 \ --output_stride = 16 \ --decoder_output_stride = 4 \ --training_number_of_steps = 1000 --train_crop_size = 513 \ --train_batch_size = 1 \ --train_crop_size = 513 \ --Fine_tune_batch_norm=False \ --Tf_initial_checkpoint = "./ Data / Init_models / Deelabv3_pascal_train_aug \ model.ckpt" --Initialize_last_layer = False \ --Last_layers_contain_logits_only = True \ --train_logdir="./data/log/train" \ --dataset_dir="./data/tfrecord" \ --dataset="pascal_voc_seg"

-转换为.pb步骤

python export_model.py \ --logtostderr \ -model_variant = "xception_65" \ --atrous_rates = 6 \ --atrous_rates = 12 \ --atrous_rates = 18 \ --output_stride = 16

直到这一步,一切看起来都很好

as output this what i got this

as settings screenshots

as settings screenshots

as settings screenshots

1 个答案:

答案 0 :(得分:0)

将标签转换为灰度[0-255],并且两个类的像素值应为0和1。设置num of classes = 2并忽略label = 255。这对我有用。