With the vigorous development of large-scale photovoltaic power plants, the demand and requirements for defect inspection of photovoltaic power plant modules are also increasing. At present, manual inspection is inefficient, costly and insecure. The inspection method combined with UAV and thermal imaging technology has high efficiency, low cost and less safety risk, which is an effective means to realize unmanned operation and maintenance of photovoltaic power plants. Combined with the image recognition technology of artificial intelligence, this paper designed an inspection and classification system based on UAV. Firstly, this paper summarized the corresponding relationship between the thermal image characteristics and the common defects of photovoltaic modules, and established a knowledge base of photovoltaic module defects based on image features. Then, an automatic image recognition algorithm model of photovoltaic modules based on YOLOV5 is built. Finally, based on the UAV and thermal camera, an inspection and classification system is built for testing and verification. The system collects thermal images of photovoltaic modules by UAV, and then distinguishes thermal anomalies of different shapes by AI automatic identification technology. The defects such as shelter, smudge, bypass diode damage, open circuit and short circuit are identified, and the treatment measures are given. On the basis of ensuring the recognition accuracy, the system greatly improves the efficiency of photovoltaic module detection, and has been successfully applied in a photovoltaic power plant.