Parcel quantity determination method and device, electronic equipment and storage medium

The neural network model is used to obtain the probability of package image features and combine the feature combination to determine the number of packages. This solves the problem of inaccurate package number judgment in the existing technology and improves the accuracy of the sorting process and transportation efficiency.

CN114155180BActive Publication Date: 2025-10-17SF TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010920366.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-04
Publication Date
2025-10-17
Estimated Expiration
2040-09-04

AI Technical Summary

Technical Problem

Existing technologies cannot accurately determine the number of parcels during the parcel sorting process, especially when the parcels are parallel, stacked, or close together, which leads to sorting errors and affects delivery time.

Method used

A neural network model is used to obtain the number features, spatial features, and connection feature probabilities of package images. Combined with the preset single-piece and multi-piece package feature combinations, the package probability is judged through the EfficientNet-b3, ResNet101, or SVM model to determine the number of packages.

Benefits of technology

The accuracy of parcel number judgment is improved, and the number of parcels in parallel, stacked and close-packed situations can be identified, reducing the sorting error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155180B_ABST
    Figure CN114155180B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a package piece number determination method and device, electronic equipment and computer readable storage medium, which can improve the accuracy of package piece number determination. In the embodiments of the present application, the package piece number determination device first acquires a to-be-recognized image containing a package; then acquires a number feature probability of a number feature, a space feature probability of a space feature and a connection feature probability of a connection feature of the package in the to-be-recognized image; then determines a single-piece package probability and a multi-piece package probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single-piece package feature combination and a preset multi-piece package feature combination; and finally determines a package piece number corresponding to the to-be-recognized image according to the single-piece package probability and the multi-piece package probability. The present scheme can directly determine the piece number of the package according to the number feature, the space feature and the connection feature of the package in the to-be-recognized image, and the accuracy of package piece number determination is high.
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 recognition, and in particular to a parcel piece number determination method and device, electronic equipment and a computer readable storage medium. BACKGROUND

[0002] The parcel weighing scanning volume measurement device (DWS) is a system for automatic weighing, volume measurement, barcode scanning and physical image acquisition of parcels on a production line during parcel sorting in the express logistics industry.

[0003] The DWS sometimes has an abnormal situation of multiple pieces of weighing, and the abnormal piece loading causes subsequent parcel sorting errors, which seriously affects the parcel delivery time. Currently, a multi-face single detection is used to identify the abnormal piece loading. However, the multiple face single can only indirectly reflect the parcel piece loading state, and for the scenarios of parallel, stacked or closely attached parcel piece loading, the existing method cannot accurately determine the piece number of the parcel, so the accuracy of the parcel piece number determination of the existing method is low. SUMMARY

[0004] The embodiments of the present application provide a parcel piece number determination method and device, electronic equipment and a computer readable storage medium, which can improve the accuracy of parcel piece number determination.

[0005] In a first aspect, the embodiments of the present application provide a parcel piece number determination method, comprising:

[0006] Obtaining a to-be-recognized image containing a parcel;

[0007] Obtaining a number feature probability of a number feature, a space feature probability of a space feature and a connection feature probability of a connection feature of the parcel in the to-be-recognized image;

[0008] Determining a single parcel probability and a multiple parcel probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single parcel feature combination and a preset multiple parcel feature combination;

[0009] Determining a parcel piece number corresponding to the to-be-recognized image according to the single parcel probability and the multiple parcel probability.

[0010] In some embodiments, the obtaining of the number feature probability of the number feature, the space feature probability of the space feature and the connection feature probability of the connection feature of the parcel in the to-be-recognized image comprises:

[0011] Inputting the to-be-recognized image into a trained first neural network model to obtain the number feature probability, the space feature probability and the connection feature probability.

[0012] In some embodiments, before the inputting the image to be identified into the trained first neural network model, obtaining the number feature probability, the space feature probability, and the connection feature probability, the method further comprises:

[0013] Obtaining a single-package image sample containing one package, the single-package image sample including a package image with no clutter in the background and a package image with clutter in the background, the clutter being an article other than the package and the conveyor belt;

[0014] Obtaining a multi-package image sample containing multiple packages, the multi-package image sample including a package image with no clutter in the background and a package image with clutter in the background;

[0015] Training a preset first neural network model according to the single-package image sample and the multi-package image sample to obtain the trained first neural network model.

[0016] In some embodiments, the determining a single-package probability and a multi-package probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single-package feature combination, and a preset multi-package feature combination, the method comprises:

[0017] Determining a single-package probability and a multi-package probability according to the number feature probability, the space feature probability, the connection feature probability, the single-package feature combination, and the multi-package feature combination based on a trained second neural network model.

[0018] In some embodiments, the second neural network model comprises EfficientNet-b3, ResNet101, a decision tree, or SVM.

[0019] In some embodiments, the determining the number of pieces of the package corresponding to the image to be identified according to the single-package probability and the multi-package probability comprises:

[0020] When the single-package probability is greater than the multi-package probability, determining that the number of pieces of the package corresponding to the image to be identified is single;

[0021] When the single-package probability is less than the multi-package probability, determining that the number of pieces of the package corresponding to the image to be identified is multiple.

[0022] In some embodiments, after the determining that the number of pieces of the package corresponding to the image to be identified is multiple when the single-package probability is less than the multi-package probability, the method further comprises:

[0023] Generating a package abnormality signal.

[0024] In some embodiments, obtaining an image to be identified containing a package comprises:

[0025] obtaining, by an image acquisition device, the image to be identified of the package on the conveying line.

[0026] In a second aspect, the embodiments of the present application further provide a package piece number determination device, comprising:

[0027] a first obtaining unit configured to obtain an image to be identified containing a package;

[0028] a second obtaining unit configured to obtain a number feature probability of a number feature, a space feature probability of a space feature, and a connection feature probability of a connection feature of the package in the image to be identified;

[0029] a first determination unit configured to determine a single-piece package probability and a multi-piece package probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single-piece package feature combination, and a preset multi-piece package feature combination;

[0030] a second determination unit configured to determine a package piece number corresponding to the image to be identified according to the single-piece package probability and the multi-piece package probability.

[0031] In some embodiments, the second obtaining unit is specifically configured to:

[0032] input the image to be identified into a trained first neural network model to obtain the number feature probability, the space feature probability, and the connection feature probability.

[0033] In some embodiments, the device further comprises:

[0034] a third obtaining unit configured to obtain a single-package image sample containing a package, the single-package image sample comprising a package image with no background clutter and a package image with background clutter, the clutter being an article other than the package and the conveying belt;

[0035] a fourth obtaining unit configured to obtain a multi-package image sample containing a plurality of packages, the multi-package image sample comprising a package image with no background clutter and a package image with background clutter;

[0036] a training unit configured to train a preset first neural network model according to the single-package image sample and the multi-package image sample to obtain the trained first neural network model.

[0037] In some embodiments, the first determination unit is specifically configured to:

[0038] determine, based on the number feature probability, the space feature probability, the connection feature probability, the single-package feature combination, and the multi-package feature combination, a single-package probability and a multi-package probability.

[0039] In some embodiments, the second determining unit is specifically configured to:

[0040] when the single-package probability is greater than the multi-package probability, determine that the number of package pieces corresponding to the to-be-identified image is single;

[0041] when the single-package probability is less than the multi-package probability, determine that the number of package pieces corresponding to the to-be-identified image is multiple.

[0042] In some embodiments, the apparatus further includes:

[0043] a generating unit configured to generate a package exception signal.

[0044] In some embodiments, the first obtaining unit is specifically configured to:

[0045] obtain, by an image obtaining device, the to-be-identified image of the package on the conveying line.

[0046] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor invokes the computer program in the memory to execute steps in any of the package piece number determination methods provided in the embodiments of the present application.

[0047] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute steps in any of the package piece number determination methods provided in the embodiments of the present application.

[0048] In the embodiments of the present application, the package piece number determination apparatus first obtains a to-be-identified image containing a package; then obtains a number feature probability of a number feature, a space feature probability of a space feature, and a connection feature probability of a connection feature of the package in the to-be-identified image; then determines a single-package probability and a multi-package probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single-package feature combination, and a preset multi-package feature combination; and finally determines the number of package pieces corresponding to the to-be-identified image according to the single-package probability and the multi-package probability. The present scheme can intuitively determine the number of package pieces in the to-be-identified image according to the number feature, the space feature, and the connection feature of the package, including the number of package pieces in the picture under the conditions of package parallelism, stacking, and close adhesion, and the accuracy of package piece number determination is high. BRIEF DESCRIPTION OF DRAWINGS

[0049] 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 description will be briefly introduced. Obviously, the drawings in the following description are only 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.

[0050] Figure 1 is an application scenario diagram of the package piece number determination method provided by the embodiments of the present application;

[0051] Figure 2 is a flowchart of the package piece number determination method provided by the embodiments of the present application;

[0052] Figure 3 is a flowchart of training the first neural network model provided by the embodiments of the present application;

[0053] Figure 4 is a flowchart of the linkage training of the first neural network model and the second neural network provided by the embodiments of the present application;

[0054] Figure 5 is a framework flowchart of the package piece number determination method provided by the embodiments of the present application;

[0055] Figure 6 is a structural diagram of the package piece number determination device provided by the embodiments of the present application;

[0056] Figure 7 is another structural diagram of the package piece number determination device provided by the embodiments of the present application;

[0057] Figure 8 is a structural diagram of the server provided by the embodiments of the present application. DETAILED DESCRIPTION

[0058] 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 are only some embodiments of the present application, but not 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.

[0059] In the following description, specific embodiments of the present application will be described with reference to steps and symbolic representations of operations (e.g., in the form of flow charts) that are performed by one or more computers, unless otherwise indicated. As such, it will be understood that the steps of the present application can be performed by one or more computers operating in concert. These computer programs (also referred to as programs, software, software applications or applications) can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on one computer, in a stand-alone computer, or across multiple computers under a client-server or other distributed processing arrangement.

[0060] The principles of the application are operable with many other general purpose or special purpose computing, communications environments or configurations. Examples of well known computing systems, environments, and configurations that can be suitable for use with the application include, but are not limited to, hand-held or laptop devices, personal computers, servers, multiprocessor systems, microcomputer-based systems, set top boxes, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.

[0061] The terms "first", "second", and "third" and the like in the present application are used to distinguish one element from another, and are not necessarily used to describe a particular sequential order. Moreover, the terms "include", "have", and any variations thereof, are intended to cover a non-exclusive inclusion.

[0062] Embodiments of the present application provide a package quantity determination method and device, electronic equipment and storage medium, which are described in detail as follows.

[0063] In the present embodiment, the package quantity determination device will be described from the perspective of the package quantity determination device, which can be integrated in an image acquisition device, or in other terminals or servers, and the specific implementation is not limited here.

[0064] The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices, and the like. The server can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0065] The package quantity determination method provided by the present application can be applied to, for example Figure 1The application environment shown. When the package arrives, it will be transported to the DWS system by the stretch machine at the unloading area, and in the DWS system, the package is conveyed to the dynamic weighing scale by the pull package machine. At this time, the image acquisition device acquires the to-be-identified image of the package on the conveying belt of the dynamic weighing scale, and then acquires the number feature probability of the number feature, the space feature probability of the space feature, and the connection feature probability of the connection feature in the to-be-identified image. Then, according to the number feature probability, the space feature probability, the connection feature probability, the pre-set single-piece package feature combination, and the pre-set multi-piece package feature combination, the single-piece package probability and the multi-piece package probability are determined. Finally, according to the single-piece package probability and the multi-piece package probability, the piece number corresponding to the to-be-identified image of the package is determined. When it is determined that the to-be-identified image contains multiple pieces of packages, it is determined that the piece number corresponding to the to-be-identified image of the package is in an abnormal state, and the abnormal piece is processed by the abnormal processing machine, and the non-abnormal piece is transferred and distributed.

[0066] It should be noted that, Figure 1 The scene diagram shown is only an example, and the scene described in the embodiments of the present application is used to more clearly illustrate the technical solutions of the embodiments of the present application, and does not limit the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that with the evolution of the package piece number determination device and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0067] Please refer to Figure 2 , Figure 2 is a flowchart of a package piece number determination method provided by an embodiment of the present application. The package piece number determination method can include:

[0068] 201, acquiring a to-be-identified image containing a package.

[0069] In this embodiment, the to-be-identified image of the package can be acquired from the memory in the package piece number determination device, or from the cloud storage, or in real time from the package conveying line through the image acquisition device. In this embodiment, the image acquisition device mentioned can be a six-surface scanning camera, or other devices that can acquire package images. The specific type of the image acquisition device is not limited here.

[0070] In some embodiments, when there is a package that needs to be loaded through the DWS, the image acquisition device acquires the to-be-identified image of the package loaded through the DWS.

[0071] In some embodiments, acquiring a to-be-identified image containing a package, the acquired to-be-identified image is subjected to standardization processing, such as mean value processing and normalization processing, and then the subsequent steps are performed using the to-be-identified image subjected to standardization processing.

[0072] 202. Obtain the number feature probability of the number feature of the packages in the image to be identified, the spatial feature probability of the spatial feature, and the connection feature probability of the connection feature.

[0073] In this embodiment, the number feature of packages includes the number feature of one package and the number feature of multiple packages. In this case, the number feature probability includes the number feature probability of one package and the number feature probability of multiple packages.

[0074] The spatial features include the spatial features of a single package (the number feature is one), the spatial features of separated packages (the number feature is multiple, and the packages are not placed in contact), the spatial features of closely packed packages (the number feature is multiple, and there are packages that are not stacked up and down in contact), and the spatial features of stacked packages (the number feature is multiple, and the packages are stacked up and down). At this time, the spatial feature probability includes the spatial feature probability of a single package, the spatial feature probability of separated packages, the spatial feature probability of closely packed packages, and the spatial feature probability of stacked packages.

[0075] The separation of packages in this application includes the case where the packages are parallel and the case where the packages are not parallel.

[0076] The connection features include connection features between packages (the packages are connected in a certain clear form, such as straps, plastic bags, etc.) and connection features between packages that are not connected (not all packages are connected in a clear form).

[0077] In this embodiment, obtaining the number feature probability of the number feature of the package in the image to be identified, the spatial feature probability of the spatial feature, and the connection feature probability of the connection feature includes: inputting the image to be identified into a trained first neural network model to obtain the number feature probability, the spatial feature probability, and the connection feature probability. The first neural network model can be of EfficientNet-b3 or ResNet101.

[0078] Specifically, the image to be identified is de-meaned and normalized and then input into the first neural network model to extract high-dimensional features: F = (f1, f2...f1024). These features are output through the fully connected layer and Softmax function of the first neural network model to output three sets of feature results (number feature probability, spatial feature probability, and connection feature probability), which respectively represent the probability of feature occurrence.

[0079] In some embodiments, as Figure 3 As shown, before inputting the image to be recognized into the trained first neural network model and obtaining the number feature probability, the spatial feature probability, and the connection feature probability, the following steps are also included:

[0080] 301、obtain a single parcel image sample containing one parcel, the single parcel image sample including a parcel image with no clutter in the background and a parcel image with clutter in the background.

[0081] In this embodiment, in order to enrich the training samples, adapt to the actual application scene, and improve the detection accuracy, the single parcel image sample in this embodiment needs to include a parcel image sample with clutter in the background but containing only one real parcel, in which the clutter in the background is an item other than the parcel and the conveyor belt, such as a parcel-like object (parcel shedder, plastic bag packaging, adhesive tape, etc.).

[0082] 302、obtain a multiple parcel image sample containing multiple parcels, the multiple parcel image sample including a parcel image with no clutter in the background and a parcel image with clutter in the background.

[0083] Similarly, the multiple parcel image sample in this embodiment needs to include a parcel image sample with clutter in the background but containing multiple real parcels (such as multiple parcel-like objects stacked or closely together in the background, which cannot be clearly identified as one or more, but are subjectively judged as multiple).

[0084] It should be noted that the multiple parcels in this embodiment refer to parcels with a number greater than 1, and the multiple parcel image sample refers to a sample with a number of parcels greater than 1 in the image.

[0085] 303、train the preset first neural network model according to the single parcel image sample and the multiple parcel image sample to obtain the trained first neural network model.

[0086] Specifically, this step includes training the preset first neural network model according to the single parcel image sample and the multiple parcel image sample to obtain the prediction values of the number feature probability, the spatial feature probability, and the connection feature probability of the single parcel image sample and the multiple parcel image sample, respectively.

[0087] Then, the true values of the number feature probability, the spatial feature probability, and the connection feature probability of the single parcel image sample and the multiple parcel image sample are obtained, and the true values and the prediction values are converged to obtain the trained first neural network model.

[0088] 203、determine a single parcel probability and a multiple parcel probability according to the number feature probability, the spatial feature probability, the connection feature probability, a preset single parcel feature combination, and a preset multiple parcel feature combination.

[0089] In this embodiment, based on the trained second neural network model, the single-piece parcel probability and the multi-piece parcel probability are determined according to the number feature probability, the space feature probability, the connection feature probability, the single-piece parcel feature combination and the multi-piece parcel feature combination. The second neural network model is EfficientNet-b3, ResNet101, decision tree or support vector machine (SVM), etc.

[0090] In some embodiments, the trained second neural network model stores the combination relationship of the single-piece parcel feature combination and the multi-piece parcel feature combination. In this embodiment, the number feature probability, the space feature probability and the connection feature probability are input into the trained second neural network model to obtain the single-piece parcel probability and the multi-piece parcel probability.

[0091] It should be noted that the multiple parcels with connection relationship are single-piece parcels, and the multiple parcels without connection relationship are multi-piece parcels.

[0092] In this embodiment, there are multiple cases of single-piece parcel feature combinations, such as: the number feature of one parcel + the space feature of a single parcel + the connection feature without connection, the number feature of multiple parcels + the space feature of close parcels + the connection feature with connection, and the number feature of multiple parcels + the space feature of stacked parcels + the connection feature with connection.

[0093] Similarly, there are multiple cases of multi-piece parcel feature combinations, such as: the number feature of multiple parcels + the space feature of separated parcels + the connection feature without connection, the number feature of multiple parcels + the space feature of close parcels + the connection feature without connection, and the number feature of multiple parcels + the space feature of stacked parcels + the connection feature without connection.

[0094] In some embodiments, the single-piece parcel probability is the sum of the feature probabilities in the single-piece parcel feature combination, the multi-piece parcel probability is the sum of the feature probabilities in the multi-piece parcel feature combination, and the output single-piece parcel probability and multi-piece parcel probability are the probabilities with the maximum values corresponding to the single-piece parcel feature combination and the multi-piece parcel feature combination respectively.

[0095] In some embodiments, before step 203 is performed, the pre-set second neural network model needs to be trained to obtain the trained second neural network model. The second neural network model can be associated with the first neural network model corresponding to the embodiment. Figure 3 The embodiment corresponds to the first neural network model associated with the training, that is, the first neural network model and the second neural network model are trained synchronously, as shown in the following training steps. Figure 4

[0096] 401, obtain single parcel image samples and multi-parcel image samples. ​

[0097] 402. Input the single-package image sample and the multi-package image sample into a first neural network model to obtain the number feature probability, spatial feature probability, and connection feature probability corresponding to the single-package image sample and the multi-package image sample, respectively.

[0098] 403. Input the number feature probability, the spatial feature probability, and the connection feature probability into the second neural network model to obtain the predicted single package probability and the predicted multiple package probability.

[0099] 404. Obtain the true value of the number of packages in the single-package image sample and the multi-package image sample.

[0100] 405. Converge the actual value of the number of parcels and the predicted value of the number of parcels to obtain a trained first neural network model and a trained second neural network model respectively.

[0101] The second neural network model in this embodiment can be a convolutional neural network model, wherein the convolutional neural network can be composed of an input layer, a hidden layer, and an output layer. The hidden layer can be composed of multiple fully connected layers, an activation layer, and a dropout layer. Specifically, the hidden layer consists of three fully connected layers, each containing 128 neurons; the activation function in the activation layer is ReLU; and each fully connected layer is followed by a dropout layer with a dropout probability of p = 0.5.

[0102] 204. Determine the number of packages corresponding to the image to be identified based on the single package probability and the multiple package probability.

[0103] In this embodiment, the number of packages is divided into single or multiple. When the probability of a single package is greater than the probability of multiple packages, the number of packages corresponding to the image to be identified is determined to be a single package; when the probability of a single package is less than the probability of multiple packages, the number of packages corresponding to the image to be identified is determined to be multiple packages.

[0104] When it is determined that the image to be identified contains multiple packages, the package number determination device will also generate a package abnormality signal, such as an alarm sound or an alarm light, to notify the staff to handle the situation.

[0105] See also Figure 5 , Figure 5A framework flowchart of the package piece number determination method provided by the embodiment of the present application is as follows: first, the picture input module 501 acquires the to-be-recognized image of the package on the conveying line, then the to-be-recognized image is input into the first neural network model 502 to obtain three groups of feature probabilities (the number feature probability, the spatial feature probability and the connection feature probability) of the to-be-recognized image, then the three groups of feature probabilities are input into the second neural network model 503 to obtain the single-piece package probability and the multi-piece package probability, and finally the piece abnormality detection feedback module 504 judges whether the piece abnormality occurs by comparing the probability output of the second neural network model, if the single-piece package probability is greater than the multi-piece package probability, the piece is normal; otherwise, the piece is abnormal.

[0106] The present application can use the cascade classification network of the first neural network and the second neural network, explicitly learn the picture attributes, effectively reduce the overfitting risk, and improve the generalization performance of the model in new devices and new sites.

[0107] In the embodiment of the present application, the package piece number determination apparatus first acquires the to-be-recognized image containing the package; then acquires the number feature probability of the number feature of the package in the to-be-recognized image, the spatial feature probability of the spatial feature and the connection feature probability of the connection feature; then determines the single-piece package probability and the multi-piece package probability according to the number feature probability, the spatial feature probability, the connection feature probability, the pre-set single-piece package feature combination and the pre-set multi-piece package feature combination; and finally determines the package piece number corresponding to the to-be-recognized image according to the single-piece package probability and the multi-piece package probability. The present scheme can directly determine the package piece number in the to-be-recognized image according to the number feature, the spatial feature and the connection feature of the package, including the package piece number in the picture under the conditions of package parallelism, stacking and close contact, and the accuracy of the package piece number determination is high.

[0108] In order to better implement the package piece number determination method provided by the embodiment of the present application, the embodiment of the present application further provides an apparatus based on the above package piece number determination method. The meanings of the terms are the same as those in the above package piece number determination method, and the specific implementation details can be referred to the description in the method embodiment.

[0109] Please refer to Figure 6 , Figure 6 The structure schematic diagram of the package piece number determination apparatus provided by the embodiment of the present application is shown in the figure, wherein the package piece number determination apparatus can include a first acquisition unit 601, a second acquisition unit 602, a first determination unit 603 and a second determination unit 604, etc. Wherein:

[0110] The first acquisition unit 601 is configured to acquire the to-be-recognized image containing the package.

[0111] The second acquisition unit 602 is configured to acquire a number feature probability of a number feature, a space feature probability of a space feature, and a connection feature probability of a connection feature of the parcel in the to-be-identified image.

[0112] The first determination unit 603 is configured to determine a single-parcel probability and a multi-parcel probability according to the number feature probability, the space feature probability, the connection feature probability, a preset single-parcel feature combination, and a preset multi-parcel feature combination.

[0113] The second determination unit 604 is configured to determine the number of parcels corresponding to the to-be-identified image according to the single-parcel probability and the multi-parcel probability.

[0114] In some embodiments, the second acquisition unit 602 is specifically configured to:

[0115] input the to-be-identified image into the trained first neural network model to acquire the number feature probability, the space feature probability, and the connection feature probability.

[0116] Please refer to Figure 7 In some embodiments, the device further includes:

[0117] The third acquisition unit 605 is configured to acquire a single-parcel image sample containing one parcel, where the single-parcel image sample includes a parcel image with no clutter in the background and a parcel image with clutter in the background, and the clutter is an article other than the parcel and a conveying belt.

[0118] The fourth acquisition unit 606 is configured to acquire a multi-parcel image sample containing multiple parcels, where the multi-parcel image sample includes a parcel image with no clutter in the background and a parcel image with clutter in the background.

[0119] The training unit 607 is configured to train a preset first neural network model according to the single-parcel image sample and the multi-parcel image sample to obtain the trained first neural network model.

[0120] In some embodiments, the first determination unit 603 is specifically configured to:

[0121] determine the single-parcel probability and the multi-parcel probability according to the number feature probability, the space feature probability, the connection feature probability, the single-parcel feature combination, and the multi-parcel feature combination based on the trained second neural network model.

[0122] In some embodiments, the second determination unit 604 is specifically configured to:

[0123] when the single-parcel probability is greater than the multi-parcel probability, determine that the number of parcels corresponding to the to-be-identified image is a single parcel.

[0124] When the single-piece package probability is less than the multi-piece package probability, it is determined that the number of pieces of the package corresponding to the to-be-identified image is multi-piece.

[0125] In some embodiments, the apparatus further includes:

[0126] The generating unit 608 is configured to generate a package anomaly signal.

[0127] In some embodiments, the first obtaining unit is specifically configured to:

[0128] The to-be-identified image of the package on the conveying line is obtained by an image acquisition device.

[0129] In the embodiments of the present application, the first obtaining unit 601 obtains the to-be-identified image containing the package; then the second obtaining unit 602 obtains the number-of-pieces feature probability of the number-of-pieces feature, the space feature probability of the space feature, and the connection feature probability of the connection feature of the package in the to-be-identified image; the first determining unit 603 determines the single-piece package probability and the multi-piece package probability according to the number-of-pieces feature probability, the space feature probability, the connection feature probability, the preset single-piece package feature combination, and the preset multi-piece package feature combination; finally, the second determining unit 604 determines the number of pieces of the package corresponding to the to-be-identified image according to the single-piece package probability and the multi-piece package probability. The present scheme can intuitively determine the number of pieces of the package in the image according to the number-of-pieces feature, the space feature, and the connection feature of the package in the to-be-identified image, including the number of pieces of the package in the image under the conditions of parallel, stacking, and close contact of the package, and the accuracy of the package piece number determination is high.

[0130] The specific implementation of each operation can be referred to the foregoing embodiments, which will not be described here.

[0131] Reference Figure 8 The embodiments of the present application provide a server 800, which can include a processor 801 with one or more processing cores, a memory 802 with one or more computer readable storage media, radio frequency (Radio Frequency, RF) circuit 803, power supply 804, input unit 805, and display unit 806, and the like. Those skilled in the art can understand that the server structure shown in the figure does not constitute a limitation on the server, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them: Figure 8 The server structure shown in the figure does not constitute a limitation on the server, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them:

[0132] The processor 801 is the control center of the server, which connects the various parts of the server through various interfaces and lines, and performs various functions and processes data of the server by running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802, thereby monitoring the server as a whole. Optionally, the processor 801 can include one or more processing cores; preferably, the processor 801 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 801.

[0133] The memory 802 can be used to store software programs and modules, and the processor 801 executes various functions and data processing by running the software programs and modules stored in the memory 802.

[0134] The RF circuit 803 can be used in the process of receiving and transmitting information, signal receiving and sending.

[0135] The server also includes a power supply 804 (such as a battery) for powering various components, and preferably the power supply can be logically connected to the processor 801 through a power management system, so as to realize the functions of managing charging, discharging and power consumption management through the power management system.

[0136] The server can also include an input unit 805, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0137] The server can also include a display unit 806, which can be used to display information input by the user or information provided to the user and various graphical user interfaces of the server, which can be composed of graphics, text, icons, video and any combination thereof. In particular, in the present embodiment, the processor 801 in the server will load the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and run the application programs stored in the memory 802 by the processor 801, thereby realizing various functions, such as:

[0138] Obtaining a to-be-identified image containing a package;

[0139] Obtaining a number feature probability of a number feature, a space feature probability of a space feature and a connection feature probability of a connection feature of the package in the to-be-identified image;

[0140] determine a single-piece parcel probability and a multi-piece parcel probability according to the number feature probability, the space feature probability, the connection feature probability, preset single-piece parcel feature combinations and preset multi-piece parcel feature combinations;

[0141] determine the parcel piece number corresponding to the to-be-identified image according to the single-piece parcel probability and the multi-piece parcel probability.

[0142] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description of the parcel piece number determination method above, which will not be repeated here.

[0143] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by related hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0144] To this end, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of instructions capable of being loaded by a processor to execute the steps in any parcel piece number determination method provided by the embodiments of the present application. For example, the instructions can execute the following steps:

[0145] obtain a to-be-identified image containing a parcel;

[0146] obtain a number feature probability of a number feature, a space feature probability of a space feature and a connection feature probability of a connection feature of the parcel in the to-be-identified image;

[0147] determine a single-piece parcel probability and a multi-piece parcel probability according to the number feature probability, the space feature probability, the connection feature probability, preset single-piece parcel feature combinations and preset multi-piece parcel feature combinations;

[0148] determine the parcel piece number corresponding to the to-be-identified image according to the single-piece parcel probability and the multi-piece parcel probability.

[0149] The specific implementation of each operation can be referred to the previous embodiments, which will not be repeated here.

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

[0151] Due to the instructions stored in the computer readable storage medium, the steps in any of the package piece number determination methods provided in the embodiments of the present application can be performed, thus the beneficial effects that can be achieved by any of the package piece number determination methods provided in the embodiments of the present application can be achieved, details of which are described above and will not be repeated here.

[0152] The above describes in detail a package piece number determination method, device, electronic device and computer readable storage medium provided in the embodiments of the present application, and the principles and implementation manners of the present application are described by applying specific examples; the above embodiment descriptions are only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as limiting the present application.

Claims

1. A method for determining the number of packages, characterized in that: include: Obtain the image to be identified containing the package; Obtaining a number feature probability of a number feature of packages in the image to be identified, a spatial feature probability of a spatial feature, and a connection feature probability of a connection feature, wherein the spatial feature includes the spatial feature of a single package, the spatial feature of separated packages, the spatial feature of closely packed packages, and the spatial feature of stacked packages; and the connection feature includes the connection feature of packages connected and the connection feature of packages not connected; Determining a single package probability and a multiple package probability according to the number feature probability, the spatial feature probability, the connection feature probability, a preset single package feature combination, and a preset multiple package feature combination; The number of packages corresponding to the image to be identified is determined according to the single package probability and the multiple package probability.

2. The method according to claim 1, characterized in that The obtaining of the number feature probability of the number feature of the packages in the image to be identified, the spatial feature probability of the spatial feature, and the connection feature probability of the connection feature includes: The image to be recognized is input into the trained first neural network model to obtain the number feature probability, the spatial feature probability and the connection feature probability.

3. The method according to claim 2, characterized in that Before inputting the image to be recognized into the trained first neural network model to obtain the number feature probability, the spatial feature probability, and the connection feature probability, the method further includes: Acquire single package image samples containing one package, the single package image samples including package images with no background debris and package images with background debris, where the debris refers to items other than the package and the conveyor belt; Acquire a multi-package image sample containing a plurality of packages, wherein the multi-package image sample includes a package image without background debris and a package image with background debris; A preset first neural network model is trained according to the single-package image sample and the multi-package image sample to obtain the trained first neural network model.

4. The method according to claim 1, wherein The method for determining the single package probability and the multiple package probability based on the number feature probability, the spatial feature probability, the connection feature probability, the preset single package feature combination, and the preset multiple package feature combination includes: Based on the trained second neural network model, the probability of a single package and the probability of multiple packages are determined according to the number feature probability, the spatial feature probability, the connection feature probability, the single package feature combination, and the multiple package feature combination.

5. The method according to claim 4, characterized in that The second neural network model includes EfficientNet-b3, ResNet101, decision tree or SVM.

6. The method according to claim 1, characterized in that The determining the number of packages corresponding to the image to be identified according to the single package probability and the multiple package probability includes: When the single package probability is greater than the multiple package probability, determining that the number of packages corresponding to the image to be identified is a single package; When the single package probability is less than the multiple package probability, it is determined that the number of packages corresponding to the image to be identified is multiple.

7. The method according to claim 6, characterized in that When the single package probability is less than the multiple package probability, after determining that the number of packages corresponding to the image to be identified is multiple, the method further includes: Generates a package exception signal.

8. The method according to any one of claims 1 to 7, characterized in that The step of obtaining an image to be identified containing a package includes: The image to be identified of the package on the conveyor line is acquired by an image acquisition device.

9. A device for determining the number of packages, characterized in that: include: A first acquiring unit is configured to acquire an image to be identified containing a package; a second acquisition unit, configured to acquire a number feature probability of a number feature of packages in the image to be identified, a spatial feature probability of a spatial feature, and a connection feature probability of a connection feature, wherein the spatial feature includes the spatial feature of a single package, the spatial feature of separated packages, the spatial feature of closely packed packages, and the spatial feature of stacked packages; and the connection feature includes the connection feature of packages connected and the connection feature of packages not connected; a first determining unit, configured to determine a single package probability and a multiple package probability based on the number feature probability, the spatial feature probability, the connection feature probability, a preset single package feature combination, and a preset multiple package feature combination; A second determining unit is configured to determine the number of packages corresponding to the image to be identified according to the single package probability and the multiple package probability.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method for determining the number of packages according to any one of claims 1 to 8 is executed.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, which are suitable for being loaded by a processor to execute the method for determining the number of packages according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • convolutional neural network YOLO V3-based statistical method for the number of fruits on a tree

    CN109919930A

  • Rice ear grain in-situ lossless counting method based on deep learning

    CN110378873A