Skip to content

Any tip to train models from scratch using cityscape dataset? #253

@June-Jo

Description

@June-Jo

Hi, I'm trying to train the segmentation models using cityscape dataset(training: 2975, validation:500).

In the papers of some segmentation models, mIoU of them is over 70%.
However, I cannot reach there.

I tried pspnet, segnet, and fcns, but they just reached to 40% of mIoU.
I also tried data augmentation(scaling, random rotation, horizontal flip).
In order to ignore the background, I changed the ignore_index of loss function from 250 to 0, and the label of 250 is replaced to 0.

Did I do something wrong or is there any tip to train them from scratch?

Thanks for your help in advance.

My cfg file of pspnet is below.

model:
    arch: pspnet
data:
    dataset: cityscapes
    train_split: train
    val_split: val
    img_rows: 512
    img_cols: 1024
    path: '/home/irobot/hj/Dataset/cityscape/'
training:
    train_iters: 120000
    batch_size: 16
    val_interval: 1000
    n_workers: 16
    print_interval: 20
    optimizer:
        name: 'sgd'
        lr: 1.0e-3
        weight_decay: 0.0001
        momentum: 0.9
    loss:
        name: 'multi_scale_cross_entropy'
        size_average: True
    lr_schedule: 
        name: 'multi_step'
        milestones: [30000, 60000, 90000]
    resume: pspnet_cityscape_best_model.pkl
    augmentations:
        rotate: 10                                    #[rotate -d to d degrees]
        scale: 2048                                 #[scale to size (h,w)]
        hflip: 0.5                                     #[flip horizontally with chance p]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions