PaddlePaddle / PaddleSeg

Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
https://arxiv.org/abs/2101.06175
Apache License 2.0
8.69k stars 1.68k forks source link

help! 使用自定义数据集训练成功,但predict结果为全红的图片 #1213

Closed Apokar closed 3 years ago

Apokar commented 3 years ago

感谢paddle团队的工作!辛苦啦

配置文件(根据bisenet_optic_disc_512x512_1k.yml修改):

_bisenet_new_camvid_512x5121k.yml

batch_size: 4 iters: 1000

train_dataset: type: Dataset dataset_root: data/NewCamVid train_path: data/NewCamVid/train.txt num_classes: 2 transforms:

  • type: Resize target_size: [512, 512]
  • type: RandomHorizontalFlip
  • type: Normalize mode: train

val_dataset: type: Dataset dataset_root: data/NewCamVid val_path: data/NewCamVid/val.txt num_classes: 2 transforms:

  • type: Resize target_size: [512, 512]
  • type: Normalize mode: val

optimizer: type: sgd momentum: 0.9 weight_decay: 4.0e-5

lr_scheduler: type: PolynomialDecay learning_rate: 0.01 end_lr: 0 power: 0.9

loss: types:

  • type: CrossEntropyLoss coef: [1, 1, 1, 1, 1]

model: type: BiSeNetV2 pretrained: Null

训练的图片我贴上一对吧

原数据 0016E5_08139

标注数据 0016E5_08139_L

标注数据全都已转换为单通道灰度图 img.shape为(720,960) 天空部分的像素值为(1,1,1) 其余部分是(0,0,0)

使用训练出的模型运行 predict.py 后结果为:

Seq05VD_f04740

Seq05VD_f04740

请问下 这个是不是数据集有问题吗 还是其他地方不对呢?请指教!

Apokar commented 3 years ago

发现一个错误 我去验证下 先关闭问题吧

Apokar commented 3 years ago

是我自己的问题哈哈 paddle还是一如既往的强悍啊

Peng-ss commented 3 years ago

是我自己的问题哈哈 paddle还是一如既往的强悍啊 你好,我也遇到同样的问题,你是如何解决的?