Fast image recognition method, system, medium and device

By simplifying and screening the image recognition feature library and combining with simplified calculations of mobile devices, the problem of slow image recognition speed on mobile devices is solved, and fast and accurate facial recognition is achieved.

CN113850332BActive Publication Date: 2025-08-08SHANGHAI CLOUDWALK HUILIN ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111137774.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2025-08-08
Estimated Expiration
2041-09-27

AI Technical Summary

Technical Problem

The existing image recognition speed is still not efficient enough, especially on mobile devices, the time is too long to search for large-scale facial feature library, resulting in poor user experience.

Method used

By simplifying the pre-stored complete feature library of objects to be identified, a simplified feature library of objects to be identified is generated, and the similarity value is calculated after simplifying the features of objects to be identified on the spot, the features that meet the threshold are selected, and then finely compare them with the complete feature library to reduce the calculation amount.

Benefits of technology

It significantly improves image recognition speed, reduces calculation amount, and ensures recognition accuracy. It is suitable for mobile devices to perform fast facial recognition in an unstable environment in the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850332B_ABST
    Figure CN113850332B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image recognition, and specifically provides a fast image recognition method. The present invention aims to solve the problem that the existing recognition of images is slow due to the large amount of computation. To this end, the method of the present invention includes simplifying a complete feature library of an object to be identified to obtain a simplified feature library; receiving the features of the object to be identified and converting them into complete vector features; simplifying the complete vector features to obtain simplified vector features of the object to be identified on site; calculating the similarity value P between the vector features of each ID in the simplified feature library and the simplified vector features of the object to be identified. a ; Screen out P in the simplified feature library of objects to be identified a The first vector feature is greater than the set threshold; the second vector feature in the complete feature library is selected to match the first vector feature selected in the simplified feature library; the similarity is calculated one by one to obtain a set of similarity values P b ; Screen and obtain P b The solution of the present invention can simplify the amount of calculation and improve the image recognition speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image recognition, and specifically provides a rapid image recognition method, system, medium and device. Background Art

[0002] Thanks to recent improvements in hardware performance, deep learning has been revitalized and continues to set new records in the field of image recognition. Image recognition is used in numerous fields, such as facial recognition, fingerprint recognition, identification devices used to collect herb species in the wild, garbage classification, and animal classification. This paper will use facial recognition as an example for further discussion. Facial recognition, as a major technical branch, has been adopted by the industrial sector for production, bringing significant benefits to fields such as payment, security, and transportation.

[0003] Due to the powerful computing performance of servers, the current mainstream technical solution is to transmit facial images captured by front-end devices (as opposed to "back-end" servers, which refers to the terminal devices that directly contact customers, commonly mobile devices such as mobile phones and tablets) to the server for facial recognition. However, this technical solution has extremely high requirements for network stability, requiring the front-end devices and servers to be constantly online. It is not suitable for scenarios where a stable connection cannot be provided, such as buses. For scenarios such as subways where the network can maintain smooth operation for a long time, it is usually desirable to have a backup plan to ensure high traffic rates and avoid congestion at the entrance in the rare event of a network outage. In addition, due to their large size and high price, servers are not suitable for installation in all locations. Even if servers are installed in a certain location, they are often limited by product cost considerations and do not use servers with extremely high computing power. As a result, facial recognition speed is still unsatisfactory and needs to be improved.

[0004] Fortunately, significant breakthroughs have been made in facial feature extraction technology for mobile devices, and recognition accuracy on large-scale facial feature libraries is gradually approaching server-level performance. Not only has feature extraction speed reached hundreds of milliseconds, but recognition rates can also support facial feature libraries in the millions. However, for mobile devices, searching a large facial feature library still takes several seconds, which is critical for business scenarios and results in a poor user experience. Therefore, further improvements in facial recognition speed are needed for both servers and mobile devices.

[0005] Accordingly, the art needs a new method, system, medium and device for rapid image recognition to solve the problem that the existing image recognition speed is still not efficient enough. Summary of the Invention

[0006] The present invention aims to solve the above technical problem, that is, to solve the problem that the existing image recognition speed is still not efficient enough.

[0007] In a first aspect, the present invention provides a fast image recognition method, characterized by comprising:

[0008] S01. Simplifying the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified;

[0009] S02. Receive features of objects to be identified on site to be verified and convert them into complete vector features of the objects to be identified on site;

[0010] S03. Simplify the complete vector features of the object to be identified on site to obtain a simplified vector feature of the object to be identified on site;

[0011] S04, calculate the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID;

[0012] S05. Filter out all P in the simplified feature library of objects to be identified. a a set of first vector features greater than a set threshold;

[0013] S06. Selecting a set of second vector features having the same ID as the set of first vector features from the complete feature library of the object to be identified;

[0014] S07: Calculate the similarity between the complete vector features of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P. b , where b is the ID number after screening;

[0015] S08, P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified on site in the complete feature library of the object to be identified, completing image recognition.

[0016] In the preferred technical solution of the above method, the solution for simplifying the vector features in step S01 and step S03 specifically includes:

[0017] Get the attribute value of each complete vector feature composed of L floating-point numbers;

[0018] Multiply each attribute value by 128 one by one, so that the values originally distributed in the (-1.0, 1.0) interval are expanded to the (-128.0, 128.0) interval;

[0019] Each attribute value is truncated, the decimal part is discarded, and an integer is obtained in the range [-128, 127];

[0020] The integer is represented by an 8-bit integer, and the original complete feature library of objects to be identified with a length of N*L*4 bytes is finally simplified to a simplified feature library of objects to be identified with a length of N*L bytes;

[0021] Among them, floating-point types occupy 4 bytes and 8-bit integers occupy 1 byte.

[0022] In a preferred technical solution of the above method, the set threshold is calculated by the following method:

[0023]

[0024] Wherein, Score is the similarity score, P is the set threshold, μ and σ are the defined feature distribution values.

[0025] In the preferred technical solution of the above method, step S05 further includes:

[0026] S051. Obtain a maximum error value A;

[0027] S052. Filter out all the features that meet P in the simplified feature library of objects to be identified. a +A is the first vector feature that is greater than the set threshold.

[0028] In the preferred technical solution of the above method, the maximum error value A is a predetermined value; or,

[0029] The maximum error value A is calculated by the following method:

[0030] When the i-th eigenvalue of the vector feature X is x i , and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i , calculate the product x i ×y i Constant level error:

[0031] Calculate the cumulative error of the inner product (cosine similarity):

[0032] The bilateral error obtained based on the cumulative error is

[0033] In the preferred technical solution of the above method, the object to be identified is any one of a human face, a fingerprint, a classified garbage object, a classified herbaceous plant object, and a classified animal object;

[0034] and / or,

[0035] Step S08 further includes:

[0036] S081, screening and obtaining P b the maximum value among the values, and determining whether the maximum value is greater than the set threshold;

[0037] S082. When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature that best matches the object to be identified in the complete object feature library, and image recognition is completed;

[0038] S083. When the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and the image recognition is completed.

[0039] The present invention also provides a rapid image recognition system, characterized in that the system comprises:

[0040] Database vector feature simplification module: simplifies the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified;

[0041] On-site object feature acquisition and vector conversion module: receives the features of the on-site object to be identified to be verified and converts them into complete vector features of the on-site object to be identified;

[0042] On-site object vector feature simplification module: simplifies the complete vector features of the on-site object to be identified to obtain the simplified vector features of the on-site object to be identified;

[0043] Simplified vector feature comparison calculation module: calculates the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID;

[0044] Simplified vector feature library ID screening module: Screen out all P in the simplified feature library of objects to be identified a a set of first vector features greater than a set threshold;

[0045] Complete vector feature library ID selection module: selects a group of second vector features having the same ID as a group of first vector features in the complete feature library of the object to be identified;

[0046] Complete vector feature comparison calculation module: calculate the similarity between the complete vector feature of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P b , where b is the ID number after screening;

[0047] Match ID output module: P bThe vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified on site in the complete feature library of the object to be identified, completing image recognition.

[0048] In the preferred technical solution of the above system, the simplified vector feature library ID screening module further includes:

[0049] Error value acquisition module: obtain the maximum error value A;

[0050] Simplified vector feature library ID screening module based on error value: Screen out all the features that meet P in the simplified feature library of objects to be identified. a +A is the first vector feature that is greater than the set threshold.

[0051] In the preferred technical solution of the above system, the error value acquisition module further includes:

[0052] Constant error calculation module: When the i-th eigenvalue of vector feature X is x i , and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i , calculate the product x i ×y i Constant level error:

[0053] Cumulative error calculation module: calculate the cumulative error of the inner product (cosine similarity):

[0054] Bilateral error calculation module: Based on the cumulative error, the bilateral error is obtained as

[0055] In a preferred technical solution of the above system, the matching ID output module further includes:

[0056] Similarity value screening and comparison module: Screen and obtain P b the maximum value among the values, and determining whether the maximum value is greater than the set threshold;

[0057] Output module: When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature in the complete feature library of the object to be identified that best matches the object to be identified on site, and image recognition is completed; when the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and image recognition is completed.

[0058] The present invention also provides a computer-readable storage medium, in which a plurality of program codes are stored. The program codes are characterized in that they are suitable for being loaded and run by a processor to execute the rapid image recognition method of any one of the above technical solutions.

[0059] The present invention also provides a control device, which includes a processor and a memory, wherein the memory is suitable for storing multiple program codes, and is characterized in that the program code is suitable for being loaded and run by the processor to execute the rapid image recognition method of any one of the above technical solutions.

[0060] It will be understood by those skilled in the art that, in the technical solution of the present invention, the rapid image recognition method includes the following steps:

[0061] S01. Simplifying the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified;

[0062] S02. Receive features of objects to be identified on site to be verified and convert them into complete vector features of the objects to be identified on site;

[0063] S03. Simplify the complete vector features of the object to be identified on site to obtain a simplified vector feature of the object to be identified on site;

[0064] S04, calculate the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID;

[0065] S05. Filter out all P in the simplified feature library of objects to be identified. a a set of first vector features greater than a set threshold;

[0066] S06. Selecting a set of second vector features having the same ID as the set of first vector features from the complete feature library of the object to be identified;

[0067] S07: Calculate the similarity between the complete vector features of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P. b , where b is the ID number after screening;

[0068] S08, P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified on site in the complete feature library of the object to be identified, completing image recognition.

[0069] The present invention is explained below using the example of a face as the object to be identified. Through the above-mentioned setting method, the present invention improves the prior art scheme of directly comparing the complete features of the face with the data in the complete face feature library, simplifies the complete face feature library, and then performs the same simplification on the face features collected on site, and then screens the simplified scheme to screen out a group of first feature vectors that meet the requirements, and then compares the face features with the features of a group of second feature vectors corresponding to this group of first feature vectors in the complete face feature library. In this way, the screening is divided into two steps. In the first step, the simplified face features are compared with the simplified face feature library, and the calculation speed is very fast. Then, based on the screened group of first feature vectors, the complete face features are compared one by one with the second feature vectors corresponding to the first feature vector in the complete face feature library. Finally, the accuracy can be achieved while maintaining the original level, and the overall calculation amount is significantly reduced, which greatly improves the recognition speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The following describes a preferred embodiment of the present invention with reference to the accompanying drawings and taking a human face as an example, wherein:

[0071] Figure 1 It is the main flow chart of the rapid image recognition method of the present invention;

[0072] Figure 2 is a detailed flow chart of step S05 of the present invention;

[0073] Figure 3 is a detailed flow chart of step S08 of the present invention;

[0074] Figure 4 It is a module composition diagram of the rapid image recognition system of the present invention;

[0075] Figure 5 This is a detailed diagram of the simplified vector feature library ID screening module;

[0076] Figure 6 This is a detailed diagram of the matching ID output module.

[0077] List of reference numerals:

[0078] 1. Fast image recognition system;

[0079] 11. Database vector feature simplification module; 12. On-site object feature acquisition and vector conversion module; 13. On-site object vector feature simplification module; 14. Simplified vector feature comparison and calculation module;

[0080] 15. Simplified vector feature library ID screening module; 151. Error value acquisition module; 1511. Constant level error calculation module; 1512. Cumulative error calculation module; 1513. Bilateral error calculation module; 152. Simplified vector feature library ID screening module based on error value;

[0081] 16. Complete vector feature library ID selection module; 17. Complete vector feature comparison calculation module;

[0082] 18. Matching ID output module; 181. Similarity value screening and comparison module; 182. Output module. DETAILED DESCRIPTION

[0083] Preferred embodiments of the present invention are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely intended to illustrate the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art may adjust these embodiments as needed to suit specific applications.

[0084] In the description of the present invention, "module" and "processor" may include hardware, software, or a combination of both. A module may include hardware circuitry, various suitable sensors, communication ports, and memory. It may also include software components, such as program code, or a combination of software and hardware. A processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. A processor has data and / or signal processing capabilities. A processor may be implemented in software, hardware, or a combination of both. Non-transitory computer-readable storage media include any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, and the like. The term "A and / or B" refers to all possible combinations of A and B, such as only A, only B, or both A and B. The terms "at least one of A or B" or "at least one of A and B" have similar meanings to "A and / or B" and may include only A, only B, or both A and B. The singular forms "one" and "the" may also include the plural forms.

[0085] Reference Figures 1 to 3 , the method of improving the detection speed of a mobile device of the present invention is described.

[0086] like Figure 1-3 As shown, in order to solve the problem that the existing image recognition speed is still not efficient enough, the fast image recognition method of the present invention includes the following steps:

[0087] S01. Simplify the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified.

[0088] Taking the face as an example, in order to verify the on-site personnel, the existing complete facial feature library is very complete, and each person in the feature library corresponds to a complete vector feature. However, each of these complete vector features must be proofread one by one with the face to be identified on site, which creates a huge workload and requires a higher-specification server to complete. If it is a mobile device such as a mobile phone or tablet, the calculation is very slow, which will make the user experience very poor and it is difficult to expand on the mobile side. In some scenarios, such as on a bus, you often go to places without a network. At this time, a mobile terminal is very necessary for identification. Due to its portability, the mobile terminal can adapt to any place. Therefore, it is imperative to develop fast image recognition on the mobile terminal so that users can complete face recognition without relying on the computing power of a remote server in an environment without a network.

[0089] In order to achieve the above-mentioned goal, in step S01 of the present invention, a simplified face feature library is first generated based on the complete face feature library, specifically, the following steps are included:

[0090] S011. Obtain the attribute value of each complete vector feature composed of L floating-point numbers;

[0091] S012. Multiply each attribute value by 128 one by one, so that the values originally distributed in the (-1.0, 1.0) interval are expanded to the (-128.0, 128.0) interval;

[0092] Each person in the complete facial feature library is represented by a vector feature. Different people will generate different vectors based on their features. Usually, a vector is the attribute value of a complete vector feature composed of L floating-point numbers. Taking the commonly used 32-bit floating-point numbers as an example, the attribute value of each feature (represented by a vector composed of L floating-point numbers) is multiplied by 128 one by one, so that the values originally distributed in the range of (-1.0, 1.0) are expanded to the range of (-128.0, 128.0).

[0093] S013. Truncate each attribute value, discard the decimal part, and obtain an integer in the range [-128, 127]. Represent the integer with an 8-bit integer, and finally simplify the original complete feature library of objects to be identified with a length of N*L*4 bytes to a simplified feature library of objects to be identified with a length of N*L bytes. Among them, the floating point type occupies 4 bytes and the 8-bit integer occupies 1 byte.

[0094] After the arrangement, the present invention obtains a simplified facial vector feature library, which can be used for subsequent calculations. The complete facial features are floating-point data, which takes up 4 bytes in length; the converted data is 8-bit integer data, which takes up 1 byte in length. The vector registers on commonly used mobile devices such as mobile phones and tablets can load 16 bytes at a time for calculation, so the number of 8-bit integer calculation results produced by one calculation is 4 times that of floating-point data. In addition, the multiplication and addition operation speed of integer data is faster than that of floating-point data (due to the hardware architecture), so the overall efficiency is significantly improved, and the comprehensive efficiency is improved by 7-11 times. At this point, the simplification of the vector feature library is basically completed.

[0095] S02. Receive features of objects to be identified on site to be verified and convert them into complete vector features of the objects to be identified on site;

[0096] S03. Simplify the complete vector features of the object to be identified on site to obtain a simplified vector feature of the object to be identified on site.

[0097] In steps S02 and S03, the corresponding scenario is that on-site staff collect faces, and the mobile terminal converts the faces into complete on-site face vector features, and then converts the floating-point data into 8-bit integer data in the same way as in step S01 to prepare for subsequent calculations.

[0098] S04, calculate the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID;

[0099] S05. Filter out all P in the simplified feature library of objects to be identified. a A set of first vector features that are greater than a set threshold.

[0100] In step S01, a simplified face feature library is obtained, and in step S03, a simplified vector feature of the face on the scene is obtained. Therefore, in step S04, the simplified face feature library is traversed and the similarity value P is calculated one by one with the simplified vector feature of the face on the scene. a , where a is the number of each ID, we get the similarity of the face on the scene with all the faces in the simplified face feature library, and then filter out all P a A set of first vector features greater than the set threshold is prepared for subsequent work.

[0101] The similarity between two vectors is usually calculated mathematically. However, similarity itself is not an intuitive concept. Therefore, to facilitate user interpretation, the final calculated similarity is usually beautified using the following formula:

[0102]

[0103] Where p is the vector similarity value, μ and σ are the feature distributions, and Score is the similarity score. The similarity score (Score) is equivalent to a subjective similarity score of 1. The similarity score will vary between 0 and 1 and is presented to users for a more intuitive understanding. Users generally don't directly use p as a replacement because p is the actual similarity value, which ranges from negative infinity to positive infinity. For example, if you tell a customer the similarity value is 1743, the user still won't understand whether it's similar or not. Therefore, p is typically used for internal calculations, while Score is presented to users. Ultimately, users will set a standard similarity score threshold (Score). The threshold p is then calculated as follows:

[0104]

[0105] Wherein, Score is the similarity score, P is the set threshold, μ and σ are the defined feature distribution values.

[0106] From the above formula, it is easy to know that the function is monotonically increasing, so in step S05, all P a A set of first vector features greater than the set threshold is a set of IDs that preliminarily meet the user's similarity requirements. Of course, the calculation method of the above vector similarity is not limited to the above cosine distance calculation method, and can also be calculated using the Euclidean distance method.

[0107] Furthermore, since decimals are discarded and truncated during the conversion of the floating-point database into an 8-bit integer database, this inevitably results in certain errors. Certain errors are also generated during the discarding of faces, resulting in a bilateral error. To further optimize the accuracy of the present invention, in a preferred embodiment of the present invention, step S05 further includes:

[0108] S051. Obtain a maximum error value A;

[0109] S052. Filter out all the features that meet P in the simplified feature library of objects to be identified. a +A is the ID that is greater than the set threshold.

[0110] The maximum error value A is a predetermined value. Those skilled in the art can flexibly set a reasonable error value A according to actual use to compensate for the reduced accuracy caused by the above simplification.

[0111] Alternatively, the maximum error value A is calculated by the following method:

[0112] When the i-th eigenvalue of the vector feature X is x i, and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i , calculate the product x i ×y i Constant level error:

[0113] Calculate the cumulative error of the inner product (cosine similarity):

[0114] The bilateral error obtained based on the cumulative error is

[0115] Through calculation, the error A can also be set to At this time, the bilateral error is within the accurate calculation range. There is no possibility that the setting value is too large and too many dissimilar images are screened out, increasing the difficulty of subsequent calculations, nor is there the possibility that the setting value is too small and many similar IDs are screened out.

[0116] At this point, the features of the simplified feature library and the on-site simplified vector have been used, and a group of IDs that preliminarily meet the user's similarity requirements have been screened out, completing the first step of the preliminary screening of the present invention.

[0117] The following will be the detailed screening of the second part:

[0118] S06: Select a group of second vector features from the complete feature library of objects to be identified that have the same ID as the group of first vector features.

[0119] Since the IDs in the simplified facial feature library correspond one-to-one to the IDs in the complete facial feature library, except that the specific parameters of the IDs are different (the second vector feature is a floating point type, and the first vector feature is an 8-bit integer type), a group of IDs in the complete facial feature library are re-matched one-to-one and extracted to obtain a group of second vector features with the same ID.

[0120] S07: Calculate the similarity between the complete vector features of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P. b , where b is the ID number after screening;

[0121] S08, P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified on site in the complete feature library of the object to be identified, completing image recognition.

[0122] Furthermore, step S08 further includes:

[0123] S081, screening and obtaining P bthe maximum value among the values, and determining whether the maximum value is greater than the set threshold;

[0124] S082. When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature that best matches the object to be identified in the complete object feature library, and image recognition is completed;

[0125] S083. When the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and the image recognition is completed.

[0126] After selecting the closest set of IDs, the present invention then re-compares the complete facial vector features with the complete vector features of this set of IDs one by one. At this point, the amount of data computation has become very small, and the mobile terminal can easily meet the requirements. The ID with the highest similarity after comparison can be used as the ID in the complete object feature library that best matches the object to be identified at the scene. At this time, since the similarity value is recalculated, the maximum value is re-compared to see if it is greater than the set threshold. If it is, the ID corresponding to the maximum value is the ID in the complete object feature library that best matches the object to be identified at the scene. If it is not, it is indicated that there is no matching ID in the database.

[0127] In summary, the present invention addresses existing problems by designing a facial feature simplification scheme consisting of preliminary screening and detailed comparison. This scheme reduces the significant computational effort and accelerates facial similarity calculations several times. Furthermore, rigorous mathematical derivation is performed on the feature simplification steps to ensure manageable errors. Within the specified error limits, a preliminary search is performed on a large-scale facial feature library to obtain candidate features that meet the requirements. The complete features are then used to accurately calculate each on-site feature, ultimately obtaining the desired target.

[0128] It should be noted that the above-mentioned embodiments are only used to illustrate the principles of the present invention and are not intended to limit the scope of protection of the present invention. Without departing from the principles of the present invention, those skilled in the art can adjust the above-mentioned structure so that the present invention can be applied to more specific application scenarios.

[0129] The above has been described for the rapid image recognition method of the present invention. The present invention also proposes a rapid image recognition system 1 for the above method. Figures 4 to 6 .

[0130] The present invention also provides a rapid image recognition system 1, comprising:

[0131] Database vector feature simplification module 11: simplifies the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified;

[0132] On-site object feature acquisition and vector conversion module 12: receives the on-site object feature to be verified and converts it into a complete on-site object feature vector;

[0133] On-site object vector feature simplification module 13: simplifies the complete vector features of the on-site object to be identified to obtain the simplified vector features of the on-site object to be identified;

[0134] Simplified vector feature comparison calculation module 14: calculates the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID;

[0135] Simplified vector feature library ID screening module 15: Screen out all P in the simplified feature library of objects to be identified a a set of first vector features greater than a set threshold;

[0136] Complete vector feature library ID selection module 16: selects a group of second vector features having the same ID as a group of first vector features in the complete feature library of the object to be identified;

[0137] Complete vector feature comparison calculation module 17: Calculate the similarity between the complete vector feature of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P b , where b is the ID number after screening;

[0138] Match ID output module 18: P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified on site in the complete feature library of the object to be identified, completing image recognition.

[0139] The simplified vector feature library ID screening module 15 further includes:

[0140] Error value acquisition module 151: obtains the maximum error value A;

[0141] The simplified vector feature library ID screening module 152 based on the error value is used to screen out all the features that meet the requirements of P in the simplified feature library of objects to be identified. a +A is the first vector feature that is greater than the set threshold.

[0142] The error value acquisition module 151 further includes:

[0143] Constant level error calculation module 1511: When the i-th eigenvalue of the vector feature X is x i , and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i, calculate the product x i xy i Constant level error:

[0144] Cumulative error calculation module 1512: Calculates the cumulative error of the inner product (cosine similarity):

[0145] Bilateral error calculation module 1513: Based on the cumulative error, the bilateral error is obtained as

[0146] The matching ID output module 18 further includes:

[0147] Similarity value screening and comparison module 181: Screening and obtaining P b the maximum value among the values, and determining whether the maximum value is greater than the set threshold;

[0148] Output module 182: When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature in the complete feature library of the object to be identified that best matches the object to be identified on site, and image recognition is completed; when the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and image recognition is completed.

[0149] In addition, the present invention also provides a computer-readable storage medium, in which multiple program codes are stored, characterized in that the program codes are suitable for being loaded and run by a processor to execute the fast image recognition method of any one of the above technical solutions.

[0150] In addition, a control device includes a processor and a memory, wherein the memory is suitable for storing multiple program codes, and is characterized in that the program code is suitable for being loaded and run by the processor to execute the fast image recognition method of any one of the above technical solutions.

[0151] Those skilled in the art will appreciate that the aforementioned system and apparatus for improving pedestrian number detection accuracy also include other known structures, such as a processor, a controller, and memory. Memory includes, but is not limited to, random access memory, flash memory, read-only memory, programmable read-only memory, volatile memory, non-volatile memory, serial memory, parallel memory, or registers. Processors include, but are not limited to, CPLD / FPGA, DSP, ARM processor, MIPS processor, etc. To unnecessarily obscure the embodiments of the present disclosure, these known structures are not shown in the accompanying drawings.

[0152] Although the various steps in the above embodiment are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not have to be executed in such an order, and they can be executed simultaneously (in parallel) or in a reverse order.

[0153] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.

Claims

1. A fast image recognition method, characterized in that: include: S01. Simplifying the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified; S02. Receive features of objects to be identified on site to be verified and convert them into complete vector features of the objects to be identified on site; S03. Simplify the complete vector features of the object to be identified on site to obtain a simplified vector feature of the object to be identified on site; S04, calculate the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID; S05. Filter out all P in the simplified feature library of objects to be identified. a a set of first vector features greater than a set threshold; S06. Selecting a set of second vector features having the same ID as the set of first vector features from the complete feature library of the object to be identified; S07: Calculate the similarity between the complete vector features of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P. b , where b is the ID number after screening; S08, P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified in the complete object feature library to complete image recognition; The method for simplifying the vector features in step S01 and step S03 specifically includes: Get the attribute value of each complete vector feature composed of L floating-point numbers; Multiply each attribute value by 128 one by one, so that the values originally distributed in the (-1.0, 1.0) interval are expanded to the (-128.0, 128.0) interval; Each attribute value is truncated, the decimal part is discarded, and an integer is obtained in the range [-128, 127]; The integer is represented by an 8-bit integer, and the original complete feature library of objects to be identified with a length of N*L*4 bytes is finally simplified to a simplified feature library of objects to be identified with a length of N*L bytes; Among them, floating-point types occupy 4 bytes and 8-bit integers occupy 1 byte.

2. The method according to claim 1, characterized in that The set threshold is calculated in the following way: Wherein, Score is the similarity score, P is the set threshold, μ and σ are the defined feature distribution values.

3. The method according to claim 1, characterized in that Step S05 further includes: S051. Obtain a maximum error value A; S052. Filter out all the features that meet P in the simplified feature library of objects to be identified. a +A is the first vector feature that is greater than the set threshold.

4. The method according to claim 3, characterized in that The maximum error value A is a specified preset value; or, The maximum error value A is calculated by the following method: When the i-th eigenvalue of the vector feature X is x i , and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i , calculate the product x i ×y i Constant level error: Calculate the cumulative error of the inner product cosine similarity once: The bilateral error obtained based on the cumulative error is 5. The method according to claim 1, wherein The object to be identified is any one of a human face, a fingerprint, a garbage classification, a herb classification, and an animal classification; and / or, Step S08 further includes: S081, screening and obtaining P b the maximum value among the values, and determining whether the maximum value is greater than the set threshold; S082. When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature that best matches the object to be identified in the complete object feature library, and image recognition is completed; S083. When the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and the image recognition is completed.

6. A fast image recognition system, characterized in that: The system comprises: Database vector feature simplification module: simplifies the vector features of the pre-stored complete feature library of objects to be identified to obtain a simplified feature library of objects to be identified; On-site object feature acquisition and vector conversion module: receives the features of the on-site object to be identified to be verified and converts them into complete vector features of the on-site object to be identified; On-site object vector feature simplification module: simplifies the complete vector features of the on-site object to be identified to obtain the simplified vector features of the on-site object to be identified; Simplified vector feature comparison calculation module: calculates the similarity value P between the vector feature corresponding to each ID in the simplified feature library of the object to be identified and the simplified vector feature of the object to be identified on site a , where a is the number of each ID; Simplified vector feature library ID screening module: Screen out all P in the simplified feature library of objects to be identified a a set of first vector features greater than a set threshold; Complete vector feature library ID selection module: selects a group of second vector features with the same ID as a group of first vector features in the complete feature library of the object to be identified; Complete vector feature comparison calculation module: calculate the similarity between the complete vector feature of the object to be identified and a set of the second vector features one by one to obtain a set of similarity values P b , where b is the ID number after screening; Match ID output module: P b The vector feature corresponding to the maximum value in is used as the vector feature that best matches the object to be identified in the complete object feature library to complete image recognition; The solutions for simplifying vector features specifically include: Get the attribute value of each complete vector feature composed of L floating-point numbers; Multiply each attribute value by 128 one by one, so that the values originally distributed in the (-1.0, 1.0) interval are expanded to the (-128.0, 128.0) interval; Each attribute value is truncated, the decimal part is discarded, and an integer is obtained in the range [-128, 127]; The integer is represented by an 8-bit integer, and the original complete feature library of objects to be identified with a length of N*L*4 bytes is finally simplified to a simplified feature library of objects to be identified with a length of N*L bytes; Among them, floating-point types occupy 4 bytes and 8-bit integers occupy 1 byte.

7. The system according to claim 6, characterized in that The simplified vector feature library ID screening module further includes: Error value acquisition module: obtain the maximum error value A; Simplified vector feature library ID screening module based on error value: Screen out all the features that meet P in the simplified feature library of objects to be identified. a +A is the first vector feature that is greater than the set threshold.

8. The system according to claim 7, characterized in that The error value acquisition module further includes: Constant error calculation module: When the i-th eigenvalue of the vector feature X is x i , and its upper limit of error is When two eigenvectors X, the i-th eigenvalue x in X i and y i , calculate the product x i ×y i Constant level error: Cumulative error calculation module: calculate the cumulative error of the inner product cosine similarity once: Bilateral error calculation module: Based on the cumulative error, the bilateral error is obtained as 9. The system according to claim 6, wherein: The matching ID output module further includes: Similarity value screening and comparison module: Screen and obtain P b the maximum value among the values, and determining whether the maximum value is greater than the set threshold; Output module: When the maximum value is greater than the set threshold, the vector feature corresponding to the maximum value is used as the vector feature in the complete feature library of the object to be identified that best matches the object to be identified on site, and image recognition is completed; when the maximum value is not greater than the set threshold, it is prompted that there is no matching vector feature in the database, and image recognition is completed.

10. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the fast image recognition method according to any one of claims 1 to 5.

11. A control device comprising a processor and a memory, wherein the memory is adapted to store a plurality of program codes, wherein: The program code is suitable for being loaded and run by the processor to execute the fast image recognition method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video image processing method and device and computer readable medium

    CN109829435A

  • Image recognition method and device and storage medium

    CN110659541A