Tensorflow Detection model zoo
The document contains Speed and Accuracy trade-off between different models given in the original detection_model_zoo. The models will be slower compared to the time reported in the detection_model_zoo for most cases because, the device informations are cleared when freezing the graph for portability reasons. Thus, the optimal GPU/CPU placement for the Ops are lost! Look at this issue for more details. Thus, the idea of this document is to provide the inference speed and Mean Average Precision mAP for the frozen models given in the detection_model_zoo. The mAP values are taken as such from the original detection_model_zoo
- Input image size: (600, 1000, 3). This size is chosen because, The original Faster-RCNN paper resizes the images to this shape.
- GPU used: Nvidia GTX 1060 with 6GB memory
- CPU used: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
- RAM: 16 GB
- CPU 1: This is the unoptimzed version of tensorflow. Installed from
pip install tensorflow.
- CPU 2: This tensorflow binary is optimized with Intel® MKL-DNN. Installed from
conda install tensorflow. See this blog for more details.
- The script used for this study is time_study.py
Models trained on MS-COCO Dataset
|S.No||model_name||GPU time (ms)||CPU time 1 (ms)||CPU time 2 (ms)||mAP|
- The input image size will not affect the inference speed (until a certain range of input shapes). This is because, the resizing function is baked into the Tensorflow graph. The time taken for resizing should be insignificant compared to the other Ops's time. However, take this with a grain of salt as this is valid only until certain range of input shapes.
- Batching the input images doesn't seem to increase the inference performance. As in, the inference time is linear with the batch size. See this issue for more details