Abstract:In this paper, We research, rewrite, and invent image recognition, clustering, and machine learning algorithms with python to propose a closed-loop technology flow that investigates the autonomous clustering of massive Qing dynasty shrine components with convergent forms. This study can assist in clustering a vast amount of similar components, reduce manual intervention, and speed up the clustering process. The output is generalizable and can be extended to other similar projects. It also provides a reference for the application of computer technology in the virtual restoration of heritage buildings.