Fragile product packaging method based on deep learning
Through deep learning technology and U-Net model, the problem that the multi-dimensional attributes of fragile products in traditional packaging methods are solved, and the accurate identification and intelligent packaging of fragile products are achieved, which improves packaging efficiency and safety.
Patent Information
- Application Number
- CN202510728827.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional packaging methods cannot consider the multi-dimensional properties of fragile products, resulting in over- or insufficient packaging, increasing transportation losses and costs.
Using a deep learning-based approach, image data is collected through high-resolution camera devices, image segmentation is performed using improved U-Net models, the material, size and fragility of fragile products are calculated, and the packaging solution is optimized to reduce material waste and improve protection performance.
It realizes accurate identification and intelligent packaging of fragile products, improves packaging efficiency, reduces transportation losses and resource waste, and ensures the safety of fragile products.
Smart Images

Figure CN120246378A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of packaging, and particularly to a method for packaging fragile items based on deep learning. Background Art
[0002] With the rapid development of e-commerce, especially the wide sales of fragile items, products such as glass bottles, kettles, water cups, etc. all involve packaging problems during transportation. How to ensure that fragile items are not damaged during transportation has become a problem to be solved.
[0003] Traditional packaging methods usually cannot consider multi-dimensional attributes such as the shape, material, size, and fragility of items, resulting in over-packaging or under-packaging, which easily causes item breakage and increases transportation costs. Therefore, the present invention proposes a method for packaging fragile items based on deep learning, which can achieve intelligent identification, attribute analysis, and automatic generation of packaging solutions for different fragile items, thereby improving packaging efficiency and reducing transportation losses. Summary of the Invention
[0004] The purpose of the present invention is to solve the problems in the prior art, and to propose a method for packaging fragile items based on deep learning.
[0005] A method for packaging fragile items based on deep learning includes the following steps: S1. Acquisition of fragile item images: Collect image data of fragile items through high-resolution imaging devices; S2. Image preprocessing: Includes image enhancement and normalization steps to ensure the image quality input into the segmentation network; S3. Identification of fragile items: Use the deep learning model U-Net to segment the image and extract the category information and boundary contours of the item; S4. Calculation of fragile item attributes: Calculate the attributes of fragile items based on the recognition results, including the material, size, and fragility assessment score of the fragile item; S5. Selection of packaging solutions: Recommend appropriate packaging materials and sizes according to the attribute analysis of fragile items; S6. Optimization of packaging solutions: Optimize the packaging layout and buffer material configuration to reduce material waste and improve protection performance.
[0006] Preferably, in the step S2, the preprocessing of the fragile item image data specifically includes the following steps: S21: Image enhancement: Use the adaptive histogram equalization method to enhance the image contrast, and the contrast enhancement formula is expressed as: Wherein, is the original input image, is the image after enhancement processing,α and β are the image contrast and brightness enhancement parameters respectively, is the adaptive histogram equalization method; S22: Image standardization: Standardize the size and pixel values of the image. All images are adjusted to a unified size, and the pixel values are unified to the range of 0 to 1. The standardization formula is expressed as: where, is the mean value of the image, is the standard deviation of the image, is the standardized image.
[0007] Preferably, in the step S3, use U-Net to segment the image and extract the category information and boundary contours of the object, which specifically includes the following steps: S31: Dataset division: Divide the image dataset processed in step S2 into a training set, a validation set, and a test set; S32: Model design: Optimize the structure of U-Net according to the characteristics of fragile product images, and adopt multi-scale spatial position fusion and self-attention mechanism; Multi-scale spatial position fusion: The size of the output of the dilated convolution is expressed as: where, represents the size of the input convolution kernel, represents the dilation coefficient, is the equivalent convolution kernel size after dilation; Enhance the modeling ability of spatial position information by introducing a spatial attention mechanism in different-level features. The input features generate low-level features, intermediate-level features, and high-level features after multiple convolutions, and then are further enhanced by the spatial attention mechanism respectively. The final enhanced feature representation is: where, is the extracted high-level feature, is the extracted intermediate-level feature, is the extracted low-level feature, Softmax is the Softmax function; Self-attention mechanism: The self-attention mechanism is expressed as: where, Q represents the query, K represents the key, V represents the value, which are obtained through matrix operations of the input data, representsQ The number of columns of the matrix, introduced The purpose is to prevent the inner product from being too large; S33: Model training and tuning; U-Net is trained using the cross entropy loss function and Adam optimizer to optimize the network structure and hyperparameters to ensure segmentation effect. The loss function is expressed as: in, For the The true label of each pixel, is the predicted value, N is the number of pixels in the image; S34, model output: one is the pixel-level segmentation result of the object, which is used to obtain the precise boundary contour of the object; the other is the category label of the object, which is used to determine its material properties.
[0008] Preferably, in step S4, calculating the item attributes based on the fragile item identification result specifically includes the following steps: S41: Classification of fragile materials: According to the reasoning results of the U-Net model, the category information of fragile products is obtained, and the material type is inferred based on the category. Through material type analysis, a basis is provided for the subsequent selection of packaging solutions. Assume that the category label output by the U-net model is M , combined with predefined material mapping tables T , infer the material type and shape of fragile items, the formula is expressed as: S42: Calculation of fragile object bounding box: Calculate the minimum circumscribed rectangle of the object outline to obtain the width and height of the object; S43: Calculation of fragile item size: According to the category of the item, the object size is estimated by the common depth range of the object category. The depth formula is expressed as: in, and is the width and height of the object, Y is the object category, f is a function based on item category and image size; S44: Fragile item vulnerability assessment: Based on the size, shape, and material information of the item, a vulnerability assessment is performed. The vulnerability score is expressed as: V in, , and is the weight coefficient used to adjust the impact of shape, volume and material on the vulnerability score. V3D is the volume of the object, is the vulnerability score of the material, is the vulnerability score of the object shape, which is expressed as: wherein, and are the weights of the vulnerability score of the object shape, is the aspect ratio score of the object. The average value of three ratios is used as the aspect ratio score of the object, is the sphericity score, which is calculated from the volume and surface area of the object.
[0009] Preferably, in step S5, according to the attribute analysis of the fragile item, appropriate packaging materials and sizes are recommended, which specifically include the following steps: S51: Select appropriate packaging materials according to the material of the item; S52: Select appropriate sizes of the packaging box according to the size and shape of the item: S53: Design the packaging layout according to the vulnerability of the item, and determine the positions of the cushioning materials. For highly vulnerable items, more cushioning materials are placed at the corners and edges of the item; for relatively sturdy items, the cushioning materials can be placed at the top and bottom of the item to reduce the need for side protection.
[0010] Preferably, in step S6, the packaging layout and the cushioning material configuration are optimized, which specifically include the following steps: S61: Input parameters: including the material, shape, size, vulnerability score of the fragile item and the size of the packaging box; S62: Preprocessing: Obtain the volume of the fragile item according to step S4, and classify the fragile item into three protection levels: high, medium, and low according to the vulnerability score; S63: Sorting: Sort from largest to smallest by volume, and at the same time consider the vulnerability score, with high-vulnerability fragile items given priority; S64: Initialize the packaging box: Set the initial state of the packaging box to be empty; S65: Layout optimization: Try to place each fragile item into the packaging box in turn, select the best position and orientation, and use heuristic rules to maximize the space utilization rate while avoiding direct contact between fragile items; S66: Cushioning configuration: Configure appropriate amounts of cushioning materials according to the protection level and shape of the fragile item. More or thicker cushioning materials are configured for high-vulnerability fragile items. The relationship between the thickness of the cushioning material and the vulnerability score is expressed as: wherein, represents at the The thickness of the cushioning material at a position represents the vulnerability score of the item at that position is a proportionality coefficient used to adjust the relationship between the vulnerability score and the thickness of the cushioning material is a constant used to adjust according to the material of the item to ensure that the formula adapts to different types of items is the weight factor related to that position, representing the protection requirement of that position; S67: Collision detection: Check whether the newly placed fragile item collides with the already placed fragile items or the edge of the packing box. If a collision occurs, adjust the position or reconfigure the cushioning material; S68: Update status and output scheme: Record the position, orientation and cushioning configuration of the placed fragile items, update the remaining space of the packing box, and output the final layout of the fragile items in the packing box, the orientation and cushioning configuration of each fragile item.
[0011] Compared with the existing technology, the advantages of the present invention are as follows: 1. The present invention proposes a method for packing fragile items based on deep learning. By combining high-resolution image data and deep learning models for item recognition, it can accurately extract the category and boundary information of fragile items, providing accurate data support for the generation of packing schemes.
[0012] 2. The present invention uses an improved U-Net model to segment the images of fragile items, and combines with calculating the material, size and vulnerability assessment score of fragile items, effectively constructing the correlation relationship between the attributes of fragile items and packing schemes, and realizing intelligent attribute assessment and optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a flowchart of the present invention.
[0014] Figure 2 is a schematic diagram of the improved U-net structure in the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0015] To make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, the present invention will be further described below in conjunction with specific embodiments.
[0016] Referring to Figure 1 as shown, a method for packing fragile items based on deep learning includes the following steps: S1. Acquisition of fragile item images: Collect image data of fragile items through a high-resolution imaging device; S2. Image preprocessing: Include image enhancement and normalization steps to ensure the image quality input into the segmentation network; S3. Fragile item recognition: Use the deep learning model U-Net to segment the image and extract the category information and boundary contours of the item; S4. Fragile item attribute calculation: Calculate the attributes of the fragile item based on the recognition result, including the material, size, and vulnerability assessment score of the fragile item; S5. Packaging solution selection: Recommend appropriate packaging materials and sizes based on the analysis of the attributes of the fragile item; S6. Packaging solution optimization: Optimize the packaging layout and buffer material configuration to reduce material waste and improve the protection performance.
[0017] In this embodiment, in step S2, the preprocessing of the fragile item image data specifically includes the following steps: S21: Image enhancement: Use the adaptive histogram equalization method to enhance the image contrast. The contrast enhancement formula is expressed as: where, is the original input image, is the image after enhancement processing, α and β are the image contrast and brightness enhancement parameters respectively, is the adaptive histogram equalization method; S22: Image normalization: Normalize the size and pixel values of the image. All images are adjusted to a unified size, and the pixel values are unified to the range of 0 to 1. The normalization formula is expressed as: where, is the mean of the image, is the standard deviation of the image, is the normalized image.
[0018] In this embodiment, in step S3, use U-Net to segment the image and extract the category information and boundary contours of the item. Specifically, it includes the following steps: S31: Dataset division: Divide the image dataset processed in step S2 into a training set, a validation set, and a test set; S32: Model design: According to the characteristics of the fragile item image, optimize the structure of U-Net, adopt multi-scale spatial position fusion and self-attention mechanism to ensure that the model can effectively extract the key features of the item and enhance the accuracy of the segmentation result; Multi-scale Spatial Location Fusion: To address the problems of spatial information loss and insufficient local dependencies caused by feature flow between the encoder and decoder, a multi-scale spatial location fusion mechanism is adopted. Rich context information is captured under different receptive fields through multi-scale dilated convolutions. The dilated convolutions capture rich context information under different receptive fields, enhancing the model's ability to capture features at different scales. The size of the output of the dilated convolution is expressed as: where, represents the size of the input convolution kernel, represents the dilation coefficient, is the equivalent convolution kernel size after dilation; By introducing a spatial attention mechanism in features at different levels, the modeling ability of spatial location information is enhanced. The input features generate low-level features, intermediate-level features, and high-level features after multiple convolutions, and then are further enhanced through the spatial attention mechanism respectively, generating the final enhanced feature representation as: where, is the extracted high-level feature, is the extracted intermediate-level feature, is the extracted low-level feature, Softmax is the Softmax function; Self-attention Mechanism: After upsampling in the decoder stage, the multi-scale fusion of features often leads to a mismatch between high-dimensional semantic information and low-level details. The effective fusion of features at each scale is optimized by introducing a self-attention mechanism. The self-attention mechanism can optimize feature fusion by calculating the correlation between positions in the input feature map. The self-attention mechanism is expressed as: where, Q represents the query, K represents the key, V represents the value, which are obtained through matrix operations on the input data, represents Q the number of columns of the matrix. The purpose of introducing is to prevent the inner product from being too large; S33: Model Training and Tuning; The U-Net is trained using the cross-entropy loss function and the Adam optimizer, and the network structure and hyperparameters are tuned to ensure the segmentation effect. The loss function is expressed as: where, is the true label of the th pixel, is the predicted value, N is the number of pixels in the image; S34, model output: one is the pixel-level segmentation result of the object, which is used to obtain the precise boundary contour of the object; the other is the category label of the object, which is used to determine its material properties.
[0019] In this embodiment, in step S4, the item attributes are calculated based on the fragile item identification result, specifically including the following steps: S41: Classification of fragile materials: According to the reasoning results of the U-Net model, the category information of fragile products is obtained, and the material type is inferred based on the category. Through material type analysis, a basis is provided for the subsequent packaging solution selection. Assume that the category label output by the U-net model is M , combined with predefined material mapping tables T , infer the material type and shape of fragile items, the formula is expressed as: S42: Calculation of fragile object bounding box: Calculate the minimum circumscribed rectangle of the object outline to obtain the width and height of the object; S43: Calculation of fragile item size: According to the category of the item, the object size is estimated by the common depth range of the object category. The depth formula is expressed as: in, and is the width and height of the object, Y is the object category, f is a function based on item category and image size; S44: Fragile item vulnerability assessment: Based on the size, shape, and material information of the item, a vulnerability assessment is performed. The vulnerability score is expressed as: V in, , and is the weight coefficient used to adjust the impact of shape, volume and material on the vulnerability score. V 3D is the volume of the object, The vulnerability score of the material is implemented based on rules, and a score is assigned to each material according to the material category. Score the fragility of the object shape, which is expressed as: in, and is the weight of the fragility score of the object shape, Score the object's aspect ratio, and calculate the average of the three ratios as the object's aspect ratio score. Sphericity score, calculated from the volume and surface area of the object.
[0020] In this embodiment, in step S5, according to the property analysis of the fragile item, appropriate packaging materials and sizes are recommended, specifically including the following steps: S51: According to the material of the item, select appropriate packaging materials (such as bubble wrap, foam, etc.); S52: According to the size and shape of the item, select the appropriate size of the packing box: S53: According to the fragility of the item, design the packaging layout and determine the position of the cushioning material. For highly fragile items (such as glass), place more cushioning materials (bubble wrap, foam, etc.) at the corners and edges of the item; for relatively sturdy items (such as ceramics), the cushioning material can be placed at the top and bottom of the item, reducing the need for side protection.
[0021] In this embodiment, in step S6, the packaging layout and cushioning material configuration are optimized, specifically including the following steps: S61: Input parameters: including the material, shape, size, fragility score of the fragile item, and the size of the packing box; S62: Preprocessing: Obtain the volume of the fragile item according to step S4, and classify the fragile item into three protection levels: high, medium, and low according to the fragility score; S63: Sorting: Sort from largest to smallest by volume, and at the same time consider the fragility score, with high-fragility fragile items taking precedence; S64: Initialize the packing box: Set the initial state of the packing box to be empty; S65: Layout optimization: Try to place each fragile item into the packing box in turn, select the best position and orientation, and use heuristic rules to maximize the space utilization rate while avoiding direct contact between fragile items; S66: Cushioning configuration: According to the protection level and shape of the fragile item, configure an appropriate amount of cushioning material for it. High-fragility fragile items are configured with more or thicker cushioning materials. The relationship between the thickness of the cushioning material and the fragility score is expressed as: Where represents the thickness of the cushioning material at the th position, represents the fragility score of the item at this position, is a proportionality coefficient used to adjust the relationship between the fragility score and the thickness of the cushioning material, is a constant used to adjust according to the material of the item to ensure that the formula adapts to different types of items, is the weight factor related to this position, representing the protection requirement of this position; S67: Collision detection: Check whether the newly placed fragile item collides with the already placed fragile items or the edge of the packaging box. If a collision occurs, adjust the position or reconfigure the cushioning material; S68: Update status and output the scheme: Record the positions, orientations, and cushioning configurations of the placed fragile items, update the remaining space of the packaging box, and output the final layout of the fragile items in the packaging box, the orientation of each fragile item, and the cushioning configuration.
[0022] In summary, the packaging method in the present invention is based on deep learning technology and optimization algorithms, can automatically identify the categories of fragile items, accurately calculate the sizes and shapes of items, and intelligently select appropriate packaging materials and packaging schemes, thereby improving packaging efficiency, reducing resource waste, and ensuring the safety of fragile items during transportation.
[0023] As is known by common technical knowledge, the present invention can be implemented by other embodiments that do not depart from its spiritual essence or essential features. Therefore, the above-disclosed embodiments are illustrative in all aspects and not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are encompassed by the present invention.
Claims
1. A method for packaging fragile items based on deep learning, characterized in that: It includes the following steps: S1. Fragile item image acquisition: Image data of fragile items are acquired through high-resolution imaging devices; S2. Image preprocessing: It includes image enhancement and normalization steps to ensure the image quality input into the segmentation network; S3. Fragile item recognition: The U-Net deep learning model is used to segment the image and extract the category information and boundary contours of the item; S4. Fragile item attribute calculation: Based on the recognition result, the attributes of the fragile item are calculated, including the material, size, and vulnerability assessment score of the fragile item; S5. Packaging solution selection: According to the attribute analysis of the fragile item, appropriate packaging materials and sizes are recommended; S6. Packaging solution optimization: Optimize the packaging layout and buffer material configuration to reduce material waste and improve the protection performance.
2. The method for packaging fragile items based on deep learning according to claim 1, characterized in that: In step S2, the image data of the fragile item is preprocessed, which specifically includes the following steps: S21: Image enhancement: The adaptive histogram equalization method is used to enhance the image contrast, and the contrast enhancement formula is expressed as: Among them, is the original input image, is the image after enhancement processing, α and β are the image contrast and brightness enhancement parameters respectively, is the adaptive histogram equalization method; S22: Image normalization: The size and pixel values of the image are normalized. All images are adjusted to a unified size, and the pixel values are unified to the range of 0 to 1. The normalization formula is expressed as: Among them, is the mean value of the image, is the standard deviation of the image, is the image after standardization.
3. A method for packaging fragile items based on deep learning according to claim 1, characterized in that: In step S3, the U-Net is used to segment the image and extract the category information and boundary contours of the item, which specifically includes the following steps: S31: Dataset division: The image dataset processed in step S2 is divided into a training set, a validation set, and a test set; S32: Model design: According to the characteristics of the fragile item image, the structure of the U-Net is optimized, and multi-scale spatial position fusion and self-attention mechanism are adopted; Multi-scale spatial position fusion: The size of the output of the dilated convolution is expressed as: Among them, represents the size of the input convolution kernel, represents the dilation coefficient, is the size of the equivalent convolution kernel after dilation; By introducing a spatial attention mechanism in different-level features to enhance the modeling ability of spatial position information, the input features generate bottom-level features, middle-level features, and high-level features after multiple convolutions, and then are further enhanced by the spatial attention mechanism respectively to generate the final enhanced feature representation as: Among them, is the extracted high-level feature, is the extracted middle-level feature, is the extracted low-level feature, Softmax is the Softmax function; Self-attention mechanism: The self-attention mechanism is expressed as: Among them, Q represents a query, K represents a key, V represents a value, which is obtained through matrix operations on the input data, represents Q the number of columns of the matrix. The purpose of introducing is to prevent the inner product from being too large; S33: Model training and tuning; The U-Net is trained using the cross-entropy loss function and the Adam optimizer, and the network structure and hyperparameters are tuned to ensure the segmentation effect. The loss function is expressed as: Among them, is the true label of the th pixel, is the predicted value, N is the number of pixels in the image; S34. Model output: One is the pixel-level segmentation result of the item, which is used to obtain the precise boundary contour of the item; the other is the category label of the item, which is used to judge its material attribute.
4. A method for packaging fragile items based on deep learning according to claim 1, characterized in that: In step S4, the item attributes are calculated based on the fragile item recognition result, which specifically includes the following steps: S41: Classification of Fragile Material: According to the inference result of the U-Net model, obtain the category information of the fragile item, and infer its material type based on the category. Through the analysis of the material type, provide a basis for the subsequent selection of packaging solutions. Assume that the category label output by the U-net model is M , combined with the predefined material mapping table T , infer the material type and shape of the fragile item. The formula is expressed as: S42: Calculation of the bounding box of the fragile item: Calculate the minimum bounding rectangle of the object contour to obtain the width and height of the object; S43: Calculation of the size of the fragile item: According to the category of the item, the size of the object is inferred through the common depth range of the object category. The depth formula is expressed as: Wherein, and are the width and height of the object, Y is the object category, f is a function based on the object category and the image size; S44: Vulnerability assessment of the fragile item: Combine the size, shape, and material information of the item to conduct a vulnerability assessment. The vulnerability score is expressed as: V Among them, , and are weight coefficients used to adjust the influence of shape, volume, and material on the vulnerability score. V 3D is the volume of the object, is the vulnerability score of the material, is the vulnerability score of the object's shape, and this score is expressed as: Among them, and are the weights of the vulnerability score of the object shape, is the aspect ratio score of the object. The average value of the three ratios is used as the aspect ratio score of the object respectively, is the sphericity score, which is calculated from the volume and surface area of the object.
5. A method for packaging fragile items based on deep learning according to claim 1, characterized in that: In step S5, according to the attribute analysis of the fragile item, appropriate packaging materials and sizes are recommended, which specifically includes the following steps: S51: Select a suitable packaging material according to the material of the item; S52: Select a suitable size of the packing box according to the size and shape of the item; S53: Design the packaging layout according to the vulnerability of the item, determine the position of the cushioning material. For highly vulnerable items, place more cushioning material at the corners and edges of the item; for relatively sturdy items, the cushioning material can be placed at the top and bottom of the item to reduce the need for side protection.
6. The fragile item packaging method based on deep learning according to claim 1, wherein: In step S6, optimize the packaging layout and cushioning material configuration, which specifically includes the following steps: S61: Input parameters: including the material, shape, size, vulnerability score of the fragile item and the size of the packing box; S62: Preprocessing: Obtain the volume of the fragile item according to step S4, and classify the fragile item into three protection levels: high, medium, and low according to the vulnerability score; S63: Sorting: Sort from largest to smallest by volume, and at the same time consider the vulnerability score, with high-vulnerability fragile items taking precedence; S64: Initialize the packing box: Set the initial state of the packing box to be empty; S65: Layout optimization: Try to place each fragile item into the packing box in turn, select the best position and orientation, and use heuristic rules to maximize the space utilization rate while avoiding direct contact between fragile items; S66: Cushioning configuration: Configure an appropriate amount of cushioning material according to the protection level and shape of the fragile item. High-vulnerability fragile items are configured with more or thicker cushioning material. The relationship between the thickness of the cushioning material and the vulnerability score is set as: Among them, represents the thickness of the cushioning material at the th position, represents the vulnerability score of the item at this position, is a proportionality coefficient used to adjust the relationship between the vulnerability score and the thickness of the cushioning material, is a constant used to adjust according to the material of the item to ensure that the formula adapts to different types of items, is the weight factor related to this position, representing the protection requirement of this position; S67: Collision detection: Check whether the newly placed fragile item collides with the already placed fragile items or the edges of the packing box. If a collision occurs, adjust the position or reconfigure the cushioning material; S68: Update the status and output the solution: Record the position, orientation and cushioning configuration of the placed fragile items, update the remaining space of the packing box, and output the final layout of the fragile items in the packing box, the orientation of each fragile item and the cushioning configuration.
Citation Information
Patent Citations
Pre-packaging quality recognition method based on deep learning
CN110969177A
Planar object edge extraction method based on machine vision and deep segmentation network
CN116863156A
Rapid package design system and method based on image processing
CN116910997A
Profile defect visual inspection method based on image processing
CN117152119A
Image feature recognition method based on robot deep learning
CN118470337A