The facility-based production method is an important stage in the development of modern agriculture, lifting natural light and temperature restrictions and helping to improve agricultural production efficiency. To address the problems of difficulty and low accuracy in detecting pests and diseases in the dense production environment of tomato facilities, an online diagnosis platform for tomato plant diseases based on deep learning and cluster fusion was proposed by collecting images of eight major prevalent pests and diseases during the growing period of tomatoes in a facility-based environment. The diagnostic platform consists of three main parts: pest and disease information detection, clustering and decision-making of detection results, and platform diagnostic display. Firstly, based on the You Only Look Once (YOLO) algorithm, the key information of the disease was extracted by adding attention module (CBAM), multi-scale feature fusion was performed using weighted bidirectional feature pyramid network (BiFPN), and the overall construction was designed to be compressed and lightweight; Secondly, the k-means clustering algorithm is used to fuse with the deep learning results to output pest identification decision values to further improve the accuracy of identification applications; Finally, a detection platform was designed and developed using Python, including the front-end, back-end, and database of the system to realize online diagnosis and interaction of tomato plant pests and diseases. The experiment shows that the algorithm detects tomato plant diseases and insect pests with mAP (mean Average Precision) of 92.7%, weights of 12.8 Megabyte (M), inference time of 33.6 ms. Compared with the current mainstream single-stage detection series algorithms, the improved algorithm model has achieved better performance; The accuracy rate of the platform diagnosis output pests and diseases information of 91.2% for images and 95.2% for videos. It is a great significance to tomato pest control research and the development of smart agriculture.