Express item damage tracking and positioning method, device and equipment and storage medium
The damaged express delivery detection model constructed through the Inception-V3 network model and channel attention module solves the accuracy and link positioning of express delivery damage detection, realizes the accurate detection and positioning of express delivery damage, and improves the quality and efficiency of the logistics system.
Patent Information
- Application Number
- CN202510636007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, express delivery damage inspection relies on manual inspection efficiency and is prone to errors, and cannot accurately locate the links of damage, and it is difficult for automated inspection technology to fully cover the diverse damage characteristics.
The Inception-V3 network model is used to build a basic framework, introduce channel attention module, build a damaged express delivery detection model, and obtain a training set by enhancing the photo database to achieve accurate detection of real-time express delivery photos and positioning of damaged links.
Accurate detection and positioning of express parcel damage is achieved, damage can be detected in a timely manner, problems can be avoided, quality and efficiency of logistics systems are improved, and targeted improvement measures are taken.
Smart Images

Figure CN120495992A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of express delivery technology, and in particular to a method, device, equipment and storage medium for tracking and locating damaged express items. Background Art
[0002] Traditional express delivery damage detection relies primarily on manual labor, resulting in inefficient inspections and prone to errors and omissions. Furthermore, it struggles to meet the demands of the growing logistics volume and complex damage scenarios. Furthermore, while automated detection technologies have been developed, existing technologies typically only perform damage detection at the end point and are unable to pinpoint the specific point where the damage occurred, making it difficult to assign responsibility and implement targeted improvement measures. Furthermore, the damage characteristics of express deliveries are complex and diverse, including scratches, dents, and tears. Detecting these various damage characteristics is challenging, making it difficult for existing technologies to comprehensively cover them. Clearly, existing technologies still require improvement and advancement. Summary of the Invention
[0003] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a method, device, equipment and storage medium for tracking and locating damaged express parcels, aiming to solve the technical problems in the prior art that the specific links where express parcels are damaged cannot be determined and the accuracy of damage detection is not high.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A first aspect of the present invention provides a method for tracking and locating damaged express parcels, comprising the following steps: obtaining photos of express parcels at each link in the logistics process, and constructing a photo database based on the photos of the express parcels; building a basic framework with the Inception-V3 network model, and introducing a channel attention module to construct a basic model; enhancing the photos of the express parcels in the photo database to obtain a training set, and using the training set to train the basic model to obtain a damaged express parcel detection model; obtaining real-time express parcel photos, using the damaged express parcel detection model to detect the real-time express parcel photos to obtain detection results, and locating the link where the damage occurs based on the detection results.
[0006] Optionally, in a first implementation manner of the first aspect of the present invention, the basic framework is built with the Inception-V3 network model, and a channel attention module is introduced to construct a basic model, specifically including: building a basic framework with the Inception-V3 network model, determining an acceptable image input size for the Inception-V3 network model, and setting hyperparameters of the Inception-V3 network model; constructing an SE channel attention module to perform compression operations, excitation operations, and recalibration operations on the input feature map; and introducing the SE channel attention module into the basic framework to construct the SE-Inception-V3 basic model.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the SE channel attention module is constructed to perform compression, excitation and recalibration operations on the input feature map, specifically including: setting a compression operation to perform global average pooling on each channel of the input feature map, compressing the spatial dimension into a scalar, and obtaining a compressed feature vector; setting an excitation operation to calculate the weight of each channel of the input feature map based on the compressed feature vector to obtain the channel weight; setting a recalibration operation to multiply the channel weight with the input feature map channel by channel to complete the recalibration of the feature map.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the excitation operation is set to calculate the weight of each channel of the input feature map based on the compressed feature vector to obtain the channel weight, specifically including: setting a first fully connected layer to reduce the number of channels of the compressed feature vector to obtain a first output value; setting a ReLU activation function to perform a nonlinear transformation on the first output value to obtain a second output value; setting a second fully connected layer to increase the dimension of the second output value to obtain a third output value; setting a Sigmoid activation function to normalize the third output value to the range of (0,1) to obtain the weight of each channel.
[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, the express package photos in the photo database are enhanced to obtain a training set, and the training set is used to train the basic model to obtain a damaged express package detection model, specifically including: enhancing the express package photos in the photo database, and the enhancement techniques include rotation, flipping, cropping, adding noise, adjusting brightness and contrast to obtain a training set; using the training set to train the basic model, and using the loss function for back propagation to update the weights of the basic model; using a visualization tool to monitor the training process, and adjusting the hyperparameters of the basic model according to the monitoring indicators to obtain a damaged express package detection model.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the real-time express photo is obtained, the real-time express photo is detected using a damaged express detection model to obtain a detection result, and the link where the damage occurs is located according to the detection result, specifically including: obtaining a real-time express photo, detecting the real-time express photo using a damaged express detection model to obtain a detection result; if the detection result is that damage exists, extracting the express image features in the real-time express photo; comparing the express image features with the photos in the photo database to trace and locate the link where the express is damaged.
[0011] Optionally, in a sixth implementation manner of the first aspect of the present invention, if the detection result is that there is damage, extracting the express image features in the real-time express photo, specifically including: comparing the detection result with a set threshold, if the detection result is greater than the set threshold, it is considered that there is damage, and storing the package information corresponding to the damaged express; using an image analysis algorithm to analyze the real-time express photo to determine the damage location and degree of damage; using an image feature extraction algorithm to extract the express image features in the real-time express photo of the damaged express.
[0012] The second aspect of the present invention provides a device for tracking and locating damaged express parcels, including: an acquisition module for acquiring photos of express parcels at each link in the logistics process and constructing a photo database based on the photos of express parcels; a construction module for building a basic framework with the Inception-V3 network model and introducing a channel attention module to construct a basic model; a training module for enhancing the photos of express parcels in the photo database to obtain a training set, and using the training set to train the basic model to obtain a damaged express parcel detection model; a detection module for acquiring real-time express parcel photos, using the damaged express parcel detection model to detect the real-time express parcel photos to obtain detection results, and locating the link where the damage occurs based on the detection results.
[0013] Optionally, in a first implementation manner of the second aspect of the present invention, the construction module includes: a construction submodule, used to build a basic framework with the Inception-V3 network model, determine the acceptable image input size of the Inception-V3 network model, and set the hyperparameters of the Inception-V3 network model; a first construction submodule, used to construct an SE channel attention module to perform compression operations, excitation operations and recalibration operations on the input feature map; and a second construction submodule, used to introduce the SE channel attention module into the basic framework to construct the SE-Inception-V3 basic model.
[0014] Optionally, in a second implementation of the second aspect of the present invention, the first construction submodule includes: a compression unit, used to set a compression operation to perform global average pooling on each channel of the input feature map, compress the spatial dimension into a scalar, and obtain a compressed feature vector; an excitation unit, used to set an excitation operation, calculate the weight of each channel of the input feature map based on the compressed feature vector, and obtain the channel weight; a recalibration unit, used to set a recalibration operation, multiply the channel weight with the input feature map channel by channel to complete the recalibration of the feature map.
[0015] Optionally, in a third implementation of the first aspect of the present invention, the excitation unit includes: a dimensionality reduction subunit, used to set a first fully connected layer, used to reduce the number of channels of the compressed feature vector to obtain a first output value; an activation subunit, used to set a ReLU activation function to perform a nonlinear transformation on the first output value to obtain a second output value; a dimensionality increase subunit, used to set a second fully connected layer, used to increase the dimension of the second output value to obtain a third output value; a calculation subunit, used to set a Sigmoid activation function, used to normalize the third output value to the range of (0,1) to obtain the weight of each channel.
[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the training module includes: an enhancement unit for enhancing the photos of express packages in the photo database, wherein the enhancement techniques include rotation, flipping, cropping, adding noise, adjusting brightness and contrast to obtain a training set; a training unit for training the basic model using the training set, and performing back propagation using the loss function to update the weights of the basic model; a monitoring unit for monitoring the training process using a visualization tool, and adjusting the hyperparameters of the basic model according to the monitoring indicators to obtain a damaged express delivery detection model.
[0017] Optionally, in a fifth implementation of the first aspect of the present invention, the detection module includes: a detection unit, used to obtain real-time express photos, and use a damaged express detection model to detect the real-time express photos to obtain detection results; an extraction unit, used to extract express image features in the real-time express photos if the detection result is that there is damage; and a comparison unit, used to compare the express image features with photos in a photo database to trace and locate the link where the express was damaged.
[0018] Optionally, in a sixth implementation of the first aspect of the present invention, the extraction unit includes: a comparison subunit, used to compare the detection result with a set threshold value. If the detection result is greater than the set threshold value, it is considered that damage exists, and the package information corresponding to the damaged express is stored; an analysis subunit, used to use an image analysis algorithm to analyze the real-time express photo to determine the damage location and degree of damage; an extraction subunit, used to use an image feature extraction algorithm to extract the express image features in the real-time express photo of the damaged express.
[0019] The third aspect of the present invention provides a device for tracking and locating damaged parcels, comprising a memory and at least one processor, wherein the memory stores computer-readable instructions; the at least one processor calls the computer-readable instructions in the memory to execute the various steps of the method for tracking and locating damaged parcels as described above.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, the various steps of the above-mentioned express delivery damage tracking and locating method are implemented.
[0021] Beneficial effect: The present invention provides a method for tracking and locating damaged express parcels. The method first obtains photos of express parcels at each link in the logistics process to build a photo database for model training and subsequent comparison; then, the basic framework is built with the Inception-V3 network model, and a channel attention module is introduced to build a basic model with better performance; then, the photos of express parcels in the photo database are enhanced to obtain a training set to improve the diversity of training data, and then the basic model is trained using the training set to obtain a damaged express parcel detection model with better performance indicators; finally, real-time express parcel photos are obtained and detected by the damaged express parcel detection model to obtain detection results, and comparison is performed based on the detection results to accurately locate the link where the damage occurs. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A first flow chart of the method for tracking and locating damaged parcels provided in an embodiment of the present invention;
[0023] Figure 2 A second flow chart of the method for tracking and locating damaged parcels provided in an embodiment of the present invention;
[0024] Figure 3 A third flow chart of the method for tracking and locating damaged parcels provided in an embodiment of the present invention;
[0025] Figure 4 A fourth flow chart of the method for tracking and locating damaged express parcels provided in an embodiment of the present invention;
[0026] Figure 5 A fifth flow chart of the method for tracking and locating damaged express parcels provided in an embodiment of the present invention;
[0027] Figure 6 A sixth flow chart of the method for tracking and locating damaged express parcels provided in an embodiment of the present invention;
[0028] Figure 7 A seventh flow chart of the method for tracking and locating damaged express parcels provided in an embodiment of the present invention;
[0029] Figure 8 A schematic diagram of the structure of a device for tracking and locating damaged parcels provided by an embodiment of the present invention;
[0030] Figure 9Another structural diagram of the device for tracking and locating damaged parcels provided by an embodiment of the present invention;
[0031] Figure 10 A schematic diagram of the structure of a damaged express delivery tracking and locating device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present invention provides a method, device, equipment, and storage medium for tracking and locating damaged parcels. The method first obtains parcel photos from each link in the logistics process, covering the status of the parcels at different links. A photo database is then constructed based on the parcel photos to facilitate subsequent image-based search operations. The method then uses the Inception-V3 network model to build a basic framework and introduces a channel attention module to enhance the model's computational power, thereby constructing a more performant basic model. The parcel photos in the photo database are then enhanced to obtain a more diverse training set, improving the performance of the damaged parcel detection model. Finally, the damaged parcel detection model is used to detect real-time parcel photos to obtain detection results, which are then compared with the photo database to locate the link where the damage occurred. The method can perform real-time detection, enabling timely detection of damaged parcels, preventing further damage and effectively protecting customer interests. Furthermore, by analyzing the link where damaged parcels occur, weaknesses in the logistics chain can be identified, enabling targeted improvement measures to be taken, thereby improving the quality and efficiency of the entire logistics system.
[0033] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable 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 apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0034] 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 tracking and locating damaged parcels in the embodiment of the present invention includes:
[0035] S101 obtains express package photos at each stage of the logistics process and constructs a photo database based on the express package photos;
[0036] Specifically, multiple cameras can be used at various stages of the logistics process to capture photos of parcels. Cameras should be installed to cover all aspects of the parcel process, including collection, transportation (including different means of transport, such as trucks, airplanes, and ships), sorting centers, and delivery. At each stage, high-definition cameras can be used to capture photos of parcels from different angles. The collected photos should be organized and categorized, and labeled according to different logistics stages and parcel types to facilitate subsequent data management and use.
[0037] S102. Build a basic framework based on the Inception-V3 network model and introduce the channel attention module to build a basic model;
[0038] Inception-V1 has 22 layers, deeper than VGGNet's 19 layers but with fewer parameters and greater expressiveness. Inception-V1 uses convolution kernels of multiple scales for feature extraction, including 1×1, 3×3, and 5×5. The 1×1 convolution kernel reduces the number of channels, accelerating network learning. This network architecture increases network depth and improves generalizability. Inception-V2 replaces large convolutions with smaller ones, replacing one 5×5 convolution with two 3×3 convolutions. While maintaining the same receptive field before and after decomposition, performance is enhanced. After decomposition, an additional activation function can be added, enhancing nonlinear expressiveness. Inception-V2 also introduces the BatchNormalization algorithm, which normalizes the network's input data to increase gradients, prevent vanishing gradients, and accelerate training and convergence. Building on this foundation, Inception-V3 introduced asymmetric convolution, decomposing the N×N structure into a superposition of 1×N and N×1 layers. This decomposition maintains the same receptive field as the original, further reducing computational effort, accelerating training and testing, and mitigating overfitting. Furthermore, the Inception-V3 network optimizes the Inception-module structure. This optimized Inception module is applied later in the network, while shallow layers still use standard convolutional layers to ensure the network can effectively extract more features.
[0039] The channel attention module can help the model more accurately extract key features in the image and distinguish the differences between different categories, thereby improving the model's accuracy in identifying damaged express deliveries.
[0040] S103. Enhance the express package photos in the photo database to obtain a training set, and use the training set to train the basic model to obtain a damaged express detection model;
[0041] The purpose of enhancing the express package photos in the photo database is to increase the diversity of training data and prevent overfitting.
[0042] S104. Obtain a real-time express delivery photo, use a damaged express delivery detection model to detect the real-time express delivery photo to obtain a detection result, and locate the link where the damage occurs based on the detection result.
[0043] The damaged package detection model, fed with a live camera photo of a package, detects the presence of damaged items in real time and provides a result. If a damaged package is detected, the system immediately issues a warning signal and searches the database for the most similar image based on the image's characteristics, identifying the specific link where the damage occurred.
[0044] See also Figure 2 The second embodiment of the method for tracking and locating damaged parcels in the embodiment of the present invention includes:
[0045] S201. Build a basic framework based on the Inception-V3 network model, determine the image input size acceptable to the Inception-V3 network model, and set the hyperparameters of the Inception-V3 network model;
[0046] Inception-V3 typically accepts fixed-size inputs, so you need to specify the input image size, for example, 299x299 pixels. For package photos in the photo database, you can use image processing libraries such as OpenCV or PIL to resize them.
[0047] Hyperparameters include learning rate, batch size, and training rounds. The learning rate determines how fast the model learns, the batch size affects training efficiency and memory usage, and the training rounds determine how many times the model repeatedly learns the training data.
[0048] S202. Construct an SE channel attention module to perform compression, excitation, and recalibration operations on the input feature map;
[0049] The SE (Squeeze-and-Excitation) channel attention module is a plug-and-play module that fuses features by compression (Squeeze), excitation (Excitation) and scale multiplication, and can enhance the channel features of the input feature map without changing the size of the feature map;
[0050] S203. Introduce the SE channel attention module into the basic framework to build the SE-Inception-V3 basic model.
[0051] The SE channel attention module recalibrates the features extracted by Inception-V3 at the channel level. Inception-V3 itself extracts rich features through multiple convolution kernels and pooling operations at different scales, but the importance of features across different channels may vary. The SE channel attention module adaptively learns the importance weights for each channel, enhancing channel features that are more important to the task and suppressing irrelevant or redundant channel features, thereby making the model's representation of image features more accurate and effective. Inception-V3's Inception module uses a multi-branch structure to fuse features of different scales, and the SE channel attention module further optimizes this feature fusion process. By assigning different weights to feature channels in different branches, the SE-Inception-V3 model is able to better fuse feature information from different scales and paths, enabling the model to capture richer and more representative feature combinations, helping to improve the model's understanding of complex image patterns.
[0052] Furthermore, the introduction of the SE channel attention module makes the model more robust to image noise, occlusion, and deformation. Because the SE channel attention module adaptively adjusts feature weights, it can highlight key features even when images are subject to a certain degree of interference, ensuring the model's judgment accuracy. For example, in some image datasets containing noise or partial occlusion, the performance degradation of the SE-Inception-V3 model is significantly smaller than that of the original Inception-V3 model.
[0053] See also Figure 3 The third embodiment of the method for tracking and locating damaged parcels in the embodiment of the present invention includes:
[0054] S301. Set a compression operation to perform global average pooling on each channel of the input feature map, compress the spatial dimension into a scalar, and obtain a compressed feature vector;
[0055] Specifically, the dimension of the input feature map is H'*W'*C', where H' is the height, W' is the width, and C' is the number of channels.
[0056] The Squeeze operation performs global average pooling on the input feature tensor to compress the spatial information in the channel dimension (C direction) and obtain a feature tensor of size 1*1*C, which is equivalent to compressing H*W into one dimension. This one-dimensional parameter obtains the global view of H*W.
[0057] S302. Set the excitation operation, calculate the weight of each channel of the input feature map based on the compressed feature vector, and obtain the channel weight;
[0058] The excitation operation consists of two fully connected layers, which pass the compressed input feature map to the two fully connected layers to learn the weight of each channel, thereby obtaining the channel weight. The channel weight represents the importance of each channel for a specific feature.
[0059] S303. Set a recalibration operation, multiply the channel weights by the input feature map channel by channel to complete the recalibration of the feature map.
[0060] The rescaling operation uses the learned activation weights to reweight each channel of the original input feature map, multiplying the channel attention vector element-wise with the feature tensor of the original input, and applying different weights to each channel.
[0061] See also Figure 4 The fourth embodiment of the method for tracking and locating damaged express items in the embodiment of the present invention includes:
[0062] S401. Setting a first fully connected layer to reduce the number of channels of the compressed feature vector to obtain a first output value;
[0063] In deep learning, fully connected layers perform linear transformations on input data, multiplying each input element by a corresponding weight or adding a bias. By setting an appropriate weight matrix, high-dimensional compressed feature vectors are mapped to a low-dimensional space. This reduces the number of parameters and computational complexity while also helping to extract more representative features.
[0064] S402. Setting a ReLU activation function to perform a nonlinear transformation on the first output value to obtain a second output value;
[0065] The ReLU activation function converts all negative input values to 0, while leaving positive input values unchanged. Introducing nonlinear activation functions in neural networks is crucial because, regardless of the number of layers, using only linear transformations (such as linear operations in fully connected layers) will ultimately be equivalent to a single linear transformation, preventing the learning of complex nonlinear relationships. The ReLU activation function increases the model's nonlinear expressiveness, enabling neural networks to learn richer feature patterns.
[0066] S403. Setting a second fully connected layer to upgrade the second output value to obtain a third output value;
[0067] The second fully connected layer performs a dimensionality increase on the second output value after the ReLU nonlinear transformation, restoring it to the same number of channels as the original compressed feature vector. This step is also achieved through the linear transformation of the fully connected layer, mapping the low-dimensional feature vector back to a high-dimensional space, in preparation for the subsequent generation of weights corresponding to the number of channels in the original feature map.
[0068] S404. Set a Sigmoid activation function to normalize the third output value to the range of (0, 1) to obtain the weight of each channel.
[0069] The Sigmoid activation function maps any real number to the (0, 1) range. In this scenario, the values in the (0, 1) range represent the relative importance weight of each channel. Values closer to 1 indicate more important channels, and values closer to 0 indicate less important channels.
[0070] See also Figure 5 The fifth embodiment of the method for tracking and locating damaged express items in the embodiment of the present invention includes:
[0071] S501 express package photos in the photo database are enhanced, and enhancement techniques include rotation, flipping, cropping, adding noise, adjusting brightness and contrast to obtain a training set;
[0072] By using a variety of data augmentation techniques, such as rotation, flipping, cropping, adding noise, adjusting brightness and contrast, etc., the diversity of training data can be increased and overfitting can be prevented. Specifically, the express package photo can be randomly rotated by a certain angle, or a small amount of Gaussian noise can be added to the image. The brightness of the image can be randomly increased or decreased within a certain range to simulate the image effect under different light intensities. The contrast of the image can also be randomly adjusted to change the difference in brightness and darkness of the image, helping the model adapt to images of different contrasts.
[0073] S502. Train the basic model using the training set and perform backpropagation using the loss function to update the weights of the basic model;
[0074] During training, the augmented training set is divided into small batches and fed into the model. The loss is calculated for each batch, and FocalLoss is used as the loss function for backpropagation to update the model weights. Focal Loss is a loss function specifically designed to address the imbalance between positive and negative samples. When calculating the loss, the weight of easily classified samples is reduced, while the weight of difficult-to-classify samples (typically damaged parcels, which account for a small proportion of the sample) is increased, allowing the model to focus more on learning minority samples.
[0075] S503. Use visualization tools to monitor the training process and adjust the hyperparameters of the basic model according to the monitoring indicators to obtain a damaged express delivery detection model.
[0076] Specifically, you can use visualization tools such as TensorBoard to monitor indicators such as loss and accuracy during training, and adjust hyperparameters such as learning rate and batch size according to changes in indicators to achieve better training results.
[0077] See also Figure 6 The sixth embodiment of the method for tracking and locating damaged parcels in the embodiment of the present invention includes:
[0078] S601 obtains real-time express photos, uses the damaged express detection model to detect real-time express photos to obtain the test results;
[0079] For real-time express delivery photos, we first need to resize them to the input size required by the model and use the same preprocessing steps as during training. The preprocessed images are input into the trained SE-Inception-V3 model to obtain the damage detection results.
[0080] S602. If the detection result is that there is damage, extract the express image features in the real-time express photo;
[0081] S603. Compare the features of the express image with the photos in the photo database to trace and locate the link where the express was damaged.
[0082] Specifically, an image search algorithm (such as feature vector-based similarity calculation) can be used to search for similar images in a photo database. Metrics such as cosine similarity and Euclidean distance are used to calculate the similarity between images. After finding the most similar image, the link where the damage occurred is inferred based on the image's annotations. In the photo database, photos of express packages are stored in chronological order. By comparing photos of packages at different stages, it is possible to determine which stage the damage first occurred and thus infer the stage where the damage occurred.
[0083] See also Figure 7 The seventh embodiment of the method for tracking and locating damaged parcels in the embodiments of the present invention includes:
[0084] S701. Compare the detection result with the set threshold. If the detection result is greater than the set threshold, it is considered damaged and the package information corresponding to the damaged express is stored;
[0085] In addition, once a damaged parcel is detected, a pre-set warning mechanism can be used, such as sending an email, text message, or popping up an alarm message on the system interface.
[0086] S702 uses image analysis algorithms to analyze real-time express photos to determine the location and extent of damage;
[0087] Specifically, the damage location and extent can be determined by analyzing local image features and comparing them with images of normal shipments. If determining the damage location and extent based on local image feature analysis, methods such as gray-level co-occurrence matrices and local binary patterns can be used to analyze the image's texture. While the texture of a normal shipment image is typically uniform and regular, the texture at the damaged location may become chaotic, rough, or exhibit unusual, repetitive patterns. Tears on the shipment surface may cause fractures and irregular lines in the otherwise smooth texture. If determining the damage location and extent based on comparison with images of normal shipments, the shipment image to be inspected can be spatially aligned with the normal shipment image to ensure accuracy in subsequent comparisons. Based on the registration, the difference between the shipment image to be inspected and the normal shipment image is calculated. This difference can be calculated at the pixel level, such as by directly calculating the grayscale value difference between corresponding pixels in the two images, or at the feature level, by comparing the distances between local feature descriptors. If the difference value in a particular region exceeds a certain threshold, it may indicate damage in that region.
[0088] S703. Use an image feature extraction algorithm to extract the image features of the damaged express package from the real-time express package photo.
[0089] Specifically, feature extraction can be performed based on texture or key points. The texture of a normal parcel surface typically exhibits a certain regularity, while the texture of a damaged area undergoes significant changes. Therefore, damage can be identified by analyzing texture features. Key points, such as corners and spots, are points with significant features in an image. Damaged areas may generate new key points or alter the features of existing key points. After extracting image features, further selection and dimensionality reduction can be performed. Because the extracted image features may contain a large amount of information, some of these features may contribute little to damage identification and may even increase computational complexity and the risk of overfitting.
[0090] The above describes the method for tracking and locating damaged parcels in the embodiment of the present invention. The following describes the device for tracking and locating damaged parcels in the embodiment of the present invention. Figure 8 In one embodiment of the present invention, a device for tracking and locating damaged parcels includes:
[0091] Acquisition module 10, used to obtain photos of express parcels in each link of the logistics process and build a photo database based on the photos of express parcels;
[0092] Construction module 20 is used to build a basic framework based on the Inception-V3 network model and introduce the channel attention module to build a basic model;
[0093] A training module 30 is configured to enhance the photos of express packages in the photo database to obtain a training set, and to train the basic model using the training set to obtain a damaged package detection model;
[0094] The detection module 40 is used to obtain real-time express delivery photos, use a damaged express delivery detection model to detect the real-time express delivery photos to obtain detection results, and locate the link where the damage occurs based on the detection results.
[0095] See also Figure 9 In one embodiment of the present invention, a device for tracking and locating damaged parcels includes:
[0096] Acquisition module 10, used to obtain photos of express parcels in each link of the logistics process and build a photo database based on the photos of express parcels;
[0097] Construction module 20 is used to build a basic framework based on the Inception-V3 network model and introduce the channel attention module to build a basic model;
[0098] A training module 30 is configured to enhance the photos of express packages in the photo database to obtain a training set, and to train the basic model using the training set to obtain a damaged package detection model;
[0099] Detection module 40, for obtaining real-time express package photos, using a damaged package detection model to detect the real-time express package photos to obtain detection results, and locating the link where the damage occurs based on the detection results;
[0100] In this embodiment, the building module 20 includes:
[0101] Building submodule 21, which is used to build a basic framework based on the Inception-V3 network model, determine the image input size acceptable to the Inception-V3 network model, and set the hyperparameters of the Inception-V3 network model;
[0102] The first construction submodule 22 is used to construct an SE channel attention module to perform compression, excitation and recalibration operations on the input feature map;
[0103] The second construction submodule 23 is used to introduce the SE channel attention module into the basic framework to build the SE-Inception-V3 basic model;
[0104] In this embodiment, the first construction submodule 22 includes:
[0105] A compression unit 221 is used to set a compression operation to perform global average pooling on each channel of the input feature map, compressing the spatial dimension into a scalar to obtain a compressed feature vector;
[0106] An excitation unit 222 is used to set an excitation operation, calculate the weight of each channel of the input feature map based on the compressed feature vector, and obtain a channel weight;
[0107] A recalibration unit 223 is used to set a recalibration operation, multiplying the channel weights by the input feature map channel by channel to complete the recalibration of the feature map;
[0108] In this embodiment, the excitation unit 222 includes:
[0109] A dimensionality reduction subunit 2221 is configured to set a first fully connected layer to reduce the number of channels of the compressed feature vector to obtain a first output value;
[0110] an activation subunit 2222, configured to set a ReLU activation function to perform a nonlinear transformation on the first output value to obtain a second output value;
[0111] A dimension-increasing subunit 2223 is configured to set a second fully connected layer, configured to perform dimension-increasing on the second output value to obtain a third output value;
[0112] A calculation subunit 2224 is used to set a Sigmoid activation function to normalize the third output value to the range of (0, 1) to obtain a weight for each channel;
[0113] In this embodiment, the training module 30 includes:
[0114] An enhancement unit 31 is used to enhance the express package photos in the photo database. Enhancement techniques include rotation, flipping, cropping, adding noise, and adjusting brightness and contrast to obtain a training set.
[0115] A training unit 32 is used to train the basic model using the training set and perform back propagation using the loss function to update the weights of the basic model;
[0116] A monitoring unit 33 is configured to monitor the training process using a visualization tool and adjust the hyperparameters of the basic model according to the monitoring indicators to obtain a damaged package detection model;
[0117] In this embodiment, the detection module 40 includes:
[0118] A detection unit 41 is used to obtain a real-time express delivery photo and detect the real-time express delivery photo using a damaged express delivery detection model to obtain a detection result;
[0119] An extraction unit 42 is configured to extract image features of the package from the real-time package photo if the detection result indicates damage.
[0120] Comparison unit 43, used to compare the features of the express image with the photos in the photo database to trace and locate the link where the express was damaged;
[0121] In this embodiment, the extraction unit 42 includes:
[0122] Comparison subunit 421 is used to compare the detection result with a set threshold value. If the detection result is greater than the set threshold value, it is considered that there is damage and the package information corresponding to the damaged express package is stored;
[0123] An analysis subunit 422 is used to analyze the real-time express delivery photo using an image analysis algorithm to determine the location and extent of damage;
[0124] The extraction subunit 423 is used to extract the image features of the damaged express package from the real-time express package photo using an image feature extraction algorithm.
[0125] The damaged package tracking and location device of the present invention first collects photos of express packages at various stages of the logistics process to form a photo database. It then constructs an Inception-V3 network model and introduces a channel attention module to build a reliable base model. Data augmentation is then performed on the photo database to obtain a training set, which is then used to train the base model, forming a highly accurate damaged package detection model. Finally, the damaged package detection model performs real-time inspection on the captured package photos, quickly identifying damaged packages, locating them, and preserving relevant evidence. This prevents further losses and allows for effective accountability and post-event prevention and remediation.
[0126] The above is a detailed description of the express package damage tracking and locating device in the embodiment of the present invention from the perspective of modular functional entities. The following is a detailed description of the express package damage tracking and locating device in the embodiment of the present invention from the perspective of hardware processing.
[0127] Figure 10This is a schematic diagram of the structure of a damaged parcel tracking and locating device provided in an embodiment of the present invention. This device 900, which can vary significantly depending on configuration or performance, may include one or more central processing units (CPUs) 910 (e.g., one or more processors), memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) storing applications 933 or data 932. The memory 920 and storage medium 930 may be either transient or persistent storage. The program stored in the storage medium 930 may include one or more modules (not shown), each of which may include a series of instructions and operations within the device 900. Furthermore, the processor 910 may be configured to communicate with the storage medium 930, executing the series of instructions and operations stored in the storage medium 930 on the device 900 to implement the steps of the damaged parcel tracking and locating method provided in the aforementioned method embodiments.
[0128] The damaged parcel tracking and locating device 900 may further include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input and output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 10 The structure of the damaged parcel tracking and locating device shown does not constitute a limitation on the damaged parcel tracking and locating device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0129] 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. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the express delivery damage tracking and locating method.
[0130] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the above-described equipment or device can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0131] If 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 this understanding, the technical solution of the present invention is essentially 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 enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.
[0132] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for tracking and locating damaged express parcels, characterized in that: The steps include: Obtain photos of express parcels at every stage of the logistics process and build a photo database based on the photos of express parcels; The basic framework is built with the Inception-V3 network model, and the channel attention module is introduced to build the basic model; Enhance the express package photos in the photo database to obtain a training set, and use the training set to train the basic model to obtain a damaged express package detection model; Obtain real-time express delivery photos, use the damaged express delivery detection model to detect the real-time express delivery photos to obtain detection results, and locate the link where the damage occurs based on the detection results.
2. The express package damage tracking and positioning method according to claim 1, characterized in that: The basic framework is built based on the Inception-V3 network model, and the channel attention module is introduced to build the basic model, which specifically includes: Build a basic framework based on the Inception-V3 network model, determine the acceptable image input size for the Inception-V3 network model, and set the hyperparameters of the Inception-V3 network model; Construct the SE channel attention module to perform compression, excitation and recalibration operations on the input feature map; The SE channel attention module is introduced into the basic framework to build the SE-Inception-V3 basic model.
3. The express package damage tracking and positioning method according to claim 2, characterized in that: The SE channel attention module is constructed to perform compression, excitation and recalibration operations on the input feature map, specifically including: Set the compression operation to perform global average pooling on each channel of the input feature map, compressing the spatial dimension into a scalar to obtain a compressed feature vector; Set the excitation operation and calculate the weight of each channel of the input feature map based on the compressed feature vector to obtain the channel weight; A recalibration operation is set to multiply the channel weight by the input feature map channel by channel to complete the recalibration of the feature map.
4. The express package damage tracking and positioning method according to claim 3, characterized in that: The setting excitation operation calculates the weight of each channel of the input feature map based on the compressed feature vector to obtain the channel weight, specifically including: Setting a first fully connected layer to reduce the number of channels of the compressed feature vector to obtain a first output value; Set a ReLU activation function to perform a nonlinear transformation on the first output value to obtain a second output value; Setting a second fully connected layer to upgrade the second output value to obtain a third output value; Set the Sigmoid activation function to normalize the third output value to the range of (0, 1) to obtain the weight of each channel.
5. The express package damage tracking and positioning method according to claim 1, characterized in that: The enhanced processing of the express package photos in the photo database to obtain a training set is performed, and the basic model is trained using the training set to obtain a damaged express package detection model, specifically including: Enhance the express package photos in the photo database using techniques such as rotation, flipping, cropping, adding noise, and adjusting brightness and contrast to obtain a training set. The training set is used to train the basic model, and the loss function is used for backpropagation to update the weights of the basic model; Visualization tools are used to monitor the training process, and the hyperparameters of the basic model are adjusted according to the monitoring indicators to obtain a damaged express delivery detection model.
6. The express package damage tracking and positioning method according to claim 1, characterized in that: The method of obtaining a real-time express delivery photo, detecting the real-time express delivery photo using a damaged express delivery detection model to obtain a detection result, and locating the link where the damage occurs based on the detection result specifically includes: Obtain real-time express delivery photos and use the damaged express delivery detection model to detect the real-time express delivery photos to obtain detection results; If the detection result shows damage, extract the image features of the package from the real-time package photo; The image features of the express delivery are compared with the photos in the photo database to trace and locate the link where the express delivery was damaged.
7. The express package damage tracking and positioning method according to claim 6, characterized in that: If the detection result indicates damage, extracting the image features of the package in the real-time package photo specifically includes: Compare the detection result with the set threshold. If the detection result is greater than the set threshold, it is considered damaged and the package information corresponding to the damaged express delivery is stored; Use image analysis algorithms to analyze real-time express photos to determine the location and extent of damage; An image feature extraction algorithm is used to extract the image features of damaged express parcels from real-time express parcel photos.
8. A device for tracking and locating damaged express parcels, characterized in that: include: The acquisition module is used to obtain photos of express packages at each stage of the logistics process and build a photo database based on the photos of express packages; The construction module is used to build the basic framework based on the Inception-V3 network model and introduce the channel attention module to build the basic model; The training module is used to enhance the photos of express packages in the photo database to obtain a training set, and use the training set to train the basic model to obtain a damaged express package detection model; The detection module is used to obtain real-time express delivery photos, use the damaged express delivery detection model to detect the real-time express delivery photos to obtain the detection results, and locate the link where the damage occurs based on the detection results.
9. A device for tracking and locating damaged express parcels, 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 each step of the express delivery damage tracking and positioning 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 steps of the express delivery damage tracking and locating method as described in any one of claims 1 to 7 are implemented.