This paper proposes a 6-DoF measurement method for industrial parts with complex shape based on monocular vision. Offline template library building, image layering preprocessing and evolutionary optimization matching are studied. Firstly, a 3D model is created using the CAD file of the target part, and a matching template library of the target model with multiple pose information under different observation directions is established offline. This method of creating a matching model based on CAD files extends the matching algorithm to space 6-DOF pose detection for complex structural parts. Then the improved Chamfer Match method is used to process the image, and the distance map is layered by the edge inclination angle, so that the established matching degree function between the image and the template has higher sensitivity and the accuracy of the measurement result is improved. Finally, the evolutionary optimal search Genetic Algorithm is used to further improve the matching efficiency. We build a monocular vision measurement system to perform 6-DOF measurement experiments of two industrial parts with different structures, and also evaluate the dynamic tracking abilities. The results show that the position measurement error of this method is within 2mm, the attitude measurement error is about 3°, and the single measurement time is within 500ms. It basically meets the requirement of real-time tracking of dynamic targets.