A target recognition method, device and intelligent device
Through dynamic feature collection and long-term feature retention principles, the target recognition and following capabilities of smart devices are optimized, solving the problem of the device being lost when the target is blocked or turned around, and improving operating speed and efficiency.
Patent Information
- Application Number
- CN202410733372.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-07
AI Technical Summary
During the target recognition and following process of existing smart devices, it is easy to lose the target because the target is blocked or turned around, and the feature update scheme causes the device running speed to decrease and memory usage to increase, making it difficult to achieve long-term stable recognition and following.
Using a dynamic feature set, including baseline frame features and multiple reference frame features, the real-time position is updated by matching image features with historical features, and feature storage is optimized based on the principle of long-term feature retention, reducing the number of historical features and improving feature matching efficiency and equipment operation. speed.
It makes it difficult to lose track of the target when it is blocked or turned around, and can be retrieved in time, which reduces the computational complexity and memory usage of feature matching, and improves the long-term stable recognition and following capabilities of the device.
Smart Images

Figure CN118314332B
Abstract
Description
Technical Field
[0001] The present application relates to the field of target recognition technology, and in particular to a target recognition method, apparatus and intelligent device. Background Art
[0002] With the rapid development of artificial intelligence and robotics, mobile robots are increasingly used in the real world. In some scenarios, such as smart shopping guides, various robots, which are intelligent devices, have emerged. In these scenarios, in order for intelligent devices to continue to serve objects and provide continuous services, they need to sense the location of the service object in real time and follow the service object for a long time.
[0003] In order to enable smart devices to serve objects for a long time, they usually record the features of the service object in a short period of time after generating the recognition task for the service object. In related technologies, the recorded features are usually temporarily stored in the smart device in the form of a feature library. For example, nearly 100 features are recorded for each trajectory. As the service object moves, the historical features in the feature library are replaced with newly acquired features. However, in actual use, as the service object moves, the service object may be blocked by other objects or objects in the scene, or the service object may turn around. The above-mentioned feature update scheme often causes the smart device to lose track of the service object. Summary of the invention
[0004] The embodiments of the present application provide a target recognition method, apparatus and intelligent device for optimizing the feature update method, realizing long-term stable recognition and following of the target object, making it difficult to lose the target object when it is blocked or turns around, and finding it in time after losing it.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a target recognition method, comprising:
[0007] Performing target detection on the collected current frame image and extracting image features of the detected reference object;
[0008] Matching the image feature with each historical feature of the target object in the dynamic feature set, and updating the real-time position of the target object when the reference object is identified as the target object;
[0009] Based on the real-time position and the acquired current device position, move toward the target object;
[0010] Among them, the historical features include a baseline frame feature and multiple reference frame features. The baseline frame feature is obtained by extracting features from the captured baseline frame image containing the target object. Each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images captured after the baseline frame image. Any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matches the historical features recorded in the dynamic feature set.
[0011] In the above method, since the dynamic feature set includes a reference frame feature, the reference frame feature is obtained by extracting features from the collected reference frame image containing the target object. Therefore, the dynamic feature library can be used to stably identify whether the reference object contained in the current frame image is the target object, so that the target is not easily lost when it is blocked or turned, or it can be found in time after being lost; at the same time, the dynamic feature set also includes multiple reference frame features, and each reference frame feature is a target image feature selected from k candidate image features of subsequent frame images collected after the reference frame feature. In this way, the number of historical features recorded in the dynamic feature set can be greatly reduced, the calculation amount of feature matching is reduced, and the memory usage is also reduced, thereby further improving the device operation speed and realizing long-term stable recognition and tracking of the target object.
[0012] In a possible implementation, the method further includes:
[0013] When the reference object is identified as the target object, caching the image feature as the candidate image feature;
[0014] Determine whether the value of the frame counter reaches k;
[0015] If so, the target image feature is selected from the cached candidate image features as the reference frame feature, and other cached candidate image features are deleted, and the frame number counter is cleared.
[0016] The above method selects the local optimal feature (ie, the target image feature) from the candidate image features of each k subsequent frame images as the reference frame feature for recording, thereby reducing the number of features and ensuring the quality of the features.
[0017] In a possible implementation, the dynamic feature set is provided with an upper limit value of the feature quantity of each historical feature, and the method further includes:
[0018] When it is necessary to add a new reference frame feature to the dynamic feature set, determining the feature quantity of each historical feature in the dynamic feature set;
[0019] If the number of features is equal to the upper limit, determining a target reference frame feature to be deleted from a plurality of reference frame features in the dynamic feature set;
[0020] Deleting the target reference frame feature from the dynamic feature set;
[0021] The new reference frame features are recorded in the dynamic feature set.
[0022] The above method can achieve effective preservation of features for a long time while avoiding exceeding the capacity of the feature library, maintaining lightweight operation, optimizing feature storage efficiency, and improving overall performance.
[0023] In a possible implementation, the multiple reference frame features in the dynamic feature set are arranged in a feature queue according to the acquisition time of subsequent frame images;
[0024] The step of determining a target reference frame feature to be deleted from a plurality of reference frame features in the dynamic feature set comprises:
[0025] Based on the long-term feature retention principle, determining the target reference frame feature to be deleted from the multiple reference frame features in the dynamic feature set, wherein the long-term feature retention principle is used to make the dynamic feature library include frame features of different time periods from the moment corresponding to the reference frame image to the current moment;
[0026] The method further comprises:
[0027] Move each reference frame feature after the target reference frame feature in the feature queue forward in sequence;
[0028] The step of recording the new reference frame feature in the dynamic feature set includes:
[0029] The new reference frame feature is added to the end of the feature queue.
[0030] The above method is based on the principle of long-term feature retention, which makes the dynamic feature set suitable for storing features with very long intervals in the time series. At the same time, the feature density close to the current moment is greater, which provides stable and reliable feature support for the continuous identification and following of the target object.
[0031] In a possible implementation, the determining of the target reference frame feature to be deleted from the multiple reference frame features in the dynamic feature set based on the long-term feature retention principle includes:
[0032] If the position of the reference frame feature deleted last time in the feature queue is not the end of the queue, the reference frame feature at the next position adjacent to the position in the feature queue is determined as the target reference frame feature;
[0033] If the reference frame feature deleted last time is at the end of the feature queue, the starting position of the next round is determined based on the starting position of the current round, and the reference frame feature of the starting position of the next round in the feature queue is determined as the target reference frame feature.
[0034] The above method can ensure the efficient use of dynamic feature sets, and also provide stable and reliable feature support for the continuous identification and following of target objects, so that in the evolution of time series, the features closer to the current time have higher density, and the features farther away from the current time have lower density.
[0035] In a possible implementation, the method further includes:
[0036] Generating a recognition task for the target object according to the voice interaction with the user;
[0037] Based on the recognition task, collecting the reference frame image within the field of view;
[0038] Performing target detection on the reference frame image, and determining the detected candidate object as the target object;
[0039] A reference frame feature of the target object in the reference frame image is extracted, and the reference frame feature is recorded in the dynamic feature set.
[0040] In a possible implementation manner, the moving toward the target object based on the real-time position and the acquired current device position includes:
[0041] Based on the real-time position and the acquired current device position, a path planning is performed using a map of the scene where the current device is located to generate a moving path from the current device position to the real-time position;
[0042] A moving speed is determined based on the distance of the moving path, and movement is performed according to the moving path based on the moving speed.
[0043] The above method can realize long-term stable tracking of the target object by using the real-time position of the target object and the current device position of the device and using the map of the scene where the current device is located for path planning.
[0044] In a possible implementation, the method further includes:
[0045] Extracting the detected motion state features of the reference object;
[0046] Matching the image feature with each historical feature of the target object in the dynamic feature set, and matching the motion state feature with a predicted state feature, wherein the predicted state feature is predicted based on the motion state feature of the target object extracted from a historical frame image, and the historical frame image is at least one frame image adjacent to the current frame image;
[0047] If it is determined that the matching rate between the image feature and the historical features is greater than a first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is greater than a second matching rate threshold, it is determined that the reference object is identified as the target object.
[0048] The above method combines motion state features and image features to identify whether the reference object is the target object, thereby improving the recognition accuracy.
[0049] In a second aspect, an embodiment of the present application provides a target recognition device, including:
[0050] A feature extraction module is used to perform target detection on the collected current frame image and extract image features of the detected reference object;
[0051] A recognition module, used for matching the image features with the historical features of the target object in the dynamic feature set, and updating the real-time position of the target object when the reference object is recognized as the target object;
[0052] A moving module, used for moving toward the target object based on the real-time position and the acquired current device position;
[0053] Among them, the historical features include a baseline frame feature and multiple reference frame features. The baseline frame feature is obtained by extracting features from the captured baseline frame image containing the target object. Each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images captured after the baseline frame image. Any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matches the historical features recorded in the dynamic feature set.
[0054] In a possible implementation, the identification module is further used to:
[0055] When the reference object is identified as the target object, caching the image feature as the candidate image feature;
[0056] Determine whether the value of the frame counter reaches k;
[0057] If so, the target image feature is selected from the cached candidate image features as the reference frame feature, and other cached candidate image features are deleted, and the frame number counter is cleared.
[0058] In a possible implementation, the dynamic feature set is provided with an upper limit value of the feature quantity of each historical feature, and the identification module is further used for:
[0059] When it is necessary to add a new reference frame feature to the dynamic feature set, determining the feature quantity of each historical feature in the dynamic feature set;
[0060] If the number of features is equal to the upper limit, determining a target reference frame feature to be deleted from a plurality of reference frame features in the dynamic feature set;
[0061] Deleting the target reference frame feature from the dynamic feature set;
[0062] The new reference frame features are recorded in the dynamic feature set.
[0063] In a possible implementation, the multiple reference frame features in the dynamic feature set are arranged in a feature queue according to the acquisition time of subsequent frame images; and the recognition module is specifically used for:
[0064] Based on the long-term feature retention principle, determining the target reference frame feature to be deleted from the multiple reference frame features in the dynamic feature set, wherein the long-term feature retention principle is used to make the dynamic feature library include frame features of different time periods from the moment corresponding to the reference frame image to the current moment;
[0065] The identification module is also used for:
[0066] Move each reference frame feature after the target reference frame feature in the feature queue forward in sequence;
[0067] The identification module is specifically used for:
[0068] The new reference frame feature is added to the end of the feature queue.
[0069] In a possible implementation, the identification module is specifically used to:
[0070] If the position of the reference frame feature deleted last time in the feature queue is not the end of the queue, the reference frame feature at the next position adjacent to the position in the feature queue is determined as the target reference frame feature;
[0071] If the reference frame feature deleted last time is at the end of the feature queue, the starting position of the next round is determined based on the starting position of the current round, and the reference frame feature of the starting position of the next round in the feature queue is determined as the target reference frame feature.
[0072] In a possible implementation, the identification module is further used to:
[0073] Generating a recognition task for the target object according to the voice interaction with the user;
[0074] Based on the recognition task, collecting the reference frame image within the field of view;
[0075] Performing target detection on the reference frame image, and determining the detected candidate object as the target object;
[0076] A reference frame feature of the target object in the reference frame image is extracted, and the reference frame feature is recorded in the dynamic feature set.
[0077] In a possible implementation, the mobile module is specifically used to:
[0078] Based on the real-time position and the acquired current device position, a path planning is performed using a map of the scene where the current device is located to generate a moving path from the current device position to the real-time position;
[0079] A moving speed is determined based on the distance of the moving path, and movement is performed according to the moving path based on the moving speed.
[0080] In a possible implementation, the identification module is further used to:
[0081] Extracting the detected motion state features of the reference object;
[0082] Matching the image feature with each historical feature of the target object in the dynamic feature set, and matching the motion state feature with a predicted state feature, wherein the predicted state feature is predicted based on the motion state feature of the target object extracted from a historical frame image, and the historical frame image is at least one frame image adjacent to the current frame image;
[0083] If it is determined that the matching rate between the image feature and the historical features is greater than a first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is greater than a second matching rate threshold, it is determined that the reference object is identified as the target object.
[0084] In a third aspect, an embodiment of the present application provides a smart device, including:
[0085] Memory, used to store computer programs or instructions;
[0086] A processor is used to execute the computer program or instructions in the memory so that any method in the first aspect described above is executed.
[0087] In a fourth aspect, an embodiment of the present application provides a computer-readable non-volatile storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any of the methods described in the first aspect above.
[0088] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code is run on a computer, enables the computer to execute the method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Figure 1 This is a schematic diagram of an optional application scenario in an embodiment of the present application;
[0090] Figure 2 A schematic diagram of a target recognition method in an embodiment of the present application;
[0091] Figure 3 A schematic diagram of a process of obtaining reference frame features in an embodiment of the present application;
[0092] Figure 4 A schematic diagram of the architecture of a target recognition system in an embodiment of the present application;
[0093] Figure 5 A schematic diagram of a process of cascade matching to identify a target object in an embodiment of the present application;
[0094] Figure 6 A schematic diagram of a process for determining target image features in an embodiment of the present application;
[0095] Figure 7 A schematic diagram of a feature update process of a dynamic feature set in an embodiment of the present application;
[0096] Figure 8 A schematic diagram of an autonomous following process in an embodiment of the present application;
[0097] Fig. 9 A schematic diagram of the logical architecture of a target recognition device in an embodiment of the present application;
[0098] Fig.10 Schematic diagram of the physical structure of the smart device in the embodiment of the present application. DETAILED DESCRIPTION
[0099] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of this application.
[0100] It should be noted that the terms "first", "second", "third", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0101] The following is a brief introduction to the design concept of the embodiments of the present application.
[0102] The present application relates to the field of target recognition technology, and mainly to a target recognition method, device and intelligent device.
[0103] In some scenarios, such as smart shopping guides, various robots have emerged as smart devices. In these scenarios, in order for smart devices to continue to serve objects and provide continuous services, they need to sense the location of the service objects in real time and follow the service objects for a long time.
[0104] In order to enable smart devices to serve objects for a long time, they usually record the features of the service object in a short period of time after generating the recognition task for the service object. In related technologies, the recorded features are usually temporarily stored in the smart device in the form of a feature library. For example, nearly 100 features are recorded for each trajectory. As the service object moves, the historical features in the feature library are replaced with newly acquired features. However, in actual use, as the service object moves, the service object may be blocked by other objects or objects in the scene, or the service object may turn around. The above-mentioned feature update scheme often causes the smart device to lose track of the service object.
[0105] In view of this, in order to solve the problem that the feature updating scheme in the related art causes the smart device to lose the target object, an embodiment of the present application provides a target recognition method. In the embodiment of the present application, target detection is performed on the collected current frame image, and image features of the detected reference object are extracted; the image features are matched with each historical feature of the target object in the dynamic feature set, and when the reference object is identified as the target object, the real-time position of the target object is updated; based on the real-time position and the acquired current device position, the target object is moved; wherein each historical feature includes a base frame feature and multiple reference frame features, wherein the base frame feature is obtained by extracting features from the collected base frame image containing the target object, and each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images collected after the base frame image, and any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matching the historical features recorded in the dynamic feature set.
[0106] In this way, since the dynamic feature set includes the reference frame feature, which is obtained by feature extraction of the collected reference frame image containing the target object, the dynamic feature library can stably identify whether the reference object contained in the current frame image is the target object, so that the target is not easily lost when it is blocked or turned, or it can be found in time after being lost; at the same time, the dynamic feature set also includes multiple reference frame features, and each reference frame feature is a target image feature selected from the candidate image features of k subsequent frame images collected after the reference frame image. In this way, the number of historical features recorded in the dynamic feature set can be greatly reduced, the calculation amount of feature matching is reduced, and the memory usage is reduced, thereby further improving the equipment operation speed and realizing long-term stable recognition and tracking of the target object.
[0107] An object recognition method provided in an embodiment of the present application is applicable to smart devices.
[0108] The above-mentioned intelligent device may be a movable device having an image acquisition device (such as a camera, etc.), for example, a robot, a mobile robot, etc.
[0109] The above-mentioned smart device can also be an electronic device connected to the image acquisition device and the mobile device. For example, the electronic device can be a smart terminal, a smart mobile terminal, a tablet computer, a laptop computer, a smart handheld device, a personal computer (PC), a computer, a smart screen, a display device, a vehicle-mounted display device, various wearable devices (such as virtual reality (VR), augmented reality (AR)), a personal digital assistant (PDA), etc.
[0110] It is understandable that the specific types of the above-mentioned smart devices are not limited in this application.
[0111] The following is a schematic diagram of an application scenario of an optional target recognition method in an embodiment of the present application, with reference to the accompanying drawings. Figure 1 .like Figure 1 As shown, the application scenario includes a smart device 10, and the smart device 10 includes an image acquisition device ( Figure 1 ), continuously collecting images within the field of view through an image acquisition device, and using a target recognition method provided in an embodiment of the present application to perform target detection on the collected current frame image, and extract the image features of the detected reference object; match the image features with the historical features of the target object in the dynamic feature set to determine whether the reference object is the target object, and update the real-time position of the target object when the reference object is identified as the target object; then move towards the target object based on the real-time position and the acquired current device position to achieve tracking of the target object and provide services to the target object in a timely manner.
[0112] Among them, each historical feature in the dynamic feature set includes a baseline frame feature and multiple reference frame features. The baseline frame feature is obtained by extracting features from the captured baseline frame image containing the target object. Each reference frame feature is a target image feature selected from the candidate image features of each k subsequent frame images captured after the baseline frame image. Any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matches the historical features recorded in the dynamic feature set.
[0113] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 The application scenario shown can also be used in other possible application scenarios, which are not limited in the embodiments of the present application.
[0114] After introducing the application scenarios of the embodiments of the present application, the preferred implementation modes of the present application are further described in detail below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.
[0115] See also Figure 2 As shown, the embodiment of the present application provides a target recognition method, the specific process of the method includes but is not limited to the following:
[0116] Step 200: Perform target detection on the collected current frame image and extract image features of the detected reference object.
[0117] In an embodiment of the present application, the smart device continuously collects images within the field of view through an image acquisition device. After acquiring the current frame image, step 200 is executed to perform target detection on the current frame image using deep learning or other methods to obtain detection bounding box information of the reference object in the current frame image. Then, a feature extraction algorithm is used to extract image features in the image area corresponding to the detection bounding box information in the current frame image, that is, features of the reference object in the current frame image.
[0118] In the embodiment of the present application, the aforementioned deep learning and other methods can be a target detection algorithm based on deep learning, which is implemented by collecting a large number of pictures containing targets and marking the bounding box of the target in each picture to produce a target detection data set; yolov8 can be used as a pre-trained model to train and tune the target detection data set to obtain a deep learning model for target detection. In implementation, when executing step 200, the collected current frame image is input into the deep learning model to obtain the detection bounding box information of the reference object in the current frame image.
[0119] Step 210: Match the image features with the historical features of the target object in the dynamic feature set, and when the reference object is identified as the target object, update the real-time position of the target object, wherein each historical feature includes a base frame feature and multiple reference frame features, the base frame feature is obtained by extracting features from the captured base frame image containing the target object, each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images captured after the base frame image, and any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matching the historical features recorded in the dynamic feature set.
[0120] In an embodiment of the present application, after extracting the image features of the reference object in the current frame image, step 210 is executed to calculate the similarity between the image features and each historical feature of the target object in the dynamic feature set to obtain the similarity between the image features and each historical feature, also known as the matching rate.
[0121] In a specific implementation, the matching rate between the image feature and each historical feature can be weighted averaged to obtain a matching rate statistic, and the matching rate statistic can be compared with a first matching rate threshold. If the matching rate statistic is greater than the first matching rate threshold, it is determined that the reference object is identified as the target object, and the real-time position of the target object is updated; if the matching rate statistic is not greater than the first matching rate threshold, it is determined that the reference object is not the target object, and the orientation of the image acquisition device is adjusted to find the target object, the next frame image is acquired, and target detection is performed on the next frame image acquired, and other processes.
[0122] In an embodiment of the present application, each historical feature in the dynamic feature set includes a baseline frame feature and multiple reference frame features. The baseline frame feature is obtained by extracting features from a captured baseline frame image containing a target object. Each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images captured after the baseline frame image. Any candidate image feature is an image feature that is obtained by extracting features from a subsequent frame image and matches the historical features recorded in the dynamic feature set.
[0123] It should be noted that the matching here represents that the matching rate / matching rate statistic value between the candidate image feature and each historical feature recorded in the dynamic feature set is greater than the first matching rate threshold, which will not be described in detail later.
[0124] The following describes in detail how to obtain the reference frame features in the dynamic feature library.
[0125] In the present application, see Figure 3 As shown, the smart device can obtain the reference frame features according to part or all of the following processes:
[0126] Step 300: Generate a recognition task for a target object based on the voice interaction with the user.
[0127] For example, the smart device is a shopping guide robot in a certain store. When a user enters the store, the shopping guide robot can actively interact with the user through voice, or the user can walk up to the shopping guide robot and interact with it through voice. During this process, after the shopping guide robot receives voice information from the user such as "take me to see a certain product" or "I want to see a certain product", it generates a recognition task for the target object so that the shopping guide robot can follow the target object. The target object can be the user or the user and a companion, and this application does not make any specific limitations.
[0128] Step 310: Based on the recognition task, collect reference frame images within the field of view.
[0129] In an embodiment of the present application, after a recognition task for a target object is generated, an image within a field of view is collected based on the recognition task and the image is used as a reference frame image, wherein the reference frame image includes the target object.
[0130] Step 320: Perform object detection on the reference frame image, and determine the detected candidate object as the target object.
[0131] In the embodiment of the present application, when executing step 320, a target detection algorithm (such as the aforementioned deep learning model) is used to perform target detection on the reference frame image, obtain the detection category and detection bounding box information of the candidate object included in the reference frame image, and determine the detected candidate object as the target object. For the scenario corresponding to the aforementioned example, the deployed target detection algorithm can be set or trained to output only the candidate object whose detection category is human, and the detection bounding box of the candidate object, which represents the position of the candidate object in the reference frame image.
[0132] Step 330: extracting reference frame features of the target object in the reference frame image, and recording the reference frame features in a dynamic feature set.
[0133] In an embodiment of the present application, after determining the target object, step 330 is executed, and based on the detection bounding box information of the candidate object, a feature extraction algorithm is used to extract the image features of the candidate object within the detection bounding box, and the extracted image features are recorded as the aforementioned reference frame features in the dynamic feature set; in this way, the reference frame features are obtained.
[0134] In the present application embodiment, Figure 4 As shown, the target recognition system in the present application includes target detection, feature extraction, cascade matching, and target trajectory. After the video stream is acquired in real time by the image acquisition device, the video stream is input into the target recognition system, and the target recognition system performs target recognition on each frame image, so as to generate the trajectory of the target object. Taking the current frame image as an example, the target recognition system performs target detection on the current frame image, and obtains the detection boundary box information of the reference object by detection. Then, the image area corresponding to the detection boundary box information in the current frame image is extracted to obtain the image features of the reference object and the motion state features of the reference object. Then, the image features are matched with each historical feature in the dynamic feature set for similarity (for re-identification ReID), and the motion state features are matched with the predicted state features estimated by Kalman filtering for IOU matching, and then cascade matching is performed based on the similarity matching results and the IOU matching results, so as to determine whether the reference object is identified as the target object. When it is determined that the reference object is identified as the target object, the trajectory of the target object is generated.
[0135] In an embodiment of the present application, yolov8m can be used as a target detector to extract features in the image area corresponding to the detection bounding box information of the detected target object, including appearance features (i.e., the aforementioned image features, which can be used to perform ReID by recording the historical features of the target object by frame skipping) and motion state features (Kalman filtering can be used to perform state estimation / prediction), and then cascade matching is used to calculate the degree of matching between the target objects in the previous and next frames to achieve stable and robust target recognition and following.
[0136] Based on the above target recognition system, after performing target detection on the current frame image and obtaining the detection bounding box information of the reference object, refer to Figure 5 As shown, the smart device also performs the following operations including but not limited to:
[0137] Step 500: Extract motion state features of the detected reference object.
[0138] In an embodiment of the present application, Kalman filtering can also be used to perform real-time estimation of the position, speed and other states of the reference object to obtain predicted state features for the target object in the current frame image, so as to identify the target in the next frame image.
[0139] Step 510: Match the image features with the historical features of the target object in the dynamic feature set, and match the motion state features with the predicted state features, wherein the predicted state features are predicted based on the motion state features of the target object extracted from the historical frame image, and the historical frame image is at least one frame image adjacent to the current frame image.
[0140] In the embodiment of the present application, when executing step 510, the image feature is matched with each historical feature in the dynamic feature set for similarity to obtain a matching rate between the two, and the motion state feature is matched with the predicted state feature for IOU to obtain a matching rate between the two. Then, the matching rate between the image feature and each historical feature in the dynamic feature set is compared with a first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is compared with a second matching rate.
[0141] Step 520: If it is determined that the matching rate between the image feature and each historical feature is greater than the first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is greater than the second matching rate threshold, it is determined that the reference object is identified as the target object.
[0142] Through the above process, Kalman filtering and ReID are used to improve the accuracy of target recognition and tracking, wherein ReID is used to determine the possibility that the image area of the detection bounding box information in the current frame image is the target object.
[0143] The following is an explanation of feature extraction, feature comparison (matching) and dynamic feature set of the target recognition system.
[0144] 1. Feature extraction
[0145] Common image features include grayscale features, color features, texture features, Haar-like rectangle features, interest point features, superpixel features, etc. There are also many other features. This application does not limit the specific type of extracted features. In practical applications, any one or any combination of the above image features can be selected according to actual needs.
[0146] In the embodiment of the present application, the feature extraction network can reuse the feature extractor part in the yolov8 model. The extracted image features can be used for target matching and following between consecutive frames. The basic network of yolov8 feature extraction can be selected as a deep convolutional neural network, such as CSPDarknet53, which can extract image features through a series of convolutional layers and residual connections to achieve efficient and accurate feature extraction.
[0147] 2. Feature matching (cascade matching)
[0148] Feature matching is a key step in achieving object association, recognition, and following. Feature matching methods usually involve calculating feature similarities between different objects and determining whether they belong to the same object based on these similarities. These features are used to distinguish different objects, even if they are visually very similar.
[0149] In the embodiment of the present application, the feature comparison network can use a Siamese network to achieve feature matching. The Siamese network consists of two sub-networks that share weights, and each sub-network processes one input. During the training process, by optimizing a contrast loss function, the distance between similar input pairs in the feature space can be made as close as possible, while the distance between dissimilar input pairs can be as far as possible, so that each target can be quickly distinguished.
[0150] 3. Update of feature library
[0151] When the result of the feature comparison, that is, the aforementioned matching rate, is greater than the first matching rate threshold, the new feature is added to the dynamic feature set as a reference frame feature. The dynamic feature set in this application can not only record the initial first frame feature, which is recorded as the reference frame feature in this application, but also save multiple reference frame features in the context of ultra-long time series; and it can be achieved in the evolution of the time series that the closer the feature is to the current time, the higher its density, and conversely, the farther the feature is from the current time, the lower its density. In order to achieve effective preservation of long-term features, avoid exceeding the capacity of the feature library, and maintain lightweight operation of the model, this application adopts a dynamic feature management and storage strategy. This strategy not only optimizes the efficiency of feature storage, but also improves the overall performance of the model.
[0152] The dynamic feature set of the present application can also be presented in the form of a feature library, which has a high degree of flexibility and scalability, and its total capacity can be set to store historical features of m target objects. The upper limit of the record of each target object in the feature library is n historical features. Among them, the specific values of m and n can be flexibly adjusted according to the hardware configuration of the smart device itself and the specific scenario requirements during the implementation process.
[0153] In the embodiment of the present application, the feature storage method of all target objects in the dynamic feature set can be kept consistent and follow a specific dynamic storage strategy. Taking a single target object as an example, the first frame at the beginning of the recognition task for the target object can be permanently stored in the dynamic feature set as a reference frame feature until the recognition task of the target object is completed, and the storage space occupied by it will be released.
[0154] In the embodiment of the present application, the feature storage method of all target objects in the dynamic feature set may not be consistent, but may follow the specific dynamic storage strategy in the present application.
[0155] The specific process of maintaining a dynamic feature set in this application is described in detail below.
[0156] In the embodiment of the present application, when executing step 210, the image features are matched with the historical features of the target object in the dynamic feature set, and when it is determined that the reference object is identified as the target object, refer to Figure 6 As shown, the following process can also be performed:
[0157] Step 600: caching the image features as candidate image features.
[0158] Step 610: Determine whether the value of the frame counter reaches k.
[0159] Step 620: If yes, then select the target image feature from the cached candidate image features as the reference frame feature, delete the other cached candidate image features, and clear the frame counter.
[0160] In an embodiment of the present application, candidate image features of subsequent frame images in which the reference object in the current frame image is identified as the target object are first cached, and then, after determining that the value of the current frame number counter has reached k, the target image features are selected from the cached candidate image features, and the target image features are used as reference frame features that need to be recorded in the dynamic feature set.
[0161] In an embodiment of the present application, the target image feature can be the candidate image feature among the k subsequent frame images, which has the highest matching rate with the historical features recorded in the dynamic feature library and is greater than the first matching rate threshold; in this way, the candidate image feature of the local optimal frame (also called the local optimal feature) can be recorded in the dynamic feature set, reducing the number of historical features recorded in the dynamic feature set and ensuring the quality of the recorded historical features.
[0162] For example, taking the frame rate of the real-time video stream captured by the smart device as 30FPS, k=30 can be set in this application. However, it should be noted that in actual applications, the value of k can also be specifically set according to the hardware configuration and scenario requirements of the selected smart device, and this application does not make any specific limitations.
[0163] Through the above process, the movement of the target object can be followed, the reference frame features in the dynamic feature set can be recorded in real time, and the real-time information of the target object can be perceived in time.
[0164] In the embodiment of the present application, as described above, the dynamic feature set in the present application is provided with an upper limit value for the number of features of each historical feature, assuming that the upper limit value is n. When the number of features in the dynamic feature set does not reach n, only new reference frame features are added and the old reference frame features are not deleted. When the number of features in the dynamic feature set reaches n, when the new reference frame feature, i.e., the local optimal feature, is recorded in the dynamic feature set, a reference frame feature is selectively deleted from the dynamic feature set to ensure that the capacity of the dynamic feature set does not exceed the preset limit at all times. This dynamic management strategy can ensure the efficient use of the dynamic feature set, while also providing stable and reliable feature support for the continuous identification and following of the target object, and can also ensure sufficient running memory support to ensure the running speed of the smart device.
[0165] Given that there is a maximum storage limit for the number of features of each historical feature, that is, there is an upper limit on the number of features of each historical feature of the target object, therefore, Figure 7 As shown, the smart device can also execute processes including but not limited to the following:
[0166] Step 700: When it is necessary to add a new reference frame feature to the dynamic feature set, determine the feature quantity of each historical feature in the dynamic feature set.
[0167] In an embodiment of the present application, when recording the reference frame features in the dynamic feature set, a counter can be started at the same time to monitor in real time the number of historical features recorded in the dynamic feature set. At this time, when executing step 700, when it is necessary to add a new reference frame feature to the dynamic feature set, the value of the counter can be read.
[0168] Step 710: If the number of features is equal to the upper limit value, determine the target reference frame features to be deleted from the multiple reference frame features in the dynamic feature set.
[0169] In an embodiment of the present application, multiple reference frame features in the dynamic feature set are arranged in the form of a feature queue according to the acquisition time of subsequent frame images; when executing step 710, based on the long-term feature retention principle (corresponding to the aforementioned dynamic management strategy), the target reference frame features to be deleted are determined from the multiple reference frame features in the dynamic feature set, wherein the long-term feature retention principle is used to make the dynamic feature library include frame features of different time periods from the moment corresponding to the reference frame image to the current moment.
[0170] In the embodiment of the present application, when determining the target reference frame features to be deleted from multiple reference frame features in the dynamic feature set based on the long-term feature retention principle, the following two situations are specifically included but not limited to:
[0171] In case 1, if the position of the reference frame feature deleted last time in the feature queue is not the end of the queue, the reference frame feature at the next position adjacent to the position in the feature queue is determined as the target reference frame feature.
[0172] In case 2, if the reference frame feature deleted last time is at the end of the feature queue, the starting position of the next round is determined based on the starting position of the current round, and the reference frame feature at the starting position of the next round in the feature queue is determined as the target reference frame feature.
[0173] As a specific embodiment, when deleting the reference frame features in the dynamic feature set, the present application uses a double recursive method embedded in a loop structure to determine the target reference frame features. Specifically, the core of this method is a double recursive structure, which is nested inside a loop structure. Recursion allows the program to call itself to handle more subdivided problems. In the present application, the recursive structure is based on pointer indexes. Pointer index is a data structure that allows the program to quickly access specific data stored in memory through an index. Among them, each pointer points to a reference frame feature, that is, a target image feature selected from the candidate image features of k subsequent frame images, that is, a local optimal feature.
[0174] In the dynamic feature set, the pointer index of the base frame feature is fixed to 0, and the pointer indexes of multiple reference frame features are sorted from 1 to the upper limit n of each historical feature in the dynamic feature set. When determining the target reference frame feature to be deleted, proceed in the order of natural numbers; specifically, in one cycle, first delete the reference frame feature pointed to by the pointer with index 1, then the reference frame feature pointed to by the pointer with index 2, and so on, until the reference frame feature pointed to by the pointer with index n; and repeat in multiple rounds of iterations during this cycle.
[0175] In the specific implementation, in the first round of iterations, the reference frame features pointed to by 1 to n will be deleted in turn. Each time a reference frame feature is deleted, the subsequent reference frame features will automatically move forward to fill the index of the deleted reference frame feature; and the new reference frame features that need to be added will be filled to the end of the queue. In subsequent rounds of iterations, the starting index will gradually increase, while the ending index remains unchanged. Therefore, in the second round of iterations, the reference frame features pointed to by 2 to n will be deleted in turn. Accordingly, each time a reference frame feature is deleted, the subsequent reference frame features will automatically move forward to fill the index of the deleted reference frame feature; and the new reference frame features that need to be added will be filled to the end of the queue; in the third round of iterations, the reference frame features pointed to by 3 to n will be deleted in turn; and this continues until the last round of iterations, when only the reference frame feature pointed to by index n is deleted. In short, the recursive structure in the present application is a mathematical structure in which the pointer index deletes the reference frame features pointed to by the corresponding pointer in natural number order, that is, from 1 to n, then from 2 to n, 3 to n... until n-1 to n, n.
[0176] In other words, the above pattern forms a recursive mathematical structure, which can be regarded as a decreasing sequence or subset sequence. Each iteration produces a new subset, which is a true subset of the subset of the previous iteration (except for the first iteration, which processes the full set). This structure allows the program to handle data deletion tasks in a highly organized and predictable way. Based on the above unique structural design, the dynamic feature set of the present application is suitable for storing features with very long intervals in the time series, and at the same time, the feature density close to the current moment is greater.
[0177] After completing a double recursive round, the structure of the round is continuously looped. As shown in the following table, taking n=6 as an example, the specific iteration process of each round in a loop is illustrated. The "bold underline" is the target reference frame feature to be deleted in the next second, that is, the local optimal feature. Among them, the index of the reference frame feature is fixed to 0, the acquisition time is recorded as the 0th second, and the indexes of multiple reference frame features are sorted in sequence from 1 until the last round of iteration in this loop is completed at the 39th second:
[0178] Table 1 List of iterative processes in each round in a cycle
[0179]
[0180] Step 720: Delete the target reference frame features from the dynamic feature set.
[0181] In this embodiment, after the target reference frame image to be deleted is determined, step 720 is executed to delete the target reference frame image from the dynamic feature set.
[0182] In the embodiment of the present application, after executing step 720, each reference frame feature after the target reference frame feature in the feature queue is moved forward in sequence.
[0183] Step 730: Record the new reference frame features in the dynamic feature set.
[0184] In the embodiment of the present application, when executing step 730, the new reference frame feature is specifically added to the end of the feature queue.
[0185] Still referring to the above table, taking the upper limit of the number of features for the target object in the dynamic feature set as 6 as an example, at the 20th second, the historical features recorded in the dynamic feature set include the benchmark frame feature, the reference frame feature of the 2nd second, the reference frame feature of the 6th second, the reference frame feature of the 12th second, the reference frame feature of the 17th second, and the reference frame feature of the 20th second. At this time, the dynamic feature set stores frame features with very long intervals in different time periods in the time series, and the density of frame features close to the current moment, i.e., the 20th second, is greater.
[0186] Step 220: Move toward the target object based on the real-time position and the acquired current device position.
[0187] In an embodiment of the present application, when executing step 220, the following process can be specifically executed: based on the real-time position and the acquired current device position, a map of the scene where the current device is located is used for path planning to generate a moving path from the current device position to the real-time position; based on the distance of the moving path, a moving speed is determined, and based on the moving speed, movement is performed according to the moving path, thereby achieving tracking of the target object.
[0188] After the above description of the target recognition method in the present application, the general process of the autonomous following function of the smart device in the present application is briefly introduced using a specific embodiment.
[0189] For example, let's take the example of a shopping guide robot in a store as an example. When a user enters the store, the shopping guide robot can actively interact with the user by voice, or the user can walk in front of the shopping guide robot and interact with the shopping guide robot by voice. In this process, refer to Figure 8 As shown, the autonomous following process of the shopping guide robot includes but is not limited to the following steps:
[0190] Step 800: Determine the target object.
[0191] The shopping guide robot interacts with the user through voice, and can identify the user and / or companions as target objects.
[0192] Step 810: Follow the target object.
[0193] In the embodiment of the present application, the shopping guide robot can follow the target object by using deep learning and other methods. Specifically, an image acquisition device (such as a camera, etc.) is used to acquire images within its own field of view in the environment; target detection is performed on the image, and features of the detected object are extracted; the state of the object is estimated; re-identification is performed, and the features are matched with each historical feature in the dynamic feature set. When the matching rate is greater than the first matching rate threshold, it indicates that the object in the image is the target object, and the features in the dynamic feature set are updated. When the matching rate is less than or equal to the first matching rate threshold, it indicates that the object in the image is not the target object, and the orientation of the image acquisition device is adjusted, the image is re-acquired, and the aforementioned process is repeated to find the target object and follow the target object.
[0194] In the embodiment of the present application, cascade matching can also be performed based on the motion state characteristics of the object. The relevant content is detailed in the above content and will not be repeated here.
[0195] Step 820: Update the position of the target object in the environment.
[0196] In the embodiment of the present application, when it is determined that the object in the captured image is the target object, step 820 is executed to update the position of the target object in the environment.
[0197] Step 830: Perform path planning.
[0198] In the embodiment of the present application, the shopping guide robot can obtain the current device position of the device through the self-positioning module. When executing step 830, based on the updated position of the target object and the current device position of the smart device in the environment, and the map of the scene (environment) where the smart device is located, path planning is performed to enable the shopping guide robot to autonomously move to the vicinity of the target object after obstacle avoidance and other operations.
[0199] Step 840: Move toward the target object based on the path planning result.
[0200] In the embodiment of the present application, the shopping guide robot moves based on the path planning results until it moves near the target object, thereby achieving stable following of the target object.
[0201] Step 850: Update the location of the smart device in the environment.
[0202] In the step of following the target object in the above autonomous following process, a dynamic feature set is maintained to record the historical features of the target object. The specific method is detailed in the above content and will not be repeated here.
[0203] It should be noted that the aforementioned embodiment only takes the shopping guide scenario of the shopping guide robot as an example to introduce the target recognition method in this application in detail, but those skilled in the art can foresee that the dynamic feature set and feature update (maintenance) method in this application can be applied to target recognition and target tracking in any scenario. Therefore, this application does not limit the application scenario.
[0204] The effectiveness of the dynamic feature set in this application is tested below. Specifically, on the VOT2018 long video sequence dataset, the test method used is the mean intersection over union (mIOU), which is used to measure the degree of overlap between the model prediction box and the true box. The result is obtained by summing the IOUs of each player in each frame and taking the average value.
[0205]
[0206] Where N is the total number of videos, is the nth video image frame number; is the j-th frame image of the n-th video.
[0207] In this application, the detection rate of the target is tested when the intersection-over-union ratio (IOU)>0.5, which reflects the accuracy of the algorithm and determines whether the target is recognized. In the test, the same hardware equipment and the same system environment are used. The accuracy of the yoloV8+strongsort released by Ultralytics is 58.71%, and the accuracy of the solution in this application is 92.14%. The following is the data recorded during the test:
[0208] Table 2 List of data recorded during the test process
[0209]
[0210] Based on the test results, it can be seen that the dynamic feature set and long-time feature retention principle in this application have advantages in retaining features under long time series, and the accuracy of target recognition is significantly improved. The effect is optimistic and the robustness is strong.
[0211] Based on the same inventive concept, refer to Fig. 9 As shown, an embodiment of the present application provides a target recognition device, comprising:
[0212] The feature extraction module 910 is used to perform target detection on the collected current frame image and extract the image features of the detected reference object;
[0213] The recognition module 920 is used to match the image feature with each historical feature of the target object in the dynamic feature set, and when the reference object is recognized as the target object, update the real-time position of the target object;
[0214] A moving module 930, configured to move toward the target object based on the real-time position and the acquired current device position;
[0215] Among them, the historical features include a baseline frame feature and multiple reference frame features. The baseline frame feature is obtained by extracting features from the captured baseline frame image containing the target object. Each reference frame feature is a target image feature selected from candidate image features of each k subsequent frame images captured after the baseline frame image. Any candidate image feature is an image feature obtained by extracting features from the subsequent frame image and matches the historical features recorded in the dynamic feature set.
[0216] In a possible implementation, the identification module 920 is further configured to:
[0217] When the reference object is identified as the target object, caching the image feature as the candidate image feature;
[0218] Determine whether the value of the frame counter reaches k;
[0219] If so, the target image feature is selected from the cached candidate image features as the reference frame feature, and other cached candidate image features are deleted, and the frame number counter is cleared.
[0220] In a possible implementation, the dynamic feature set is provided with an upper limit value of the feature quantity of each historical feature, and the identification module 920 is further configured to:
[0221] When it is necessary to add a new reference frame feature to the dynamic feature set, determining the feature quantity of each historical feature in the dynamic feature set;
[0222] If the number of features is equal to the upper limit, determining a target reference frame feature to be deleted from a plurality of reference frame features in the dynamic feature set;
[0223] Deleting the target reference frame feature from the dynamic feature set;
[0224] The new reference frame features are recorded in the dynamic feature set.
[0225] In a possible implementation, the multiple reference frame features in the dynamic feature set are arranged in a feature queue according to the acquisition time of subsequent frame images; the recognition module 920 is specifically used to:
[0226] Based on the long-term feature retention principle, determining the target reference frame feature to be deleted from the multiple reference frame features in the dynamic feature set, wherein the long-term feature retention principle is used to make the dynamic feature library include frame features of different time periods from the moment corresponding to the reference frame image to the current moment;
[0227] The identification module 920 is also used for:
[0228] Move each reference frame feature after the target reference frame feature in the feature queue forward in sequence;
[0229] The identification module 920 is specifically used for:
[0230] The new reference frame feature is added to the end of the feature queue.
[0231] In a possible implementation, the identification module 920 is specifically configured to:
[0232] If the position of the reference frame feature deleted last time in the feature queue is not the end of the queue, the reference frame feature at the next position adjacent to the position in the feature queue is determined as the target reference frame feature;
[0233] If the reference frame feature deleted last time is at the end of the feature queue, the starting position of the next round is determined based on the starting position of the current round, and the reference frame feature of the starting position of the next round in the feature queue is determined as the target reference frame feature.
[0234] In a possible implementation, the identification module 920 is further configured to:
[0235] Generating a recognition task for the target object according to the voice interaction with the user;
[0236] Based on the recognition task, collecting the reference frame image within the field of view;
[0237] Performing target detection on the reference frame image, and determining the detected candidate object as the target object;
[0238] A reference frame feature of the target object in the reference frame image is extracted, and the reference frame feature is recorded in the dynamic feature set.
[0239] In a possible implementation, the moving module 930 is specifically used for:
[0240] Based on the real-time position and the acquired current device position, a path planning is performed using a map of the scene where the current device is located to generate a moving path from the current device position to the real-time position;
[0241] A moving speed is determined based on the distance of the moving path, and movement is performed according to the moving path based on the moving speed.
[0242] In a possible implementation, the identification module 920 is further configured to:
[0243] Extracting the detected motion state features of the reference object;
[0244] Matching the image feature with each historical feature of the target object in the dynamic feature set, and matching the motion state feature with a predicted state feature, wherein the predicted state feature is predicted based on the motion state feature of the target object extracted from a historical frame image, and the historical frame image is at least one frame image adjacent to the current frame image;
[0245] If it is determined that the matching rate between the image feature and the historical features is greater than a first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is greater than a second matching rate threshold, it is determined that the reference object is identified as the target object.
[0246] Based on the same inventive concept, see Fig.10 As shown, an embodiment of the present application provides a smart device, including:
[0247] Memory 101, used for storing computer programs or instructions;
[0248] The processor 102 is used to execute the computer program or instructions in the memory 101 so that any one of the methods in the above embodiments is executed.
[0249] The processor 102 may include one or more central processing units (CPUs) or digital processing units, etc., for executing computer programs or instructions in the memory 101, so that any one of the methods in the above embodiments is executed;
[0250] It should be noted that the specific connection medium between the memory 101 and the processor 102 is not limited in the embodiment of the present application. Fig.10In the embodiment, the memory 101 and the processor 102 are connected via a bus 103, and the connection between other components is only for illustrative purposes and is not intended to be limiting. The bus 103 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
Claims
1. A target recognition method, characterized in that: include: Performing target detection on the collected current frame image and extracting image features of the detected reference object; Matching the image features with historical features of a target object in a dynamic feature set, and updating the real-time position of the target object when the reference object is identified as the target object; Moving toward the target object based on the real-time location and the acquired current device location; Among them, the historical features include a base frame feature and multiple reference frame features, the base frame feature is obtained by feature extraction of the captured base frame image containing the target object, each reference frame feature is a target image feature selected from the candidate image features of each k subsequent frame images captured after the base frame image, and any candidate image feature is an image feature obtained by feature extraction of the subsequent frame image and matches the historical features recorded in the dynamic feature set; and the dynamic feature set is provided with an upper limit value for each historical feature, when a new reference frame feature is added to the dynamic feature set, if the dynamic feature set exceeds the upper limit value, the target reference frame feature to be deleted is determined from the multiple reference frame features, the multiple reference frame features are arranged in a feature queue according to the capture time of the subsequent frame images, and the new reference frame feature is recorded in the dynamic feature set as the feature at the end of the feature queue.
2. The method according to claim 1, wherein The method further comprises: When the reference object is identified as the target object, caching the image feature as the candidate image feature; Determine whether the value of the frame counter reaches k; If so, the target image feature is selected from the cached candidate image features as the new reference frame feature, and the other cached candidate image features are deleted, and the frame counter is cleared.
3. The method according to claim 2, wherein The selecting the target image feature from the cached candidate image features as the new reference frame feature includes: Selecting the maximum value from the matching rates obtained by matching each cached candidate image feature with each recorded historical feature in the dynamic feature set; Determine the candidate image feature corresponding to the maximum value as the target image feature; The target image features are used as the new reference frame features.
4. The method according to claim 1, wherein The target reference frame features to be deleted are determined by: Based on the principle of long-term feature retention, the target reference frame feature to be deleted is determined from the multiple reference frame features, wherein the long-term feature retention principle is used to make the dynamic feature set include frame features of different time periods from the moment corresponding to the reference frame image to the current moment.
5. The method according to claim 4, wherein The determining, based on the long temporal feature retention principle, the target reference frame feature to be deleted from the multiple reference frame features includes: If the position of the reference frame feature deleted last time in the feature queue is not the end of the queue, the reference frame feature at the next position adjacent to the position in the feature queue is determined as the target reference frame feature; If the reference frame feature deleted last time is at the end of the feature queue, the starting position of the next round is determined based on the starting position of the current round, and the reference frame feature of the starting position of the next round in the feature queue is determined as the target reference frame feature.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: generating a recognition task for the target object based on the voice interaction with the user; Based on the recognition task, collecting the reference frame image within the field of view; Performing target detection on the reference frame image, and determining the detected candidate object as the target object; Extracting reference frame features of the target object in the reference frame image, and recording the reference frame features in the dynamic feature set.
7. The method according to any one of claims 1 to 5, characterized in that: The moving toward the target object based on the real-time position and the acquired current device position includes: Based on the real-time location and the acquired current device location, a path is planned using a map of the scene where the current device is located to generate a movement path from the current device location to the real-time location; A moving speed is determined based on the distance of the moving path, and movement is performed according to the moving path based on the moving speed.
8. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: extracting the detected motion state features of the reference object; Matching the image feature with each historical feature of the target object in the dynamic feature set, and matching the motion state feature with a predicted state feature, wherein the predicted state feature is predicted based on the motion state feature of the target object extracted from a historical frame image, where the historical frame image is at least one frame image adjacent to the current frame image; If it is determined that the matching rate between the image feature and the historical features is greater than a first matching rate threshold, and the matching rate between the motion state feature and the predicted state feature is greater than a second matching rate threshold, it is determined that the reference object is identified as the target object.
9. A target recognition device, characterized in that: include: A feature extraction module is used to perform target detection on the collected current frame image and extract image features of the detected reference object; an identification module, configured to match the image features with historical features of a target object in a dynamic feature set, and update a real-time position of the target object when the reference object is identified as the target object; A movement module, configured to move toward the target object based on the real-time location and the acquired current device location; Among them, the historical features include a base frame feature and multiple reference frame features, the base frame feature is obtained by feature extraction of the captured base frame image containing the target object, each reference frame feature is a target image feature selected from the candidate image features of each k subsequent frame images captured after the base frame image, and any candidate image feature is an image feature obtained by feature extraction of the subsequent frame image and matches the historical features recorded in the dynamic feature set; and the dynamic feature set is provided with an upper limit value for each historical feature, when a new reference frame feature is added to the dynamic feature set, if the dynamic feature set exceeds the upper limit value, the target reference frame feature to be deleted is determined from the multiple reference frame features, the multiple reference frame features are arranged in a feature queue according to the capture time of the subsequent frame images, and the new reference frame feature is recorded in the dynamic feature set as the feature at the end of the feature queue.
10. A smart device, characterized in that: include: Memory, used to store computer programs or instructions; A processor is configured to execute the computer program or instructions in the memory so that the method according to any one of claims 1 to 8 is performed.
Citation Information
Patent Citations
Target detecting method and system
EP2858008A2
Identity recognition image processing method and apparatus, computer device, and storage medium
WO2024093665A1
