Article package damage detection method and device, computer device, and storage medium

By using computer vision technology and cascaded detection models to detect and inspect product packaging for damage, and combining coordinate mapping for deduplication, the problem of time-consuming, labor-intensive, and inaccurate manual inspection in existing technologies is solved, thereby improving the accuracy of product packaging damage detection.

CN115705683BActive Publication Date: 2026-04-10SF TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SF TECH CO LTD
Filing Date
2021-08-05
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing methods for detecting damage to product packaging mainly rely on manual inspection, which is time-consuming, labor-intensive, and has low accuracy.

Method used

Using computer vision technology, a cascaded first and second detection model is used to detect packaging and damage in the image to be detected. Combined with coordinate mapping deduplication, the detection accuracy is improved.

Benefits of technology

This effectively avoids the abnormal situation where the same damage is detected multiple times due to overlap between multiple product packages, thus improving the accuracy of product packaging damage detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115705683B_ABST
    Figure CN115705683B_ABST
Patent Text Reader

Abstract

The application provides an article packaging damage detection method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining a to-be-detected image; performing article packaging detection on the to-be-detected image to obtain a packaging detection frame; when the to-be-detected image contains at least two packaging detection frames, performing damage detection on the article packaging image of each packaging detection frame to obtain a damage detection result of each article packaging image; and if the damage detection result is that the target article packaging image of the damage detection frame contains at least two, performing coordinate mapping and deduplication processing on each target article packaging image to obtain a packaging damage detection result of the to-be-detected image. The method can effectively avoid the abnormal situation that the same damage is detected multiple times due to the possible overlap between multiple article packaging, thereby improving the damage detection accuracy of the article packaging.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an article packaging damage detection method and device, computer equipment and storage medium. BACKGROUND

[0002] With the rapid development of e-commerce, express business volume gradually rises, and more and more articles will be packaged and output, but the packaged articles often occur damage due to extrusion, collision and other reasons in the conveying process, thereby causing damage to the articles in the package and causing certain losses to the supply chain.

[0003] At present, the traditional article packaging damage detection method mostly checks and compares the monitoring data of each site in real time by manual, so as to determine whether the article outer packaging is damaged, but this manual detection method not only consumes time and effort, but also reduces the detection accuracy.

[0004] Therefore, the existing article packaging damage detection method has the technical problem of low detection accuracy. SUMMARY

[0005] Therefore, it is necessary to provide an article packaging damage detection method, device, computer equipment and storage medium to improve the article packaging damage detection accuracy.

[0006] In a first aspect, the present application provides an article packaging damage detection method, comprising:

[0007] obtaining a to-be-detected image;

[0008] performing article packaging detection on the to-be-detected image to obtain a packaging detection frame;

[0009] when the to-be-detected image contains at least two packaging detection frames, performing damage detection on the article packaging images of each packaging detection frame to obtain damage detection results of each article packaging image;

[0010] if the damage detection result is that the target article packaging image of the damage detection frame includes at least two, performing coordinate mapping and deduplication processing on each target article packaging image to obtain a packaging damage detection result of the to-be-detected image.

[0011] In some embodiments of the present application, if the damage detection result is that the target object packaging image of the damage detection frame includes at least two, the target object packaging image is subjected to coordinate mapping and deduplication processing to obtain the packaging damage detection result of the to-be-detected image, including: screening the object packaging image of the damage detection result as the target object packaging image; counting the number of images of the target object packaging image; if the number of images is greater than or equal to two, obtaining the size ratio of each damage detection frame in the corresponding target object packaging image, and obtaining the initial size of each packaging detection frame; according to the initial size and the size ratio, the target object packaging image is subjected to coordinate mapping and deduplication processing to obtain the packaging damage detection result of the to-be-detected image.

[0012] In some embodiments of the present application, according to the initial size and the size ratio, the target object packaging image is subjected to coordinate mapping and deduplication processing to obtain the packaging damage detection result of the to-be-detected image, including: according to the initial size and the size ratio, the target object packaging image containing the damage detection frame is subjected to size adjustment to obtain the actual size of each damage detection frame; based on the actual size, the target object packaging image is subjected to coordinate mapping processing relative to the to-be-detected image to obtain the to-be-detected image containing each damage detection frame; for the to-be-detected image containing each damage detection frame, the damage detection frame satisfying the preset repetition condition is subjected to deduplication processing to obtain the packaging damage detection result of the to-be-detected image.

[0013] In some embodiments of the present application, the object packaging detection is performed on the to-be-detected image to obtain a packaging detection frame, including: inputting the to-be-detected image into a trained first detection model to enable the trained first detection model to perform object packaging detection on the to-be-detected image; obtaining the output result of the trained first detection model to obtain the packaging detection frame; wherein the trained first detection model is obtained by training a back image, and the back image is an image with a packaging damage detection result in historical detection, and the confidence of the packaging damage detection result does not reach a preset threshold.

[0014] In some embodiments of the present application, when the to-be-detected image contains at least two packaging detection frames, the object packaging image of each packaging detection frame is subjected to damage detection to obtain the damage detection result of each object packaging image, including: when the packaging detection frame contains at least two packaging detection frames in total, the image of each packaging detection frame is extracted to obtain the object packaging image of each packaging detection frame; inputting the object packaging image into a trained second detection model to enable the trained second detection model to perform damage detection on each object packaging image; obtaining the output result of the trained second detection model to obtain the damage detection result; wherein the trained second detection model is obtained by training a back image, and the back image is an image with a packaging damage detection result in historical detection, and the confidence of the packaging damage detection result does not reach a preset threshold.

[0015] In some embodiments of the present application, before the image to be detected is subjected to the article packaging detection, and the packaging detection frame is obtained, the method further comprises: constructing an initial article packaging damage detection model, wherein the article packaging damage detection model is formed by cascading the first detection model and the second detection model; obtaining a packaging damage image set, wherein the packaging damage image set comprises a plurality of first images belonging to a preset COCO data set and a plurality of second images with labeled article packaging damage information; pre-training the initial article packaging damage detection model using the first images to obtain a pre-trained article packaging damage detection model; and training the pre-trained article packaging damage detection model using the second images to obtain the trained first detection model and the trained second detection model.

[0016] In some embodiments of the present application, the pre-trained article packaging damage detection model is trained using the second images to obtain the trained first detection model and the trained second detection model, comprising: preliminarily training the pre-trained article packaging damage detection model using the second images to obtain a preliminarily trained article packaging damage detection model; obtaining a detected image with a packaging damage detection result in a historical period, wherein the packaging damage detection result of the detected image comprises a confidence; obtaining a target detected image with a confidence not satisfying a preset threshold as a feedback image; and adjusting training the preliminarily trained article packaging damage detection model using the feedback image to obtain the trained first detection model and the trained second detection model.

[0017] In some embodiments of the present application, the packaging damage image set is obtained, comprising: obtaining a training sample image, wherein the training sample image is an image with labeled article packaging damage information; analyzing an image format, an image size and / or an image feature of the training sample image; screening out a target training sample image satisfying a preset model training condition from the training sample image according to at least one of the image format, the image size and the image feature; performing data augmentation on the target training sample image to obtain a second image; and taking the second image and the first image as the packaging damage image set.

[0018] In some embodiments of the present application, the target article packaging image contains an article code image, and after obtaining the packaging damage detection result of the image to be detected, the method further comprises: determining an article packaging to which the damage detection frame belongs according to the packaging damage detection result as a target article packaging; recognizing an article code image corresponding to the target article packaging to obtain an article code of the target article packaging; and feeding back the article code of the target article packaging to a terminal to enable the terminal to receive and display the article code of the target article packaging.

[0019] In a second aspect, the present application provides an article packaging damage detection device, comprising:

[0020] An image acquisition module is configured to acquire a to-be-detected image.

[0021] A package detection module is configured to perform package detection on the to-be-detected image to obtain a package detection frame.

[0022] A damage detection module is configured to, when the to-be-detected image contains at least two package detection frames, perform damage detection on the package images of the package detection frames to obtain damage detection results of the package images.

[0023] A damage processing module is configured to, if the damage detection results indicate that the target package images of the damage detection frames contain at least two, perform coordinate mapping and deduplication processing on the target package images to obtain a package damage detection result of the to-be-detected image.

[0024] In a third aspect, the present application also provides a computer device, which comprises:

[0025] one or more processors;

[0026] a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the package damage detection method.

[0027] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program. The computer program is loaded by a processor to execute the steps in the package damage detection method.

[0028] In a fifth aspect, the present application provides a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the method provided in the first aspect.

[0029] The package damage detection method, device, computer device, and storage medium described above can effectively avoid the abnormal situation that the same damage is detected multiple times due to the overlap between multiple package images, thereby improving the damage detection accuracy of the package. BRIEF DESCRIPTION OF DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0031] Figure 1 is a scene schematic diagram of the article packaging damage detection method in the embodiments of the present application;

[0032] Figure 2 is a flow schematic diagram of the article packaging damage detection method in the embodiments of the present application;

[0033] Figure 3 is an effect schematic diagram of the article packaging damage detection method in the embodiments of the present application;

[0034] Figure 4 is a training flowchart of the article packaging damage detection model in the embodiments of the present application;

[0035] Figure 5 is an effect schematic diagram of the training sample image data augmentation step in the embodiments of the present application;

[0036] Figure 6 is a structural schematic diagram of the article packaging damage detection device in the embodiments of the present application;

[0037] Figure 7 is a structural schematic diagram of the computer device in the embodiments of the present application. DETAILED DESCRIPTION

[0038] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.

[0039] In the description of the present application, the terms “first”, “second” are only used for description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features with “first”, “second” can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of “multiple” is two or more, unless otherwise specifically limited.

[0040] In the description of the present application, the word "for example" is used to indicate that "serves as an example, instance, or illustration." Any embodiment described as "for example" in this application is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, for purposes of explanation, specific details are set forth. It will be apparent to those skilled in the art that the present application can be practiced without the specific details presented. In other instances, well-known structures and processes are not elaborated in order to avoid obscuring the present application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features presented.

[0041] In the embodiments of the present application, the article package damage detection method mainly involves computer vision technology (CV) in artificial intelligence (AI). Artificial intelligence is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence.

[0042] Computer vision is a science that studies how to make machines "see". More specifically, it refers to using cameras and computers to replace human eyes to identify, track and measure targets, and further process graphics so that the computer processing becomes images more suitable for human observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish artificial intelligence systems that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and other technologies. It also includes common face recognition, fingerprint recognition and other biometric identification technologies. In this application, for the image to be detected, CV mainly implements image detection in image semantic understanding (ISU), detects the target object in the image and outputs the detection result. It can be understood that the target object can be any object determined by actual business requirements, such as people, vehicles, packages, etc. However, in the embodiments of the present application, the target object can be a damaged item packaging of a specified shape or color and an irregular shape or size.

[0043] The embodiments of the present application provide an item packaging damage detection method and device, computer equipment and a storage medium, which are described in detail below.

[0044] Reference is made to Figure 1 , Figure 1A scene diagram of an article package damage detection method provided by the present application is shown in the figure. The logistics distribution method can be applied to an article package damage detection system. The article package damage detection system includes a terminal 100 and a server 200. The terminal 100 can be a device that includes receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device can include a cellular or other communication device with a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The terminal 100 can be a desktop terminal or a mobile terminal, and can also be one of a mobile phone, a tablet computer, and a notebook computer. The server 200 can be a stand-alone server, a server network or a server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing. In addition, the terminal 100 and the server 200 establish a communication connection through a network, and the network can be any one of a wide area network, a local area network, or a metropolitan area network.

[0045] Those skilled in the art can understand that Figure 1 The application environment shown in the figure is only one application scenario applicable to the scheme of the present application, and does not constitute a limitation on the application scenarios of the scheme of the present application. Other application environments can include more or fewer computer devices than Figure 1 The application environment shown in the figure is only one application scenario applicable to the scheme of the present application, and does not constitute a limitation on the application scenarios of the scheme of the present application. Other application environments can include more or fewer computer devices than Figure 1 Only one server 200 is shown in the figure, and it can be understood that the article package damage detection system can also include one or more other servers, which are not limited specifically herein. In addition, as shown in the figure Figure 1 The article package damage detection system can also include a memory for storing data, such as storing monitoring images captured by cameras at various sites, including but not limited to package sorting sites and article packaging sites.

[0046] It should be noted that Figure 1 The scene diagram of the article package damage detection system shown in the figure is only one example. The article package damage detection system and the scene described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, as the article package damage detection system evolves and new business scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0047] Referring to Figure 2 The embodiments of the present application provide an article package damage detection method. The embodiments mainly apply the method to the aboveFigure 1 The method is exemplified by the server 200 in the system 100, and comprises steps S201 to S204, as follows:

[0048] S201, obtaining an image to be detected.

[0049] The image to be detected can be an image recorded by a camera in a business site, and can include but is not limited to a picture, a video frame in a video, etc. The video can include but is not limited to a short video and a long video. The short video can be a video with a length less than 10 minutes, and the long video can be a video with a length greater than 10 minutes. The article packaging can include but is not limited to a cuboid, a cube, a cylinder, and an irregular body. The business site can include but is not limited to a parcel sorting site and an article packaging site.

[0050] In a specific implementation, the server 200 can obtain the image to be detected from a camera installed in a designated business site according to a user demand. The camera can be a monocular camera or a multiocular camera, and the specific implementation is not limited in the present application. However, the image to be detected obtained by the server 200 should be an image containing an article packaging pattern, that is, the camera installed in the designated business site is a device for monitoring the article packaging state, specifically a device for monitoring whether the article packaging is in an abnormal state. Of course, the server 200 can also obtain the image to be detected by other devices according to a user demand, for example, by the terminal 100.

[0051] Further, the image to be detected can be obtained in the following ways, including but not limited to: (1) The terminal 100 obtains images to be detected from cameras installed in various business sites in advance, so that the server 200 can obtain the image to be detected from the terminal 100. (2) There is a blockchain system composed of multiple devices (including the server 200) as blockchain nodes, for example, a public chain system or a private chain system. After the image to be detected is uploaded to any blockchain node in the system, the image to be detected can be read from the chain table by other blockchain nodes in the system. (3) The server 200 requests the image to be detected from its superior server or polls the image to be detected from its subordinate server. At this time, the servers including the server 200 form a tree structure system with a superior and subordinate relationship. (4) The server 200 directly obtains the image to be detected from the camera installed in the designated business site.

[0052] In addition, the image to be detected obtained by the server 200 can also be a preprocessed image, including but not limited to a preprocessed image obtained by cleaning and adjusting.

[0053] For example, after the server 200 obtains the initial image to be detected by one of the above-mentioned image acquisition methods, the server 200 can perform cleaning and / or adjustment processing on the initial image to be detected, including but not limited to cleaning away repeated or incorrectly read images, adjusting the image size, color, and the like.

[0054] S202, performing an article packaging detection on the image to be detected to obtain a packaging detection frame.

[0055] The packaging detection frame can be a square frame present in the image for marking a target object. The target object can be an object pre-set according to actual business needs, including but not limited to a person or an object. As can be seen, the pre-set target object in this embodiment is an article packaging, specifically a box-shaped article packaging, but it does not exclude a bag-shaped, bottle-shaped, or other container-shaped article packaging in other embodiments. In addition, the packaging detection frame needs to be obtained with the aid of artificial intelligence technology, as described below.

[0056] In a specific implementation, after the server 200 obtains the image to be detected, the server 200 can call a first detection model that has been pre-trained and even debugged, referred to as a "trained first detection model". The structure of the model is not specifically limited in this embodiment, that is, any one of a convolutional neural network (CNN), a recurrent neural network (RNN), a deep neural network (DNN), or other model structures can be used.

[0057] Further, by inputting the image to be detected into the network model, the network model can analyze various types of graphical information contained in the image to be detected based on the pre-learned article packaging detection capability, and finally detect the article packaging image in the image to be detected, which is marked by the packaging detection frame.

[0058] In one embodiment, this step includes: inputting the image to be detected into the trained first detection model to enable the trained first detection model to perform an article packaging detection on the image to be detected; obtaining an output result of the trained first detection model to obtain the packaging detection frame; wherein the trained first detection model is obtained by training the back image, and the back image is an image with a packaging damage detection result in history detection, and a confidence of the packaging damage detection result does not reach a pre-set threshold.

[0059] The return image is an image of which the historical detection has a package damage detection result and a confidence of the package damage detection result does not reach a preset threshold. That is to say, the embodiment of the present application proposes to analyze the confidence of each detected image, obtain the confidence of each detected image, and then take the detected image of which the confidence does not reach the preset threshold as the return image, so as to use the return image to perform superimposed training on the model and improve the detection accuracy of the model. The model training steps involved in the embodiment will be described in detail in the following embodiments.

[0060] In a specific implementation, the server 200 can obtain the package detection frame of the to-be-detected image through the trained first detection model, and this implementation has been described in the above embodiments. It needs to be supplemented in the embodiment that not every to-be-detected image can successfully obtain the package detection frame, and it is extremely possible that some to-be-detected images do not detect the package detection frame or the detected package detection frame is only one. Therefore, in order to solve the technical problem proposed in the present application, if the to-be-detected image currently analyzed has one of the above two situations, the server 200 can reacquire the to-be-detected image until the trained first detection model can successfully output the package detection frame meeting the actual business requirement.

[0061] For example, referring to the leftmost image in FIG. 1, Figure 3 that is, the package detection frame output by the trained first detection model, the image containing the package detection frame meeting the actual business requirement is the to-be-detected image.

[0062] S203, when the to-be-detected image contains at least two package detection frames, performing damage detection on the object package images of the package detection frames to obtain damage detection results of the object package images.

[0063] The damage detection result can be a detection result including but not limited to the package detection frame and the damage detection frame, for example, can also include the confidence of the to-be-detected image, and the confidence is also called reliability or confidence level or confidence coefficient. It can be understood that the confidence involved in the embodiment of the present application can be represented by a coefficient in a related range, for example, the confidence is represented by a coefficient range of “0-10”; for example, the confidence is represented by a coefficient range of “0%-100%”, or even other.

[0064] In a specific implementation, the image that can be used as a basis for subsequent processing is necessarily an image containing at least two packaging detection boxes detected in a previous step. This is because the packaging damage detection scheme proposed in the present application is mainly to solve the problem that multiple product packages may appear in a certain image, and the multiple product packages may cause multiple detections of the same damage due to overlapping, resulting in false detection, or only one damage is detected due to the large overlapping area, resulting in missed detection. For such scene problems, although there may be some solutions to place the products apart in advance, such a solution not only takes time and effort, but also inevitably leads to occasional situations such as abnormal placement and accidental stacking. Therefore, the present application proposes to save manpower and resources, improve the detection accuracy of product packaging damage by using the product packaging damage detection method, and further improve the robustness of damage detection.

[0065] In one embodiment, the step includes: when the packaging detection boxes include at least two packaging detection boxes, performing image extraction on each packaging detection box to obtain an image of the product packaging of each packaging detection box; inputting the image of the product packaging into the trained second detection model to enable the trained second detection model to detect damage in each image of the product packaging; obtaining the output result of the trained second detection model to obtain a damage detection result; wherein the trained second detection model is obtained by training the back image, and the back image is an image with a packaging damage detection result in history detection, and the confidence of the packaging damage detection result does not reach a preset threshold.

[0066] The trained second detection model can refer to the description of the first detection model in the above embodiments, including model structure, model function, data used for model training, etc. In addition, the model training steps to be involved in the present embodiment will be described in detail in the following embodiments.

[0067] In a specific implementation, after the server 200 obtains the packaging detection boxes of the image to be detected, it can count the number of packaging detection boxes of the image to be detected, and when at least two packaging detection boxes are detected, it is determined that the image to be detected currently analyzed meets the requirements of the preset business scenario. At this time, the server 200 can perform image extraction on each packaging detection box in the image to be detected, that is, extract the image of the product packaging contained in each packaging detection box, and then input each image of the product packaging into the trained second detection model to enable the trained second detection model to detect damage in each image of the product packaging.

[0068] Further, reference can be made to Figure 3 , Figure 3The server 200 displays the effect diagram after image extraction of each packaging detection frame. After extracting the article packaging images of each packaging detection frame, the server 200 can input the article packaging images into the trained second detection model respectively, so that the trained second detection model outputs the damage detection results of each article packaging image. The damage detection results include the first detection result and the second detection result, the first detection result indicates that there is a damage detection frame in the corresponding article packaging image, and the second detection result indicates that there is no damage detection frame in the corresponding article packaging image. The server 200 can further analyze the article packaging images with the first detection result as the damage detection result.

[0069] For example, as shown in the to-be-detected image, if the to-be-detected image contains two packaging detection frames, and each article packaging image corresponding to each packaging detection frame has a damage detection frame, the two article packaging images each containing a damage detection frame can be taken as target article packaging images for subsequent analysis and processing of the target article packaging images. Figure 3

[0070] For another example, if there is a to-be-detected image containing three packaging detection frames, A, B, and C, if the server 200 detects that the article packaging image corresponding to the packaging detection frame A has a damage detection frame, and the article packaging image corresponding to the packaging detection frame C also has a damage detection frame, but the article packaging image corresponding to the packaging detection frame B has no damage detection frame, the article packaging images corresponding to the packaging detection frames A and C can be determined as target article packaging images. At this time, the damage detection result of the packaging detection frame A is the first detection result, the damage detection result of the packaging detection frame C is also the first detection result, and the damage detection result of the packaging detection frame B is the second detection result.

[0071] S204, if the target article packaging image with the damage detection frame includes at least two, the server 200 performs coordinate mapping and deduplication processing on each target article packaging image to obtain the packaging damage detection result of the to-be-detected image.

[0072] The target article packaging image can refer to the article packaging image with the first detection result, i.e., the article packaging image in which the damage detection frame is detected.

[0073] ​In specific implementation, after the server 200 obtains the damage detection results of each item packaging image, it can filter the item packaging images whose damage detection result is "first detection result" as target item packaging images. At this time, if there is no target item packaging image, it means that there is no item packaging damage in the image to be detected, and no further processing is required; if there is only one target item packaging image, no coordinate mapping deduplication processing is required to determine the location of item packaging damage in the image to be detected. However, since this embodiment proposes to perform damage detection on each item packaging image separately, rather than simultaneously, the detection accuracy of item packaging damage can also be improved accordingly; if there are two or more target item packaging images, coordinate mapping deduplication processing can be used to obtain the packaging damage detection results. The coordinate mapping deduplication processing steps involved in this embodiment will be described in detail below.

[0074] In one embodiment, this step includes: selecting the product packaging images whose damage detection results are damage detection boxes as target product packaging images; counting the number of target product packaging images; if the number of images is greater than or equal to two, obtaining the size ratio of each damage detection box in the corresponding target product packaging image, and obtaining the initial size of each packaging detection box; and performing coordinate mapping deduplication processing on each target product packaging image according to the initial size and size ratio to obtain the packaging damage detection result of the image to be detected.

[0075] In the specific implementation, after the server 200 determines the target item packaging image in each item packaging image, if the number of target item packaging images is greater than or equal to "2", the server 200 will further obtain the size ratio of each damage detection box in the corresponding target item packaging image, and obtain the initial size of the packaging detection box to which each target item packaging image belongs.

[0076] For example, see Figure 3 The number of target item packaging images contained in the image to be detected is "2", and the damage detection boxes corresponding to the two target item packaging images are both "1". Then the server 200 can obtain the size ratio of the damage detection box "a" in the corresponding target item packaging image "A", which is recorded as "one-quarter", and obtain the size ratio of the damage detection box "b" in the corresponding target item packaging image "B", which is recorded as "one-fifth". Then, the initial size of the packaging detection box corresponding to the target item packaging image "A" is obtained as "5cm*10cm", and the initial size of the packaging detection box corresponding to the target item packaging image "B" is obtained as "7cm*12cm".

[0077] Of course, although the initial size and size ratio provided by the above example is only one expression, i.e., corresponding to one unit, respectively, it does not exclude that in other embodiments, the "size ratio" includes but is not limited to the length / width ratio or the area ratio of each damage detection frame in the corresponding target article packaging image; and the "initial size" includes but is not limited to the length / width size recorded in centimeters (cm), decimeters (dm), or pixels.

[0078] In one embodiment, according to the initial size and the size ratio, the coordinate mapping deduplication processing is performed on each target article packaging image to obtain the packaging damage detection result of the to-be-detected image, including: according to the initial size and the size ratio, the size of the target article packaging image containing the damage detection frame is adjusted to obtain the actual size of each damage detection frame; based on the actual size, the coordinate mapping processing is performed on each target article packaging image relative to the to-be-detected image to obtain the to-be-detected image containing each damage detection frame; for the to-be-detected image containing each damage detection frame, the damage detection frame satisfying the preset repetition condition is deduplicated to obtain the packaging damage detection result of the to-be-detected image.

[0079] In a specific implementation, before the server 200 performs damage detection on each article packaging image, in order to improve the accuracy of article packaging damage detection, the article packaging image may be first enlarged or reduced accordingly, so that the size of the subsequent obtained target article packaging image is different from the initial size of the article packaging image. Therefore, the server 200 can use the current obtained initial size and size ratio to adjust the size of the target article packaging image containing the damage detection frame, that is, the current size of each target article packaging image is adjusted to the initial size, and then the damage detection frame contained in the target article packaging image will also be changed in size accordingly, and the actual size of each damage detection frame is obtained.

[0080] For example, the initial size of the packaging detection frame corresponding to the target article packaging image "A" is "5cm*10cm", and the size ratio of the damage detection frame "a" in the corresponding target article packaging image "A" is "one fifth long and one fifth wide", and the actual size of the damage detection frame "a" is "1cm*2cm".

[0081] Furthermore, based on the actual size, the server 200 performs coordinate mapping processing on each target item packaging image relative to the image to be detected. That is, it maps the target item packaging image containing the actual-sized damage detection boxes to the image coordinate system of the image to be detected, thus obtaining the image to be detected containing each damage detection box. It should be noted that the coordinate mapping processing maintains the position of the damage detection boxes in the target item packaging image. Although this application embodiment does not describe how to maintain the position of the damage detection boxes in the target item packaging image during size adjustment or coordinate mapping processing, it does not mean that this application embodiment is not limited in this regard. It can be understood that maintaining the position of the damage detection boxes in the target item packaging image can be achieved by simultaneously acquiring the position information of the damage detection boxes in the target item packaging image, thereby maintaining the position of the mapped box diagram. The deduplication processing of damage detection boxes that meet the preset repetition conditions can be implemented using a non-maximum suppression (NMS) algorithm; it can also be achieved by analyzing the image texture features covered by each damage detection box.

[0082] In one embodiment, prior to this step, the method further includes: constructing an initial item packaging damage detection model, which is composed of a first detection model and a second detection model cascaded together; acquiring a set of damaged packaging images, which includes multiple first images belonging to a pre-set COCO dataset and multiple second images labeled with item packaging damage information; pre-training the initial item packaging damage detection model using the first images to obtain a pre-trained item packaging damage detection model; and training the pre-trained item packaging damage detection model using the second images to obtain a trained first detection model and a trained second detection model.

[0083] In specific implementation, such as Figure 4 The diagram shown illustrates the training flowchart of the item packaging damage detection model involved in this embodiment. Before the server 200 performs item packaging detection on the image to be detected and obtains the packaging detection box, it first needs to construct an initial item packaging damage detection model. The initial item packaging damage detection model is composed of a first detection model and a second detection model cascaded together. The cascading method includes, but is not limited to, direct connection and indirect connection. The indirect connection method means that there are other data processing steps between the two models, which require the assistance of the server 200.

[0084] Further, the server 200 can obtain image data for training the article packaging damage detection model, i.e., the server 200 can obtain a small amount of training images with labeled packaging damage information through the terminal 100. The labeling tool can be labelling based on Python language, which supports cross-platform running in Windows, Linux, etc., and can mark the target object through a visual operation interface. Then, a small amount of training images are data-augmented to obtain a large amount of second images. At the same time, the server 200 can also obtain a sufficient amount of first images from the preset COCO dataset, and combine the second images as a packaging damage image set. In this way, the first images can be used to pre-train the initial article packaging damage detection model, and then the second images can be used to train the pre-trained article packaging damage detection model until the model learns the article packaging / damage detection capability, i.e., the trained first detection model and the trained second detection model involved in the above embodiments are obtained.

[0085] More specifically, the pre-trained article packaging damage detection model will have certain initialization parameters, and part of the model training process can be omitted in the subsequent training process, saving model training time. The stopping conditions of model pre-training can include: 1. The error is less than a certain pre-set smaller value. 2. The weight change between two iterations is very small, and a threshold value can be set, when it is less than this threshold value, the training is stopped. 3. Set the maximum number of iterations, when the iteration exceeds the maximum number, stop training, for example, "273 cycles". 4. The recognition accuracy reaches a certain pre-set larger value. The data augmentation step and the model training step after pre-training involved in the present embodiment will be described in detail below.

[0086] In one embodiment, the pre-trained article packaging damage detection model is trained using the second image to obtain the trained first detection model and the trained second detection model, comprising: using the second image to preliminarily train the pre-trained article packaging damage detection model to obtain a preliminarily trained article packaging damage detection model; obtaining detected images with packaging damage detection results in a historical period, the packaging damage detection result of the detected image including a confidence; obtaining a target detected image with a confidence not satisfying a pre-set threshold value as a feedback image; using the feedback image to adjust train the preliminarily trained article packaging damage detection model to obtain the trained first detection model and the trained second detection model.

[0087] In a specific implementation, the stop condition of the preliminary training of the model can also include any of the conditions in the above embodiments. After the server 200 performs the preliminary training step according to the current set stop condition, a preliminary trained article packaging damage detection model can be obtained. The preliminary trained article packaging damage detection model can be used to detect the article packaging and damage in the “test image” to test the model performance. It can be understood that, since the test time of the test step is a historical time compared to the current processing time of the to-be-detected image, the “test image” can be a detected image with a packaging damage detection result in a historical period.

[0088] Further, the purpose of the model performance test is to obtain the confidence of the packaging damage detection result of the detected image, mainly referring to the confidence of the damage detection result. Since the size of the article packaging is large and the shape is regular, it is easy to detect, while the packaging damage not only has a small size, but also has many damage shapes and ways, which is much more complex than the article packaging detection task, so it is necessary to focus on the image with low damage detection result confidence, that is, one or more target detected images with confidence not meeting the preset threshold are obtained as the feedback image, which is used to adjust and train the preliminary trained article packaging damage detection model until the images with confidence meeting the preset threshold are no longer detected, or the above training stop condition is met.

[0089] It should be noted that, if the multiple target detected images as the feedback image have a high similarity, that is, the image feature distance of part of the images is less than the preset distance threshold, indicating that the corresponding images have a high similarity. At this time, the server 200 can remove the images with high similarity, that is, realize deduplication, so as to improve the model detection performance and improve the article packaging damage detection accuracy.

[0090] In one embodiment, obtaining the packaging damage image set includes: obtaining a training sample image, the training sample image being an image with labeled article packaging damage information; analyzing the image format, image size and / or image feature of the training sample image; according to at least one of the image format, image size and image feature, screening out a training sample image meeting the preset model training condition as a target training sample image; performing data augmentation on the target training sample image to obtain a second image; and taking the second image and the first image as the packaging damage image set.

[0091] The training sample image can be an image with labeled article packaging damage information, and the article packaging damage information includes but is not limited to hole, crack and other damage information existing on various article packaging.

[0092] In a specific implementation, before the server 200 obtains the set of packaging damage images, it can obtain training sample images. The training sample images can be images obtained from the terminal 100 or other devices, or images pre-stored in a database of the server 200. However, the training sample images obtained by the server 200 cannot be directly used to form the set of packaging damage images, because there is a high possibility that the training sample images contain images that cannot be used for training. Therefore, to avoid affecting the training effect, after obtaining the training sample images, the server 200 needs to filter out images that cannot be normally read, images that are too small in size, and duplicate images, that is, obtain at least one of the image format, image size, and image feature of the training sample images, to pre-screen the training sample images and obtain target training sample images that meet the preset model training conditions.

[0093] It can be understood that the target training sample images are the “annotated small data set” shown in FIG. 2. Figure 4 After the server 200 obtains the “annotated small data set” required for model training, it can perform data augmentation on the “annotated small data set”. The data augmentation methods include but are not limited to optical transformation, affine transformation, Mosaic data augmentation, Mixup data augmentation, and the like.

[0094] The “Mosaic data augmentation” is to scale and splice four images into one image. Mosaic is beneficial to improve the detection of small targets, because generally small targets are unevenly distributed in images in a data set, which leads to insufficient learning of small targets in regular training. The “Mixup data augmentation” is to fuse positive and negative samples into a new set of samples, so that the sample quantity is doubled. The enhancement effects of “Mosaic data augmentation” and “Mixup data augmentation” on ordinary images can be referred to Figure 5 .

[0095] More specifically, the target training sample images after data augmentation are second images, and the second images are the “augmented data set” shown in FIG. 2. Figure 4 The second images and the first images form the set of packaging damage images, and can jointly complete the training task of the article packaging damage detection model to obtain the “initial model” with detection capability.

[0096] In an embodiment, the target article packaging image contains an article code image. After this step, the method further includes: determining, according to the packaging damage detection result, an article packaging to which the damage detection frame belongs as a target article packaging; identifying an article code image corresponding to the target article packaging to obtain an article code of the target article packaging; and feeding back the article code of the target article packaging to the terminal, so that the terminal receives and displays the article code of the target article packaging.

[0097] In the embodiment, it is proposed that the target object packaging image further includes an object code image. The object code involved can be an object order code, an object identity code, etc. The object code image is a specified image that can obtain the object code through image recognition, such as a bar code, a two-dimensional code, etc.

[0098] In a specific implementation, the above embodiment does not explicitly indicate whether the to-be-detected image is an image containing an object code image. The main reason is that the role of the object code image is to provide a query basis for the object packaging, and the above embodiment does not involve this requirement. Therefore, in the embodiment, it is proposed that after obtaining the packaging damage detection result of the to-be-detected image, the object packaging to which the damage detection frame belongs can be further determined according to actual business requirements. The determination method includes but is not limited to analyzing the associated area, pixel coordinates, etc. of the image contained in the damage detection frame and each target object packaging image. As shown in the figure, the object packaging to which the damage detection frame belongs is the target object packaging. The server 200 identifies the object code image corresponding to the target object packaging, thereby obtaining the object code of the target object packaging, and then sends the object code to the terminal 100 for display, so that the staff using the terminal 100 can recycle or process the target object packaging. Figure 3

[0099] In the above object packaging damage detection, the server obtains the to-be-detected image, performs object packaging detection on the to-be-detected image to obtain a packaging detection frame, and when the to-be-detected image contains at least two packaging detection frames, performs damage detection on the object packaging image of each packaging detection frame to obtain the damage detection result of each object packaging image. If the damage detection result is that the target object packaging image of the damage detection frame includes at least two, the coordinate mapping and deduplication processing are performed on each target object packaging image to obtain the packaging damage detection result of the to-be-detected image. In this way, the to-be-detected image containing multiple object packagings is subjected to packaging detection and then coordinate mapping and deduplication processing after damage detection. This can effectively avoid the abnormal situation that the same damage is detected multiple times due to the possible overlap between multiple object packagings, thereby improving the damage detection accuracy of the object packaging. In addition, the application also proposes an improvement scheme for the model training process and damage packaging locking. The model performance can be maximally improved, and the to-be-processed target can be provided in response to the user demand, thereby improving the reliability of the object packaging in terms of completeness.

[0100] In order to better implement the object packaging damage detection method provided in the embodiments of the application, on the basis of the object packaging damage detection method provided in the embodiments of the application, an object packaging damage detection device is further provided in the embodiments of the application, as shown in the figure. The object packaging damage detection device 600 includes: Figure 6

[0101] ​​The image acquisition module 610 is configured to acquire a to-be-detected image.

[0102] The package detection module 620 is configured to perform package detection on the to-be-detected image to obtain a package detection frame.

[0103] The damage detection module 630 is configured to, when the to-be-detected image contains at least two package detection frames, perform damage detection on the package images of the package detection frames to obtain damage detection results of the package images.

[0104] The damage processing module 640 is configured to, if the damage detection result is that the target package image of the damage detection frame contains at least two, perform coordinate mapping and deduplication processing on the target package images to obtain a package damage detection result of the to-be-detected image.

[0105] In some embodiments of the present application, the damage processing module 640 is further configured to filter out the package image of the damage detection frame as the target package image according to the damage detection result; count the number of images of the target package image; if the number of images is greater than or equal to two, obtain the size ratio of each damage detection frame in the corresponding target package image, and obtain the initial size of each package detection frame; and perform coordinate mapping and deduplication processing on the target package images according to the initial size and the size ratio to obtain the package damage detection result of the to-be-detected image.

[0106] In some embodiments of the present application, the damage processing module 640 is further configured to perform size adjustment on the target package image containing the damage detection frame according to the initial size and the size ratio to obtain the actual size of each damage detection frame; perform coordinate mapping processing on the target package image relative to the to-be-detected image based on the actual size to obtain the to-be-detected image containing each damage detection frame; and perform deduplication processing on the damage detection frame satisfying the preset repetition condition for the to-be-detected image containing each damage detection frame to obtain the package damage detection result of the to-be-detected image.

[0107] In some embodiments of the present application, the package detection module 620 is further configured to input the to-be-detected image into the trained first detection model to enable the trained first detection model to perform package detection on the to-be-detected image; and obtain the output result of the trained first detection model to obtain the package detection frame; wherein the trained first detection model is obtained by training the back transmission image, and the back transmission image is an image with a package damage detection result in history detection, and the confidence of the package damage detection result does not reach a preset threshold.

[0108] In some embodiments of the present application, the damage detection module 630 is further configured to perform image extraction on each of the packaging detection frames when the packaging detection frame set includes at least two packaging detection frames, to obtain an article packaging image of each of the packaging detection frames; input the article packaging image into the trained second detection model, so that the trained second detection model performs damage detection on each of the article packaging images; obtain an output result of the trained second detection model, to obtain a damage detection result; wherein the trained second detection model is obtained by training using a feedback image, and the feedback image is an image that has a packaging damage detection result in a historical detection and a confidence of the packaging damage detection result does not reach a preset threshold.

[0109] In some embodiments of the present application, the article packaging damage detection device 600 further comprises a model training module configured to construct an initial article packaging damage detection model, wherein the article packaging damage detection model is formed by cascading the first detection model and the second detection model; obtain a packaging damage image set, wherein the packaging damage image set includes a plurality of first images belonging to a preset COCO data set and a plurality of second images with labeled article packaging damage information; pre-train the initial article packaging damage detection model using the first images, to obtain a pre-trained article packaging damage detection model; train the pre-trained article packaging damage detection model using the second images, to obtain the trained first detection model and the trained second detection model.

[0110] In some embodiments of the present application, the model training module is further configured to preliminarily train the pre-trained article packaging damage detection model using the second images, to obtain a preliminarily trained article packaging damage detection model; obtain a detected image with a packaging damage detection result in a historical period, wherein the packaging damage detection result of the detected image includes a confidence; obtain a target detected image with a confidence that does not satisfy a preset threshold, as a feedback image; adjust train the preliminarily trained article packaging damage detection model using the feedback image, to obtain the trained first detection model and the trained second detection model.

[0111] In some embodiments of the present application, the model training module is further configured to obtain a training sample image, wherein the training sample image is an image with labeled article packaging damage information; analyze an image format, an image size and / or an image feature of the training sample image; according to at least one of the image format, the image size and the image feature, filter out a training sample image that satisfies a preset model training condition, as a target training sample image; perform data augmentation on the target training sample image, to obtain a second image; and use the second image and the first image as the packaging damage image set.

[0112] In some embodiments of the present application, the target object packaging image contains an object code image, and the object packaging damage detection device 600 further comprises a damage prompt module, configured to determine the object packaging to which the damage detection frame belongs as the target object packaging according to the packaging damage detection result, identify the object code image corresponding to the target object packaging to obtain the object code of the target object packaging, and feed back the object code of the target object packaging to the terminal to enable the terminal to receive and display the object code of the target object packaging.

[0113] In the above embodiments, the object packaging damage detection device performs packaging detection on the to-be-detected image containing multiple object packagings respectively, and then performs coordinate mapping and deduplication processing after damage detection, which can effectively avoid the abnormal situation that the same damage is detected multiple times due to the possible overlap between multiple object packagings, thereby improving the damage detection accuracy of object packaging. In addition, the present application also proposes an improvement scheme for model training process and damage packaging locking, which not only maximizes the improvement of model performance, but also provides a to-be-processed target in response to user demand, thereby improving the reliability of object packaging in terms of integrity.

[0114] In some embodiments of the present application, the object packaging damage detection device 600 can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 7 The memory of the computer device can store various program modules constituting the object packaging damage detection device 600, such as an image acquisition module 610, a packaging detection module 620, a damage detection module 630, and a damage processing module 640 as shown in Figure 6 The computer program constituted by various program modules enables the processor to execute the steps in the object packaging damage detection method of each embodiment of the present application described in the present specification.

[0115] For example, Figure 7 The computer device as shown in Figure 6The image acquisition module 610 in the illustrated article package damage detection apparatus 600 performs step S201. The computer device can perform step S202 through the package detection module 620. The computer device can perform step S203 through the damage detection module 630. The computer device can perform step S204 through the damage processing module 640. The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with external computer devices through network connections. The computer program is executed by the processor to implement an article package damage detection method.

[0116] Those skilled in the art can understand that, Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In some embodiments of the present application, a computer device is provided, including one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to perform the steps of the article package damage detection method by the processor. The steps of the article package damage detection method can be the steps in the article package damage detection method of each of the above embodiments.

[0118] In some embodiments of the present application, a computer readable storage medium is provided, storing a computer program, which is loaded by a processor to make the processor perform the steps of the article package damage detection method. The steps of the article package damage detection method can be the steps in the article package damage detection method of each of the above embodiments.

[0119] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0120] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0121] The above provides a detailed introduction to the method, device, computer equipment and storage medium provided by the embodiments of the present application. The principle and implementation mode of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed; in view of the above, the content of the specification should not be understood as the limitation of the present application.

Claims

1. An article package damage detection method characterized by comprising: The method comprises the following steps: acquiring a to-be-detected image; performing article package detection on the to-be-detected image to acquire a package detection frame; when the to-be-detected image contains at least two package detection frames, performing damage detection on the article package images of the package detection frames to obtain damage detection results of the article package images; screening out the article package images with damage detection results as damaged package detection frames as target article package images, counting the number of the target article package images, and if the number is greater than or equal to two, acquiring the size ratio of each damaged package detection frame in the corresponding target article package image and the initial size of each package detection frame; according to the initial size and the size ratio, adjusting the size of the target article package images containing the damaged package detection frames to obtain the actual size of each damaged package detection frame; based on the actual size, performing coordinate mapping processing on each target article package image relative to the to-be-detected image to obtain a to-be-detected image containing each damaged package detection frame, and performing deduplication processing on the damaged package detection frames that meet the preset repetition condition for the to-be-detected image containing each damaged package detection frame to obtain a package damage detection result of the to-be-detected image.

2. The method of claim 1, wherein, The method comprises the following steps: inputting the to-be-detected image into a trained first detection model to enable the trained first detection model to perform article package detection on the to-be-detected image; acquiring the output result of the trained first detection model to obtain the package detection frame; wherein the trained first detection model is obtained by training using a feedback image, and the feedback image is an image that has a package damage detection result in historical detection and the confidence of the package damage detection result does not reach a preset threshold.

3. The method of claim 1, wherein, The method comprises the following steps: when the package detection frame contains at least two package detection frames, performing image extraction on each package detection frame to obtain the article package image of each package detection frame; inputting the article package image into a trained second detection model to enable the trained second detection model to perform damage detection on each article package image; acquiring the output result of the trained second detection model to obtain the damage detection result; wherein the trained second detection model is obtained by training using a feedback image, and the feedback image is an image that has a package damage detection result in historical detection and the confidence of the package damage detection result does not reach a preset threshold.

4. The method of claim 1, wherein, Before the step of performing article package detection on the to-be-detected image to acquire a package detection frame, the method further comprises the following steps: constructing an initial article package damage detection model, wherein the article package damage detection model is composed of a first detection model and a second detection model in a cascading manner; Obtain a packaging damage image set, the packaging damage image set including a plurality of first images belonging to a preset COCO data set and a plurality of second images with labeled packaging damage information of an article; Pre-train the initial packaging damage detection model of the article using the first images to obtain a pre-trained packaging damage detection model of the article; Train the pre-trained packaging damage detection model of the article using the second images to obtain a trained first detection model and a trained second detection model.

5. The method of claim 4, wherein, The training of the pre-trained packaging damage detection model of the article using the second images to obtain a trained first detection model and a trained second detection model comprises: Preliminary training of the pre-trained packaging damage detection model of the article using the second images to obtain a preliminary trained packaging damage detection model of the article; Obtain detected images with packaging damage detection results in a historical period, the packaging damage detection results of the detected images including a confidence level; Obtain target detected images with confidence levels not meeting a preset threshold as feedback images; Adjust and train the preliminary trained packaging damage detection model of the article using the feedback images to obtain the trained first detection model and the trained second detection model.

6. The method of claim 4, wherein, The obtaining of the packaging damage image set comprises: Obtain training sample images, the training sample images being images with labeled packaging damage information of the article; Analyze the image format, image size and / or image features of the training sample images; According to at least one of the image format, the image size and the image features, screen out training sample images meeting preset model training conditions as target training sample images; Data augmentation is performed on the target training sample images to obtain the second images; The second images and the first images are taken as the packaging damage image set.

7. The method of claim 1, wherein, The target article packaging image contains an article code image, and after obtaining the packaging damage detection result of the to-be-detected image, the method further comprises: According to the packaging damage detection result, determine the article packaging to which the damage detection frame belongs as a target article packaging; Identify the article code image corresponding to the target article packaging to obtain the article code of the target article packaging; Feed back the article code of the target article packaging to a terminal to enable the terminal to receive and display the article code of the target article packaging.

8. An article package damage detection apparatus, characterized by, The method comprises: An image acquisition module is configured to obtain a to-be-detected image; A packaging detection module is configured to perform article packaging detection on the to-be-detected image to obtain a packaging detection frame; A damage detection module is configured to, when the to-be-detected image contains at least two packaging detection frames, perform damage detection on the article packaging image of each packaging detection frame to obtain a damage detection result of each article packaging image; The damage processing module is configured to: screen out, as a target product packaging image, a product packaging image in which the damage detection result is a damage detection frame; count the number of images of the target product packaging image; if the number of images is greater than or equal to two, obtain a size ratio of each damage detection frame in the corresponding target product packaging image, and obtain an initial size of each packaging detection frame; According to the initial size and the size ratio, the target product packaging image containing the damage detection frame is adjusted in size to obtain an actual size of each damage detection frame; Based on the actual size, coordinate mapping processing is performed on each target product packaging image relative to the image to be detected to obtain an image to be detected containing each damage detection frame; and for the image to be detected containing each damage detection frame, damage detection frames that meet a preset repetition condition are removed to obtain a packaging damage detection result of the image to be detected.

9. A computer device, comprising: The computer device comprises: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the product packaging damage detection method of any one of claims 1 to 7.

10. 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 product packaging damage detection method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • The invention discloses a target detection duplicate removal method and device

    CN109829517A

  • Logistics piece state detection method, apparatus and device

    CN111666816A