mhamilton723 / STEGO

Unsupervised Semantic Segmentation by Distilling Feature Correspondences
MIT License
712 stars 143 forks source link

Adapt model to other image resolutions #36

Open Eric-L-Manibardo opened 2 years ago

Eric-L-Manibardo commented 2 years ago

I was wondering if it's possible to adapt the model to bigger image resolutions. If so, it's possible to use non-square images?

tanveer6715 commented 2 years ago

I was wondering if it's possible to adapt the model to bigger image resolutions. If so, it's possible to use non-square images?

Hi I am looking for the thing.. Have you use high resolution during training? As it only support 224x224 resolution.

Eric-L-Manibardo commented 2 years ago

Sorry, I have only used the model in inference mode for the moment. However, input and output images are 320x320 resolution.

My question is more oriented toward how the overall performance (i.e. mIoU) would evolve when increasing the image resolution. My hypothesis is that noise would be increased. More boundary pixels between classes will appear (for instance, between a car and the ground).

Neither I know if from an implementation point of view is interesting to be able to segment higher resolution images.

tanveer6715 commented 2 years ago

Sorry, I have only used the model in inference mode for the moment. However, input and output images are 320x320 resolution.

My question is more oriented toward how the overall performance (i.e. mIoU) would evolve when increasing the image resolution. My hypothesis is that noise would be increased. More boundary pixels between classes will appear (for instance, between a car and the ground).

Neither I know if from an implementation point of view is interesting to be able to segment higher resolution images.

Thanks for your response. Actually I want to train model using custom dataset with high image resolution.

Eric-L-Manibardo commented 2 years ago

My insight is that the model complexity (i.e. trainable params) would increase unreasonable, so prepare your GPUs...

Jokes aside, please let me know about your progress on this matter.

tanveer6715 commented 2 years ago

My insight is that the model complexity (i.e. trainable params) would increase unreasonable, so prepare your GPUs...

Jokes aside, please let me know about your progress on this matter.

Sure I will let you know when train it with high resolution. :)

gjackson1997 commented 2 years ago

Hey, did you make any progress training with higher res images?

tanveer6715 commented 2 years ago

Hey, did you make any progress training with higher res images?

Yes I trained model with high resolution. I used my own dataset and I experienced slightly increases in mIoU by increasing resolution. All you need to do is 1st you need to create KNN indices of your dataset and there you have to change your image resolution you want. also keep in mind that with increase in resolution of images you may need to reduced your batch size as it may cause GPU memory problem.