hkchengrex / Cutie

[CVPR 2024 Highlight] Putting the Object Back Into Video Object Segmentation
https://hkchengrex.com/Cutie/
MIT License
691 stars 69 forks source link

Interpolation aligment #52

Closed bhack closed 6 months ago

bhack commented 6 months ago

Have you checked if you are affected in https://github.com/hkchengrex/Cutie/blob/555d016b6836ef3a4096418166aa3075ca1ee93b/cutie/inference/inference_core.py#L223

By https://github.com/pytorch/pytorch/issues/34808 ?

I've not analyzed all the interpolations you have used between pytorch and opencv so I am not sure if you are impacted or not.

hkchengrex commented 6 months ago

Thank you for reporting this. We used PIL's nearest during training and PyTorch's nearest during inference on the GUI so there might be a problem. I will look into it.

For benchmarking, we resize the mask during data loading with PIL https://github.com/hkchengrex/Cutie/blob/555d016b6836ef3a4096418166aa3075ca1ee93b/cutie/inference/data/video_reader.py#L96-L98 so that would be fine.

hkchengrex commented 6 months ago

I have updated it to nearest-exact.