Packaging material detection method, device, electronic equipment and storage medium

Through the packaging method and device, the type of image recognition and classification technology is used to automatically identify the type of packaging material, which solves the problem of high artificial identification error rate, and improves the detection accuracy and automatic recognition probability.

CN114219955BActive Publication Date: 2025-01-28SF TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010986809.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-01-28
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

When identifying or recording packaging materials through manual operations, the error rate is high and there is a lack of third-party supervision, resulting in the abuse and waste of packaging materials.

Method used

Provide a packaging material detection method and device. By obtaining the image of the packaging material, you can detect whether there is a material identification code. If you exist, you can analyze the identification code to obtain the material type.

Benefits of technology

The automatic recognition probability and detection accuracy of packaging materials have been improved, the error rate of manual operation is reduced, and effective supervision of packaging materials is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219955B_ABST
    Figure CN114219955B_ABST
Patent Text Reader

Abstract

The present application provides a packaging material detection method, device, electronic device and computer-readable storage medium. The packaging material detection method includes: obtaining at least one packaging material image of each packaging material on a conveying device within a preset time period; performing detection processing on the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code; if the packaging material image has the material identification code, performing parsing processing according to the material identification code to obtain the material type of each packaging material; if the packaging material image does not have the material identification code, performing classification processing according to the packaging material image to obtain the material type of each packaging material. The present application can improve the recognition rate and recognition accuracy of packaging materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a packaging material detection method, device, electronic device and computer-readable storage medium. Background Art

[0002] In recent years, due to the substantial increase in domestic pulp costs, the prices of commonly used packaging materials (i.e. packaging materials) in the express delivery industry, such as cartons and document envelopes, have risen accordingly, causing the express delivery costs to rise all the way. Due to the lack of supervision over packaging materials such as cartons, it is often the case that the actual amount of packaging materials used on site is less than the amount applied to the headquarters, resulting in abuse and waste, further increasing the express delivery costs.

[0003] In order to supervise the packaging materials, the identification or recording of traditional packaging materials is done by manually scanning the material code with a handheld barcode reader or manually entering the packaging material type. However, the manual identification or recording of packaging materials lacks third-party supervision and has a high error rate. Summary of the invention

[0004] The present application provides a packaging material detection method, device, electronic device and computer-readable storage medium, aiming to solve the problem of high error rate in packaging material identification or recording caused by manual operation.

[0005] In a first aspect, the present application provides a packaging material detection method, the method comprising:

[0006] Acquire at least one packaging material image of each packaging material on the conveying device within a preset time period;

[0007] Performing detection processing on the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code;

[0008] If the packaging material image has the material identification code, then performing parsing processing according to the material identification code to obtain the material type of each packaging material;

[0009] If the packaging material image does not have the material identification code, classification processing is performed according to the packaging material image to obtain the material type of each packaging material.

[0010] In a second aspect, the present application provides a packaging material detection device, the packaging material detection device comprising:

[0011] An acquisition unit, used to acquire at least one packaging material image of each packaging material on the conveying device within a preset time period;

[0012] A detection unit, used for performing detection processing on the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code;

[0013] A decoding unit, configured to, if the packaging material image contains the material identification code, perform a parsing process according to the material identification code to obtain the material type of each packaging material;

[0014] A classification unit is used for performing classification processing according to the packaging material image to obtain the material type of each packaging material if the material identification code does not exist in the packaging material image.

[0015] In a possible implementation of the present application, the decoding unit is further configured to:

[0016] If the packaging material image contains the material identification code, calling a preset parsing algorithm to perform parsing processing according to the material identification code;

[0017] When the parsing algorithm parses out the identification code information of the material identification code, obtaining the packaging information corresponding to the identification code information as the material type;

[0018] When the parsing algorithm fails to parse the material identification code, classification processing is performed according to the packaging material image to obtain the material type of each packaging material.

[0019] In a possible implementation of the present application, the classification unit is further used to:

[0020] Calling the trained classification network to perform feature extraction processing on the packaging material image to obtain image feature information of the packaging material image;

[0021] Calling the classification network to perform prediction processing according to the feature information to obtain the predicted type of the packaging material and the confidence of the predicted type;

[0022] The material type of each packaging material is determined according to the prediction type and the confidence level.

[0023] In a possible implementation of the present application, the packaging material detection device further includes a statistical unit, and the statistical unit is specifically used to:

[0024] Statistical processing is performed on the quantity of packaging materials according to the material types to obtain the usage quantity of packaging materials of each preset type within the preset time period.

[0025] In a possible implementation of the present application, the detection unit is further configured to:

[0026] Performing a wrapping area detection process on the packaging material image to determine whether the packaging material image has a target wrapping area;

[0027] When the packaging material image does not exist in the target wrapping area, determining that the packaging material image does not have a material identification code;

[0028] When the target package area exists in the packaging material image, performing identification code area detection processing according to the target package area;

[0029] When the identification code area in the target package area is not detected, determining that the packaging material image does not have the material identification code;

[0030] When the identification code area in the target package area is detected, it is determined that the material identification code exists in the packaging material image.

[0031] In a possible implementation of the present application, the detection unit is further configured to:

[0032] Performing package area detection processing on the packaging material image to obtain various package areas;

[0033] Detecting a package identification code of the package area and detecting a preset identification code of the packaging material image;

[0034] When it is detected that the package identification code is the same as the preset identification code, determining that the target package area exists in the packaging material image;

[0035] When the preset identification code is not detected, determining that the target wrapping area does not exist in the packaging material image;

[0036] When the target package area exists in the packaging material image, performing identification code area detection processing according to the target package area, the process further includes:

[0037] A package area corresponding to a target package identification code is acquired as the target package area of ​​the packaging material image, wherein the target package identification code is a package identification code that is the same as the preset identification code.

[0038] In a possible implementation of the present application, the material type includes at least one of a carton, a plastic bag, and a document envelope.

[0039] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the processor executes the steps of any packaging material detection method provided in the present application.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the packaging material detection method.

[0041] The present application obtains at least one packaging material image of each packaging material on the conveying device within a preset time period; performs detection processing on the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code; if the packaging material image has a material identification code, performs parsing processing based on the material identification code to obtain the material type of each packaging material; if the packaging material image does not have a material identification code, performs classification processing based on the packaging material image to obtain the material type of each packaging material. It can be seen that since each packaging material is preferentially identified by the material identification code, if the packaging material image does not have a material identification code or cannot be identified by the material identification code, the material type of the packaging material is classified based on the packaging material image; on the one hand, the automatic identification probability of the packaging material is improved; on the other hand, the detection accuracy of the packaging material is improved, avoiding the problem of manual operation to identify or record the packaging material, resulting in a high error rate in the identification or recording of the packaging material. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 is a schematic diagram of a scenario of a packaging material detection system provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a process of a packaging material detection method provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of a packaging material image provided in an embodiment of the present application;

[0046] Figure 4 is a schematic diagram of an embodiment of step S20 provided in an embodiment of the present application;

[0047] Figure 5 is another schematic diagram of the packaging material image provided in the embodiments of the present application;

[0048] Figure 6 is a schematic flow chart of an embodiment of step S30 provided in an embodiment of the present application;

[0049] Figure 7is a schematic structural diagram of an embodiment of a packaging material detection device provided in an embodiment of the present application;

[0050] Figure 8 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0052] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0053] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0054] The embodiments of the present application provide a packaging material detection method, device, electronic device and computer-readable storage medium. The packaging material detection device can be integrated in an electronic device, which can be a server or a terminal.

[0055] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the embodiments of the present application is introduced.

[0056] In recent years, the number of domestic express deliveries has increased dramatically, and cost reduction and efficiency improvement have become the basic demands of every express delivery company. Packaging materials, such as cartons and document seals, are often abused and wasted due to the lack of effective supervision. The current method of counting packaging materials is to manually scan material codes or manually enter packaging material types, which lacks supervision and has a high error rate.

[0057] Based on the above-mentioned defects in the existing related technologies, the embodiments of the present application provide a packaging material detection method, which at least overcomes the defects in the existing related technologies to a certain extent.

[0058] See also Figure 1 , Figure 1 : is a scene diagram of the packaging material detection system provided in the embodiment of the present application. Among them, the packaging material detection system may include an electronic device 100, and a packaging material detection device is integrated in the electronic device 100. For example, the electronic device can obtain at least one packaging material image of each packaging material on the conveying device within a preset time period; perform detection processing on the identification code area of ​​the packaging material image to determine whether there is a material identification code in the packaging material image; if there is a material identification code in the packaging material image, perform parsing processing based on the material identification code to obtain the material type of each packaging material; if there is no material identification code in the packaging material image, perform classification processing based on the packaging material image to obtain the material type of each packaging material. In this application, the recognition rate and recognition accuracy of packaging materials can be improved.

[0059] In addition, if Figure 1 As shown, the packaging material detection system may further include a memory 200 for storing data, such as image data and video data.

[0060] It should be noted that Figure 1 The scenario diagram of the packaging material detection system shown is merely an example. The packaging material detection system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the packaging material detection system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0061] The executor of the packaging material detection method of the embodiment of the present application may be the packaging material detection device provided in the embodiment of the present application, or different types of electronic devices such as a server device, a physical host or a user equipment (UE) that integrates the packaging material detection device. The packaging material detection device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer or a personal digital assistant (PDA).

[0062] The electronic device can adopt a single-operation working mode or a device cluster working mode. By applying the packaging material detection method provided in the embodiment of the present application, it can automatically identify the category of packaging materials without human intervention throughout the process with high accuracy, which can improve the recognition rate and recognition accuracy of packaging materials.

[0063] Next, the packaging material detection method provided in the embodiment of the present application is introduced. In the embodiment of the present application, an electronic device is used as an execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments.

[0064] Reference Figure 2 , Figure 2 It is a flow chart of a packaging material detection method provided in an embodiment of the present application. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here. The packaging material detection method includes steps S10 to S40, wherein:

[0065] S10. Acquire at least one packaging material image of each packaging material on the conveying device within a preset time period.

[0066] In the embodiments of the present application, the packaging materials (also referred to as "packaging materials" or "packaging materials" herein) may be packaging boxes and packaging bags. The packaging bags may be document envelopes, document bags or parcel bags, etc. The packaging boxes may be polyhedral packaging boxes. The polyhedral shapes may be regular shapes, such as regular polyhedrons, cylinders, etc., such as cube shapes and rectangular parallelepiped shapes in regular hexahedrons. In special applications, such as packaging specific items, they may also be irregular shapes, which are not specifically limited here.

[0067] In the embodiments of the present application, the identification of packaging materials of express delivery in the field of logistics is used as an example to explain more clearly how to automatically identify the type of packaging materials. It can be understood that the packaging material detection method provided in the embodiments of the present application is not limited to the identification of packaging materials of express delivery, but can also be applied to the identification of packaging materials in other fields, such as the identification of packaging materials of facial cleansers and facial masks on cosmetic production lines.

[0068] In the embodiment of the present application, packaging materials such as packaging boxes will be printed with special material identification codes when leaving the factory, and the material type of the packaging material (for example, packaging cartons, soft plastic bags, and document envelopes, etc.) can be obtained by parsing the material identification code. The material identification code can be a QR code or a barcode, wherein the barcode can be an EAN barcode, a UPC barcode, a Codabar barcode, a 39 barcode, a 25 barcode, a cross 25 barcode, or a matrix 25 barcode, etc., and the QR code can be PDF417, QR Code, Code 49, Code 16K, Code One, etc. The above-mentioned material identification codes are only examples, and it can be understood that the material identification code can also be other types of barcodes or QR codes, or new barcodes or QR codes that will appear in the future, as well as other types of material identification codes, which are not specifically limited here.

[0069] Among them, the preset time period can be set according to specific needs. For example, in order to detect the packaging materials of express parcels at express delivery and receiving point A in July 2020, the preset time period can be July 1, 2020-July 31, 2020; for example, in order to detect the packaging materials of express parcels at express delivery and receiving point B on July 1, 2020, the preset time period can be 0-24 hours on July 1, 2020.

[0070] Among them, the conveying device can be a belt conveyor, a rubber belt conveyor, etc. The above conveying device is only an example. It can be understood that the conveying device can also be other types of conveying devices, which are not specifically limited here.

[0071] In order to improve the speed and comprehensiveness of the detection of packaging materials, in an embodiment of the present application, the characteristics of the conveying device for conveying packaging materials will be adopted for production processes (for example, in a logistics transfer yard, express parcels are conveyed by conveyor belts on a sorting line), and the images of the packaging materials on the conveying device are obtained for further analysis and processing to quickly and comprehensively detect each packaging material.

[0072] Specifically, in actual applications, an electronic device that applies the packaging material detection method provided in the embodiment of the present application may directly include a camera in the scene area where the conveying device is located (such as the sorting area of ​​a logistics transfer site) in terms of hardware (the field of view of the camera mainly covers the conveying device to collect images of the packaging materials on the conveying device), and store the images taken by the camera locally, which can be directly read inside the electronic device; alternatively, the electronic device may also establish a network connection with the camera, and obtain the images obtained by the camera online from the camera based on the network connection; alternatively, the electronic device may also read the images obtained by the camera from a related storage medium that stores the images obtained by the camera, and the specific acquisition method is not limited here.

[0073] The camera can capture images according to a preset shooting method, such as setting a shooting height, shooting direction or shooting distance. The specific shooting method can be adjusted according to the camera itself, and is not limited here. The multiple frames of images captured by the camera can be combined into a video through a timeline.

[0074] S20: Perform detection processing on the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code.

[0075] In some embodiments, step S20 can be implemented using a deep-learned identification code detection network. That is, step S20 can specifically include: inputting the packaging material image into the trained identification code detection network, calling the identification code detection network to perform identification code region detection processing on the packaging material image, and determining whether there is a material identification code in the packaging material image.

[0076] Among them, the trained identification code detection network can be used to perform binary classification on the image (specifically: dividing the image into two categories: the material identification code exists and the material identification code does not exist), and detect the area where the material identification code exists in the packaging material image.

[0077] For example, first, based on a training data set (including positive samples and negative samples, positive samples include multiple images containing material identification codes, and negative samples are images that do not contain material identification codes), a preset identification code detection network is trained so that the trained identification code detection network learns the characteristics of the material identification code, thereby obtaining a trained identification code detection network (suitable for performing detection processing based on the image to determine whether there is a binary classification of the material identification code in the image, and determining the area where the material identification code in the image is located). Among them, the preset face sheet recognition network can be an open source network model that can be used for detection tasks, such as OverFeat network, YOLOv1 network, YOLOv2 network, YOLOv3 network, SSD network and RetinaNet network, etc. Specifically, an open source network with model parameters as default values ​​(which can be used for detection tasks) can be used as the preset identification code detection network.

[0078] Then, the packaging material image is input into the trained identification code detection network, so as to call the trained identification code detection network to classify the packaging material image and determine whether there is a material identification code in the packaging material image. When it is determined that there is a material identification code in the packaging material image, the packaging material image is subjected to a material identification code region detection process to predict the material identification code region in the packaging material image.

[0079] like Figure 3 As shown, Figure 3This is a schematic diagram of a packaging material image provided in an embodiment of the present application. Generally speaking, the material identification code accounts for a relatively small proportion in the packaging material image. If a large-scale detection is performed on the entire image, it is difficult to accurately and quickly detect whether the material identification code exists. For this reason, in an embodiment of the present application, the package area in the packaging material image is first detected, and then the material identification code is detected based on the package area.

[0080] Please refer to Figure 4 , Figure 4 1 is a flow chart of an embodiment of step S20 provided in the embodiment of the present application. At this time, step S20 may specifically include the following steps S21 to S25, wherein:

[0081] S21 , performing a wrapping area detection process on the packaging material image to determine whether the packaging material image contains a target wrapping area.

[0082] The target package refers to a package of a preset packaging type, such as a package packaged in a carton, a package packaged in a plastic bag, a package packaged in a document envelope, etc. The target package area refers to the area where the target package is located in the packaging material image.

[0083] In the embodiment of the present application, the purpose of detecting the target package area is: on the one hand, to determine whether there is a package in the packaging material image. If there is no package, no further processing is required to reduce the amount of data processing. On the other hand, since the material identification code is on the package, the target package area is located, which is more conducive to quickly and accurately detecting the material identification code.

[0084] In some embodiments, step S21 can be implemented using a package area detection network that has undergone deep learning. That is, step S21 may specifically include: inputting the packaging material image into the trained package area detection network, calling the package area detection network to perform package area detection processing on the packaging material image, and determining whether there is a target package area (i.e., whether there is a target package) in the packaging material image.

[0085] Among them, the trained package area detection network can be used to perform binary classification on the image (specifically: dividing the image into two categories: the target package exists and the target package does not exist), and detect the area where the target package exists in the packaging material image.

[0086] For example, first, based on a training data set (including positive samples and negative samples, the positive samples include multiple images containing packages, and the negative samples are images that do not contain packages), the preset package area detection network is trained so that the trained package area detection network learns the characteristics of the package, thereby obtaining a trained identification code detection network (suitable for performing detection processing based on the image to determine whether there is a binary classification of the package in the image, and determine the area where the package in the image is located). Among them, the preset package area detection network can be an open source network model that can be used for detection tasks, such as OverFeat network, YOLOv1 network, YOLOv2 network, YOLOv3 network, SSD network and RetinaNet network, etc. Specifically, an open source network with model parameters as default values ​​(which can be used for detection tasks) can be used as the preset package area detection network.

[0087] Then, the packaging material image is input into the trained package area detection network to call the trained package area detection network to classify the packaging material image and determine whether there is a target package in the packaging material image. When it is determined that there is a target package in the packaging material image, the package area detection process is performed on the packaging material image to predict the target package area in the packaging material image, so as to further detect the material identification code based on the target package area.

[0088] In the embodiment of the present application, the ultimate purpose of detecting the material type of the packaging material is to count the usage quantity of each packaging material to facilitate management work such as billing and distribution of the packaging materials.

[0089] Please refer to Figure 5 , Figure 5 It is another schematic diagram of the packaging material image provided in the embodiment of the present application. In some scenarios, some packaging material images contain several packages at the same time. For example, in the express sorting of logistics transit, for the sorting of small items, there may be multiple small items on the conveying device at the same time, so the captured packaging material image may contain multiple small items at the same time. And each small item may be in a different packaging material image. If the quantity of packaging materials of each small item in the packaging material image is counted, it will cause the problem of duplicate counting.

[0090] In the embodiment of the present application, before the express is sorted, the waybill number of the express is scanned in advance. The waybill number of the corresponding express is used to name the packaging material image. In order to ensure that the number of packaging materials can be counted normally later, when detecting the packaging material image, only the packaging materials of the express with the same waybill number and the same name as the packaging material image are detected to avoid repeated packaging material statistics.

[0091] To this end, further, in some embodiments of the present application, step S21 may specifically include: performing package area detection processing on the packaging material image to obtain various package areas; detecting the package identification code of the package area, and detecting the preset identification code of the packaging material image; when the package identification code is detected to be the same as the preset identification code, determining that the target package area exists in the packaging material image; when the preset identification code is not detected, determining that the target package area does not exist in the packaging material image.

[0092] The specific steps of "performing package area detection processing on the packaging material image to obtain each package area" can be referred to the above step S21, which will not be described in detail here. Different from step S21, multiple package areas can be detected at this time.

[0093] The package identification code may be the waybill number of the package corresponding to the package area. The preset identification code refers to the name of the packaging material image.

[0094] Among them, "detecting the package identification code of the package area" can be specifically decoded based on the package area through an open source decoding rate (such as zxing), so as to obtain the package identification code of each package area.

[0095] Correspondingly, before step S22, the method further includes: acquiring a package area corresponding to the target package identification code to serve as the target package area of ​​the packaging material image.

[0096] The target package identification code refers to a package identification code that is the same as the preset identification code.

[0097] For example, by performing package area detection processing on image a, the package areas contained in the image are obtained as: A, B, C, and D. Package identification code detection is performed on package areas A, B, C, and D respectively, and the package identification codes of package areas A, B, C, and D are obtained as: "123", "456", "789", and "137" respectively. The preset identification code of the detected packaging material image is "137". Then, package area D can be used as the target package area of ​​the packaging material image.

[0098] From the above content, it can be seen that by naming each packaging material image as the preset identification code of the packaging material image, and obtaining the package area whose corresponding package identification code is the same as the preset identification code as the target package area of ​​the packaging material image, it is possible to avoid repeated packaging material identification / statistics for the same express delivery, thereby improving the accuracy of subsequent packaging material data statistics.

[0099] S22: When the packaging material image does not exist in the target wrapping area, determine that the packaging material image does not have a material identification code.

[0100] Specifically, if it is detected in step S21 that the target wrapping area does not exist in the packaging material image, it can be directly determined that the material identification code does not exist in the packaging material image.

[0101] S23: When a target package area exists in the packaging material image, perform identification code area detection processing according to the target package area.

[0102] In the embodiment of the present application, the purpose of detecting the identification code area is: on the one hand, to determine whether there is a material identification code in the target package area, if there is no package, no further processing is required to reduce the amount of data processing. On the other hand, it can avoid the problem that the material identification code is too vague and difficult to distinguish, and still cannot be parsed later.

[0103] In some embodiments, the identification code detection network mentioned in the above step S20 can continue to be used in step S23 to perform identification code area detection processing. The detection principle is similar to that of the above step S20 and will not be repeated here. The difference is that the identification code detection network in step S23 only needs to detect the target package area, while the entire packaging material image needs to be detected in step S20.

[0104] Among them, the identification code detection network, package area detection network, and the classification network mentioned later can be integrated into one network model, that is, the same network model can be used to implement the functions implemented by the identification code detection network, package area detection network, and the classification network mentioned later. Alternatively, any two of the identification code detection network, package area detection network, and classification network mentioned in this article can be integrated into the same network model for implementation.

[0105] S24: When the identification code area in the target package area is not detected, determining that the material identification code does not exist in the packaging material image.

[0106] Specifically, if it is detected in step S23 that no identification code region exists in the target package region, it can be directly determined that no material identification code exists in the packaging material image.

[0107] S25: When the identification code area in the target package area is detected, determining that the packaging material image contains the material identification code.

[0108] Specifically, if it is detected in step S23 that there is an identification code area in the target package area, it can be directly determined that there is no material identification code in the packaging material image.

[0109] From the above content, it can be seen that by successively detecting the target package area and the material identification code area, it is possible to determine whether the material identification code exists in the packaging material image. This can avoid the problem that the QR code area occupies a small proportion in the image and is difficult to identify; thus, the material identification code can be located more accurately.

[0110] S30: If the packaging material image contains the material identification code, perform parsing processing according to the material identification code to obtain the material type of each packaging material.

[0111] Please refer to Figure 6 , Figure 6 1 is a flow chart of an embodiment of step S30 provided in the embodiments of the present application. In some embodiments of the present application, step S30 may specifically include the following steps S31 to S33, wherein:

[0112] S31. If the packaging material image contains the material identification code, a preset parsing algorithm is called to perform parsing processing according to the material identification code.

[0113] For example, when the material identification code is a QR code, you can use the open source decoding rate zbar to decode the QR code. ZBar is an open source library for scanning and reading QR codes and barcodes. The supported QR codes include: EAN QR code, UPC QR code, QR code, etc.

[0114] For example, when the material identification code is a barcode, you can use the open source decoding rate Xing to decode the barcode. Xing is an open source, 1D / 2D barcode image processing library in multiple formats implemented in Java. It contains ports to other languages. Zxing can realize barcode scanning and decoding.

[0115] Furthermore, in order to improve the decoding rate, the embodiments of the present application may perform image preprocessing before decoding the material identification code. For example, in some embodiments of the present application, in the decoding part, the gray value of the darker packaging material image is first increased to a certain value, such as above 160, and then the contrast of the packaging material image is increased by a normalization operation, thereby improving the decoding rate.

[0116] S32. When the parsing algorithm parses out the identification code information of the material identification code, the packaging information corresponding to the identification code information is obtained as the material type.

[0117] The coding information contained in the material identification code on the packaging material corresponds to the material type of the packaging material, so when the coding information of the material identification code is parsed, the material type of the packaging material can be determined. For example, the coding information "1", "2", "3", and "4" correspond to the packaging materials: large cartons, small cartons, document envelopes, and plastic bags.

[0118] The identification code information refers to the coding information of the material identification code.

[0119] Specifically, in some embodiments, the identification code information of the material identification code in the packaging material image can be normally parsed by a preset parsing algorithm, and at this time, the material type corresponding to the identification code information can be directly obtained as the material type of the packaging material. Similarly, the material type of each packaging material appearing on the conveying device within a preset period of time can be determined.

[0120] For example, the coding information "1", "2", and "3" are respectively associated with packaging materials: cartons, document envelopes, and plastic bags. If the coding information contained in the material identification code is parsed to be "2", it can be determined that the material type of the packaging material is "document envelope".

[0121] S33: When the parsing algorithm fails to parse the material identification code, classify the packaging material images to obtain the material type of each packaging material.

[0122] Specifically, in some embodiments, if the preset parsing algorithm in step S31 fails to parse the material identification code, further classification processing may be performed based on the packaging material image to obtain the material type of each packaging material.

[0123] In step S33, "performing classification processing according to the packaging material images to obtain the material type of each packaging material" can refer to the description and examples in the following steps S41 to S43, which will not be repeated here.

[0124] From the above content, it can be seen that the preset parsing algorithm can accurately parse the coded information of the material identification code, and then accurately determine the material type of each packaging material. When the material identification code cannot be parsed or the parsing fails, the packaging material image is classified and processed to determine the material type of each packaging material, avoiding the problem of being unable to automatically detect the material type of the packaging material due to the fuzzy or incomplete material QR code, and further improving the recognition rate of packaging materials.

[0125] S40: If the material identification code does not exist in the packaging material image, classify the packaging material image to obtain the material type of each packaging material.

[0126] In some embodiments, a classification network after deep learning can be used to classify the packaging material images to obtain the material type of each packaging material. That is, step S40 can specifically include steps S41 to S43, wherein:

[0127] S41. Calling a trained classification network to perform feature extraction processing on the packaging material image to obtain image feature information of the packaging material image.

[0128] The image feature information refers to the image space features obtained after feature extraction processing is performed on the packaging material image.

[0129] The trained classification network is obtained through pre-training. In this article, unless otherwise specified, the classification network refers to the trained classification network.

[0130] In order to ensure that the classification network can be normally used to determine the material type of each packaging material according to the packaging material image, before step S41, the method further includes: training the preset classification network to obtain a trained classification network.

[0131] Specifically, based on a training data set (including multiple sample images, where the sample images refer to images of sample packaging materials), a preset classification network is trained so that the preset classification network learns the characteristics of different packaging materials, thereby obtaining a trained classification network. At this time, the classification network can detect the material type of the packaging material based on the packaging material image. Among them, the preset classification network includes but is not limited to a convolutional neural network, such as yolov3-tiny, yolov3, yolov5 and other networks that can be used for classification tasks. Specifically, an open source classification network with model parameters as default values ​​can be used as the preset classification network.

[0132] The above-mentioned preset classification network is only an example. It is understandable that the preset classification network can also be other types of network models that can be used for classification tasks, or new network models that can be used for classification tasks in the future, which are not specifically limited here.

[0133] Furthermore, a specific open source network can be selected as the preset classification network according to the timeliness and accuracy required for the specific scenario task. For example, the yolov3-tiny network can be selected as the preset classification network for training to obtain the trained classification network. Because packaging materials are relatively easy to detect objects, and the task is single, the use of the yolov3-tiny network can achieve the required accuracy while taking into account its timeliness.

[0134] Among them, the preset classification network may include a feature extraction layer and a prediction layer.

[0135] The feature extraction layer is used to output the image feature information of the sample image according to the sample image. The feature extraction layer takes the sample image as input and performs one or more operations including but not limited to convolution and pooling on the sample image to extract features from the sample image to obtain the image feature information of the sample image.

[0136] The prediction layer is used to output the predicted material type of the sample packaging material and the confidence of the predicted material type based on the image feature information. The prediction subnetwork takes the image feature information as input, performs regression prediction processing based on the image feature information, and determines the predicted material type of the sample packaging material.

[0137] Specifically, first, each sample image of the training data set (wherein the sample image has been labeled with the actual material type of the sample packaging material) is input into the preset classification network, so as to call the feature extraction layer in the preset classification network to perform one or more operations including but not limited to convolution and pooling according to the sample image, so as to extract the features of the sample image and obtain the image feature information of the sample image. And the prediction layer in the preset classification network is called to perform regression prediction processing according to the image feature information to determine the predicted material type of the sample packaging material.

[0138] Then, according to the predicted material type and the actual material type of the sample packaging material, the training loss value of the preset classification model is determined. And according to the training loss value, the model parameters of the preset classification model are back-propagated to update until the preset classification model converges to obtain the trained classification model.

[0139] At this time, the trained classification model can be applied to perform feature extraction processing on the packaging material image to obtain image feature information of the packaging material image. For example, the packaging material image is input into the trained classification network to call the feature extraction layer in the classification network to perform one or more operations including but not limited to convolution and pooling on the packaging material image to extract features from the packaging material image to obtain image feature information of the packaging material image.

[0140] S42: calling the classification network, performing prediction processing according to the feature information, and obtaining the predicted type of the packaging material and the confidence of the predicted type.

[0141] The predicted type refers to the material type of the packaging material predicted by performing classification regression according to the image features of the packaging material image.

[0142] Correspondingly, at this time, the prediction layer in the classification network can be called to perform regression prediction processing according to the image feature information to determine and output the predicted type of the packaging material and the confidence of the predicted type of the packaging material.

[0143] For example, image 1 of packaging material 1 (such as a carton) is input into the classification network to call the feature extraction layer in the classification network to perform feature extraction on image 1 to obtain image feature information A of image 1; the prediction layer in the classification network is called to perform classification regression prediction based on the image feature information A to obtain the material type of packaging material 1 as "envelope", and the confidence level of "envelope" is 0.5.

[0144] For another example, an image 2 of packaging material 2 (such as a document envelope) is input into the classification network, and the feature extraction layer in the classification network is called to perform feature extraction processing on image 2 to obtain image feature information B of image 2; the prediction layer in the classification network is called to perform classification regression prediction based on the image feature information B to obtain that the material type of packaging material 2 is "document envelope", and the confidence level of "document envelope" is 0.9.

[0145] S43: Determine the material type of each packaging material according to the prediction type and the confidence level.

[0146] In some embodiments, the predicted type of the packaging material predicted by the classification network can be directly used as the material type of the packaging material. Similarly, the material type of each packaging material appearing on the conveying device within a preset time period can be determined.

[0147] Furthermore, in order to improve the detection accuracy of packaging materials, it is necessary to determine the material type of the packaging material in combination with the confidence of the predicted type of the packaging material predicted by the classification network.

[0148] Specifically, in some embodiments, each packaging material has a packaging material image. At this time, it is detected whether the confidence of the predicted type is greater than a preset confidence threshold. If the confidence of the predicted type is greater than the preset confidence threshold, the predicted type with a confidence greater than the preset confidence threshold is used as the material type of the packaging material. If the confidence of the predicted type is less than or equal to the preset confidence threshold, the predicted type of the packaging material predicted by the classification network is discarded, and the image is continued to be collected to detect the packaging material.

[0149] For example, an image 3 of packaging material 3 (such as a carton) is input into the classification network, and the feature extraction layer in the classification network is called to perform feature extraction processing on image 3 to obtain image feature information C of image 3; the prediction layer in the classification network is called to perform classification regression prediction based on the image feature information C to obtain that the material type of packaging material 3 is "carton" and the confidence level of the material type of packaging material 3 is 0.9. If the confidence level of the material type "carton" is 0.9 and is greater than the preset confidence threshold (such as 0.8), "carton" can be used as the material type of packaging material 3; if the confidence level of the material type "carton" is 0.9 and is less than the preset confidence threshold (such as 0.95), the material type "carton" predicted by the classification network is discarded.

[0150] In some embodiments, there are multiple packaging material images for each packaging material. In this case, first, a prediction type result (i.e., the predicted type of the packaging material) and the confidence corresponding to each prediction type result can be predicted for each packaging material image through the classification network, and multiple prediction type results can be predicted for multiple packaging material images. Then, the prediction type result with the highest confidence (or the confidence is greater than the preset confidence threshold and the confidence is the highest) is obtained from the multiple prediction type results as the material type of the packaging material. Similarly, the material type of each packaging material appearing on the conveying device within a preset time period can be determined.

[0151] For example, images 1, 2, and 3 of packaging material 4 (such as a plastic bag) are respectively input into the classification network, and the feature extraction layer in the classification network is called to perform feature extraction processing on images 1, 2, and 3 to obtain image feature information A1, A2, and A3 of images 1, 2, and 3; the prediction layer in the classification network is called to perform classification regression prediction based on the image feature information A1, A2, and A3 to obtain the material types of packaging material 4 as "plastic bag", "envelope", and "plastic bag", and the confidences of the three predicted material types "plastic bag", "envelope", and "plastic bag" are 0.8, 0.5, and 0.85 respectively. At this time, "plastic bag" can be used as the material type of packaging material 4.

[0152] In some embodiments, there are multiple packaging material images for each packaging material. In this case, first, a prediction type result (i.e., the predicted type of the packaging material) and the confidence corresponding to each prediction type result can be predicted for each packaging material image through the classification network. Multiple packaging material images can be predicted to obtain multiple prediction type results. Then, the top N prediction type results with the highest confidence are obtained from the multiple prediction type results. Finally, the prediction type with the most occurrences among the top N prediction type results is used as the material type of the packaging material.

[0153] For example, images 1, 2, 3, and 4 of packaging material 5 (such as a document envelope) are input into the classification network respectively, and the feature extraction layer in the classification network is called to perform feature extraction processing on images 1, 2, 3, and 4 respectively to obtain image feature information A1, A2, A3, and A4 of images 1, 2, 3, and 4; the prediction layer in the classification network is called to perform classification regression prediction based on the image feature information A1, A2, A3, and A4 respectively to obtain the material type of packaging material 4 as "plastic bag", "document envelope", "carton", and "document envelope", and the confidences of the predicted four material types "plastic bag", "document envelope", "carton", and "document envelope" are 0.8, 0.85, 0.5, and 0.9 respectively. At this time, the top three prediction type results "plastic bag", "document envelope", and "document envelope" with the largest confidence can be obtained from the four prediction type results; thus, the material type of packaging material 5 can be determined to be "document envelope".

[0154] From the above content, it can be seen that since the classification network is obtained through deep learning training, the trained classification network can fully learn the characteristic relationship between the packaging type of packaging materials and the packaging material image, thereby ensuring the detection accuracy of the material type of packaging materials.

[0155] From the above content, it can be seen that by acquiring at least one packaging material image of each packaging material on the conveying device within a preset time period; performing detection processing on the packaging material image in the identification code area to determine whether the packaging material image has a material identification code; if the packaging material image has a material identification code, then performing parsing processing according to the material identification code to obtain the material type of each packaging material; if the packaging material image does not have a material identification code, then performing classification processing according to the packaging material image to obtain the material type of each packaging material. It can be seen that since each packaging material is preferentially identified by the material identification code, if the packaging material image does not have a material identification code or cannot be identified by the material identification code, the material type of the packaging material is classified according to the packaging material image; on the one hand, the automatic identification probability of the packaging material is improved; on the other hand, the detection accuracy of the packaging material is improved, and the problem of high error rate in the identification or recording of packaging materials caused by manual operation is avoided.

[0156] In order to facilitate the supervision of packaging materials, in some embodiments of the present application, the detected packaging materials can also be counted to determine the actual usage quantity of various packaging materials within a preset period of time, so as to facilitate the subsequent billing, issuance, and management of packaging materials. That is, the packaging material detection method provided in the embodiment of the present application can also include: performing statistical processing on the quantity of packaging materials according to the material type, and obtaining the usage quantity of each preset type of packaging materials within the preset period of time.

[0157] For example, in order to count the actual quantity of packaging materials used in a logistics outlet within a preset time period (such as 1 day) to facilitate the billing, distribution and management of packaging materials in the logistics outlet, the quantity of packaging materials can be statistically processed according to the material type of each packaging material on the conveying device within the preset time period to obtain the usage quantity of each preset type of packaging materials within the preset time period.

[0158] In some embodiments, after detecting the packaging materials of each express package passing through the sorting line (i.e., the conveying device) within a preset period of time through the above packaging material detection method, the material type of the packaging material of each express package is recorded, and a web page report of various packaging materials of the express package is generated. And the number of packaging materials can be statistically processed based on the material type of the packaging material of each express package recorded, and the usage quantity of each preset type of packaging material within the preset period of time can be obtained.

[0159] For example, it is detected that the packaging materials of each express parcel passing through the sorting line in one day are: carton, carton, plastic bag, document envelope, document envelope, carton, plastic bag, document envelope, document envelope, plastic bag, document envelope, carton, plastic bag, document envelope, plastic bag. Through statistics, it can be determined that the number of preset types of packaging materials (such as carton, document envelope, plastic bag, packaging box) used in one day is: 4, 6, 5, 0 respectively.

[0160] From the above content, it can be seen that by statistically processing the number of packaging materials according to the material type of each packaging material on the conveying device within the preset time period, the number of packaging materials of each preset type used within the preset time period can be obtained. On the one hand, it is possible to automatically count the actual number of packaging materials used, which facilitates the billing, issuance, and management of packaging materials and improves the statistical efficiency of packaging materials. On the other hand, due to the characteristics of the conveying device used to convey packaging materials in production and other processes, by obtaining the image of the packaging materials on the conveying device for further analysis and processing, each packaging material can be quickly and comprehensively detected, avoiding manual scanning statistics, and improving statistical efficiency and comprehensiveness.

[0161] In order to better implement the packaging material detection method in the embodiment of the present application, based on the packaging material detection method, the embodiment of the present application also provides a packaging material detection device, such as Figure 7 FIG. 1 is a schematic diagram of the structure of an embodiment of a packaging material detection device in an embodiment of the present application. The packaging material detection device 700 includes:

[0162] An acquisition unit 701 is used to acquire at least one packaging material image of each packaging material on a conveying device within a preset time period;

[0163] A detection unit 702 is used to detect the identification code area of ​​the packaging material image to determine whether the packaging material image has a material identification code;

[0164] A decoding unit 703 is configured to perform parsing processing according to the material identification code to obtain the material type of each packaging material if the material identification code exists in the packaging material image;

[0165] The classification unit 704 is configured to perform classification processing according to the packaging material image to obtain the material type of each packaging material if the packaging material image does not have the material identification code.

[0166] In some implementations of the present application, the decoding unit is further configured to:

[0167] If the packaging material image contains the material identification code, calling a preset parsing algorithm to perform parsing processing according to the material identification code;

[0168] When the parsing algorithm parses out the identification code information of the material identification code, obtaining the packaging information corresponding to the identification code information as the material type;

[0169] When the parsing algorithm fails to parse the material identification code, classification processing is performed according to the packaging material image to obtain the material type of each packaging material.

[0170] In some implementations of the present application, the classification unit 704 is further configured to:

[0171] Calling the trained classification network to perform feature extraction processing on the packaging material image to obtain image feature information of the packaging material image;

[0172] Calling the classification network to perform prediction processing according to the feature information to obtain the predicted type of the packaging material and the confidence of the predicted type;

[0173] The material type of each packaging material is determined according to the prediction type and the confidence level.

[0174] In some embodiments of the present application, the packaging material detection device 700 further includes a statistical unit (not shown in the figure), which is specifically used to:

[0175] Statistical processing is performed on the quantity of packaging materials according to the material types to obtain the usage quantity of packaging materials of each preset type within the preset time period.

[0176] In some embodiments of the present application, the detection unit 702 is further configured to:

[0177] Performing a wrapping area detection process on the packaging material image to determine whether the packaging material image has a target wrapping area;

[0178] When the packaging material image does not exist in the target wrapping area, determining that the packaging material image does not have a material identification code;

[0179] When the target package area exists in the packaging material image, performing identification code area detection processing according to the target package area;

[0180] When the identification code area in the target package area is not detected, determining that the packaging material image does not have the material identification code;

[0181] When the identification code area in the target package area is detected, it is determined that the material identification code exists in the packaging material image.

[0182] In some embodiments of the present application, the detection unit 702 is further configured to:

[0183] Performing package area detection processing on the packaging material image to obtain various package areas;

[0184] Detecting a package identification code of the package area and detecting a preset identification code of the packaging material image;

[0185] When it is detected that the package identification code is the same as the preset identification code, determining that the target package area exists in the packaging material image;

[0186] When the preset identification code is not detected, determining that the target wrapping area does not exist in the packaging material image;

[0187] When the target package area exists in the packaging material image, performing identification code area detection processing according to the target package area, the process further includes:

[0188] A package area corresponding to a target package identification code is acquired as the target package area of ​​the packaging material image, wherein the target package identification code is a package identification code that is the same as the preset identification code.

[0189] In some embodiments of the present application, the material type includes at least one of a carton, a plastic bag, and a document envelope.

[0190] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0191] Since the packaging material detection device can perform the present application as follows Figures 1 to 6Corresponding to the steps in the packaging material detection method in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 6 The beneficial effects that can be achieved by the packaging material detection method in any embodiment are detailed in the previous description and will not be repeated here.

[0192] In addition, in order to better implement the packaging material detection method in the embodiment of the present application, on the basis of the packaging material detection method, the embodiment of the present application also provides an electronic device, referring to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. Specifically, the electronic device provided by the embodiment of the present application includes a processor 801, and the processor 801 is used to execute a computer program stored in a memory 802 to implement the following Figures 1 to 6 Corresponding to each step of the packaging material detection method in any embodiment; or, the processor 801 is used to execute the computer program stored in the memory 802 to implement the following Figure 7 The functions of each unit in the corresponding embodiment.

[0193] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 802, and executed by the processor 801 to complete the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0194] The electronic device may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that the illustration is merely an example of an electronic device and does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the illustration, or may combine certain components, or different components, for example, the electronic device may also include input and output devices, network access devices, buses, etc., and the processor 801, memory 802, input and output devices, and network access devices, etc., are connected via a bus.

[0195] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0196] The memory 802 can be used to store computer programs and / or modules. The processor 801 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 802 and calling the data stored in the memory 802. The memory 802 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0197] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the packaging material detection device, the electronic device and its corresponding units described above can refer to the following. Figures 1 to 6 The description of the packaging material detection method in any embodiment will not be repeated here in detail.

[0198] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0199] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figures 1 to 6 For the steps in the packaging material detection method in any embodiment, the specific operations can be referred to as follows Figures 1 to 6 The description of the packaging material detection method in any embodiment will not be repeated here.

[0200] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0201] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figures 1 to 6 Corresponding to the steps in the packaging material detection method in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 6 The beneficial effects that can be achieved by the packaging material detection method in any embodiment are detailed in the previous description and will not be repeated here.

[0202] The above is a detailed introduction to a packaging material detection method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A packaging material detection method, characterized in that: The method comprises: Acquire at least one packaging material image of each packaging material on the conveying device within a preset time period; Performing package area detection processing on the packaging material image to obtain various package areas; Detecting a package identification code of the package area and detecting a preset identification code of the packaging material image; When it is detected that the package identification code is the same as the preset identification code, determining that the target package area exists in the packaging material image; When the preset identification code is not detected, determining that the target wrapping area does not exist in the packaging material image; Acquire a package area corresponding to a target package identification code as the target package area of ​​the packaging material image, wherein the target package identification code is a package identification code that is the same as the preset identification code; When the target package area exists in the packaging material image, performing identification code area detection processing according to the target package area; When the identification code area in the target package area is detected, determining that the packaging material image has a material identification code; If the packaging material image has the material identification code, then performing parsing processing according to the material identification code to obtain the material type of each packaging material; If the packaging material image does not have the material identification code, classification processing is performed according to the packaging material image to obtain the material type of each packaging material.

2. The packaging material detection method according to claim 1, characterized in that: If the packaging material image has the material identification code, parsing is performed according to the material identification code to obtain the material type of each packaging material, including: If the packaging material image contains the material identification code, calling a preset parsing algorithm to perform parsing processing according to the material identification code; When the parsing algorithm parses out the identification code information of the material identification code, obtaining the packaging information corresponding to the identification code information as the material type; When the parsing algorithm fails to parse the material identification code, classification processing is performed according to the packaging material image to obtain the material type of each packaging material.

3. The packaging material detection method according to claim 1 or 2, characterized in that: The classifying process is performed according to the packaging material image to obtain the material type of each packaging material, including: Calling the trained classification network to perform feature extraction processing on the packaging material image to obtain image feature information of the packaging material image; Calling the classification network to perform prediction processing according to the feature information to obtain the predicted type of the packaging material and the confidence of the predicted type; The material type of each packaging material is determined according to the prediction type and the confidence level.

4. The packaging material detection method according to claim 1, characterized in that: The method further comprises: Statistical processing is performed on the quantity of packaging materials according to the material types to obtain the usage quantity of packaging materials of each preset type within the preset time period.

5. The packaging material detection method according to claim 1, characterized in that: The method further comprises: When the packaging material image does not exist in the target wrapping area, determining that the packaging material image does not have a material identification code; When the identification code area in the target package area is not detected, it is determined that the packaging material image does not have the material identification code.

6. The packaging material detection method according to claim 1, characterized in that: The material type includes at least one of a carton, a plastic bag, and a document envelope.

7. A packaging material detection device, characterized in that: The packaging material detection device comprises: An acquisition unit, used to acquire at least one packaging material image of each packaging material on the conveying device within a preset time period; a detection unit, configured to perform package area detection processing on the packaging material image to obtain various package areas; detect a package identification code of the package area, and detect a preset identification code of the packaging material image; determine that a target package area exists in the packaging material image when the package identification code is detected to be the same as the preset identification code; determine that a target package area does not exist in the packaging material image when the preset identification code is not detected; obtain a package area corresponding to a target package identification code as a target package area of ​​the packaging material image, wherein the target package identification code refers to a package identification code that is the same as the preset identification code; when a target package area exists in the packaging material image, perform identification code area detection processing according to the target package area; determine that a material identification code exists in the packaging material image when an identification code area in the target package area is detected; A decoding unit, configured to, if the packaging material image contains the material identification code, perform a parsing process according to the material identification code to obtain the material type of each packaging material; A classification unit is used for performing classification processing according to the packaging material image to obtain the material type of each packaging material if the material identification code does not exist in the packaging material image.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the packaging material detection method according to any one of claims 1 to 6 when calling the computer program in the memory.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the packaging material detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • An intelligent identification system on a traveling crane

    CN109241798A

  • Assembly line parcel sorting device based on visual technology and electronic equipment

    CN110102490A

  • Self-service cash registering method and device of commodity

    CN110264645A

  • Method and device for acquiring cargo information

    CN110717347A