Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6162 Discussions

How to set batch size to increase performance?


Hi ,

    I'd successfully running the Openvino on CPU and FPGA , then I try to set batch size to increase peformance

    I tried -b cmmand when converting IR files using , but when loading into FPGA the messages shows "batch size is set to 1" or "... force set to 1" or some example show's " ... set to 16" (different examples, some example have more than one xml file ,like -m,-m_ag,-m_hp...)

    Could any body know how to set batch size ?


Dee Zeng

0 Kudos
1 Reply

Hi, Dee,

From your question, I guess you are referring to "interactive Face Detection Demo".

The demo utilize four DNN models to detect different things (age, head pose, emotion and landmarks) that's why you see so many different parameters. For dynamic patch size you need to set two parameter to make it works, for example if you want to have 8 batches to be processed simultaneously for age model, you need to set "-n_ag 8 -dyn_ag true".

If you are referring how to write the code, you can refer to the sample code. there is "Load" function in "detectors.cpp" which checks if "dyn_ag" set to true or not to configure the plugin with "PluginConfigParams:YES". Then use the SetBachSize function of the CNNNetwork to configure the batch size from the parameter "n_ag".