dusty-nv / jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
https://developer.nvidia.com/embedded/twodaystoademo
MIT License
7.72k stars 2.97k forks source link

Can I train ssd mobilenet with rectangular shape resize? #1886

Open oguzhankayaa opened 4 weeks ago

oguzhankayaa commented 4 weeks ago

I want to train ssd mobilenet with rectangular shape image. As I understand train file is written only for square shape resizing. How can I resize in a rectangular form so that I can keep the aspect ratio?

dusty-nv commented 4 weeks ago

@oguzhankayaa I'm not sure, I'm not the original author of the pytorch-ssd repo - the upstream is from here: https://github.com/qfgaohao/pytorch-ssd

You can double check it in the code, but I believe it does center cropping so the aspect ratio is maintained. But you would loose the data on the edges. It seems more common to just train the model on squished aspect ratio if you don't want to modify the architecture.