Intelligent cargo identification method and system based on computer vision

Through the smart cargo identification method based on computer vision, the cosine similarity of feature vectors is used to identify item information, which solves the problem of bank identification difficulties during the entry and exit process, improves the safety and accuracy of warehouse management, and is suitable for different shapes and color item identification.

CN118658129BActive Publication Date: 2024-10-15INSPUR SMART SUPPLY CHAIN TECH (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411147219.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-10-15
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for banks to effectively identify and monitor mortgage items during the process of entering and exiting the warehouse, which may lead to the possibility of mistaken or private use, affecting the bank's reputation and financial status.

Method used

The smart cargo identification method based on computer vision is used to obtain the item area, set the detection window to move on the preset standard image, calculate the cosine similarity of the feature vector, identify the item information, and realize the identification of items of different shapes and colors in a timely manner. It is found that the wrong or private use has occurred.

Benefits of technology

It improves the safety and accuracy of warehouse management. It is suitable for identifying items of different shapes and colors. It does not rely on the specific placement or label of the items. It has a wider range of identification scenarios, reduces interference in non-target areas, and improves the accuracy of identification. accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658129B_ABST
    Figure CN118658129B_ABST
Patent Text Reader

Abstract

The present application relates to the field of cargo identification, and in particular to a computer vision-based intelligent cargo identification method and system, the method comprising the steps of: setting a detection window according to the article area, obtaining multiple matching windows matching the detection window and screening the matching windows; calculating the feature vector and distinction value of any two pixels in the detection window, sorting and screening the feature vector according to the distinction value, and performing the same operation in the matching window; calculating the cosine similarity of the feature vectors corresponding to the sorting between the detection window and the matching window, taking the mean of the cosine similarity as the cargo identification evaluation of the matching window, and taking the standard image in the matching window corresponding to the maximum value of the cargo identification evaluation as the result of identifying the goods; the elements in the feature vector include elements representing distance features and elements representing color features. The present application has the effect of identifying cargo during the process of cargo in and out of the warehouse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cargo identification, and in particular to a computer vision-based intelligent cargo identification method and system. Background Art

[0002] Banks need to ensure the safety and integrity of the mortgaged items and need to monitor the items, for example, by installing video surveillance cameras to monitor the storage area of ​​the mortgaged items 24 hours a day. Video data should be backed up regularly and reviewed when necessary.

[0003] Ensure that collateral items are stored in secure warehouses or safes that have strict access control and surveillance systems to ensure that only authorized personnel can enter the storage area of ​​collateral items.

[0004] In the prior art, a Chinese patent application document with publication number CN114565335A discloses a bank physical management method and device, including the steps of: generating a summary table of correspondence between physical objects and storage devices based on the physical information included in each physical change table and the attribute information of each storage device in the warehouse.

[0005] Among them, the summary table of correspondence between physical objects and storage devices includes multiple different physical objects; the summary table of correspondence between physical objects and storage devices is sent to a third-party server, so that the third-party server controls the corresponding storage device to open to facilitate authorized personnel to store or take out the physical objects.

[0006] Authorized personnel may take the wrong goods or take them privately, which may affect the bank's reputation and financial status. Therefore, it is necessary to identify the goods in the warehouse during the outbound delivery process to detect the wrong or private taking in time. Summary of the invention

[0007] In order to solve the problem of how to identify goods during the warehousing and outbound process, the present application provides a computer vision-based intelligent goods identification method and system.

[0008] In the first aspect, the present application provides a computer vision-based intelligent cargo identification method, which adopts the following technical solutions:

[0009] The intelligent cargo identification method based on computer vision comprises the following steps: obtaining an article area, setting a detection window according to the article area, moving the detection window on a preset standard image to match, obtaining multiple matching windows matching the detection window and screening the matching windows; calculating the feature vectors and distinction values ​​of any two pixels in the detection window, sorting and screening the feature vectors according to the distinction values, and performing the same operation in the matching window; calculating the cosine similarity of the feature vectors corresponding to the sorting between the detection window and the matching window, taking the mean value of the cosine similarity as the cargo identification evaluation of the matching window, and taking the standard image in the matching window corresponding to the maximum value of the cargo identification evaluation as the result of identifying the cargo; wherein the elements in the feature vector include elements representing distance features and elements representing color features, and the calculation formula of the feature vector is: , in, Pixel and pixels The characteristic vector of Pixel and pixels The Euclidean distance of Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel The pixel value of the blue channel, Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel Pixels for the blue channel.

[0010] By considering the pixel values ​​of the three color channels of red, green and blue, the color information in the image is captured. By calculating the pixel value ratio of pixel A and pixel B in each color channel, the difference in color between the two pixels is measured, which helps to distinguish items of different colors. The Euclidean distance, as an element of the feature vector, can measure the distance between the two pixels in space, which helps to distinguish the shape and structural features in the image. The standard image in the matching window corresponding to the maximum value of the goods recognition evaluation is used as the result of identifying the goods. The standard image in this matching window is most similar to the image in the detection window. According to the standard image, the item information in the detection window, such as type, name or number, can be identified. That is, the item with the highest similarity in the monitoring image is matched in the standard image, so as to determine the item information in the monitoring image, which is convenient for timely discovery of the phenomenon of wrong or private taking of items in the process of entering and leaving the warehouse, and helps to improve the safety and accuracy of warehouse management. In addition, the flexibility of the goods recognition method of the present application is high, suitable for the recognition of items of different shapes, does not depend on the specific placement position or label of the item, and the recognition scene is more extensive. It helps to distinguish items of different colors.

[0011] Optionally, the size of the detection window is the same as the size of the bounding rectangle of the object area.

[0012] Ensure that the detection window can completely cover the object area to avoid missing any relevant pixels, thereby improving the accuracy of recognition. By limiting the size of the detection window to the circumscribed rectangle of the object area, the interference of non-target areas can be reduced, making the recognition process more focused on the target object.

[0013] Optionally, a matching value between the detection window and the matching window is calculated, and the matching window is screened according to the matching value.

[0014] Optionally, the calculation of the matching value includes the steps of: constructing a first region feature sequence of the object region in the detection window, expressed as: ,in, is the first regional feature sequence, is the set of all pixel values ​​in the object area, represents the minimum function, is the first pixel value, For the pixel values, Indicates that the pixel value ratio in the object area is The number of pixels, Indicates that the pixel value ratio in the object area is Similarly, construct a second regional feature sequence of the object area in the matching window; compare the lengths of the first regional feature sequence and the second regional feature sequence, if the lengths are not equal, lengthen the shorter sequence to make the first regional feature sequence and the second regional feature sequence equal in length; use the Pearson correlation coefficient between the first regional feature sequence and the second regional feature sequence as the matching value.

[0015] By calculating the Pearson correlation coefficient between the first region feature sequence and the second region feature sequence, the similarity between the two sequences can be obtained, thereby detecting the similarity relationship between the pixels in the window and the pixels between the matching windows.

[0016] Optionally, the method of lengthening is to add 0 in front of or behind the shorter sequence between the first region feature sequence and the second region feature sequence.

[0017] A method for supplementing the sequence length is provided to ensure the consistency of the length of the two feature sequences. The calculation of the Pearson correlation coefficient requires that the two sequences must be of equal length.

[0018] Optionally, the feature vectors are sorted and screened according to the distinguishing values, including the steps of: sorting the feature vectors corresponding to the respective distinguishing values ​​in descending order; taking a preset number of feature vectors in descending order of the distinguishing values, and deleting the remaining feature vectors.

[0019] Optionally, obtaining the object region includes: performing a perspective conversion on the acquired surveillance image to obtain a front view image, performing grayscale processing on the front view image to obtain a grayscale image, and performing semantic segmentation on the grayscale image to obtain the object region.

[0020] In the second aspect, the present application provides a computer vision-based intelligent cargo identification system, which adopts the following technical solutions:

[0021] The computer vision-based intelligent cargo identification system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the computer vision-based intelligent cargo identification method described above is implemented.

[0022] The above-mentioned computer vision-based intelligent cargo identification method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor. Thus, a system is made based on the memory and the processor for easy use.

[0023] This application has the following technical effects:

[0024] 1. By considering the pixel values ​​of the three color channels of red, green and blue, the color information in the image is captured. By calculating the pixel value ratio of pixel A and pixel B in each color channel, the difference in color between the two pixels is measured, which helps to distinguish objects of different colors. The Euclidean distance, as an element of the feature vector, can measure the distance between two pixels in space, which helps to distinguish the shape and structural features in the image.

[0025] 2. Match the object in the standard image that is most similar to the object in the surveillance image to determine the object information in the surveillance image, so as to timely discover the phenomenon of wrong or private taking of objects during the process of entering and leaving the warehouse, which helps to improve the safety and accuracy of warehouse management.

[0026] 3. The cargo identification method of the present application is highly flexible and is applicable to the identification of objects of different shapes. It does not depend on the specific placement or label of the object, and the identification scenarios are more extensive. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-restrictive manner, and the same or corresponding numbers represent the same or corresponding parts.

[0028] Figure 1 It is a method flow chart of the intelligent cargo identification method based on computer vision in an embodiment of the present application.

[0029] Figure 2 It is a flow chart of a method for calculating matching values ​​in a smart cargo identification method based on computer vision according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0031] It should be understood that when the terms "first", "second", etc. are used in the claims, specification and drawings of the present application, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present application indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0032] The embodiment of the present application discloses a smart cargo identification method based on computer vision. The main application scenario is in the bank's warehouse, which is used to identify and monitor the cargo (such as collateral, etc.) in the warehouse, and promptly discover the situation of taking the wrong goods, taking more than the goods, or taking without permission. Figure 1 , including steps S1 to S3, which are specifically as follows:

[0033] S1: Acquire the object area, set the detection window according to the object area, move the detection window on the preset standard image for matching, obtain multiple matching windows matching the detection window, and filter the matching windows.

[0034] In one embodiment, a method for acquiring an object region is as follows: performing a perspective conversion on an acquired surveillance image to obtain a front view image, performing grayscale processing on the front view image to obtain a grayscale image, and performing semantic segmentation on the grayscale image to obtain the object region.

[0035] The monitoring image is an RGB (Red, Green, Blue) image, which has three color channels: red, green, and blue.

[0036] Perspective conversion refers to transforming an image from one perspective to another, such as transforming an oblique image into a frontal image, to facilitate subsequent analysis. Image correction technology, such as perspective transformation, is used to transform the monitoring image into a frontal image. Perspective transformation is an existing technology and will not be described in detail here.

[0037] In one embodiment, the size of the detection window is the same as the size of the bounding rectangle of the object area.

[0038] The method of matching window screening is: calculate the matching value between the detection window and the matching window, and screen the matching window according to the matching value. Figure 2 , specifically including steps S10 to S12, which are as follows:

[0039] S10: In the detection window, a first region feature sequence of the object region is constructed, and in the matching window, a second region feature sequence of the object region is constructed.

[0040] In one embodiment, the expression of the first region feature sequence is:

[0041] ,in, is the first regional feature sequence, is the set of all pixel values ​​in the object area, represents the minimum function, is the first pixel value, For the pixel values, Indicates that the pixel value ratio in the object area is The number of pixels, Indicates that the pixel value ratio in the object area is The number of pixels.

[0042] Similarly, the second region feature sequence of the item region is constructed in the matching window, denoted as .

[0043] S11: Compare the lengths of the first region feature sequence and the second region feature sequence. If the lengths are not equal, lengthen the shorter sequence so that the first region feature sequence and the second region feature sequence are equal in length.

[0044] In one embodiment, the method of lengthening is to add 0 in front of or behind the short sequence to make the first region characteristic sequence and the second region characteristic sequence equal in length. Other existing lengthening methods can also be used to make the first region characteristic sequence and the second region characteristic sequence equal in length, which will not be elaborated here.

[0045] S12: Taking the Pearson correlation coefficient between the first region feature sequence and the second region feature sequence as a matching value.

[0046] Specifically, the expression for the matching value is: ,in, For the The matching value of the matching window, is the Pearson correlation coefficient, is the first regional feature sequence, For the The second region feature sequence of the matching window.

[0047] The Pearson correlation coefficient is a statistical indicator that measures the degree of linear correlation between two variables. Its value is between -1 and 1. When the correlation coefficient is close to 1, it indicates that there is a strong positive correlation between the two variables (the first regional characteristic sequence and the second regional characteristic sequence). When the correlation coefficient is close to -1, it indicates that there is a strong negative correlation between the two variables (the first regional characteristic sequence and the second regional characteristic sequence). When the correlation coefficient is close to 0, it indicates that there is no obvious linear relationship between the two variables (the first regional characteristic sequence and the second regional characteristic sequence).

[0048] S2: In the detection window, calculate the feature vector and the difference value of any two pixels, sort and filter the feature vector according to the difference value, and perform the same operation in the matching window.

[0049] In one embodiment, the calculation formula of the feature vector is: , in, Pixel and pixels The characteristic vector of Pixel and pixels The Euclidean distance of Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel The pixel value of the blue channel, Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel Pixels for the blue channel.

[0050] In other embodiments, in the calculation formula of the above feature vector, the number of color channels can be one or two, and the present application preferably uses three color channels, and other cases are not described in detail. The preset number of difference values ​​is taken, and the preset number is set to five.

[0051] In sorting and screening the feature vectors according to the distinguishing values, the sorting method is: sorting the feature vectors corresponding to each distinguishing value in descending order of the distinguishing values; the screening method is: taking a preset number of feature vectors in descending order of the distinguishing values, and deleting the remaining feature vectors.

[0052] Exemplarily, the preset number is set to 5, the distinction values ​​in the detection window are sorted in descending order, the feature vectors corresponding to the first 5 distinction values ​​are taken for analysis, and the distinction values ​​in the matching window are sorted in descending order, and the feature vectors corresponding to the first 5 distinction values ​​are taken for analysis.

[0053] S3: Calculate the cosine similarity of the feature vectors corresponding to the order between the detection window and the matching window, take the mean value of the cosine similarity as the goods recognition evaluation of the matching window, and take the standard image in the matching window corresponding to the maximum value of the goods recognition evaluation as the result of identifying the goods.

[0054] The feature vectors that correspond in order between the detection window and the matching window refer to: the feature vector ranked first in the detection window and the feature vector ranked first in the matching window, the feature vector ranked second in the detection window and the feature vector ranked second in the matching window, and so on.

[0055] Exemplarily, find the feature vector corresponding to the maximum value of the distinguishing value in the detection window, and the feature vector corresponding to the distinguishing value in the matching window, calculate the cosine similarity of the two feature vectors, find the feature vector corresponding to the distinguishing value just less than the maximum value in the detection window, and the feature vector corresponding to the distinguishing value just less than the maximum value in the matching window, repeat the above operation, obtain 5 feature vectors corresponding to the detection window and the matching window respectively, and then obtain five cosine similarities, calculate the average of the five cosine similarities, and use it as the cargo identification evaluation of the matching window. The calculation of cosine similarity is a prior art and will not be described in detail here.

[0056] Traverse all matching windows to obtain multiple goods recognition evaluations, and take the standard image in the matching window corresponding to the maximum value of the goods recognition evaluation as the result of identifying the goods. Obtain the goods recognition evaluation of all matching windows, and take the standard image in the matching window corresponding to the maximum value of the goods recognition evaluation as the result of identifying the goods. The standard image in this matching window is most similar to the image in the detection window. According to the standard image, the item information in the detection window, such as type, name or number, can be identified. That is, the item with the highest degree of similarity with the surveillance image is matched in the standard image, so as to determine the item information in the surveillance image.

[0057] In one embodiment, when the identified item information is inconsistent with the item information to be shipped out, an alarm message may be sent to the monitoring terminal, or a sound alarm may be issued to remind relevant personnel that there is an abnormality in the process of goods entering or leaving the warehouse.

[0058] The embodiment of the present application also discloses a computer vision-based intelligent cargo identification system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the computer vision-based intelligent cargo identification method according to the present application is implemented.

[0059] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0060] In the present application, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high bandwidth memory HBM (High Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0061] Although this specification has shown and described a plurality of embodiments of the present application, it is obvious to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present application. It should be understood that in the process of practicing the present application, various alternatives to the embodiments of the present application described herein may be adopted.

[0062] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. The intelligent cargo identification method based on computer vision is characterized by: Includes steps: Acquire the object area, set the detection window according to the object area, make the detection window move and match on the preset standard image, obtain multiple matching windows matching the detection window and filter the matching windows; In the detection window, the feature vectors and the difference values ​​of any two pixels are calculated, and the feature vectors are sorted and filtered according to the difference values. The same operation is performed in the matching window. Calculate the cosine similarity of the feature vectors corresponding to the order between the detection window and the matching window, take the mean value of the cosine similarity as the goods recognition evaluation of the matching window, and take the standard image in the matching window corresponding to the maximum value of the goods recognition evaluation as the result of identifying the goods; The elements in the feature vector include elements representing distance features and elements representing color features. The calculation formula of the feature vector is: , in, Pixel and pixels The characteristic vector of Pixel and pixels The Euclidean distance of Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel The pixel value of the blue channel, Pixel The pixel value of the red channel, Pixel The pixel value of the green channel, Pixel Pixels for the blue channel.

2. The computer vision-based intelligent cargo identification method according to claim 1, characterized in that: The size of the detection window is the same as the size of the bounding rectangle of the object area.

3. The computer vision-based intelligent cargo identification method according to claim 1, characterized in that: The screening method is: calculating the matching value between the detection window and the matching window, and screening the matching window according to the matching value.

4. The computer vision-based intelligent cargo identification method according to claim 3 is characterized in that: The calculation of the matching value includes the following steps: In the detection window, the first region feature sequence of the object region is constructed, and the expression is: ,in, is the first regional feature sequence, is the set of all pixel values ​​in the object area, represents the minimum function, is the first pixel value, For the pixel values, Indicates that the pixel value ratio in the object area is The number of pixels, Indicates that the pixel value ratio in the object area is The number of pixels; Similarly, a second region feature sequence of the object region is constructed in the matching window; Comparing the lengths of the first region characteristic sequence and the second region characteristic sequence, if the lengths are not equal, lengthening the shorter sequence so that the first region characteristic sequence and the second region characteristic sequence are equal in length; The Pearson correlation coefficient between the first region feature sequence and the second region feature sequence is used as a matching value.

5. The computer vision-based intelligent cargo identification method according to claim 4, characterized in that: The method of lengthening is to add 0 at the front or back of the shorter sequence between the first region feature sequence and the second region feature sequence.

6. The computer vision-based intelligent cargo identification method according to claim 1, characterized in that: Sorting and filtering the eigenvectors according to their distinctive values ​​includes the following steps: Sort the eigenvectors corresponding to each distinguishing value in descending order of the distinguishing value; In descending order of the distinguishing value, a preset number of eigenvectors are taken and the rest are deleted.

7. The computer vision-based intelligent cargo identification method according to claim 1, characterized in that: Areas where items can be obtained include: The acquired surveillance image is subjected to perspective conversion to obtain a front view image, the front view image is subjected to grayscale processing to obtain a grayscale image, and the grayscale image is subjected to semantic segmentation to obtain the object area.

8. Intelligent cargo identification system based on computer vision, characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the intelligent cargo identification method based on computer vision according to any one of claims 1 to 7 is implemented.