qubvel / segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
MIT License
4.77k stars 1.03k forks source link

Question about the input size #472

Closed stephancheng closed 3 years ago

stephancheng commented 3 years ago

@qubvel Hi! Thanks for the code. I have followed the example in multiclass segmentation (camvid).ipynb and I saw that for validation and test data there is a data augmentation that make the input size divisible by 32. Is this necessary for all cases? (My picture size is 1280*966) Also in the example the data loader always return image and annotation, but my test data set don't have the annotation, is it correct to change as follow for test data set?

if self.augmentation:
            sample = self.augmentation(image=image  )
            image  = sample['image'] 

# apply preprocessing
if self.preprocessing:
    sample = self.preprocessing(image=image  )
    image = sample['image']