NVIDIA / semantic-segmentation

Nvidia Semantic Segmentation monorepo
BSD 3-Clause "New" or "Revised" License
1.76k stars 388 forks source link

Question about cropping operation in sdcnet #121

Closed visionxyz closed 3 years ago

visionxyz commented 3 years ago

https://github.com/NVIDIA/semantic-segmentation/blob/b4fc685bb35d9b7547b805b1395c515876ec48db/sdcnet/datasets/frame_loader.py#L87

Here, height, width = input_shape, but input_shape is the shape before cropping. Why the padding operation on cropped images use the original shape? I think it should use the cropped size? Thanks!

fitsumreda commented 3 years ago

The padding logics are relevant more for eval/inference, and the proceeding cropping logics for training. The padding allows inference for arbitrarily shaped input sequences. In training, crop_size is assumed to be selected to evenly fit into the models.

visionxyz commented 3 years ago

I see. Thank you so much!