The rapid development of computer technology has brought new opportunities for industrial design teaching. In order to improve the efficiency and quality of product form optimization in computer-aided industrial design teaching, this study constructs a product form optimization model based on ant colony algorithm. Methodologically, firstly, the perceptual engineering theory was used to determine the vocabulary of product target imagery, 21 gastrointestinal machine samples were classified into 6 categories through cluster analysis, an ant colony algorithm mathematical model containing pheromone updating and path selection probability was established, and the fitness function was designed to evaluate the value of perceptual imagery of the product morphology combinations. The results show that the total contribution of the gastrointestinal machine samples after clustering analysis reaches 98.32%, and the optimal product form design example combination adaptation degree obtained after the ant colony algorithm optimization search is 0.826, and the performance of the algorithm is significantly better than that of the genetic algorithm. In the satisfaction survey, 190 valid questionnaires show that 95.00% of users maintain a satisfactory attitude towards the product form optimization design scheme based on ACO algorithm. The conclusion shows that the ant colony algorithm can effectively solve the product morphology optimization problem, provide scientific method guidance for computer-aided industrial design teaching, and significantly improve the design efficiency and user satisfaction.