PurposeTemplate matching is one of the most suitable choices for full six degrees of freedom pose estimation in many practical industrial applications. However, the increasing number of templates while dealing with a wide range of viewpoint changes results in a long runtime, which may not meet the real-time requirements. This paper aims to improve matching efficiency while maintaining sample resolution and matching accuracy.Design/methodology/approachA multi-pyramid-based hierarchical template matching strategy is proposed. Three pyramids are established at the sphere subdivision, radius and in-plane rotation levels during the offline template render stage. Then, a hierarchical template matching is performed from the highest to the lowest level in each pyramid, narrowing the global search space and expanding the local search space. The initial search parameters at the top level can be determined by the preprocessing of the YOLOv3 object detection network to further improve real-time performance.FindingsExperimental results show that this matching strategy takes only 100 ms under 100k templates without loss of accuracy, promising for real industrial applications. The authors further validated the approach by applying it to a real robot grasping task.Originality/valueThe matching framework in this paper improves the template matching efficiency by two orders of magnitude and is validated using a common template definition and viewpoint sampling methods. In addition, it can be easily adapted to other template definitions and viewpoint sampling methods.