False express sheet identification method, apparatus and device, and storage medium
By building a false sign-in detection model based on DenseNet and using weighted cross-entropy loss function optimization, the problem of couriers impersonating sign-in is solved, and efficient identification of false sign-in is achieved, reducing manual review costs and improving logistics management efficiency.
Patent Information
- Application Number
- CN202510227055.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-07-01
AI Technical Summary
The existing technology is difficult to effectively identify and prevent couriers from impersonating signing by taking photos, which has affected the operation and management of logistics companies and financial settlement.
A false sign-in detection model based on DenseNet is adopted, and a weighted cross entropy loss function optimization model is built by obtaining signed image samples, classification, annotation and preprocessing, and a weighted cross entropy loss function optimization model is used to detect false sign-in behavior in signed image in real time.
It improves the efficiency of identifying false signing and receipts, reduces the dependence on manual review, reduces labor costs and audit work intensity, and improves the efficiency of logistics signing and receipt management.
Smart Images

Figure CN120236293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics management technology, and in particular to a false waybill identification method, device, equipment and storage medium. Background Art
[0002] In the logistics industry, express delivery signing is a key node in the entire express service process. It is not only the final confirmation link of package delivery, but also an important sign of the completion of logistics services. Accurate recording of signing information is of great significance to the operation management, customer service and financial settlement of logistics companies. However, with the rapid development of the logistics industry, some couriers may take improper means to complete the signing operation in pursuit of efficiency or to cope with assessment pressure. One of the common ways is to pretend to sign by taking photos of packages or waybills in mobile phones or computers. This behavior not only violates professional ethics, but also seriously interferes with the normal operation of logistics companies. The traditional signing detection method mainly relies on manual review, that is, the staff of the express company checks the signing information submitted by the courier one by one. However, this method seems to be unable to cope with the growing logistics business volume and complex signing violations. It can be seen that the existing technology still needs to be improved and improved. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a method, device, equipment and storage medium for identifying false delivery bills, aiming to improve the efficiency of identifying false signed delivery bills.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The first aspect of the present invention provides a method for identifying false receipts, comprising the following steps: obtaining a receipt image sample, classifying the receipt image sample to obtain data samples of multiple categories, and constructing training samples based on the data samples of multiple categories; building a basic model based on DenseNet, using a weighted cross entropy loss function, and optimizing the basic model according to the data amount of data samples of different categories; preprocessing the training samples, and using the preprocessed training samples to train the basic model to obtain a false receipt detection model; obtaining a real-time receipt image, and using the false receipt detection model to detect the real-time receipt image to obtain a detection result.
[0006] Optionally, in the first implementation manner of the first aspect of the present invention, the obtaining of the signed receipt picture samples, classifying the signed receipt picture samples to obtain data samples of multiple categories, and constructing training samples according to the data samples of multiple categories specifically includes: obtaining the signed receipt picture samples, classifying the signed receipt picture samples to obtain data samples of multiple categories, where the categories of the data samples include directly taken signed receipt pictures and indirectly taken signed receipt pictures, and the indirectly taken signed receipt pictures include the signed receipt pictures in the mobile phone taken by the mobile phone and the signed receipt pictures in the computer taken by the mobile phone; labeling the directly taken signed receipt pictures, and the content of the labeling includes the shooting time, location, and shooting device type; labeling the indirectly taken signed receipt pictures, and the content of the labeling includes the shooting time, location, shooting device type, screen resolution, operating system type, and application name.
[0007] Optionally, in the second implementation manner of the first aspect of the present invention, the building of the basic model based on DenseNet, using the weighted cross-entropy loss function, and optimizing the basic model according to the data volume of data samples of different categories specifically includes: building the basic model based on DenseNet and setting the parameters of the basic model; calculating the weights of data samples of each category according to the data volume of data samples of different categories, and regularizing the weights of data samples of each category to obtain sample weight data; using the weighted cross-entropy loss function, calculating the cross-entropy loss in combination with the sample weight data, and optimizing the basic model according to the cross-entropy loss.
[0008] Optionally, in the third implementation manner of the first aspect of the present invention, the building of the basic model based on DenseNet and setting the parameters of the basic model specifically includes: setting the input layer parameters of DenseNet to adjust the input image size; setting a cascaded combination of three 3×3 convolutional layers, and the stride of the three convolutional layers is set to [1×2], [1×2], [1×1] in sequence, and a channel composed of two 3×3 convolutional layers is set in parallel; inserting a channel attention mechanism to obtain the basic model based on DenseNet and setting the parameters of the basic model.
[0009] Optionally, in the fourth implementation manner of the first aspect of the present invention, the preprocessing of the training samples, using the preprocessed training samples to train the basic model to obtain a false signature detection model specifically includes: preprocessing the training samples, and the preprocessing includes data augmentation of the signed receipt picture samples in the training samples, and the operations of the data augmentation include random rotation, translation, flipping, and cropping; inputting the preprocessed training samples into the RetinaNet network in batches and setting the size of each batch of data to train the basic model; adjusting the parameters of the basic model according to the training results to obtain a false signature detection model.
[0010] Optionally, in the fifth implementation manner of the first aspect of the present invention, for obtaining the real-time signature receipt image, a false signature receipt detection model is used to detect the real-time signature receipt image to obtain a detection result, which specifically includes: obtaining the real-time signature receipt image, performing size adjustment and normalization processing on the real-time signature receipt image; using the false signature receipt detection model to detect the real-time signature receipt image to obtain a detection result; if the detection result is a false signature receipt, marking the real-time signature receipt image and extracting information related to the real-time signature receipt image; outputting the detection result of the false signature receipt to obtain a review result.
[0011] Optionally, in the sixth implementation manner of the first aspect of the present invention, for outputting the detection result of the false signature receipt to obtain a review result, it specifically includes: outputting the detection result of the false signature receipt to obtain a review result; if the review result is incorrect, adding the incorrect detection result to the training sample to adjust the false signature receipt detection model; if the review result is correct, generating a warning message according to the review result and outputting the warning message to the administrator terminal.
[0012] The second aspect of the present invention provides a false waybill identification device, including:
[0013] A sample construction module, configured to obtain signature receipt picture samples, classify the signature receipt picture samples to obtain data samples of multiple categories, and construct training samples according to the data samples of multiple categories;
[0014] A model building module, configured to build a basic model based on DenseNet, adopt a weighted cross-entropy loss function, and optimize the basic model according to the data volume of data samples of different categories;
[0015] A training module, configured to preprocess the training samples, and use the preprocessed training samples to train the basic model to obtain a false signature receipt detection model;
[0016] A detection module, configured to obtain a real-time signature receipt image, and use the false signature receipt detection model to detect the real-time signature receipt image to obtain a detection result.
[0017] Optionally, in the first implementation manner of the second aspect of the present invention, the sample construction module includes:
[0018] A classification unit, configured to obtain signature receipt picture samples, classify the signature receipt picture samples to obtain data samples of multiple categories, the categories of the data samples include directly photographed signature receipt pictures and indirectly photographed signature receipt pictures, and the indirectly photographed signature receipt pictures include signature receipt pictures photographed by a mobile phone in the mobile phone and signature receipt pictures photographed by a mobile phone in a computer;
[0019] The first annotation unit is used to annotate the directly captured signature pictures, and the annotation content includes the shooting time, location, and shooting device type;
[0020] The second annotation unit is used to annotate the indirectly captured signature pictures, and the annotation content includes the shooting time, location, shooting device type, screen resolution, operating system type, and application name.
[0021] Optionally, in the second implementation manner of the second aspect of the present invention, the model building module includes:
[0022] The building sub-module is used to build a basic model based on DenseNet and set the parameters of the basic model;
[0023] The first calculation sub-module is used to calculate the weights of each category of data samples according to the data volume of different category data samples, regularize the weights of each category of data samples, and obtain sample weight data;
[0024] The second calculation sub-module is used to adopt a weighted cross-entropy loss function, calculate the cross-entropy loss in combination with the sample weight data, and optimize the basic model according to the cross-entropy loss.
[0025] Optionally, in the third implementation manner of the second aspect of the present invention, the building sub-module includes:
[0026] The first setting unit is used to set the input layer parameters of DenseNet to adjust the input image size;
[0027] The second setting unit is used to set the cascaded combination of three 3×3 convolutional layers, and the stride of the three convolutional layers is set to [1×2], [1×2], [1×1] in sequence, and a channel composed of two 3×3 convolutional layers is set in parallel;
[0028] The insertion unit is used to insert a channel attention mechanism to obtain a basic model based on DenseNet and set the parameters of the basic model.
[0029] Optionally, in the fourth implementation manner of the second aspect of the present invention, the training module includes:
[0030] The preprocessing unit is used to preprocess the training samples. The preprocessing includes data augmentation of the signature picture samples in the training samples, and the operations of the data augmentation include random rotation, translation, flipping, and cropping;
[0031] The input unit is used to batch input the preprocessed training samples into the RetinaNet network and set the size of each batch of data to train the basic model;
[0032] An adjustment unit for adjusting the parameters of the basic model according to the training results to obtain a false signature detection model.
[0033] Optionally, in the fifth implementation manner of the second aspect of the present invention, the detection module includes:
[0034] A processing sub-module for obtaining a real-time signature image and performing size adjustment and normalization processing on the real-time signature image;
[0035] A detection sub-module for detecting the real-time signature image using the false signature detection model to obtain a detection result;
[0036] A marking sub-module for marking the real-time signature image and extracting information related to the real-time signature image if the detection result is a false signature;
[0037] An output sub-module for outputting the detection result of the false signature to obtain a review result.
[0038] Optionally, in the fifth implementation manner of the second aspect of the present invention, the output sub-module includes:
[0039] A result output unit for outputting the detection result of the false signature to obtain a review result;
[0040] A model optimization unit for adding the incorrect detection result to the training sample to adjust the false signature detection model if the review result is incorrect;
[0041] A generation unit for generating a warning message according to the review result and outputting the warning message to the administrator terminal if the review result is correct.
[0042] The third aspect of the present invention provides a false waybill recognition device, including a memory and at least one processor, wherein computer-readable instructions are stored in the memory; the at least one processor calls the computer-readable instructions in the memory to execute each step of the false waybill recognition method as described above.
[0043] The fourth aspect of the present invention provides a computer-readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, each step of the false waybill recognition method as described above is implemented.
[0044] Beneficial effects: The present invention provides a method for identifying false waybills. The false waybill identification method first obtains a sample of signed receipt pictures and classifies the sample of signed receipt pictures to obtain training samples of multiple category data samples, so that the model can be trained according to different types of data in subsequent training to improve the training effect; then builds a basic model based on DenseNet and uses a weighted cross-entropy loss function to optimize the basic model according to the data volume of different category data samples, thereby reducing the problem of class imbalance in the training process and enhancing the robustness of the model; then preprocesses the training samples to obtain more diverse data samples, so that the accuracy of the false signed receipt detection model obtained by training is higher; finally, obtains a real-time signed receipt image and uses the false signed receipt detection model to detect the real-time signed receipt image to obtain a detection result, reducing the dependence on manual review, reducing the labor cost and the intensity of review work, and improving the efficiency of logistics receipt management. Description of the Drawings
[0045] Figure 1 The first flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0046] Figure 2 The second flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0047] Figure 3 The third flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0048] Figure 4 The fourth flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0049] Figure 5 The fifth flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0050] Figure 6 The sixth flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0051] Figure 7 The seventh flowchart of the false waybill identification method provided by the embodiment of the present invention;
[0052] Figure 8 A structural schematic diagram of a false waybill identification device provided by an embodiment of the present invention;
[0053] Figure 9 Another structural schematic diagram of a false waybill identification device provided by an embodiment of the present invention;
[0054] Figure 10 A structural schematic diagram of a false waybill identification device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The present invention provides a false receipt identification method, device, equipment and storage medium. The present invention first obtains receipt image samples and classifies the receipt image samples to construct training samples, providing classified data for subsequent model training, so that the obtained model can better cope with different situations; then, the basic model is optimized by using a basic model based on DenseNet and using weighted cross entropy loss to improve the basic model's ability to analyze data of different categories and improve accuracy; then, the training samples are preprocessed to increase the data volume and sample richness, so that the performance of the false receipt detection model obtained by training is further improved; finally, the real-time receipt image is detected by using the false receipt detection model to realize the automation of audit, which can effectively reduce the dependence on manual audit, reduce labor costs, and improve audit efficiency.
[0056] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0057] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the method for identifying a fake face sheet in the embodiment of the present invention includes:
[0058] S101. Obtain a sample of a receipt image, classify the sample of the receipt image to obtain data samples of multiple categories, and construct a training sample based on the data samples of multiple categories;
[0059] In this embodiment, the receipt picture is obtained by taking pictures with a mobile phone. When the scene and content are different during the shooting, the receipt picture itself will be quite different. Therefore, it is necessary to classify it so that the subsequent model will have corresponding analysis methods when dealing with different types of pictures, thereby making the analysis accuracy of different categories of receipt pictures higher.
[0060] S102. Build a basic model based on DenseNet, use the weighted cross entropy loss function, and optimize the basic model according to the amount of data samples of different categories;
[0061] S103. Preprocess the training samples, and use the preprocessed training samples to train the basic model to obtain a false signature detection model;
[0062] S104. Obtain real-time signature images, and use the false signature detection model to detect the real-time signature images to obtain detection results.
[0063] The DenseNet (Densely Connected Convolutional Networks) is a densely connected network model that establishes dense connections between all previous layers and the subsequent layers. Another major feature of DenseNet is to achieve feature reuse through connections of features across channels.
[0064] In the analysis of logistics signature pictures, based on the dense connection mechanism of DenseNet, the basic model can seamlessly fuse low-level features (such as text edges, barcode details) and high-level features (such as the overall shape of the package, label layout), avoiding information loss. In addition, the basic model based on DenseNet can dynamically weight key regions (such as the express delivery note, signature handwriting) in the signature pictures and suppress background noise (such as packing tape, irrelevant items).
[0065] Combining the weighted cross-entropy loss function on the basis of DenseNet can reduce the problem of class imbalance during training, making the model pay more attention to minority classes during training, thereby improving the recognition accuracy of each class and enhancing the robustness of the model.
[0066] Before completing the construction and training of the basic model, it is also necessary to preprocess the training samples. In this embodiment, the main content of the preprocessing of the training samples is to perform enhancement operations on the training samples, so as to expand the data volume and data types in the training samples. When the subsequent model is trained using the preprocessed training samples, there will be more diverse signature picture samples, thereby improving the adaptability of the model to different image transformations. For example, in the actually obtained signature pictures, due to different angles, shooting levels, shooting performances of the devices, shooting environments, etc. of the shooting personnel, the system will obtain various types of signature pictures. By simulating various types of signature picture samples in advance for the model to train, the response ability of the false signature detection model can be improved.
[0067] Finally, the constructed false signature detection model is used to detect the real-time signature images, so as to quickly determine whether there is a false signature. The system adopting the false signature detection model can further automatically collect relevant data without manual filling and improvement of relevant information, reducing the intensity of manual review and enabling the reviewers to focus on verifying the detection results of the system. This not only improves the detection efficiency but also makes the final judgment result more accurate.
[0068] Please refer to Figure 2 , the second embodiment of the false waybill identification method in the embodiment of the present invention includes:
[0069] S201. Obtain signature picture samples, classify the signature picture samples to obtain data samples of multiple categories. The categories of the data samples include directly taken signature pictures and indirectly taken signature pictures. The indirectly taken signature pictures include the signature pictures taken by a mobile phone in the mobile phone and the signature pictures taken by a mobile phone in a computer.
[0070] S202. Label the directly taken signature pictures. The content of the label includes the shooting time, location, and shooting device type.
[0071] S203. Label the indirectly taken signature pictures. The content of the label includes the shooting time, location, shooting device type, screen resolution, operating system type, and application name.
[0072] The directly taken signature pictures are obtained by directly shooting a paper signature form or an electronic signature interface with various camera devices. The indirectly taken signature pictures include the signature pictures taken by a mobile phone in the mobile phone and the signature pictures taken by a mobile phone in a computer.
[0073] When collecting samples such as directly photographed signature pictures, it is necessary to ensure the diversity of shooting angles, lighting conditions, resolution, etc., so as to cover various situations that may occur in actual application scenarios. Different shooting distances will affect the clarity of the signature information in the picture, and different lighting conditions may cause different degrees of noise and distortion in the picture. To obtain more comprehensive samples, different personnel can be arranged to sign and shoot in different environments, and different signature carriers should also be considered, including paper signature forms, electronic signature pages on tablets, etc. When storing these samples, attention should be paid to labeling them, indicating information such as the shooting time, location, and type of shooting equipment, which is convenient for subsequent management and analysis of the samples. For paper signature forms, factors such as the color, texture, wear degree of the paper, and the color of the signature pen should be considered, because these may all affect the presentation and recognition of information in the image. For example, signing with a pen of a lighter color may be difficult to clearly identify under certain lighting conditions, and paper with creases or stains will cause difficulties in image processing. Ensure the authenticity of the samples during the sample collection process, and avoid mixing in non-standard or deliberately forged samples to ensure the reliability of the trained model in actual applications.
[0074] Mobile phone shooting of signature pictures in the mobile phone or computer: Obtained by shooting the signature information displayed on the mobile phone screen or computer screen with a mobile phone. In this case, problems such as screen reflection, inconsistent screen resolution and display effects will occur. To simulate various possible situations, the signature information can be displayed and shot on mobile phones and computers of different brands and models, and at the same time, display parameters such as screen brightness, contrast, and color saturation can be adjusted. Since moiré patterns may be generated by screen display, different degrees of moiré pattern situations should be included when collecting samples to help the model learn how to identify and process these interferences. The interface styles of different operating systems and applications will also be different, and samples of different signature software or web interfaces need to be covered. When storing samples of indirectly photographed signature pictures, in addition to marking the above-mentioned information such as the shooting time, location, and type of shooting equipment, the corresponding information in the photographed device, such as the screen resolution, operating system type, and application name, should also be marked for subsequent processing and analysis.
[0075] Please refer to Figure 3 , the third embodiment of the false waybill recognition method in the embodiment of the present invention includes:
[0076] S301. Build a basic model based on DenseNet and set the parameters of the basic model;
[0077] S302. Calculate the weights of each category of data samples according to the data volume of different category data samples, and regularize the weights of each category of data samples to obtain sample weight data;
[0078] S303. Adopt a weighted cross-entropy loss function, calculate the cross-entropy loss in combination with sample weight data, and optimize the basic model according to the cross-entropy loss.
[0079] In this embodiment, assume that the directly photographed signed pictures are of category A, and the indirectly photographed signed pictures are of category B. If the number of samples of category A is much larger than that of category B, then the weight of category B should be increased accordingly to balance the model's attention to the two categories. The weight of a category can be calculated using a formula. For example, the weight of category B = total number of samples / (number of samples of category B × number of categories).
[0080] After calculating the weights, a regularization term can be added, such as L1 or L2 regularization. L1 regularization will cause some weights of the model to become zero, achieving sparsity, which helps with feature selection; L2 regularization can prevent overfitting and make the weights smoother. By adjusting the strength parameters of regularization (such as the coefficients of L1 and L2), a balance can be found between reducing overfitting and improving model performance.
[0081] When using the weighted cross-entropy loss function, incorporate the calculated weights into the calculation of the loss function. For each sample, according to its category, use the corresponding weight to weight the loss. For example, when calculating the cross-entropy loss, if a sample belongs to category B, its loss will be multiplied by the weight of category B, which can make the model pay more attention to the minority category during training and avoid the model tending to predict samples as the majority category due to the excessive number of samples in the majority category.
[0082] Please refer to Figure 4 , the fourth embodiment of the false waybill recognition method in the embodiments of the present invention includes:
[0083] S401. Set the input layer parameters of DenseNet to adjust the input image size;
[0084] S402. Set the cascade combination of three 3×3 convolutional layers, and set the strides of the three convolutional layers to [1×2], [1×2], [1×1] in sequence, and set up a channel composed of two 3×3 convolutional layers in parallel;
[0085] S403. Insert a channel attention mechanism to obtain a basic model based on DenseNet, and set the parameters of the basic model.
[0086] For the input layer of the DenseNet network, it needs to be set according to the size of the signed pictures. For the original pictures, they need to be adjusted to a unified size, such as 224x224 pixels or 256x256 pixels, to ensure the consistency of the input data.
[0087] When setting up the convolutional layer, the 7×7 convolutional layer in the original DenseNet network can be removed and replaced with a cascade combination of three 3×3 convolutional layers. The stride of the first two convolutional layers is set to [1×2], and the stride of the last convolutional layer is set to [1×1]. By cascading three 3×3 convolutional layers, the nonlinear ability of the network can be increased. A ReLU activation function is connected after each convolutional layer, which enables the network to learn more complex feature representations. Cascading three 3×3 convolutional layers can also gradually extract finer-grained features.
[0088] The convolutional block is the core component of the dense connection layer, and the level of its feature extraction ability determines the size of the entire network's feature extraction ability. To further improve the ability of the convolutional block to extract image features, a channel composed of two 3×3 convolutional layers (with a receptive field equivalent to 5×5) is connected in parallel to the original network structure to improve the feature extraction ability of the convolutional block.
[0089] The attention mechanism inserted into the DenseNet structure uses global average pooling to obtain eigenvalue, then learns the feature weights of each feature channel based on the eigenvalue, and finally the output vector is the vector product of the feature weights and the input vector.
[0090] Please refer to Figure 5 , the fifth embodiment of the fake waybill recognition method in the embodiments of the present invention includes:
[0091] S501. Preprocess the training samples. The preprocessing includes data augmentation for the signed picture samples in the training samples. The operations of the data augmentation include random rotation, translation, flipping, and cropping;
[0092] S502. Batch input the preprocessed training samples into the RetinaNet network and set the size of each batch of data to train the basic model;
[0093] S503. Adjust the parameters of the basic model according to the training results to obtain a fake signature detection model.
[0094] Before inputting the training samples into the RetinaNet network, the training samples need to be further processed, including data augmentation operations. For example, perform random rotation, translation, flipping, cropping, etc. on the signed pictures to expand the training samples and improve the adaptability of the model to different image transformations.
[0095] Specifically, when performing random rotation on the image, the rotation operation can be carried out between -15 degrees and 15 degrees to simulate the tilting situation that may occur during the actual shooting of the signed picture; random cropping of the image simulates the scenario where only part of the signed information is captured; horizontal or vertical flipping can increase the data diversity.
[0096] When inputting the processed data into RetinaNet in batches, it is necessary to determine an appropriate batch size in advance according to the computing resources and video memory size. For example, 32, 64, or 128 can be selected. A reasonable batch size can affect the training speed and convergence effect of the model. Being too large may lead to insufficient video memory, and being too small may lead to unstable training. During the training process, set an appropriate number of training epochs. According to the performance during training, such as the accuracy and loss value on the validation set, adjust the number of training epochs. Generally, you can start with a smaller number of epochs, such as 10 or 20 epochs, observe the performance of the model. If the performance does not meet the expectations, the number of epochs can be appropriately increased. For the anchor setting in the RetinaNet network, according to the size and shape of the targets (such as signature areas, signed receipt information areas, etc.) in the signed receipt pictures, adjust the size and aspect ratio of the anchors. Determine an appropriate anchor configuration through experiments to improve the recall rate and accuracy of object detection. For example, in the scenario of express delivery receipt, the signature area may have different sizes and aspect ratios. Multiple anchors with different sizes and aspect ratios can be set to cover various possible situations. At the same time, during the training process, the model should be evaluated regularly, and the validation set is used to monitor the performance of the model. Various evaluation metrics can be calculated, such as accuracy, recall rate, F1 value, etc. According to the changes in these metrics, adjust the training parameters, such as adjusting the learning rate, modifying the network structure, or using different data augmentation strategies.
[0097] Please refer to Figure 6 , the sixth embodiment of the method for identifying false waybills in the embodiments of the present invention includes:
[0098] S601. Obtain a real-time signed receipt image, and perform size adjustment and normalization processing on the real-time signed receipt image;
[0099] S602. Use the false signed receipt detection model to detect the real-time signed receipt image to obtain a detection result;
[0100] S603. If the detection result is a false signed receipt, mark the real-time signed receipt image and extract information related to the real-time signed receipt image;
[0101] S604. Output the detection result of the false signed receipt to obtain a review result.
[0102] For the real-time input signed receipt image taken by the courier, first, the same preprocessing operations as the training samples need to be performed, including size adjustment, normalization, etc., to ensure that the format and feature range of the input data are consistent with those during training. For example, adjust the input image to the unified size during training, and normalize the pixel values to between 0 and 1 or between -1 and 1 to ensure the input consistency of the model.
[0103] After inputting the real-time signature receipt image into the model, the model will perform feature extraction and classification or detection operations on the image to determine whether the signature receipt image belongs to a real signature or a false signature. In a target detection network such as RetinaNet, the model will detect possible false signature areas in the image and give corresponding confidence levels. If the confidence level exceeds a set threshold (such as 0.5 or 0.7), it is determined that a false signature has been detected.
[0104] If the detection result is a false signature, the system will mark the real-time signature receipt image, extract information related to the real-time signature receipt image, and at the same time, record the detailed information of the false signature. These information can include the shooting time, location, express waybill number, courier information, storage location of the image, confidence level of model detection, etc. These information can be stored in the database for relevant personnel to view and process through the background management system.
[0105] Please refer to Figure 7 , the seventh embodiment of the false waybill recognition method in the embodiment of the present invention includes:
[0106] S701. Output the detection result of the false signature to obtain a review result;
[0107] S702. If the review result is incorrect, add the incorrect detection result to the training sample to adjust the false signature detection model;
[0108] S703. If the review result is correct, generate a warning message according to the review result and output the warning message to the administrator terminal.
[0109] When the model in the system determines the detection result of a false signature, the system can issue a warning message, such as popping up a warning box on the handheld device used by the courier, emitting a sound or vibration prompt, and will also output the detection result to the manual review system for manual review of the result. Information related to the real-time signature receipt image will be packaged and output together to assist manual review.
[0110] After manual review, the review result will be fed back. If the review result is incorrect, the signature receipt image and related details will be added to the training sample as new training samples to fine-tune the model to improve the accuracy of the model. In the case of continuous false alarms, the model needs to be re-evaluated and optimized, analyze the reasons for false alarms, whether it is a data problem or a problem with the model itself, and take corresponding improvement measures.
[0111] If the review result is correct, the system will immediately issue a warning signal to prompt the corresponding management personnel to intervene.
[0112] The above describes the false waybill recognition method in the embodiments of the present invention. Next, the false waybill recognition device in the embodiments of the present invention will be described. Please refer to Figure 8 , one embodiment of the false waybill recognition device in the embodiments of the present invention includes:
[0113] A sample construction module 10, configured to obtain signed picture samples, classify the signed picture samples to obtain data samples of multiple categories, and construct training samples according to the data samples of multiple categories;
[0114] A model building module 20, configured to build a basic model based on DenseNet, adopt a weighted cross-entropy loss function, and optimize the basic model according to the data volume of data samples of different categories;
[0115] A training module 30, configured to preprocess the training samples, and use the preprocessed training samples to train the basic model to obtain a false signature detection model;
[0116] A detection module 40, configured to obtain real-time signed images, and use the false signature detection model to detect the real-time signed images to obtain detection results.
[0117] Please refer to Figure 9 , one embodiment of the false waybill recognition device in the embodiments of the present invention includes:
[0118] A sample construction module 10, configured to obtain signed picture samples, classify the signed picture samples to obtain data samples of multiple categories, and construct training samples according to the data samples of multiple categories;
[0119] A model building module 20, configured to build a basic model based on DenseNet, adopt a weighted cross-entropy loss function, and optimize the basic model according to the data volume of data samples of different categories;
[0120] A training module 30, configured to preprocess the training samples, and use the preprocessed training samples to train the basic model to obtain a false signature detection model;
[0121] A detection module 40, configured to obtain real-time signed images, and use the false signature detection model to detect the real-time signed images to obtain detection results;
[0122] In this embodiment, the sample construction module 10 includes:
[0123] Classification unit 11 is used to obtain signed picture samples, classify the signed picture samples to obtain data samples of multiple categories. The categories of the data samples include directly photographed signed pictures and indirectly photographed signed pictures. The indirectly photographed signed pictures include the signed pictures in the mobile phone photographed by the mobile phone and the signed pictures in the computer photographed by the mobile phone;
[0124] The first annotation unit 12 is used to annotate the directly photographed signed pictures, and the annotation content includes the shooting time, location and shooting device type;
[0125] The second annotation unit 13 is used to annotate the indirectly photographed signed pictures, and the annotation content includes the shooting time, location, shooting device type, screen resolution, operating system type and application name;
[0126] In this embodiment, the model building module 20 includes:
[0127] The building sub-module 21 is used to build a basic model based on DenseNet and set the parameters of the basic model;
[0128] The first calculation sub-module 22 is used to calculate the weights of data samples of each category according to the data volume of data samples of different categories, regularize the weights of data samples of each category, and obtain sample weight data;
[0129] The second calculation sub-module 23 is used to adopt a weighted cross-entropy loss function, calculate the cross-entropy loss in combination with the sample weight data, and optimize the basic model according to the cross-entropy loss;
[0130] In this embodiment, the building sub-module 21 includes:
[0131] The first setting unit 211 is used to set the input layer parameters of DenseNet to adjust the input image size;
[0132] The second setting unit 212 is used to set the cascaded combination of three 3×3 convolutional layers. The stride of the three convolutional layers is set to [1×2], [1×2], [1×1] in sequence, and a channel composed of two 3×3 convolutional layers is set in parallel;
[0133] The insertion unit 213 is used to insert a channel attention mechanism to obtain a basic model based on DenseNet and set the parameters of the basic model;
[0134] The training module 30 includes:
[0135] The preprocessing unit 31 is used to preprocess the training samples. The preprocessing includes data augmentation of the signed picture samples in the training samples. The operations of the data augmentation include random rotation, translation, flipping and cropping;
[0136] An input unit 32 for batch-inputting the preprocessed training samples into the RetinaNet network and setting the size of each batch of data to train the basic model;
[0137] An adjustment unit 33 for adjusting the parameters of the basic model according to the training results to obtain a false signature detection model;
[0138] In this embodiment, the detection module 40 includes:
[0139] A processing sub-module 41 for obtaining a real-time signature image, and performing size adjustment and normalization processing on the real-time signature image;
[0140] A detection sub-module 42 for detecting the real-time signature image by using the false signature detection model to obtain a detection result;
[0141] A marking sub-module 43 for, if the detection result is a false signature, marking the real-time signature image and extracting information related to the real-time signature image;
[0142] An output sub-module 44 for outputting the detection result of the false signature to obtain a review result;
[0143] In this embodiment, the output sub-module 44 includes:
[0144] A result output unit 441 for outputting the detection result of the false signature to obtain a review result;
[0145] A model optimization unit 442 for, if the review result is incorrect, adding the incorrect detection result to the training samples to adjust the false signature detection model;
[0146] A generation unit 443 for, if the review result is correct, generating a warning message according to the review result and outputting the warning message to the administrator terminal.
[0147] The false waybill recognition device of the present invention first classifies the received signature picture samples to construct training samples, then builds a basic model based on DenseNet, and combines the use of weighted cross-entropy loss function to reduce the problem of class imbalance during model training. Then, it uses the preprocessed training samples to train the basic model to obtain a reliable false signature detection model. Finally, it uses the false signature detection model to detect the real-time signature image to obtain a detection result, effectively improving the detection efficiency, reducing the dependence on manual review, and can meet the growing logistics business volume and effectively handle complex signature violation situations.
[0148] The above is a detailed description of the false waybill recognition device in the embodiments of the present invention from the perspective of modular functional entities. The following is a detailed description of the false waybill recognition device in the embodiments of the present invention from the perspective of hardware processing.
[0149] Figure 10 FIG. is a schematic structural diagram of a false waybill recognition device provided by an embodiment of the present invention. The false waybill recognition device 900 may vary greatly due to configuration or performance, and may include one or more central processing units (CPUs) 910 (for example, one or more processors) and a memory 920, and one or more storage media 930 (for example, one or more mass storage devices) that store application programs 933 or data 932. Among them, the memory 920 and the storage media 930 may be transient storage or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the false waybill recognition device 900. Further, the processor 910 may be configured to communicate with the storage media 930 and execute a series of instruction operations in the storage media 930 on the false waybill recognition device 900 to implement the steps of the false waybill recognition method provided in the above method embodiments.
[0150] The false waybill recognition device 900 may further include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that Figure 10 the shown structure of the false waybill recognition device does not constitute a limitation on the false waybill recognition device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0151] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions run on a computer, the computer is caused to execute the steps of the false waybill recognition method.
[0152] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices or apparatuses can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0153] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0154] It can be understood that for those of ordinary skill in the art, equivalent substitutions or changes can be made according to the technical solution of the present invention and its inventive concept, and all such changes or substitutions should fall within the protection scope of the claims appended to the present invention.
Claims
1. A method for identifying a fake face sheet, characterized in that: The steps include: Obtaining receipt image samples, classifying the receipt image samples to obtain data samples of multiple categories, and constructing training samples based on the data samples of multiple categories; Build a basic model based on DenseNet, use the weighted cross entropy loss function, and optimize the basic model according to the amount of data samples of different categories; Preprocess the training samples, and use the preprocessed training samples to train the basic model to obtain a false signing detection model; A real-time receipt image is acquired, and a false receipt detection model is used to detect the real-time receipt image to obtain a detection result.
2. The method for identifying a fake face sheet according to claim 1, characterized in that: The acquiring of the receipt image samples, classifying the receipt image samples to obtain data samples of multiple categories, and constructing training samples according to the data samples of multiple categories specifically include: Acquire receipt picture samples, and classify the receipt picture samples to obtain data samples of multiple categories, where the categories of the data samples include directly taken receipt pictures and indirectly taken receipt pictures, where the indirectly taken receipt pictures include the receipt pictures taken by a mobile phone in a mobile phone and the receipt pictures taken by a mobile phone in a computer; Label the directly taken receipt photos, including the shooting time, location and type of shooting equipment; The indirectly taken receipt pictures shall be labeled with the shooting time, location, shooting device type, screen resolution, operating system type and application name.
3. The method for identifying a fake face sheet according to claim 1, characterized in that: The basic model based on DenseNet is built, and the weighted cross entropy loss function is used to optimize the basic model according to the data volume of different categories of data samples, specifically including: Build a basic model based on DenseNet and set the parameters of the basic model; The weight of each category of data samples is calculated according to the data volume of different categories of data samples, and the weight of each category of data samples is regularized to obtain sample weight data; The weighted cross entropy loss function is used to calculate the cross entropy loss in combination with the sample weight data, and the basic model is optimized according to the cross entropy loss.
4. The method for identifying a fake face sheet according to claim 3, characterized in that: The basic model based on DenseNet is built and the parameters of the basic model are set, including: Set the input layer parameters of DenseNet to adjust the input image size; Set up a cascade combination of three 3×3 convolutional layers, with the strides of the three convolutional layers set to [1×2], [1×2], [1×1] respectively, and set up a channel consisting of two 3×3 convolutional layers in parallel; Insert the channel attention mechanism, obtain the basic model based on DenseNet, and set the parameters of the basic model.
5. The method for identifying a fake face sheet according to claim 1, characterized in that: The preprocessing of the training samples and training the basic model using the preprocessed training samples to obtain the false receipt detection model specifically includes: Preprocessing the training samples, wherein the preprocessing includes data enhancement of the signed image samples in the training samples, and the data enhancement operations include random rotation, translation, flipping and cropping; Input the preprocessed training samples into the RetinaNet network in batches and set the size of each batch of data to train the basic model; The parameters of the basic model are adjusted according to the training results to obtain a false signature detection model.
6. The method for identifying a fake face sheet according to claim 1, characterized in that: The acquiring of the real-time receipt image and the use of the false receipt detection model to detect the real-time receipt image to obtain the detection result specifically include: Acquire a real-time receipt image, and perform size adjustment and normalization processing on the real-time receipt image; A false sign-off detection model is used to detect the real-time sign-off image to obtain the detection result; If the detection result is a false signature, the real-time signature image is marked and information related to the real-time signature image is extracted; Output the detection results of false signatures to obtain the review results.
7. The method for identifying a fake face sheet according to claim 6, characterized in that: The output of the false signing detection result to obtain the review result specifically includes: Output the test results of false receipt to obtain the review results; If the review result is incorrect, the incorrect test result is added to the training sample to adjust the false receipt detection model; If the review result is correct, a warning message is generated according to the review result, and the warning message is output to the administrator end.
8. A false label recognition device, characterized in that: include: A sample construction module is used to obtain a sample of a receipt image, classify the sample of the receipt image to obtain data samples of multiple categories, and construct training samples based on the data samples of multiple categories; The model building module is used to build a basic model based on DenseNet, using the weighted cross entropy loss function to optimize the basic model according to the amount of data samples of different categories; A training module is used to preprocess the training samples and use the preprocessed training samples to train the basic model to obtain a false sign-off detection model; The detection module is used to obtain a real-time receipt image and use a false receipt detection model to detect the real-time receipt image to obtain a detection result.
9. A false label recognition device, characterized in that: comprising a memory and at least one processor, wherein the memory has computer-readable instructions stored therein; The at least one processor calls the computer-readable instructions in the memory to execute the various steps of the fake face sheet identification method as described in any one of claims 1-7.
10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the various steps of the false face sheet identification method as described in any one of claims 1-7 are implemented.