Person recognition method, apparatus and non-transitory computer readable medium
By calculating the vector distance between person images and dynamically adjusting the threshold, the problem of untimely database updates in person recognition is solved, thereby improving recognition accuracy and database stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- REALTEK SEMICON CORP
- Filing Date
- 2021-10-18
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies fail to effectively update the database to adapt to image changes during the person identification process, leading to misjudgments and database contamination.
By calculating the vector distance between the image of the person to be identified and the image of the registered person, the matching person is determined, and the database is updated when the matching vector distance is less than a threshold. The moving average method is used to dynamically adjust the vector distance threshold to maintain a smooth change in the matching vector distance.
It improves the accuracy of character identification, reduces misjudgments, ensures the dynamic adaptability and stability of database updates, and prevents misjudgments caused by sudden changes.
Smart Images

Figure CN115995094B_ABST
Abstract
Description
Technical Field
[0001] This invention application relates to a person identification method, apparatus, and non-transitory computer-readable medium. In particular, it relates to a person identification method, apparatus, and non-transitory computer-readable medium that updates a database while performing person identification. Background Technology
[0002] Person recognition (also known as human figure recognition or face recognition) mainly consists of two parts: identity registration and database comparison. In practical applications, during database comparison, unknown persons can be automatically registered, with their identity names replaced by serial numbers. If a person appearing in the image is already registered in the database, their information (person vector) is updated in the database. Therefore, database comparison simultaneously involves reading and writing to the database. Summary of the Invention
[0003] Some embodiments of the present invention relate to a person identification method, comprising the following steps: a processor determines a matching person among multiple registered persons by the vector of the person to be identified and the vectors of multiple registered persons' images, based on the distance between the vectors of the person to be identified and the vectors of the matching person; and stores the distance between the vectors of the person to be identified and the vectors of the matching person; and when the distance between the matching vectors is less than a vector distance threshold, the processor updates the stored data of the matching person based on the person to be identified.
[0004] Some embodiments of the present invention relate to a person recognition device, comprising a memory and a processor. The memory stores data of a plurality of registered persons. The processor is coupled to the memory and is used to determine, based on a plurality of identification vector distances between the vector of the image of the person to be identified and a plurality of identification vector distances between the vectors of the images of the persons to be identified and the vectors of the persons to be identified, determine a matching person among the plurality of registered persons, and store the matching vector distance between the vector of the image of the person to be identified and the vector of the matching person. When the matching vector distance is less than a vector distance threshold, the processor updates the stored data of the matching person based on the image of the person to be identified.
[0005] Some embodiments of the present invention relate to a non-transitory computer-readable medium that stores computer software for executing a person identification method. The person identification method includes the following steps: determining a matching person among the multiple registered persons based on multiple identification vector distances between the vector of the image of the person to be identified and multiple vectors of multiple registered persons' images, and storing the matching vector distance between the vector of the image of the person to be identified and the vector of the matching person; and updating the stored data of the matching person based on the image of the person to be identified when the matching vector distance is less than a vector distance threshold. Attached Figure Description
[0006] The features, practical operation, and effects of this invention will be described in detail below with reference to the accompanying drawings.
[0007] Figure 1 This is a schematic diagram of a person recognition device;
[0008] Figure 2 This is a schematic diagram illustrating a person recognition method according to some embodiments of the present invention;
[0009] Figure 3 It is illustrated according to some embodiments of the present invention. Figure 2 A diagram illustrating one step in the method of identifying people in Chinese;
[0010] Figure 4 This is a diagram illustrating some embodiments of the present invention. Figure 1 A schematic diagram of the frame image obtained by the input / output circuit in the circuit;
[0011] Figure 5 It is illustrated according to some embodiments of the present invention. Figure 2 A diagram illustrating one step in the method of identifying people in Chinese; and
[0012] Figure 6 This is data corresponding to the matched person, as illustrated in some embodiments of the present invention.
[0013] Symbol Explanation
[0014] 100: Person Recognition Device
[0015] 110: Processor
[0016] 130: Memory
[0017] 150: Input / output circuit
[0018] 200: Methods for identifying persons
[0019] S210, S230: Steps
[0020] S212, S214, S215, S216, S218: Steps
[0021] S232, S234, S236, S238: Steps
[0022] 400: Image
[0023] 410A, 410B: Images of people to be identified
[0024] 600: Data
[0025] 601 to 605: Storage Space
[0026] 6A1 to 6A6: Portraits Detailed Implementation
[0027] This disclosure provides numerous different embodiments or examples below to implement various features of the invention. The components and configurations in the specific examples are used in the following discussion to simplify the invention. Any examples discussed are for illustrative purposes only and do not in any way limit the scope or significance of the invention or its examples.
[0028] As used in this document, the term "coupled" can refer to "electrical coupling," and the term "connected" can refer to "electrical connection." "Coupled" and "connected" can refer to two or more components cooperating or interacting with each other.
[0029] Please see Figure 1 . Figure 1 This is a schematic diagram of a person recognition device 100. (Example) Figure 1 As illustrated, the person recognition device 100 includes a processor 110 and a memory 130. The processor 110 is coupled to the memory 130. In some embodiments, the person recognition device 100 further includes an input / output circuit 150. The input / output circuit 150 is coupled to the processor 110. In some embodiments, the input / output circuit 150 may be a camera.
[0030] Please see Figure 2 . Figure 2 This is a schematic diagram illustrating a person recognition method 200 according to some embodiments of the present invention. The embodiments of the present invention are not limited thereto.
[0031] It should be noted that this person identification method 200 can be applied to [various situations]. Figure 1 The structure of the character recognition device 100 is the same as or similar to that of the system. For simplicity, the following will use... Figure 2 The method of operation is described using an example, but this invention does not use it as an example. Figure 1 Its application is limited.
[0032] It should be noted that in some embodiments, the person recognition method 200 can be a computer program and stored in a non-transitory computer-readable medium, thereby enabling the computer, electronic device, or the aforementioned... Figure 1 After the processor 110 in the person recognition device 100 reads the recording medium, it performs this operation method. The processor 110 may consist of one or more chips. The non-transitory computer-readable recording medium may be a read-only memory, flash memory, floppy disk, hard disk, optical disk, USB flash drive, magnetic tape, database accessible by a network, or other non-transitory computer-readable recording media with the same function that can be easily conceived by those skilled in the art.
[0033] In addition, it should be understood that, unless otherwise specified, the order of operation of the person identification method 200 mentioned in this embodiment can be adjusted according to actual needs, and can even be executed simultaneously or partially simultaneously.
[0034] Furthermore, in different embodiments, these operations may be adaptively added, replaced, and / or omitted.
[0035] Please see Figure 2 The person identification method 200 includes steps S210 to S230.
[0036] In step S210, based on the distance between the vector of the image to be identified and the vectors of the multiple registered persons, the matching person mapped to the image to be identified is determined, and the distance between the vector of the image to be identified and the vector of the matching person is stored.
[0037] Please refer to the following: Figure 1 In some embodiments, step S210 may be performed by, for example... Figure 1 The process is executed by processor 110. Detailed instructions for step S210 will be provided below. Figure 1 , Figures 3 to 4 illustrate.
[0038] Please see Figure 3 . Figure 3 It is illustrated according to some embodiments of the present invention. Figure 2 A schematic diagram of step S210 in the human identification method 200. (See diagram for example.) Figure 3 As shown, step S210 includes steps S212 to S218.
[0039] In step S212, input the image of the person to be identified.
[0040] Please see Figure 4 . Figure 4 This is a diagram illustrating some embodiments of the present invention. Figure 1 A schematic diagram of the frame image 400 obtained by the input / output circuit 150. It should be noted that... Figure 4 The image 400 shown is a frame image in a continuous image sequence. The continuous image sequence may be acquired by the input / output circuitry 150 (e.g., a camera). The processor 110 acquires the image 410A of the person to be identified from the image 400. In some embodiments, the image 400 may contain images of multiple different persons. For example, the image 400 may also contain the image 410B of the person to be identified, B.
[0041] In step S214, the image of the person to be identified is compared with multiple registered person images of multiple registered persons to obtain multiple identification vector distances.
[0042] For example, after the processor 110 obtains the image 410A of the person to be identified from the image 400, it calculates the vector of the image 410A. Assume that memory 130 stores vectors of images of multiple registered individuals (undrawn) who have been registered in the database, including the vector of registered individual A. Vector of registered person B Vector of registered person C Processor 130 calculates the vector of the image 410A of the person to be identified. Vector of registered person A The distance ad between the vectors to be identified and the vector of the image 410A of the person to be identified Vector of registered person B The distance between the vectors to be identified (bd) and the vector of the image of the person to be identified (410A) The vector of the registered person C The distance cd between the vectors to be identified.
[0043] In step S215, it is determined whether a matching person has been found.
[0044] Continuing with the above example, if processor 110 determines that the smallest of the distances among ad, bd, and cd to be identified is ad, and if the distance ad to be identified is less than the determination threshold, processor 110 determines that a matching identity has been found as person A, and executes step S218. On the other hand, if processor 110 determines that the smallest of the distances among ad, bd, and cd to be identified is ad, and if the distance ad to be identified is not less than the identification threshold, processor 110 determines that no matching person has been found, and executes step S216.
[0045] In step S216, an unknown identity is output. In some embodiments, the unknown identity output by the processor 110 is a serial number person. In some embodiments, if it is determined in step S215 that no matching person is found, the processor 110 determines that the image of the person to be identified 410A does not correspond to any of the registered persons, and determines it to be an unknown identity.
[0046] If the identity is determined to be unknown, do not proceed. Figure 2 Step S230 in the process.
[0047] In step S218, the matching vector distance is stored. For example, if processor 110 determines that the matched person is registered person A, processor 110 records the identification vector distance ad and executes... Figure 2Step S230 in the process.
[0048] In some embodiments, Figure 2 Step S210 is performed in a neural network. That is, the distance between multiple identification vectors between the vector of the image of the person to be identified and the vector of the registered person's image is calculated by the neural network, and the neural network determines whether the image of the person to be identified corresponds to a matching person among the multiple registered persons.
[0049] Please return to Figure 2 In step S230, when the matching vector distance is less than the vector distance threshold, the stored matching person data is updated based on the image of the person to be identified. For easier understanding, please refer to the following... Figure 1 , Figure 5 and Figure 6 To provide an explanation.
[0050] Please see Figure 5 . Figure 5 It is illustrated according to some embodiments of the present invention. Figure 2 A schematic diagram of step S230 in the Chinese character recognition method 200. (See diagram for example.) Figure 5 As shown, step S230 includes steps S232 to S238.
[0051] In step S232, the vector distance threshold is calculated.
[0052] In some embodiments, the vector distance threshold is calculated based on multiple historical vector distances from multiple historical images of the matched person. Specifically, the processor 110 calculates the average of the multiple historical vector distances and multiplies the calculated average by a parameter to generate the vector distance threshold.
[0053] Please see Figure 6 . Figure 6 This is data 600 corresponding to the matched person A, as illustrated in some embodiments of the present invention. The following explanation uses a moving average algorithm to the distance of 5 historical vectors as an example. In the following description, since the image of the person to be identified has already identified the corresponding matched person in step S210, the description will use the person image instead of the image of the person to be identified.
[0054] For example, suppose processor 110 acquires the first frame image 6A1 of the matching person A at time point T1, the second frame image 6A2 of the matching person A at time point T2, the third frame image 6A3 of the matching person A at time point T3, the fourth frame image 6A4 of the matching person A at time point T4, and the fifth frame image 6A5 of the matching person A at time point T5. Since the matching person A has not acquired five historical images before acquiring the fifth frame image, images 6A1 to 6A5, along with their corresponding vectors and matching vector distances, are stored in storage spaces 601 to 605 respectively, serving as vectors of the historical images of the matching person A and their historical vector distances.
[0055] After processor 110 obtains the sixth frame image 6A6 of the matched person A at time point T6, processor 110 calculates the vector distance threshold based on the historical vector distances corresponding to historical person images 6A1 to 6A5. The matching vector distance of person image 6A6 is then compared with the vector distance threshold.
[0056] Suppose the historical vector distances between historical figures images 6A1 to 6A5 are dd1 to dd5. Processor 110 calculates the average of the historical vector distances dd1 to dd5, and then multiplies the average by a parameter to use as the vector distance threshold.
[0057] In some embodiments, the parameter is 2, but the implementation of the present invention is not limited thereto. The smaller the value of the parameter, the stricter the database update conditions; conversely, the larger the value of the parameter, the more lenient the database update conditions.
[0058] In step S234, it is determined whether the matching vector distance is greater than the vector distance threshold. For example, after the processor 110 obtains the sixth frame image 6A6 of the matched person A at time point T6, it compares the matching vector distance of the person image 6A6 with the vector distance threshold.
[0059] In step S236, the matched person is output and the data of the matched person is updated. For example, when the processor 110 determines that the matching vector distance of the person image 6A6 is less than the vector distance threshold, the processor 110 outputs the information that the person image 6A6 corresponds to the matched person A through the input / output circuit 150, and updates the matched person data of the matched person A stored in the storage spaces 601 to 605.
[0060] In some embodiments, the update of the matched person data is performed in a first-in, first-out (FIFO) manner. However, the embodiments of the present invention are not limited to this. For example, when updating in a FIFO manner, the processor 110 stores the person image 6A6 and its corresponding vector and matching vector distance in the storage space 601 as historical person images and historical vector distances for matching person A. At this time, the historical vector distances corresponding to the matched person A stored in the database are updated from the original historical vector distances of person images 6A1 to 6A5 to the historical vector distances of person images 6A2 to 6A6.
[0061] In this case, after the processor 110 obtains the seventh frame image (not drawn) of the matching person A at time point T7, the processor 110 calculates the vector distance threshold based on the historical distance vectors of the person images 6A2 to 6A6 stored in the storage space 601 to 605.
[0062] In step S238, the matching person is output, but the matching person data is not updated. For example, when the processor 110 determines that the matching vector distance of person image 6A6 is not less than the vector distance threshold, the processor 110 outputs the information that person image 6A6 corresponds to matching person A via the input / output circuit 150, but does not update the data of matching person A stored in storage spaces 601 to 605. That is, the historical vector distance corresponding to matching person A is still the historical vector distance of the originally stored person images 6A1 to 6A5.
[0063] In this case, after the processor 110 obtains the seventh frame image of the matching person A at time point T7, the processor 110 calculates the vector distance threshold based on the historical vector distance of the historical person images 6A1 to 6A5 stored in storage space 601 to 605.
[0064] In the above implementation, the vector distance threshold is calculated using five historical vector distances. However, the implementation of this invention is not limited to five.
[0065] Please refer back to this. Figure 1 In some embodiments, the processor 110 may be a server or other device. In some embodiments, the processor 110 may be a server, circuit, central processing unit (CPU), microcontroller (MCU), or other device with equivalent functions, which have functions such as temporary storage, calculation, data reading, receiving signals or messages, and transmitting signals or messages.
[0066] In some embodiments, the memory 130 may be a computing circuit or component with data storage, data transmission and reception, or similar functions. In some embodiments, the input / output circuit 150 may be a computing circuit or component with data reading, transmission and reception, or similar functions.
[0067] In some embodiments, the processor 110 and / or memory 130 may be located on a cloud server.
[0068] In summary, this invention provides a person recognition method, a person recognition device, and a non-transient computer-readable medium. It stores the matching vector distance of each successfully matched image of a person to be identified and applies a moving average to the stored matching vector distance over time (per frame). The value after applying the moving average is smoother than the matching vector distance of each successfully matched image of a person to be identified, while still maintaining the trend of the matching vector distance. Therefore, this invention uses the moving average method to obtain a dynamic vector distance threshold for database updates. That is, the vector distance threshold changes dynamically over time to preserve image changes with the same trend for the same matched person. Furthermore, while the vector distance threshold changes dynamically, it filters out instantaneous changes with excessively large differences to reduce subsequent misjudgments caused by contaminated matching vector updates to the database.
[0069] Various functional components have been disclosed herein. To those skilled in the art, functional components can be implemented by circuits (whether dedicated circuits or general-purpose circuits operating under the control of one or more processors and coded instructions).
[0070] While the embodiments of the present invention have been described above, these embodiments are not intended to limit the present invention. Those skilled in the art can make changes to the technical features of the present invention based on the explicit or implicit content of the present invention. All such changes may fall within the scope of patent protection sought by the present invention. In other words, the scope of patent protection of the present invention shall be determined by the scope defined in the claims of this application.
Claims
1. A method for identifying persons, characterized in that, The method includes: The processor determines the matching person among the multiple registered persons by the vector of the image to be identified and the vector of the image of the person to be identified, based on the distance between the vector of the image to be identified and the vector of the matching person. The processor also stores the distance between the vector of the image to be identified and the vector of the matching person. as well as When the matching vector distance is less than the vector distance threshold, the processor updates the stored matching person data based on the image of the person to be identified; The data for the matched person includes multiple historical vector distances between multiple historical images of the matched person, and the person identification method further includes: The processor calculates the vector distance threshold based on the multiple historical vector distances of the multiple historical figures' images; and When the stored data of the matched person is updated, the matching vector distance replaces one of the plurality of historical vector distances.
2. The person identification method as described in claim 1, characterized in that, The person identification method also includes: The processor calculates the average of the multiple historical vector distances of the multiple historical figures images, and multiplies the average by a parameter to generate the vector distance threshold.
3. The person identification method as described in claim 1, characterized in that, The method further includes: The processor receives a continuous image to be identified, and the image of the person to be identified and the multiple historical figures are obtained by the processor at different time points in the continuous image to be identified.
4. The person identification method as described in claim 1, characterized in that, The method further includes: When the vector distance is less than the vector distance threshold, the processor stores the matching vector distance to update the data of the matched person.
5. The person identification method as described in claim 1, characterized in that, The method further includes: The image of the person to be identified, output by the input / output component, corresponds to the matched person.
6. The person identification method as described in claim 1, characterized in that, The method further includes: When the matching vector distance is not less than the vector distance threshold, the processor does not update the stored data of the matched person.
7. The person identification method as described in claim 1, characterized in that, The method further includes: The processor calculates the distances between the plurality of vectors to be identified and determines the smallest distance among the plurality of vectors to be identified; When the smallest of the plurality of distances between the vectors to be identified is less than the identification threshold, the processor determines that the image of the person to be identified is mapped to the matching person among the plurality of registered persons, and the matching person corresponds to the smallest of the plurality of distances between the vectors to be identified. as well as When the smallest of the distances among the plurality of vectors to be identified is not less than the identification threshold, the processor determines that the image of the person to be identified does not correspond to the plurality of registered persons, and does not update the stored data of the plurality of registered persons.
8. A person recognition device, characterized in that, The device includes: The memory stores data for multiple registered individuals. as well as A processor, coupled to the memory, is configured to determine, based on multiple identification vector distances between the vector of the image to be identified and multiple vectors of the multiple registered person images of the multiple registered persons, a matching person mapped to the image to be identified, and to store the matching vector distance between the vector of the image to be identified and the vector of the matching person. When the matching vector distance is less than a vector distance threshold, the processor updates the stored data of the matching person based on the image to be identified. The data of the matching person includes multiple historical vector distances of multiple historical person images of the matching person. The processor calculates the vector distance threshold based on the multiple historical vector distances of the multiple historical person images. When the stored data of the matched person is updated, the matching vector distance replaces one of the plurality of historical vector distances.
9. A non-transitory computer-readable medium storing computer software for executing a person recognition method, the person recognition method comprising: Based on the distances between the vectors of the image of the person to be identified and the vectors of the images of the multiple registered persons, the matching person mapped to the image of the person to be identified is determined, and the distance between the vectors of the image of the person to be identified and the vectors of the matching person is stored. as well as When the matching vector distance is less than the vector distance threshold, the stored data of the matching person is updated based on the image of the person to be identified; in, The data of the matched person includes multiple historical vector distances of multiple historical images of the matched person, and the processor calculates the vector distance threshold based on the multiple historical vector distances of the multiple historical images of the matched person. When the stored data of the matched person is updated, the matching vector distance replaces one of the plurality of historical vector distances.