With the widespread application of proton exchange membrane fuel cells (PEMFCs), ensuring the safe and reliable operation of the PEMFCs is becoming more and more important. Timely diagnosis of fault types and the implementation of targeted interventions are crucial for addressing these challenges. In this study, a simulated PEMFC model is firstly introduced by using Fluent, and the effectiveness is validated through experiments involving membrane dry faults, water flooding faults, normal states, and unknown states. Then, a data-driven deep learning convolutional neural network, YOLOv5-CG-AS, is developed, which employs the EfficientViT network as the backbone, incorporating lightweight improvements through the proposed CG-AS attention layer. The results demonstrate that YOLOv5-CG-AS can automatically extract fault features from images for offline fault diagnosis and can perform real-time online diagnosis of multiple parameter curves of PEMFCs. Moreover, the experimental results have validated the feasibility and effectiveness of proposed method and shown the average precision mean Average Precision (mAP) of the trained model reaches 99.50%, superior than other conventional strategies. This has significant implications for advancing fault diagnosis methods, enhancing the reliability and durability of PEMFC systems, and promoting further development in the field.