Cultural relic surface fingerprint extraction and analysis method based on FPGA
Through the FPGA development board and deep learning model, combined with comprehensive lighting and light matrix technology that minimizes shadows, the problem of insufficient accuracy and clarity in fingerprint extraction on the surface of the Terracotta Warriors and Horses is solved, and efficient and accurate fingerprint analysis and identification are achieved.
Patent Information
- Application Number
- CN202410915106.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-15
AI Technical Summary
Existing non-contact technology has insufficient accuracy and clarity when extracting fingerprints from the surface of the Terracotta Warriors and Horses, and cannot effectively identify and extract key information.
Using FPGA-based fingerprint extraction and analysis methods on the surface of cultural relics, images are collected through the FPGA development board, and convolutional neural networks are used for migration learning and deployment of deep learning models. The fingerprints are extracted and analyzed by combining comprehensive illumination and light matrix technology that minimizes shadows. feature.
Efficient data flow and real-time image processing are achieved, which improves the measurement efficiency and accuracy of fingerprints on the surface of the Terracotta Warriors and Horses, ensuring high-quality fingerprint image acquisition and accurate recording.
Smart Images

Figure CN118781601A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of cultural relics monitoring, and in particular relates to a method for extracting and analyzing cultural relics surface fingerprints based on FPGA. Background Art
[0002] During the restoration process of the Terracotta Warriors, archaeological experts discovered that some of the Terracotta Warriors had fingerprints left by craftsmen. As a treasure of ancient Chinese culture, the Terracotta Warriors have an immeasurable unique craftsmanship and historical value. Studying the fingerprints on the surface of the Terracotta Warriors can reveal the Qin Dynasty's pottery-making technology, the identity and system of craftsmen, provide historical evidence, optimize cultural relics protection measures, provide scientific research data, and promote traditional culture. It has extremely high historical, scientific and cultural value.
[0003] In the past few decades, the collection and comparison of fingerprints on the surface of the Terracotta Warriors mainly relied on manual contact methods, which easily caused irreversible damage to the surface of the Terracotta Warriors. The existing non-contact technology is not accurate enough and clear enough to capture subtle surface features, resulting in the inability to effectively identify and extract key information such as fingerprints. For example, the existing desktop equipment - the rapid acquisition and modeling device for the appearance of cultural relics, has high accuracy but is difficult to achieve efficient analysis and feedback on site, or the accuracy and clarity are not enough when capturing subtle surface features, resulting in the inability to effectively identify and extract key information such as fingerprints. Summary of the invention
[0004] The purpose of the present invention is to provide a method for extracting and analyzing fingerprints on the surface of cultural relics based on FPGA, which solves the problem that the non-contact technology in the prior art has insufficient accuracy and clarity when extracting fingerprints, resulting in the inability to effectively identify and extract key information such as fingerprints.
[0005] The technical solution adopted by the present invention is a method for extracting and analyzing the surface fingerprint of cultural relics based on FPGA, which is specifically implemented according to the following steps:
[0006] Step 1: Use an external camera on the FPGA development board to collect fingerprint images on the surface of cultural relics to form a fingerprint data set, and display the images on an external display screen;
[0007] Step 2: Use the public dataset to pre-train the deep learning model using the convolutional neural network, and then transfer the weights of the pre-trained model to the fingerprint dataset for learning;
[0008] Step 3: Deploy the deep learning model that has completed transfer learning on the FPGA development board to obtain the deployed model;
[0009] Step 4: The deployed model in step 3 extracts and analyzes the feature information of the fingerprint image collected in step 1, and the analysis result is displayed on the display screen.
[0010] The present invention is also characterized in that
[0011] Step 1 is implemented as follows:
[0012] Step 1.1, distribute three light sources in the form of an equilateral triangle around the fingerprint to be collected;
[0013] Step 1.2: Connect the FPGA development board to an external camera and ensure that the camera maintains a fixed distance and vertical angle with the surface of the cultural relic whose fingerprints are to be collected;
[0014] Step 1.3: The camera collects fingerprint images to form a fingerprint data set and displays the collected fingerprint images on the display screen.
[0015] If the collected fingerprint image does not meet the requirements in step 1.3, readjust the light source angle or camera position and take the image again.
[0016] Step 2 is implemented as follows:
[0017] Step 2.1, input the public dataset FVC2004 into the deep learning model using convolutional neural network for training;
[0018] Step 2.2, calculate the loss using the angle-weighted loss function;
[0019] Step 2.3, repeat the training until convergence to obtain the pre-trained model;
[0020] In step 2.4, transfer the weights of the pre-trained model to the fingerprint dataset.
[0021] Step 2.4 is implemented as follows:
[0022] Step 2.4.1, rotate, flip and scale the images in the fingerprint dataset to expand the samples;
[0023] Step 2.4.2, adjust the weight of the pre-trained model based on the fingerprint dataset expanded in step 2.4.1, as shown in the following formula:
[0024]
[0025] Where θ′ is the adjusted model weight, θ is the weight of the pre-trained model, η is the learning rate, and L is the loss function;
[0026] In step 2.4.3, learning rate decay and early stopping strategy are used to ensure the stability of the pre-trained model. The learning rate decay is shown in the following formula:
[0027]
[0028] Among them, η t is the learning rate of the tth round, η0 is the initial learning rate and decay is the decay rate.
[0029] Step 3 is implemented as follows:
[0030] Step 3.1, quantize the weights and activation values of the pre-trained model;
[0031] Step 3.2, convert the quantized pre-trained model into a binary file for FPGA execution;
[0032] In step 3.3, the binary file generated in step 3.2 is loaded onto the FPGA, the model parameters and operating environment are initialized, and the loaded model is optimized to obtain the deployed model.
[0033] The optimization in step 3.3 includes performance optimization and parallel computing optimization. Performance optimization is to optimize the calculation graph and data transmission path of the model; parallel computing optimization is as follows:
[0034]
[0035] Among them, T parallel is the parallel computing time, T serial is the single-line computation time, and N is the number of parallel computation units.
[0036] Step 4 is implemented according to the following steps:
[0037] Step 4.1, input the fingerprint image collected in step 1 into the deployed model based on the AXI bus and DMA controller;
[0038] Step 4.2, after deployment, the model extracts the fingerprint features and texture information in the fingerprint image to obtain a feature vector;
[0039] Step 4.3, calculate the Euclidean distance between two feature vectors. The calculation formula is as follows:
[0040]
[0041] Where d is the Euclidean distance, x i and i are the i-th components of the two eigenvectors, and n is the dimension of the eigenvector;
[0042] Step 4.4, set a threshold. If the calculated Euclidean distance is less than the preset threshold, the two fingerprint images are considered to match and are from the same finger; otherwise, they are considered to be mismatched.
[0043] Step 4.5, display the analysis result of step 4.4 on the display screen.
[0044] Step 4.2 is implemented as follows:
[0045] Step 4.2.1, deploy a convolution accelerator on the FPGA, perform convolution calculations on the fingerprint image data, and extract edge and texture features in the fingerprint image;
[0046] Step 4.2.2, by performing multi-layer convolution calculations on the extracted edge and texture features, two corresponding feature vectors are generated. The feature vectors contain the subtle structure and texture information of the fingerprint.
[0047] The threshold setting in step 4.4 is implemented according to the following steps:
[0048] Step 4.4.1, calculate the false positive rate FPR and true positive rate TPR, respectively Generate ROC curve parameters , as shown below:
[0049]
[0050] Among them, FP is the number of false positives, TN is the number of true negatives, TP is the number of true positives, and FN is the number of false negatives;
[0051] In step 4.4.2, the difference between the maximum true positive rate TPR and the maximum false positive rate FPR in the ROC curve parameters is used as the threshold, as shown in the following formula:
[0052]
[0053] Among them, θ is the threshold, TPR and FPR are the true positive rate and false positive rate when the threshold is θ, respectively.
[0054] The beneficial effects of the present invention are:
[0055] (1) The FPGA-based cultural relic surface fingerprint extraction and analysis method of the present invention adopts a light matrix technology with comprehensive illumination and shadow minimization, which enhances detail capture, realizes efficient data flow and real-time image processing, and ensures the acquisition and accurate recording of high-quality terracotta warrior surface fingerprint images; at the same time, it combines FPGA (field programmable gate array) and deep learning models, and utilizes the programmability and real-time data processing capabilities of FPGA to greatly improve the measurement efficiency and accuracy of cultural relic surface fingerprints.
[0056] (2) The FPGA-based cultural relic surface fingerprint extraction and analysis method of the present invention adds an angle weighting term to the Softmax loss function, making the distribution of feature vectors in high-dimensional space more uniform, thereby improving the discrimination ability of the deep learning model. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart of the method for extracting and analyzing the surface fingerprint of cultural relics based on FPGA of the present invention;
[0058] Figure 2 It is a schematic diagram of the framework of the deep learning model in the present invention. DETAILED DESCRIPTION
[0059] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] The present invention combines FPGA with high-precision fingerprint acquisition technology as a highly flexible and programmable hardware platform. It utilizes the programmability and real-time data processing capabilities of FPGA to greatly improve the measurement efficiency and accuracy of Terracotta Warriors fingerprints. The main application of deep learning in the surface fingerprint acquisition of cultural relics today is concentrated in the two links of feature extraction and matching. First, a large number of fingerprint images are collected and preprocessed, and then a suitable deep learning model architecture, such as convolutional neural network CNN, is selected. Next, the model is trained using training data so that the model can extract useful features from the input fingerprint image and classify or match it. After the training is completed, the model performance is evaluated using the validation set and tuned according to the results. Finally, the test set is used for the final evaluation and the model is deployed in practical applications. Throughout the process, the quality and diversity of the data, the model architecture and the selection of hyperparameters are crucial to the performance of the model. Through continuous experiments and adjustments, an accurate and efficient fingerprint recognition model can be obtained. CNN can learn complex features from the original fingerprint image, thereby improving the accuracy and efficiency of recognition.
[0061] Example 1
[0062] The present invention is based on FPGA cultural relics surface fingerprint extraction and analysis method, such as Figure 1 As shown, the specific implementation steps are as follows:
[0063] Step 1: Use an FPGA development board with ALINX Xilinx Zynq UltraScale+MPSoC AXU3EGB as the core board to connect an external high-resolution camera to collect fingerprint images on the surface of cultural relics, form a fingerprint data set, and display the images on an external display screen;
[0064] Step 1 is implemented as follows:
[0065] Step 1.1, distribute three light sources in an equilateral triangle around the fingerprint to be collected; this light source configuration can minimize shadows and reflections, improve image uniformity and detail performance. The selection of light source angles is based on the principle of illumination uniformity. Through the multi-angle incidence of light, the shadows caused by the uneven surface can be reduced, ensuring that every detail on the surface of the cultural relic is fully illuminated.
[0066] Step 1.2, connect the FPGA development board to an external high-resolution camera, and ensure that the camera maintains a fixed distance and vertical angle with the surface of the artifact whose fingerprints are to be collected; the benefit of vertical alignment is to reduce image distortion and perspective error, ensuring that the captured image has true geometric proportions and high detail fidelity. The camera can be fixed using a professional camera stand or fixture to ensure that it does not move or shake during shooting.
[0067] Step 1.3, the camera collects fingerprint images, forms a fingerprint data set, and displays the collected fingerprint images on the display screen. The captured high-resolution fingerprint image is displayed in real time through the display screen connected to the FPGA development board, and the user can immediately check the image quality. If the collected fingerprint image does not meet the requirements, readjust the light source angle or camera position, and repeat the shooting process until a satisfactory image is obtained. The real-time display function relies on the fast image processing capability of the FPGA and the high-bandwidth data transmission interface to ensure that users can see the image effect immediately.
[0068] Step 2: Use the public dataset to pre-train the deep learning model using the convolutional neural network, and then transfer the weights of the pre-trained model to the fingerprint dataset for learning;
[0069] like Figure 2 As shown, the deep learning model used in the present invention is used to extract and analyze the surface fingerprints of the Terracotta Warriors. The network structure is designed for efficient feature extraction and recognition tasks and includes multiple important modules.
[0070] Input layer:
[0071] The input layer receives the preprocessed fingerprint image and passes it to the first stage for feature extraction.
[0072] Stage 1:
[0073] In the first stage, the image is subjected to preliminary feature extraction through convolutional layers, batch normalization (BatchNorm) and ReLU activation functions. This stage mainly extracts low-level features of the image, such as edges and basic textures.
[0074] Stage 2:
[0075] The second stage further processes the features extracted from the first stage. Through deeper convolutional layer structures, the network is able to capture higher-level features such as complex textures and shapes.
[0076] Stage 3:
[0077] The third stage combines depthwise separable convolution and attention mechanism. Depthwise separable convolution reduces the amount of computation and improves computational efficiency by decomposing standard convolution operations. The attention mechanism further enhances the network's focus on key features.
[0078] Residual Block:
[0079] Between stages, residual blocks are used to alleviate the gradient vanishing problem and ensure that deep networks can be effectively trained. Residual blocks introduce skip connections to add the input directly to the output, improving the stability and effectiveness of training.
[0080] Channel Attention Module:
[0081] The channel attention module calculates the importance of each channel and generates attention weights through channel max pooling (Channel Maxpool) and channel average pooling (ChannelAvgpool). The attention mechanism enhances the focus on important features and improves the accuracy of feature extraction.
[0082] Linear layer:
[0083] Finally, the feature vector processed by multi-layer convolution and attention mechanism is input into the fully connected layer (Linear) for the final classification or regression task. The fully connected layer maps the high-dimensional features to the output space and generates the final recognition result.
[0084] Output layer:
[0085] The output layer generates the final fingerprint recognition results, including visualization and classification data of fingerprint features.
[0086] In practical applications, the above deep learning model using convolutional neural networks combines efficient convolution operations, attention mechanisms, and residual connections to achieve efficient fingerprint feature extraction and analysis. By deploying this network structure on FPGA, the real-time and accuracy of fingerprint recognition can be significantly improved, providing strong technical support for the non-destructive detection and analysis of fingerprints on the surface of the Terracotta Warriors.
[0087] Step 3: Deploy the deep learning model that has completed transfer learning on the FPGA development board to obtain the deployed model;
[0088] Step 4: The deployed model in step 3 extracts and analyzes the feature information of the fingerprint image collected in step 1, and the analysis result is displayed on the display screen.
[0089] Step 4 is implemented according to the following steps:
[0090] Step 4.1, input the fingerprint image collected in step 1 into the deployed model based on the AXI bus and DMA controller; achieve efficient data transmission to ensure that the image data can quickly reach the FPGA for processing. The clock management module in the data transmission process ensures the synchronization and continuity of data transmission, avoiding delays and losses in data transmission.
[0091] Step 4.2, after deployment, the model extracts the fingerprint features and texture information in the fingerprint image to obtain a feature vector;
[0092] Step 4.2 is implemented as follows:
[0093] Step 4.2.1, deploy a convolution accelerator on the FPGA, perform convolution calculations on the fingerprint image data, and extract edge and texture features in the fingerprint image. The convolution calculation formula is shown below:
[0094]
[0095] Where I is the input image, K is the convolution kernel, (x, y) is a pixel in the image, and m and n are the width and height of the convolution kernel, respectively.
[0096] Step 4.2.2, by performing multi-layer convolution calculations on the extracted edge and texture features, two corresponding feature vectors are generated. The feature vectors contain the subtle structure and texture information of the fingerprint.
[0097] Utilize the hardware optimization capabilities of FPGA to reduce data transmission delay and calculation delay. Use pipeline processing technology to process data simultaneously at different processing stages, further improving data processing efficiency.
[0098] Step 4.3, calculate the Euclidean distance between two feature vectors. The calculation formula is as follows:
[0099]
[0100] Where d is the Euclidean distance, x i and i are the i-th components of the two eigenvectors, and n is the dimension of the eigenvector.
[0101] Step 4.4, set a threshold. If the calculated Euclidean distance is less than the preset threshold, the two fingerprint images are considered to match and are from the same finger; otherwise, they are considered to be mismatched.
[0102] Furthermore, the threshold value in step 4.4 is set in accordance with the following steps:
[0103] Step 4.4.1, calculate the false positive rate FPR and true positive rate TPR of the model deployed on the FPGA development board, and generate the ROC curve parameters respectively, as shown in the following formula:
[0104]
[0105] Among them, FP is the number of false positives, TN is the number of true negatives, TP is the number of true positives, and FN is the number of false negatives.
[0106] In step 4.4.2, the difference between the maximum true positive rate TPR and the maximum false positive rate FPR in the ROC curve parameters is used as the threshold, as shown in the following formula:
[0107]
[0108] Among them, θ is the threshold, TPR and FPR are the true positive rate and false positive rate when the threshold is θ, respectively.
[0109] Step 4.5, display the analysis result of step 4.4 on the display screen.
[0110] After the analysis results are generated, the high-speed data transmission interface is used to transmit the analysis results generated by the FPGA to the display system interface. The high efficiency of data transmission ensures the real-time display of the analysis results. The display system interface renders the received analysis results and displays them on an external display screen. The interface display includes visual images and classification labels of fingerprint features, and users can interact with the interface through a touch screen or other input devices.
[0111] At the same time, the analysis and matching results are stored, including the visualization data of the fingerprint features, the Euclidean distance calculation value and the matching judgment result. The stored data format can be a JSON file.
[0112] Example 2
[0113] On the basis of Example 1, step 2 of the FPGA-based cultural relic surface fingerprint extraction and analysis method of the present invention is specifically implemented according to the following steps:
[0114] Step 2.1, input the large-scale public dataset FVC2004 into the deep learning model using convolutional neural network for training;
[0115] The fingerprint images in the FVC2004 dataset are preprocessed, including image resizing, grayscale, denoising and normalization. Rotation, flipping and cropping are used to increase the diversity of training data and improve the generalization ability of the model.
[0116] The preprocessed FVC2004 dataset is input into the designed convolutional neural network for multiple rounds of iterative training. In each round of iteration, the model calculates the prediction results through forward propagation and updates the model parameters through back propagation to minimize the loss function.
[0117] Use cross-validation to evaluate the performance of the model on the validation set and adjust hyperparameters such as learning rate and batch size to optimize model performance.
[0118] Step 2.2, use the angle-weighted loss function to calculate the loss. The loss function is shown as follows:
[0119]
[0120] Where N is the energy size, C is the number of categories, s is the scaling factor, m is the angle glue weighting term, and θ y is the true category angle of sample i, θ j is the other category angle of sample i.
[0121] Step 2.3, repeat the training until convergence to obtain the pre-trained model;
[0122] Step 2.4, transfer learning of the weights of the pre-trained model on the fingerprint dataset;
[0123] Step 2.4 is implemented in the following steps to adapt the model to specific fingerprint recognition tasks and improve its feature extraction ability and recognition accuracy on new datasets:
[0124] Step 2.4.1, rotate, flip and scale the images in the fingerprint dataset to expand the samples, increase the diversity of the data and improve the robustness of the model;
[0125] Step 2.4.2, based on the fingerprint dataset expanded in step 2.4.1, adjust the weights of the pre-trained model to adapt to the new data and tasks. Transfer learning optimizes specific layers of the model, including convolutional layers, fully connected layers, and feature extraction layers, so that it can better recognize fingerprint features, as shown in the following formula:
[0126]
[0127] Where θ′ is the adjusted model weight, θ is the weight of the pre-trained model, η is the learning rate, and L is the loss function.
[0128] Convolutional layers can effectively extract low-level features of images such as edges and textures through local connections and weight sharing mechanisms. In transfer learning, these layers can retain the features learned during pre-training, but can be fine-tuned to adapt to the characteristics of the new task.
[0129] The feature extraction layer is located in the middle part of the model and is responsible for extracting higher-level image features. Fine-tuning these layers can make the model better adapt to the characteristics of new data.
[0130] The fully connected layer is located at the end of the model and maps the extracted features to the classification space. As shown in the following formula:
[0131] y=Wx+b;
[0132] Among them, y is the output, W is the weight matrix, x is the input feature, and b is the bias.
[0133] In step 2.4.3, learning rate decay and early stopping strategies are used to ensure the stability of the pre-trained model. Learning rate decay gradually reduces the learning rate, making the adjustment of model parameters smoother in the later stage of training, thereby improving the stability of the model. The learning rate decay formula is as follows:
[0134]
[0135] Among them, η t is the learning rate of the tth round, η 0 is the initial learning rate and decay is the decay rate.
[0136] The implementation steps of the early stopping strategy are as follows:
[0137] S1. Set monitoring indicators: Select the loss value on the validation set as the monitoring indicator.
[0138] S2. Set the patience value: The patience value refers to the number of consecutive rounds in which the performance indicator on the validation set does not improve. Set the patience value to 10. If the performance on the validation set does not improve within 10 consecutive rounds, stop training.
[0139] S3. Monitor validation set performance: After each round of training, calculate the monitoring indicators on the validation set and compare them with the historical best indicators.
[0140] S4. Trigger early stopping: If the monitoring indicator does not improve within the patience value range, early stopping is triggered and the training is terminated.
[0141] Through transfer learning, the model can more effectively extract and identify subtle fingerprint features on new fingerprint datasets, preparing for subsequent model conversion and FPGA deployment.
[0142] Example 3
[0143] On the basis of Example 1, step 3 of the FPGA-based cultural relic surface fingerprint extraction and analysis method of the present invention is specifically implemented according to the following steps:
[0144] Step 3.1, quantize the weights and activation values of the pre-trained model; weight quantization is to map floating-point weights to fixed-point representation. Linearly scale the weights. As shown in the following formula, the representation range of 8-bit fixed-point numbers is (0, 255);
[0145]
[0146] Among them, w int8 is the quantized fixed-point weight, w fp32 is a floating point weight.
[0147] Activation value quantization maps floating-point activation values to fixed-point representations using a linear scaling method.
[0148] Step 3.2, convert the quantized pre-trained model into a binary file for FPGA execution;
[0149] Specifically, it is first converted into an FPGA-specific intermediate representation IR, and then further converted into an FPGA executable binary file, as shown in the following formula:
[0150] Intermediate Representation (IR): IR = Converter (Quantized Model);
[0151] Binary file: Binary = Compiler (IR).
[0152] Step 3.3, load the binary file generated in step 3.2 onto the FPGA, initialize the model parameters and operating environment, ensure that the model can be correctly loaded and run on the FPGA; and optimize the loaded model to obtain the deployed model.
[0153] The optimization in step 3.3 includes performance optimization and parallel computing optimization. Performance optimization is to optimize the calculation graph and data transmission path of the model.
[0154] The calculation graph of the optimization model is:
[0155] Computational graph optimization: Reduce redundant calculations and improve computing efficiency by rearranging and fusing the computational graphs. Combine multiple convolutional layer operations into one operation to reduce the storage and reading times of intermediate data.
[0156] Operation fusion: Fusion of continuous operator operations, convolution and batch normalization operations, to reduce computational overhead.
[0157] The optimized data transmission path is:
[0158] Data prefetching and buffering: During the calculation process, the required data is prefetched in advance and the data is temporarily stored in a buffer to reduce data transmission delays.
[0159] Reduce memory access: By optimizing the memory access pattern, the number of accesses to the DDR memory is reduced, and data transmission efficiency is improved. Frequently used data is stored in on-chip memory to reduce data transmission time.
[0160] Double buffering mechanism: With the double buffering mechanism, while one buffer is processing data, the other buffer pre-fetches the next batch of data, improving the continuity and efficiency of data processing.
[0161] Parallel computing optimization is shown in the following formula:
[0162]
[0163] Among them, T parallel is the parallel computing time, T serial is the single-line computation time, and N is the number of parallel computation units.
[0164] Parallel convolution calculation: multiple channels of the convolution kernel are calculated simultaneously, and each channel processes a part of the image independently, improving the parallelism of the calculation.
[0165] Multi-core parallel processing: Multiple computing cores are configured on the FPGA, and each core performs computing tasks independently without interfering with each other. For example, multiple convolution kernels are used to process different areas of an image in parallel to increase computing speed.
Claims
1. A method for extracting and analyzing fingerprints on the surface of cultural relics based on FPGA, characterized in that: Follow the steps below to implement it: Step 1: Use an external camera on the FPGA development board to collect fingerprint images on the surface of cultural relics to form a fingerprint data set, and display the images on an external display screen; Step 2: Use the public dataset to pre-train the deep learning model using the convolutional neural network, and then transfer the weights of the pre-trained model to the fingerprint dataset for learning; Step 3: Deploy the deep learning model that has completed transfer learning on the FPGA development board to obtain the deployed model; Step 4: The deployed model in step 3 extracts and analyzes the feature information of the fingerprint image collected in step 1, and the analysis result is displayed on the display screen.
2. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 1, characterized in that: The step 1 is specifically implemented according to the following steps: Step 1.1, distribute three light sources in the form of an equilateral triangle around the fingerprint to be collected; Step 1.2: Connect the FPGA development board to an external camera and ensure that the camera maintains a fixed distance and vertical angle with the surface of the cultural relic whose fingerprints are to be collected; Step 1.3: The camera collects fingerprint images to form a fingerprint data set and displays the collected fingerprint images on the display screen.
3. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 2, characterized in that: If the collected fingerprint image does not meet the requirements in step 1.3, the light source angle or camera position is readjusted and the image is taken again.
4. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 1, characterized in that: The step 2 is specifically implemented according to the following steps: Step 2.1, input the public dataset FVC2004 into the deep learning model using convolutional neural network for training; Step 2.2, calculate the loss using the angle-weighted loss function; Step 2.3, repeat the training until convergence to obtain the pre-trained model; In step 2.4, transfer learning of the weights of the pre-trained model to the fingerprint dataset.
5. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 4, characterized in that: The step 2.4 is specifically implemented according to the following steps: Step 2.4.1, rotate, flip and scale the images in the fingerprint dataset to expand the samples; Step 2.4.2, adjust the weight of the pre-trained model based on the fingerprint dataset expanded in step 2.4.1, as shown in the following formula: Among them, θ ′ is the adjusted model weight, θ is the weight of the pre-trained model, η is the learning rate, and L is the loss function; In step 2.4.3, learning rate decay and early stopping strategy are used to ensure the stability of the pre-trained model. The learning rate decay is shown in the following formula: Among them, η t is the learning rate of the tth round, η0 is the initial learning rate, and decay is the decay rate.
6. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 1, characterized in that: The step 3 is specifically implemented according to the following steps: Step 3.1, quantize the weights and activation values of the pre-trained model; Step 3.2, convert the quantized pre-trained model into a binary file for FPGA execution; In step 3.3, the binary file generated in step 3.2 is loaded onto the FPGA, the model parameters and operating environment are initialized, and the loaded model is optimized to obtain the deployed model.
7. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 6, characterized in that: The optimization in step 3.3 includes performance optimization and parallel computing optimization. The performance optimization is Optimize the model's computational graph and data Transmission Path ; The parallel computing optimization is shown in the following formula: Among them, T parallel is the parallel computing time, T serial is the single-line computation time, and N is the number of parallel computation units.
8. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 1, characterized in that: The step 4 is specifically implemented according to the following steps: Step 4.1, input the fingerprint image collected in step 1 into the deployed model based on the AXI bus and DMA controller; Step 4.2, after deployment, the model extracts the fingerprint features and texture information in the fingerprint image to obtain a feature vector; Step 4.3, calculate the Euclidean distance between two feature vectors. The calculation formula is as follows: Where d is the Euclidean distance, x i and i are the i-th components of the two eigenvectors, and n is the dimension of the eigenvector; Step 4.4, set a threshold. If the calculated Euclidean distance is less than the preset threshold, the two fingerprint images are considered to match and are from the same finger; otherwise, they are considered to be mismatched. Step 4.5, display the analysis result of step 4.4 on the display screen.
9. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 8, characterized in that: The step 4.2 is specifically implemented according to the following steps: Step 4.2.1, deploy a convolution accelerator on the FPGA, perform convolution calculations on the fingerprint image data, and extract edge and texture features in the fingerprint image; Step 4.2.2, by performing multi-layer convolution calculations on the extracted edge and texture features, two corresponding feature vectors are generated. The feature vectors contain the subtle structure and texture information of the fingerprint.
10. The method for extracting and analyzing cultural relics surface fingerprints based on FPGA according to claim 8, characterized in that: The threshold setting in step 4.4 is specifically implemented according to the following steps: Step 4.4.1, calculate the false positive rate FPR and true positive rate TPR, respectively Generate ROC curve parameters , as shown below: Among them, FP is the number of false positives, TN is the number of true negatives, TP is the number of true positives, and FN is the number of false negatives; In step 4.4.2, the difference between the maximum true positive rate TPR and the maximum false positive rate FPR in the ROC curve parameters is used as the threshold, as shown in the following formula: Among them, θ is the threshold, TPR and FPR are the true positive rate and false positive rate when the threshold is θ, respectively.
