Tramac / awesome-semantic-segmentation-pytorch

Semantic Segmentation on PyTorch (include FCN, PSPNet, Deeplabv3, Deeplabv3+, DANet, DenseASPP, BiSeNet, EncNet, DUNet, ICNet, ENet, OCNet, CCNet, PSANet, CGNet, ESPNet, LEDNet, DFANet)
Apache License 2.0
2.83k stars 581 forks source link

how to train my dataset #144

Open LiZhangMing opened 4 years ago

LiZhangMing commented 4 years ago

hi, i'm a student. Each image in my dataset is 852*480, and is divided into two categories:raw_data and groundtruth

the raw_data contains 236 images and groundtruth contains 236 images which are corresponds the raw_data

Could you please tell me which dataloader.py should I refer and modify? Thank You!

Tramac commented 4 years ago

pascal_voc.py is ok.

LiZhangMing commented 4 years ago

tanks

danylott commented 4 years ago

tanks

Hello, Have you done your own dataloader? If so, could you provide some code snippets, please?

Kittywyk commented 4 years ago

pascal_voc.py is ok.

Hi, I met the same problem. I've already written a dataloader file and renamed it to mydata.py for example. I also added the name "mydata" in code as an argument. But when I ran the command " python train.py --model fcn32s --backbone vgg16 --dataset mydata --lr 0.01 --epochs 50" ,the error occured: train.py: error: argument --dataset: invalid choice: 'mydata' (choose from 'pascal_voc', 'pascal_aug', 'ade20k', 'citys', 'sbu') So what should I modify then? Thanks for ur help!

MaKaNu commented 3 years ago

@Kittywyk this should be an easy fix: In the argument parser is a list inserted which checks for valid values (The Parser does this for every argument, or at least most. Not rly shure about). Just Add 'mydata' to this list. You can find the list in line 44 of ./scripts/train.py. Maybe you will run into other problems later.