One of the difficulties in high-precision recognition of low-quality, moist or surgically altered fingerprints for personal identification is that it is not easy. To solve the above problem, this paper puts forward a fingerprint recognition and evaluation method based on a Convolutional Neural Network (CNN). A model was constructed and trained based on the Sokoto Coventry Fingerprint (SOCOFing) dataset, and then the other two external benchmark datasets were used to evaluate its generalization performance. The methods of experiments were to test the basic performance, robustness, cross-dataset evaluation, etc. Grad-CAM was also used to show the attention distribution at different levels of features and determine the reasons for the drop in performance. As shown in the above results, although the model has reached an accuracy of over 96% on the clean data set, this value is as low as 61% in the presence of severe data degradation and is even lower after cross-dataset testing due to domain shift. Based on the above visualisation, it can be seen that the network relies too much on local texture features and is easily damaged by noise in these features. Therefore, many kinds of data augmentation methods have been introduced to address this problem. The new model is relatively strong and can be generalized to some extent if some parts fail.