Change input image size of the sampleUffSSD project in TensorRT 4.0

Hi,

I’m wondering how can I change the input image size of the sampleUffSSD project. The current project only supports 300*300 images. Thanks.

Sorry for posting it here. But there’s nobody answering question in the TensorRT board.

Hi,

Which input size do you want to change? Image reader or SSD network?

Usually, there is a resizer for pre-precessing before deep learning engine.
If you just want add more flexibility in image size, it’s recommended to scale image to (300,300) and feed into SSD.
If you want to change the network architecture for large image, please also remember to modify the output dimension of SSD.

Thanks.

Hi AastaLLL,

I need to change the network architecture, could you give me some hint on how to change the output dimension. Currently, I just change the input shape in the config.py file to [1, 3, 600, 600] and change the INPUT_H and INPUT_W in BatchStreamPPM.h file to 600, but I got the following error.

../data/ssd/sample_ssd_600.uff
Begin parsing model...
ERROR: UFFParser: Parser error: BoxPredictor_0/Reshape: Reshape: Volume mismatch
ERROR: sample_uff_ssd: Fail to parse
sample_uff_ssd_debug: sampleUffSSD.cpp:714: int main(int, char**): Assertion `tmpEngine != nullptr' failed.

RUN FINISHED; Aborted; core dumped; real time: 1s; user: 720ms; system: 610ms

I really appreciate your help!

Hi,

Please check our document:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#uffssd_sample

Output dimension is related to plugin implementation.
Please check our document for the detail calculation.

Thanks.