RolandGao / RegSeg

The official implementation of "Rethink Dilated Convolution for Real-time Semantic Segmentation"
MIT License
86 stars 14 forks source link

Camvid #12

Open miscedence12 opened 1 year ago

miscedence12 commented 1 year ago

@RolandGao Hello,I wonder to know whether you will publish the weights file trained on the Camvid dataset.

RolandGao commented 1 year ago

I don't have the CamVid weights anymore. The Cityscapes weights are much more useful because Cityscapes is a larger dataset. You can train on the CamVid dataset yourself by preparing the dataset, downloading the Cityscapes trainval pretrained weights, and using the training config here (https://github.com/RolandGao/RegSeg/blob/main/configs/camvid_200epochs.yaml).

miscedence12 commented 1 year ago

@RolandGao hello,Can you provide me with the directory structure of the Camvid dataset you use and show sample images? The data set I prepared by myself seems to be unable to complete the training,thanks!

RolandGao commented 1 year ago

CamVid does require a bit of preprocessing before it can be used. The labels are converted from rgb to class labels first using something like the rgb_mask2 function in camvid.py. The directory structure is -- train -- train_labels -- val -- val_labels -- test -- test_labels -- class_dict.csv

miscedence12 commented 1 year ago

@RolandGao Thanks for your reply,I have made the following changes to camvid.py. Do you think it is right? My label is rgb image. line43: img = Image.open(self.images[index]).convert('RGB') line44: target = rgb_to_mask2(Image.open(self.masks[index]),color_to_class=self.color_to_class)

RolandGao commented 1 year ago

I think it should be correct, but you have to test it out yourself to confirm.

miscedence12 commented 1 year ago

@RolandGao I've already verified it. It's right;Recently, I want to train the model on coco dataset. Have you ever trained it before? If so, is there any pretrained weights?

Best wishes! Jie

RolandGao commented 1 year ago

Hi,

Training on coco should be supported by the repository with the "coco_100epochs.yaml" config file, but I don't have pretrained weights.

anizyu commented 9 months ago

Do I need to rewrite a training file to train the Camvid dataset?

RolandGao commented 9 months ago

No, you can use the same train.py. You only need to prepare the dataset.