To address the challenges of scarce labeled samples, strong instantaneity, and variable morphology in lightning optical classification—issues that traditional methods struggle to handle efficiently and often require extensive manual intervention—we propose a frame difference triplet network (FD-TripletNet) tailored for few-shot lightning recognition. The lightning optical dataset used in this study was collected from two observation stations over six months, comprising 459 video samples that include lightning events with diverse morphologies (e.g., branched, spherical) and non-lightning events prone to misclassification (e.g., strong light interference, moving objects). Considering the critical feature of lightning—abrupt single-frame changes—we introduce adjacent frame difference matrices as model input to explicitly capture transient brightness variations, reducing noise from static backgrounds. To enhance discriminative ability in few-shot scenarios, the model leverages Triplet Loss to compact intra-class features and separate inter-class features, combined with a dynamic sample matching strategy to focus on challenging cases. The experimental results show that FD-TripletNet achieves a classification accuracy of 94.8% on the dataset, outperforming traditional methods and baseline deep learning models. It effectively reduces the False Negative Rate (FNR) to 3.2% and False Positive Rate (FPR) to 7.4%, successfully distinguishing between lightning and non-lightning events, thus providing an efficient solution for real-time lightning monitoring in meteorological applications.
Xiao et al. (Fri,) studied this question.