KaiyangZhou / deep-person-reid

Torchreid: Deep learning person re-identification in PyTorch.
https://kaiyangzhou.github.io/deep-person-reid/
MIT License
4.32k stars 1.15k forks source link

Reshaping vs Cropping+Padding vs other approach #376

Open bml1g12 opened 4 years ago

bml1g12 commented 4 years ago

Given most models have fixed input shape, was wondering if you have any advice on whether better performance would be expected from: a) cropping to the bounding box and padding the image with black versus b) stretching the image to the appropriate shape?

I guess (b) is better, given that black padding could end up making it similar to other images with lots of black padding, but equally I can imagine a heavily stretched image might not be very easy to REID to a non-stretched image.

Thanks for any advice

KaiyangZhou commented 4 years ago

haven't done such a comparison before

but I don't think the difference is huge

I'd stick to (b)—use the cropped person images detected by a detector and then do reshaping

bml1g12 commented 4 years ago

Ok thanks! Feel free to close this if you'd like