In vivo confocal microscopy(IVCM) is a real-time in vivo high-resolution and non-invasive imaging method that allows observation of morphological changes in the lid gland at the cellular level. We use IVCM to observe the meibomian glands and divide the 12,630 pictures obtained into six groups (normal group, normal with meibomian gland opening group, meibomian gland atrophy group, meibomian gland atrophy with obstruction group, meibomian gland obstruction group and meibomian gland obstruction with opening group), randomly select 70% of the pictures and use the ResNet34 deep learning network model for training, and use the remaining 30% of the pictures and another 12889 pictures collected from the top three hospitals as internal and external validation sets to verify the performance of the model. The results show that the model validation set recognition constructed using the deep learning method has achieved good performance, and the obtained AUROCs are all greater than 0.95. This model provides the possibility for future automatic classification and diagnosis of meibomian gland dysfuncton(MGD),and can be used for MGD related clinical auxiliary diagnosis and screening of diseases.