The Siamese network architecture and Siamese-KNN classifier. (A) The Siamese network architecture, which was made up of two BP networks with identical architecture and weights. The inputs to this network are two samples, and the output is the distance between two input samples in target space. (B) The Siamese-KNN classifier used in this study. The subnetwork in the trained Siamese network and KNN classifier was cascaded as the final classifier. Abbreviation: KNN, K-nearest neighbor.