A natural language-based target locking method, device, equipment and medium
By integrating natural language instructions and image frame data, selecting appropriate detector configurations, and using semantic models to progressively narrow candidate boxes, the problem of adapting detector semantic understanding capabilities was solved, thus improving the accuracy of target locking.
Patent Information
- Application Number
- CN202611716846.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-11-02
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, the way queries are made to the detector cannot be adapted to the detector's semantic understanding capabilities. The attribute semantics in natural language instructions are discarded, making it difficult to lock a unique target among multiple similar candidates, resulting in low accuracy in target locking.
By receiving natural language instructions, image frames are acquired synchronously, input data is integrated and locked, a suitable front-end configuration for the detector is selected, instructions are converted into query representations, and semantic models are used to determine the target identity information. Candidate boxes are narrowed step by step by combining disambiguation cues, appearance features are extracted and locked as anchor features, and the locking results are output.
It realizes the conversion of natural language instructions according to the semantic understanding ability level of the detector, which improves the accuracy of target locking and enables natural language instructions with attributes or references to lock a unique target among multiple similar candidates.
Smart Images

Figure CN123178606A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a target locking method, apparatus, device, and medium based on natural language. Background Technology
[0002] Mobile following robots and intelligent tracking vehicles typically have cameras and other sensors mounted on their bodies. Embedded computing units on board process the captured images, identify the user-specified target within the frame, and continuously track it. Based on this, the chassis is controlled to perform following and obstacle avoidance. With the development of semantic understanding technologies such as large-scale visual language models, users can directly specify the target to be followed or photographed using natural language, such as saying, "Take a picture of the person in the green shirt." In these applications, the target described by the natural language instruction must first be identified as a clear bounding box in the image—that is, target locking is achieved. Subsequent tracking and following are based on this locked bounding box.
[0003] In existing technologies, target locking mainly relies on detectors to generate bounding boxes in images, and there are three common implementation methods. The first type is local closed-set detection schemes, which run lightweight detection models like YOLO (You Only Look Once) on the device. These models can only recognize fixed categories learned during training, and when queried, they can only provide a category label, such as "person." Their advantages are high speed and low power consumption. The second type is open-vocabulary detection schemes, which run detection models like YOLO-World and GroundingDINO that can use text as a query condition. When queried, they can provide a noun phrase, such as "person in green clothes," or directly hand the entire image to a large visual language model for processing. This type of scheme can handle targets described arbitrarily by the user, but the inference time per frame ranges from hundreds of milliseconds to several seconds. The third type is single-target template tracking schemes. This scheme does not contain a detection model. The template tracker is initialized by the bounding box given in the first frame, and then template regression is performed frame by frame to output the current bounding box and quality score for continuous object tracking.
[0004] However, different detectors vary greatly in their ability to understand query semantics. Existing solutions typically use upper-level logic that is fixed for a specific detector, making it impossible to adjust the query content based on the configured detector's understanding capabilities. Attributes such as color, location, and reference relationships that the detector cannot parse are simply discarded during the query process. For example, regarding "a person wearing green clothes," if a closed-set detection model is configured, only "person" can be used as the query. The detector will provide identical bounding boxes for every person in the image, and the "green" attribute will be lost during the query. Therefore, there is no basis for selecting the user's intended person from multiple bounding boxes. Consequently, when multiple similar candidates exist in the image, existing solutions struggle to converge attributed or referential natural language commands to a single target, resulting in low target locking accuracy. Summary of the Invention
[0005] This invention provides a natural language-based target locking method, apparatus, device, and medium, aiming to solve the technical problem that the existing method of proposing queries to the detector cannot adapt to the detector's semantic understanding capabilities, the attribute semantics in natural language instructions are discarded, and it is difficult to lock a unique target among multiple similar candidates.
[0006] In a first aspect, embodiments of the present invention provide a natural language-based target locking method, comprising: Receive target description data issued by the upper semantic module according to the natural language instructions describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; Based on the task mode identifier and target category text in the locked input data, select one set from multiple preset front-end configurations and instantiate it to obtain a configuration instance; According to the semantic understanding ability level of the detector selected in the configuration instance, the natural language instruction is converted into a query representation, and the corresponding uncarried semantic components are converted into disambiguation clues; The query representation drives the selected detector to generate a set of candidate boxes in the image frame, and the preset semantic model determines the target identity information according to the natural language instructions. The target identity information is matched with the candidate box set. If the matching result is not unique, the candidate box is narrowed down step by step by combining the disambiguation clues, and the matched candidate box is taken as the lock box. Extract the appearance features of the locked frame and lock them as anchor point features. Output the locked frame, the anchor point features, and the configuration identifier of the configuration instance to obtain the locking result.
[0007] Secondly, embodiments of the present invention provide a target locking device based on natural language, comprising: The data acquisition module is used to receive target description data issued by the upper semantic module according to the natural language instructions describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; The configuration assignment module is used to select and instantiate a set of pre-set front-end configurations based on the task mode identifier and target category text in the locked input data to obtain a configuration instance; The intent adaptation module is used to convert the natural language instruction into a query representation according to the semantic understanding capability level of the selected detector in the configuration instance, and to convert the corresponding uncarried semantic components into disambiguation clues. The candidate generation module is used to drive the selected detector to generate a set of candidate boxes in the image frame using the query representation, and to determine the target identity information by a preset semantic model according to the natural language instructions. The locking disambiguation module is used to match the target identity information with the candidate box set. When the matching result is not unique, it combines the disambiguation clues to narrow down the selection step by step, and takes the matched candidate box as the locking box. The lock output module is used to extract the appearance features of the lock box and lock them as anchor point features, and output the lock box, the anchor point features and the configuration identifier of the configuration instance to obtain the lock result.
[0008] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the natural language-based target locking method of the first aspect.
[0009] Fourthly, embodiments of the present invention provide a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the natural language-based target locking method of the first aspect.
[0010] This invention provides a natural language-based target locking method, comprising: receiving target description data issued by a higher-level semantic module according to a natural language instruction describing the target to be locked; synchronously acquiring image frames captured by a camera; integrating them to obtain locking input data; selecting and instantiating a set of preset front-end configurations according to the task mode identifier and target category text in the locking input data to obtain a configuration instance; converting the natural language instruction into a query representation according to the semantic understanding ability level of the detector selected in the configuration instance, and converting the corresponding uncarried semantic components into disambiguation clues; driving the selected detector to generate a set of candidate boxes in the image frames with the query representation, and determining the target identity information by a preset semantic model according to the natural language instruction; matching the target identity information with the set of candidate boxes, and narrowing the matching results step by step by combining the disambiguation clues when the matching results are not unique, and taking the matched candidate boxes as the locking boxes; extracting appearance features from the locking boxes and locking them as anchor features; outputting the locking boxes, the anchor features, and the configuration identifier of the configuration instance to obtain the locking result. This invention transforms natural language instructions according to the semantic understanding level of the selected detector, ensuring that each detector receives a query representation that matches its capabilities and can be parsed. The upper-level logic is no longer fixed for any particular detector; detectors can be replaced as needed for deployment. Semantic components such as color and location not carried by the query representation are not discarded but converted into disambiguation clues, participating in progressive narrowing when matching results are not unique. The candidate box set is generated by the selected detector, and the target identity information is determined by the semantic model according to the natural language instructions. After matching, the matched candidate box is used as the locking box. The locking box corresponds to the target indicated by the user while retaining the precise boundary given by the detector. The locking box, anchor features, and configuration identifiers are output together, providing a unified format for subsequent tracking. Therefore, this invention solves the technical problems in existing technologies where the query method cannot adapt to the semantic understanding capabilities of the detector, and attribute semantics are discarded, making it difficult to lock a unique target. Natural language instructions with attributes and referential meanings can converge to a unique target even when multiple similar candidates exist in the image, improving the accuracy of target locking.
[0011] This invention also provides a natural language-based target locking device, computer equipment, and storage medium, which have the same beneficial effects as described above. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1A flowchart illustrating a natural language-based target locking method provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a target locking device based on natural language, provided as an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0016] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0017] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0018] Please see below. Figure 1 , Figure 1 The flowchart of a natural language-based target locking method provided in an embodiment of the present invention specifically includes steps S101 to S106.
[0019] S101: Receive target description data sent by the upper semantic module according to the natural language instruction describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; S102. Based on the task mode identifier and target category text in the locked input data, select one set from the multiple preset front-end configurations and instantiate it to obtain a configuration instance; S103. According to the semantic understanding ability level of the detector selected in the configuration instance, the natural language instruction is converted into a query representation, and the corresponding uncarried semantic components are converted into disambiguation clues; S104. The selected detector is driven by the query representation to generate a set of candidate boxes in the image frame, and the target identity information is determined by the preset semantic model according to the natural language instructions. S105. Match the target identity information with the candidate box set. If the matching result is not unique, combine the disambiguation clues to narrow down the candidate boxes step by step and take the matched candidate boxes as the locked boxes. S106. Extract the appearance features of the locking frame and lock them as anchor point features. Output the locking frame, the anchor point features and the configuration identifier of the configuration instance to obtain the locking result.
[0020] In step S101, the semantic information and image required for this locking are received and integrated together. The method of this embodiment can be applied, for example, to mobile following robots or intelligent tracking vehicles, where sensors such as cameras are mounted on the vehicle body. A camera is an image sensor mounted on the vehicle body to capture images of the surrounding scene, for example, mounted at the front of the vehicle body facing the direction of travel, continuously shooting at a certain frame rate to form a continuous video stream; an image frame is a single image captured by the camera at a certain moment. The onboard computing unit is an embedded system-on-chip (SoC), which executes the steps of this embodiment. Due to the dual constraints of battery capacity and heat dissipation conditions, the available power consumption and computing power budget of the embedded computing unit are relatively limited. For example, a user can say to the mobile following robot, "Help me take a picture of the person in the green clothes." The device needs to first lock onto the target in the frame, and then the subsequent visual tracking algorithm stably follows the target in the continuous video stream, thereby controlling the chassis to complete the following and obstacle avoidance.
[0021] The upper-level semantic module refers to the semantic module located upstream in the target locking process, responsible for understanding the user's natural language. For example, a Vision-Language Model (VLM) can be used; a VLM is a large model capable of simultaneously understanding image content and natural language. Natural language instructions refer to the user's instructions expressed in everyday language to describe the target to be locked. These can be text spoken by the user and converted through speech recognition, or text entered by the user on the terminal, such as "take a picture of the person in the green clothes," "the deliveryman's electric scooter," or "the cat on the left." The target to be locked is the target the user refers to in the natural language instruction. Target locking refers to the process of determining the target to be locked in the image frame based on the natural language instruction. Generally speaking, the detector first outlines several rectangles in the image frame that could be the target to be locked, i.e., candidate boxes. Then, the one that the user actually pointed to is determined as the locked box, which is the rectangle that ultimately encloses the target to be locked.
[0022] After receiving the natural language instructions, the higher-level semantic module parses the described target into structured data and sends it downwards; this structured data is the target description data. Sending the target description data according to the natural language instructions means that the content of the target description data is determined by the natural language instructions. The target description data includes, for example, target category text indicating the category to which the target belongs, and task mode identifiers indicating whether the current locking focuses on response speed or locking accuracy. The user's flexible and diverse natural language expressions are thus converted into data that can be directly processed in subsequent steps.
[0023] Synchronous acquisition refers to acquiring the image frames captured by the camera at the same time as receiving the target description data, ensuring that the target description data and the image frames used for detection correspond in time, preventing misalignment between description and image caused by target movement after user commands are issued. Locking input data refers to the input data that integrates the target description data and the synchronously acquired image frames, used for this locking task. For example... Figure 1 As shown, step S101 is located at the beginning of the entire process, and the lock input data obtained therein provides the processing object for subsequent steps S102 to S106.
[0024] It should be noted that target locking is a sparse event throughout the entire process, occurring only once when the user issues a new natural language command. After locking is complete, the tracking algorithm follows the target frame by frame. Therefore, steps S101 to S106 are executed only once during locking and do not enter the frame-by-frame tracking process. The embedded computing unit, while receiving data from the upper-level semantic module and sensor data such as that from the camera, is also responsible for outputting the locking result obtained in step S106 for subsequent processing such as target tracking and follow-up control.
[0025] In one embodiment, step S101 includes: Receive the target category text and task mode identifier issued by the higher-level semantic module according to the natural language instruction, and obtain the basic fields; The normalized anchor point box, color hints, and sound source azimuth angle of the first frame sent together are incorporated into the basic field to obtain the target description data; Synchronize with the received target description data, acquire image frames captured by the color camera, and obtain the current image frame; Acquire the 3D point cloud output by the depth sensor, which is synchronized with the current image frame, to obtain the depth point cloud; The target description data, the current image frame, and the depth point cloud are combined to obtain the locked input data.
[0026] In this embodiment, after parsing the natural language instruction, the upper-level semantic module first sends out the target category text and the task mode identifier. The target category text refers to the text extracted by the upper-level semantic module from the natural language instruction, indicating the category to which the target to be locked belongs. For example, for "Help me take a picture of the person in the green clothes," the target category text could be "person," and for "the cat on the left," the target category text could be "cat." The task mode identifier indicates whether the user prioritizes speed or accuracy in this task. Prioritizing speed means wanting to complete the locking as quickly as possible, while prioritizing accuracy means valuing the accuracy of the locking. Receiving these two items yields the basic fields, which are carried with every locking task. Subsequent selection of the front-end configuration is mainly based on these basic fields.
[0027] Furthermore, the first frame normalized anchor box, color cues, and sound source azimuth angle, which are issued along with the basic fields, are incorporated into the basic fields to obtain target description data. The first frame refers to the image frame at the start of this locking task, which is also the first frame for subsequent tracking. The first frame normalized anchor box refers to the position box given by the upper semantic module for the target to be locked in the first frame. Its coordinates are normalized to between 0 and 1 according to the width and height of the image frame. For example, the normalized coordinates (x1, y1, x2, y2) of the upper left and lower right corners are represented as (0.39, 0.21, 0.57, 0.98). The advantage of using normalized coordinates is that they are independent of image resolution. Even if the image processed by the upper semantic module has a different resolution than the image processed locally, they can be directly converted: multiply the normalized horizontal coordinate by the width of the image frame and the normalized vertical coordinate by the height of the image frame to obtain the corresponding pixel coordinates. For example, in an image frame with a width of 1280 pixels and a height of 720 pixels, the pixel box corresponding to the above anchor point is approximately (499, 151, 730, 706).
[0028] The normalized anchor box for the first frame is provided by the higher-level semantic module based on the natural language instruction. It inherently indicates which target it is, essentially a box with a relatively coarse location but a clear identity. When providing the normalized anchor box for the first frame, the higher-level semantic module can also directly convert the orientation and order information in the natural language instruction to the position of the anchor box. For example, for "Help me take a picture of the second person in green from the left," the higher-level semantic module can directly assign the anchor box to the second person in green from the left in the frame.
[0029] The normalized anchor boxes in the first frame play a role in several ways in subsequent steps. First, when filtering from multiple candidate boxes, the spatial proximity between each candidate box and the anchor box can be used as a criterion. Second, since the anchor boxes themselves indicate the target identity, the normalized anchor boxes in the first frame can be directly used as target identity information and matched with the candidate box set when determining the target identity information. Third, when candidate boxes are generated by detectors that can only identify fixed categories, the main target can be selected using a three-level selection method with anchor boxes: First, select the candidate box with the highest intersection-over-union (IoU) ratio with the anchor box that is not lower than the locking threshold. The IoU ratio is the ratio of the intersection area to the union area of two boxes, with a value between 0 and 1. The locking threshold can be, for example, 0.3. Second, if the IoU ratio of all candidate boxes with the anchor box is lower than the locking threshold, select the box whose center is closest to the center of the anchor box. Third, if there are no anchor boxes in the target description data, select the one with the largest area. Taking "Take a picture of the person in the green clothes for me" as an example, the intersection-over-union ratio (IoU) between the pixel box corresponding to the anchor point and the candidate box that frames the person in the green clothes is approximately 0.72, which is higher than the locking threshold. Therefore, the candidate box can be selected at the first level. Fourth, when the category of the target to be locked is not within the recognition range of the local detector or the detection model is not running, the normalized anchor point box of the first frame can be directly decoded into a pixel box and used as the locking box.
[0030] Color cues refer to information extracted by the higher-level semantic module from natural language instructions, describing the color of the target to be locked. For example, for "Help me take a picture of the person in the green clothes," the color cue is green, and it can be noted that this color corresponds to the top. Color cues can be used as a basis for color comparison when filtering from multiple candidate boxes. The normalized anchor point box of the first frame, color cues, and sound source azimuth angle can all be provided as needed. The higher-level semantic module decides whether to provide them based on the content of the natural language instructions and the information currently available. Fields that are not provided are left blank in the target description data, and subsequent steps skip the processing related to blank fields.
[0031] The azimuth angle of the sound source refers to the horizontal angle of the speaker relative to the moving, following robot. In this embodiment, a microphone array is installed on the vehicle body. The microphone array consists of multiple microphones arranged in a certain geometric configuration, such as on the top of the vehicle body. When the user speaks, there are slight differences in the time it takes for each microphone to receive the same sound. Based on this time difference, the direction of the sound source can be estimated, thus obtaining the azimuth angle of the sound source. For example, the azimuth angle of the sound source is zero degrees, with the direction directly in front of the vehicle body (i.e., the direction of the camera's optical axis) as zero degrees, rightward being positive and leftward being negative. The upper-level semantic module sends the estimated azimuth angle of the sound source along with other fields while parsing the voice command.
[0032] The azimuth angle of the sound source can be used to identify the speaker from multiple candidate frames, which is suitable for situations where the user wants the device to lock onto the speaker. Specifically, the azimuth angle θ of the sound source is first clamped into the horizontal field of view of the camera; that is, when θ exceeds half of the horizontal field of view, its value is taken according to the boundary of the horizontal field of view. Then, θ is mapped to the horizontal coordinates in the image according to a strict pinhole model. The pinhole model is a geometric model that approximates camera imaging as light passing through a small hole and projecting onto the imaging plane. u = c x + f x ·tanθ
[0033] Where u is the horizontal pixel coordinate of the sound source direction in the image frame, and c x f represents the horizontal pixel coordinates of the camera's principal point, which is the intersection of the camera's optical axis and the imaging plane. x Let u be the camera's focal length in pixels along the horizontal direction, and θ be the azimuth angle of the sound source after being clamped into the horizontal field of view. After obtaining u, distortion correction is performed according to the camera's distortion parameters to eliminate coordinate deviations caused by lens distortion. Finally, u is limited to between 0 and the image width to prevent it from going out of the frame. Subsequently, candidate boxes are filtered within an interval near u with a width that is a certain proportion of the image width. For example, human candidate boxes whose center x-coordinate falls within the range of u ± 0.1W are retained, where W is the width of the image frame. If there are no candidate boxes within this interval, it reverts to using all candidate boxes to avoid not getting results due to overly strict orientation criteria. Finally, the candidate box with the highest detection confidence is selected as the locked box from the retained candidate boxes. Detection confidence refers to the degree to which the detector is certain that a candidate box is indeed the query target.
[0034] For example, the camera's horizontal field of view is 90 degrees, and the image frame width is 1280 pixels. x It is 640, f x The value is approximately 640. If the user speaks at about 15 degrees to the right of the camera's optical axis, then u≈640+640×tan15°≈811, meaning the speaker is roughly located around pixel 811 on the horizontal axis of the image. The filtering interval is 811±128 pixels. The center horizontal coordinates of the five candidate human bounding boxes in the image are 145, 415, 610, 805, and 1055, respectively. Only the candidate box with a center horizontal coordinate of 805 falls within this interval; this candidate box is the locked box containing the speaker. As an alternative to the sound source azimuth angle, other prior directions can also be used for filtering, such as radar azimuth, remote control pointing, or previously known azimuth.
[0035] Synchronizing with the received target description data, image frames acquired by the color camera are obtained to obtain the current image frame. The color camera, also known as an RGB (Red, Green, Blue) camera, is a specific form of the aforementioned camera, for example, mounted at the front of the vehicle, facing the direction of travel, and continuously acquiring color images at a fixed frame rate. During synchronous acquisition, the image frame acquired by the color camera at or closest to the received target description data is taken as the current image frame, using the time of receipt as a reference. In practice, a timestamp can be recorded for each image frame, and selection is based on the timestamp; the current image frame is the first frame of this locking task.
[0036] Furthermore, the depth point cloud is obtained by acquiring the 3D point cloud output from the depth sensor synchronized with the current image frame. A depth sensor measures the distance from each point in the scene to the sensor. In this embodiment, a Time-of-Flight (ToF) depth sensor is used, which is positioned adjacent to the color camera with its field of view largely overlapping. The depth of each point in the scene is obtained by emitting modulated light and measuring the time it takes for the reflected light to return. The 3D point cloud is a dataset composed of numerous 3D coordinate points in the scene, with each point recording its spatial position relative to the sensor. Synchronization with the current image frame means selecting the depth data frame corresponding to the acquisition time of the current image frame, so that the 3D point cloud reflects the scene at the same moment as the current image frame. The resulting 3D point cloud is the depth point cloud.
[0037] Depth point clouds have two main uses: first, they serve as depth priors in the candidate bounding box selection phase, where depth priors provide distance constraints; second, after locking, they are handed over to the depth fusion unit, which calculates the 3D position of the target to be locked based on the locked bounding box and the 3D point cloud, and includes this position in the locking result for the chassis to perform following and obstacle avoidance. The source of depth point clouds is not limited to time-of-flight depth sensors; it can also be structured light depth sensors, binocular stereo cameras, or calculated from color images by a monocular depth estimation network. They can be selected as needed when depth priors are required for selection during the locking phase or when the 3D position needs to be included in the locking result.
[0038] Finally, the target description data, the current image frame, and the depth point cloud are combined to obtain the locking input data. For example, after a user says, "Take a picture of the person in the green shirt," the target category text in the locking input data is "person," the task mode identifier indicates an emphasis on accuracy, the normalized anchor box of the first frame is (0.39, 0.21, 0.57, 0.98), the color cue is green (shirt), and the sound source azimuth angle is -20 degrees, indicating that the user issuing the command is located approximately 20 degrees to the left of the camera's optical axis. Since the target to be locked in this example is not the speaker, this field is not used in subsequent filtering. The current image frame is a color image with a width of 1280 pixels and a height of 720 pixels, and the depth point cloud is a synchronized 3D point cloud. The locking input data centralizes the semantic information required for a single locking operation with the sensor data, and subsequent steps read the necessary content from it, making the source of each data item clear and explicit.
[0039] In step S102, the processing scheme to be used for this target locking is determined based on the locking input data. The front-end configuration refers to the pre-combined processing scheme for completing a target locking operation, including the combination of detectors used and the corresponding disambiguation strategy. A detector is a model that detects targets in an image frame and outputs candidate boxes. The disambiguation strategy refers to the process of gradually eliminating candidate boxes that do not conform to the description when multiple candidate boxes exist in an image frame, ultimately retaining only one of the adopted rules. Different front-end configurations have different semantic capabilities and computational costs: some front-end configurations use lightweight detection models that can only recognize fixed categories, resulting in low computational cost but limited semantic understanding; some front-end configurations use detection models that can use text as query conditions, offering strong semantic capabilities but high computational cost; and some front-end configurations do not run detection models but directly use the location information provided by the higher-level semantic module, resulting in the lowest computational cost. The pre-set multiple front-end configurations are several pre-prepared and selectable front-end configurations.
[0040] When selecting the front-end configuration, two criteria are used: the task mode identifier and the target category text in the lock input data. The task mode identifier reflects whether the user requires speed or accuracy, while the target category text reflects whether the target to be locked can be recognized by the local detector. These two criteria constitute a two-dimensional criterion. Since the criteria only come from the text and identifier fields in the lock input data, the selection process can be completed before any preprocessing is performed on the image frame. This allows the selection of which models to call for this lock to be determined at the beginning, without having to run the models first and then make the judgment.
[0041] Instantiation refers to creating a dedicated runtime object for this locking task based on the selected front-end configuration. This runtime object is the configuration instance. The configuration instance carries the components required for this locking task, such as detectors and disambiguation strategies. A new configuration instance is created for each locking task, and different locking tasks do not interfere with each other. The configuration instance has a configuration identifier, which indicates which set of front-end configurations the configuration instance was instantiated from, such as the front-end configuration number. This identifier is output along with the locking result in step S106.
[0042] The number of pre-configured front-end configurations can be two or more, not limited to a fixed number. The criteria for selecting a front-end configuration can also include other dimensions besides task mode identifiers and target category text, such as target scale level and scene lighting level, to select the appropriate front-end configuration for more scenarios. For example, entry-level products with lower computing power can have only pre-configured front-end configurations that do not run the detection model and only run a lightweight detection model, while products with higher computing power can also have a pre-configured front-end configuration using an open vocabulary detection model. The same software can adapt to products of different levels simply by selecting the front-end configuration. Figure 1 As shown, the configuration instance obtained in step S102 determines the detector and disambiguation strategy used in subsequent steps S103 to S105.
[0043] In one embodiment, step S102 includes: When the task mode is identified as fast mode, the first preset configuration is selected; when the preset open vocabulary forced switch is turned on, the second preset configuration is selected, and the selected configuration is obtained. When the selected configuration is empty, the target category text is lowercase and whitespace is removed to obtain the normalized category text; The normalized category text is matched bidirectionally with the self-built vocabulary of the local closed set detection model to obtain the vocabulary hit result. Based on the word list hit results, the third preset configuration is selected when a hit occurs, and the fourth preset configuration is selected when a hit does not occur, thus obtaining the selected configuration; The required model is borrowed from the global model repository for the selected configuration and its cross-task runtime is reset to obtain a configuration instance.
[0044] In this embodiment, the types of models involved are described as follows: Local closed-set detection models refer to detection models deployed locally on an embedded computing unit that can only detect fixed categories learned during training, such as lightweight detection models like YOLO; self-built vocabularies refer to a vocabulary composed of all category labels that a local closed-set detection model can recognize, such as category labels including person, cat, dog, car, and bicycle. Open-vocabulary detection models refer to detection models that can use any text as a query condition and detect targets matching the text, such as text conditional detection networks like YOLO-World and GroundingDINO. They have strong semantic capabilities but high computational overhead. Appearance feature models refer to models that convert image regions into appearance feature vectors. General appearance feature models are suitable for common targets, while high-discriminatory appearance feature models are designed for open-category targets with greater appearance differences and are more capable of distinguishing different individuals.
[0045] This embodiment pre-configures four front-end configurations: the first, second, third, and fourth preset configurations. Their respective compositions, computational power levels, and applicable scopes are as follows: The first preset configuration consists of a local closed-set detection model that only detects human categories, a sound source orientation disambiguation unit, and a general appearance feature model. It has low computational overhead, does not perform semantic disambiguation, and is suitable for speaker locking driven by sound sources, i.e., locking onto the person currently speaking. The second preset configuration consists of an open-vocabulary detection model and a high-discriminatory appearance feature model. The open-vocabulary detection model generates candidate boxes that are progressively narrowed after being driven by a query representation. It can also be overlaid with a semantic model for semantic and geometric matching. It has the strongest open semantic capability and the highest computational overhead, but this is only triggered during the locking process. It is suitable for complex open categories requiring semantic disambiguation. The third preset configuration consists of a local closed-set detection model and a general appearance feature model. The detection results of the local closed-set detection model are filtered to the target category according to category. It has low computational overhead and is suitable for high-frequency categories within a self-built vocabulary. If necessary, a semantic model can also be overlaid to further select a candidate box based on semantics. The fourth preset configuration does not include a detection model. The first frame directly uses the anchor box provided by the upper semantic module, and then combines it with a general appearance feature model. It has the lowest computational cost and is suitable for any category other than the self-built vocabulary.
[0046] When selecting a configuration, the following priorities are applied sequentially. First, it checks if the task mode identifier is in fast mode. Fast mode indicates that the task mode identifier prioritizes speed; if the task mode identifier is in fast mode, it means the user values response speed, and the first preset configuration with the lowest computational cost is selected. Second, it checks the open vocabulary enforcement switch. The open vocabulary enforcement switch is a pre-set switch; when enabled, it means that this lock will forcibly use the configuration with the strongest open semantic capabilities, and the second preset configuration is selected. After these two checks, if a configuration has been selected, the selected configuration is obtained; if neither condition is met, the selected configuration is empty, and the selection is then based on the target category text. The selected configuration is the final front-end configuration selected for this lock task.
[0047] When determining the target category based on the text, the target category text is parsed first. The target category text can include a main category field and candidate category fields. The main category field is the category deemed most relevant by the higher-level semantic module, while the candidate category field contains other categories for fallback. The main category field is used preferentially during parsing; if the main category field is empty, candidate category fields are used as a fallback. Subsequently, the parsed target category text is lowercase and whitespace is removed to obtain normalized category text. For example, PERSON is normalized to "person," and Electric Scooter is normalized to "electricscooter." Normalization eliminates differences caused by variations in capitalization and whitespace, making subsequent matching results more stable.
[0048] After obtaining the normalized category text, a bidirectional fuzzy matching is performed between it and the self-built vocabulary of the local closed-set detection model to obtain the vocabulary hit result. Bidirectional fuzzy matching refers to bidirectional fuzzy substring matching. A match is considered a hit if the normalized category text contains a category label from the self-built vocabulary, or if a category label from the self-built vocabulary contains the normalized category text. Bidirectional judgment can take into account both cases where the category text given by the higher-level semantic module is more specific or more general than the category labels in the self-built vocabulary. For example, when the user specifies "orange cat," the target category text can be "orange cat," and the normalized category text is "orangecat," which contains "cat" from the self-built vocabulary, thus a hit. When the normalized category text is "electricscooter," no category label in the self-built vocabulary contains it, so a miss is detected. Furthermore, when the self-built vocabulary is empty, it is considered that the local closed-set detection model is not restricted by the vocabulary and is always considered a hit; when the target category text contains no category information, it is treated as a miss.
[0049] The configuration is selected based on the word list hit result: A hit indicates the target belongs to a category recognizable by the local closed-set detection model, and the third preset configuration is selected to complete the detection with lower computational power. A miss indicates the local closed-set detection model cannot recognize the category, and the fourth preset configuration is selected, using the anchor boxes provided by the upper-level semantic module directly without running the detection model. For example, when a user says "Take a picture of the person in the green clothes," the task mode is not in fast mode, the open word list forced switch is off, the target category text "person" hits the self-built word list, and the third preset configuration is selected. When a user says "the deliveryman's electric scooter," if the target category text is "electric scooter," it does not hit the self-built word list after normalization, and the fourth preset configuration is selected. When the open word list forced switch is on, the second preset configuration is selected regardless of the target category text. In multi-user scenarios, when users want the device to quickly lock onto themselves while they are speaking, the task mode given by the upper-level semantic module is fast mode, and the first preset configuration is selected. In summary, the selection process sequentially checks three conditions: whether the task mode identifier is in fast mode, whether the open vocabulary enforcement switch is enabled, and whether the target category is within the user-built vocabulary. If either of the first two conditions is met, the corresponding configuration is selected directly; otherwise, the third condition determines whether to select the third or fourth preset configuration. The entire process only involves identifier reading and string comparison and does not require calling any models.
[0050] After obtaining the selected configuration, a new configuration instance for this locking task is created for the selected configuration. The global model repository is a repository that uniformly manages the weights of various models. The weights of the same model are loaded only once globally and then reused in different locking tasks. Users do not need to reload the model when switching locking targets. When constructing a configuration instance, the configuration instance borrows the models required by the selected configuration from the global model repository. For example, the configuration instance of the third preset configuration borrows the local closed set detection model and the general appearance feature model. Borrowing means that the configuration instance references the model that has already been loaded in the global model repository without copying the model weights separately.
[0051] While constructing the configuration instance, the cross-task runtime state of the borrowed components is reset. The cross-task runtime state refers to the runtime state of the component accumulated in previous locking tasks and related to the previous target, such as detector cache, candidate buffer, and feature library. If not reset, candidate boxes or appearance features of previous targets may remain in this locking process, interfering with the judgment of new targets. Because the reset occurs during the construction of the configuration instance, each newly created configuration instance is necessarily in a clean state. This clean state for new tasks is guaranteed by the construction process itself and does not depend on separate cleanup performed by the caller.
[0052] Furthermore, in the current deployment configuration, heavy models that are not borrowed by any configuration instance are lazily not loaded. Heavy models refer to models with high computational and memory overhead, such as open vocabulary detection models; laziness means that models are not loaded until they are actually needed. For example, if a product configuration only uses the first, third, and fourth preset configurations, the open vocabulary detection model will not be loaded at all, thus reducing memory usage and startup time. Even if a heavy model is loaded, it only runs during the sparse event of locking, and exits immediately after locking, without entering the frame-by-frame tracking path.
[0053] Models in the global model repository can run on both general-purpose deep learning frameworks and inference acceleration engines. The two inference backends can be switched orthogonally, meaning that switching the inference backend does not affect the selection of the frontend configuration or the construction of configuration instances, and the upper-level logic requires no modification. In this way, the same software can combine frontend configurations according to the product's computing power level and run on embedded computing units with limited computing power budgets.
[0054] In step S103, the natural language instructions are converted into a form that the selected detector can parse. The selected detector refers to the detector in the configuration instance used to generate candidate boxes in the image frame. The semantic understanding capability level refers to the richness of the query semantics that the detector can understand, indicating what kind of queries the detector can receive: some detectors can understand entire sentences of natural language, some can only understand phrases consisting of nouns and a few modifiers, and some can only recognize a fixed category label. The query representation refers to the query content input to the selected detector, used to drive it to detect the target to be locked. Its granularity matches the semantic understanding capability level of the selected detector; the stronger the capability, the more semantics the query representation retains; the weaker the capability, the coarser the query representation, until only a single category label remains.
[0055] After a natural language instruction is converted into a query representation, some semantics often cannot be carried by the query representation. For example, when converting "take a picture of the person in the green clothes" into the category label "person," the semantic meaning of "green" is not carried. This embodiment does not discard this part of the semantics, but instead converts the corresponding uncarried semantic components into disambiguation clues. Semantic components refer to the parts of the natural language instruction that describe a certain feature of the target to be locked, such as color or location; disambiguation clues refer to the information compiled from the uncarried semantic components, which is used to distinguish the unique target from multiple candidate boxes in subsequent steps. The disambiguation clues and the query representation are handed over to the subsequent locking and disambiguation stages. The query representation is responsible for driving the selected detector to find candidate boxes, and the disambiguation clues are responsible for converging to the unique target in the candidate boxes.
[0056] The conversion in step S103 can be completed by the upper-level semantic module. For example, the visual language model can read the semantic understanding capability level of the selected detector and then combine it with the user's original instructions to generate the corresponding query representation and disambiguation clues. The number of semantic understanding capability levels is unlimited; it can be divided into three levels or further refined into four or more levels, for example, divided into four levels based on whole-sentence semantics, multi-attribute phrases, single-attribute phrases, and pure category labels. In this way, the upper layer no longer writes queries specifically for a particular detector, but first reads the capabilities of the currently selected detector and then generates queries that it can parse based on its capabilities. The query generation method is adjusted accordingly when the detector is changed, while the downstream locking and disambiguation logic remains unchanged. Figure 1 As shown, the query representation and disambiguation clues obtained in step S103 provide inputs for steps S104 and S105, respectively.
[0057] In one embodiment, step S103 includes: Read the semantic understanding capability level declared by the selected detector in the configuration instance to obtain the capability level; When the capability level is language-based, the natural language command is lightly rewritten using normalization to obtain the query representation; When the capability level is an open vocabulary phrase type, the central noun and key attribute words of the natural language instruction are extracted to obtain the query representation; When the capability level is a closed-set category type, the category label that is closest to the semantics of the natural language instruction in the vocabulary is taken to obtain the query representation; The query representation is structured by uncarried color, material, orientation, reference relationship and ordinal component to obtain disambiguation clues.
[0058] In this embodiment, each detector pre-declares its own semantic understanding capability level, for example, by registering it along with the detector as a configuration field. The capability tier is obtained by reading the semantic understanding capability level declared by the selected detector in the configuration instance. The capability tier refers to the level divided according to the semantic understanding capability level. In this embodiment, it is divided into three tiers: linguistic, open vocabulary phrase, and closed set category, corresponding to high, medium, and low capability levels, respectively. Since the capability tier comes from the detector's own declaration, when changing a detector, only the declaration of the semantic understanding capability level needs to be changed accordingly. The query representation generation method is automatically adjusted, and the downstream locking and disambiguation logic does not require any modification. Therefore, the detector becomes a hot-swappable component during deployment, and the same software can cover product forms with different computing power tiers.
[0059] When the capability level is language-based, the selected detector, such as a large visual language model or large language model (LLM) used as the detection end, can understand complete natural language. Therefore, only lightweight normalization rewriting is performed on the natural language instructions, preserving their complete semantics without semantic reduction. Lightweight normalization rewriting refers to removing colloquial components irrelevant to the description target from the instructions and standardizing the expression, for example, rewriting "help me take a picture of the person in the green clothes" as "the person wearing a green top". At this time, the complete semantics are already preserved in the query representation, and there are generally no uncarried semantic components.
[0060] When the capability level is open-vocabulary phrase type, the selected detector, such as YOLO-World or GroundingDINO text conditional detection networks, can parse noun phrases but struggles to understand complete sentences. Therefore, central nouns and key attribute words are extracted from the natural language instructions and organized into phrases that the selected detector can parse. Central nouns refer to the nouns in the natural language instructions that represent the target itself, such as "person"; key attribute words are those that best distinguish the target from other targets, such as "green." For example, "Help me take a picture of the person wearing green clothes" is transformed into "person in green clothes." Since phrases have limited capacity, any remaining attribute components not included in the phrase need to be converted into disambiguation cues.
[0061] When the capability level is closed-set categorical, the selected detector, such as a fixed-vocabulary detection network like YOLO, can only receive one category label. Therefore, it selects the category label closest in semantics to the natural language instruction from its self-built vocabulary as the query representation. This is equivalent to collapsing the natural language instruction into the closest closed-set category label. The self-built vocabulary is a list of all category labels that the detector can recognize. A category label refers to a word in the self-built vocabulary that represents a certain category. Semantically closest means that among all category labels in the self-built vocabulary, the one that is closest in meaning to the user's intent. For example, "Help me take a picture of the person in the green clothes" is collapsed into "person".
[0062] Semantic components discarded during the transition from high to low tiers are not discarded but instead undergo structured processing to obtain disambiguation clues. This is equivalent to moving these attributes from the query representation to the disambiguation clues; this processing is shared across all three tiers. Specifically, color components describe the target's color (e.g., green); material components describe the target's material (e.g., metal, leather); location components describe the target's position within the image (e.g., left side of the image); reference relationship components describe the relative relationship between the target and reference objects (e.g., the relationship between the electric scooter and the delivery person in "delivery person's electric scooter"); and ordinal components describe the target's position within a group of similar targets (e.g., second from the left). Structured processing involves organizing these components into clearly defined, structured data for easy use by field.
[0063] For example, a user says, "Take a picture of the second person on the left wearing green." When the capability level is closed-category, the query collapses to "person," and the disambiguation cues are {color: green (shirt); location: left side of the screen; ordinal: second from the left; reference point: none}. When the capability level is open-phrase, the query is "person in green clothes," where the color is already conveyed by the phrase, and the disambiguation cues are {location: left side of the screen; ordinal: second from the left}. When the capability level is linguistic, the query is "the second person on the left wearing a green shirt," where the complete semantics are preserved, and the disambiguation cues are empty. Another example: a user says, "Take a picture of that orange cat." In closed-category, the query is "cat," where the color component "orange" becomes the disambiguation cues; in open-phrase, it's "orange cat"; and in linguistic, it's "orange cat." For the query "the deliveryman's electric scooter", the open-vocabulary phrase query representation can be "electric scooter". The reference relationship between the electric scooter and the deliveryman is transformed into a disambiguation clue {reference object: deliveryman}. It is evident that the granularity of the query representation obtained for the same natural language instruction varies at different capability levels, but the query representation combined with the disambiguation clue always fully preserves the semantics of the instruction.
[0064] In this way, each detector receives the most suitable query within its expressive capacity, without missing a query due to excessive complexity or losing semantics due to excessive coarseness. The discarded semantic components are converted into disambiguation clues and continue to play a role when converging to the unique target. The downgrading of the query representation and the subsequent disambiguation are connected, which not only adapts to different detectors, but also ensures that the unique target can still be converged among multiple similar candidates.
[0065] In step S104, the selected detector and the semantic model respectively provide a candidate box set and target identity information. Driving the selected detector with the query representation means that the query representation obtained in step S103 is input into the selected detector, which detects targets in the image frame that match the query representation and outputs candidate boxes. Candidate boxes generally have category labels and detection confidence scores, and the candidate box set is the set of all candidate boxes. For example, when the query representation is "person," the selected detector will outline each person in the image, forming a candidate box set. The selected detector is responsible for answering where the target is and where the boundary is, but does not determine which one is the target the user is referring to. The backend of the selected detector can be any one or more combinations of models such as the Visual Language Model, the Segment Anything Model (SAM), GroundingDINO, YOLO-World, and YOLO, with no limit on the number of models, and can be hot-replaced.
[0066] A pre-deployed semantic model refers to a model that understands natural language and identifies targets in an image based on it, such as a large visual language model. Target identity information refers to the semantic model's response to which target in the image matches the natural language command, indicating who the target to be locked is, without pursuing precise boundary conditions. It can take the form of the target's approximate location in the image frame or an identification of a candidate box in a candidate box set. For example, each candidate box in the candidate box set can be numbered first. The numbered image frame, along with the user's original command, is input into the semantic model, and the semantic model directly responds with the number, which is the target identity information. This method does not require the semantic model to have the ability to output bounding boxes.
[0067] The tasks of identifying the target and determining its boundary are respectively handled by a semantic model, which excels in semantic understanding, and a selected detector, which excels in precise localization. The selected detector and the semantic model process the same image frame—the image frame acquired synchronously in step S101. Their results are in the same image coordinate system, allowing for direct comparison later. The semantic model can be deployed locally on the embedded computing unit or replaced with a cloud-based visual language large-scale model interface. Since step S104 is executed only once during the sparse event of locking, the computationally expensive detector and semantic model are only invoked during locking and exit immediately after locking, without entering the frame-by-frame tracking path. Therefore, regardless of whether the semantic model is deployed locally or in the cloud, it will not slow down the frame rate of frame-by-frame tracking. The requirements of arbitrarily specifying the target category using natural language and timely locking response can be simultaneously met within the computational budget of the embedded computing unit. Figure 1 As shown, the candidate box set obtained in step S104 and the target identity information are used together as the input for step S105.
[0068] In one embodiment, step S104 includes: The selected detector, which acts as a geometric detector, detects the image frame according to the query representation to obtain an initial candidate box; The initial candidate boxes are sorted in descending order of detection confidence and truncated to the first preset number to obtain a candidate box set; The image frame containing the candidate box set and the natural language instruction are input into the semantic model to obtain the semantic recognition output; Select the target that matches the natural language instruction from the semantic recognition output to obtain the target identity; The semantic model, which serves as a large model of visual language, outputs a rough bounding box of the target identity to obtain the target identity information.
[0069] In this embodiment, the selected detector is used as a geometric detector. A geometric detector is one that excels at outputting precise bounding boxes, such as closed-set detection models like YOLO or open-vocabulary detection models like YOLO-World and GroundingDINO. Its output boxes closely adhere to the target boundaries and are accurately positioned. The geometric detector takes a query representation matching its semantic understanding level as input to the detection image frame and outputs all high-precision candidate boxes for that category within the image, i.e., the initial candidate boxes. The geometric detector only answers where the object is and how precise its boundaries are; it does not participate in semantic judgment.
[0070] For example, when the query is "person", the geometric detector outputs all five bounding boxes B1 to B5 within an image frame that is 1280 pixels wide and 720 pixels high. These are represented by pixel coordinates (top-left x-coordinate, top-left y-coordinate, bottom-right x-coordinate, bottom-right y-coordinate): B1 is (60, 200, 230, 690), B2 is (330, 160, 500, 700), B3 is (520, 180, 700, 690), B4 is (730, 240, 880, 690), and B5 is (960, 170, 1150, 700). B3 encloses the person wearing a green shirt. Since the five bounding boxes are identical, the geometric detector itself cannot determine which person the user is referring to.
[0071] Furthermore, the initial candidate boxes are sorted in descending order of detection confidence and truncated to a preset number, resulting in a candidate box set. This preset number is denoted as N, for example, 20. When the scene is crowded, the number of initial candidate boxes increases with the complexity of the scene. Subsequent matching and progressive narrowing require processing each candidate box individually; this is the only overhead in the locking process that increases linearly with scene complexity. After truncating to the first N, this overhead is limited to a constant, and the locking time no longer increases with scene complexity. For example, in a crowded scene, when the query is "person," there may be dozens of initial candidate boxes. After truncating, only the 20 with the highest detection confidence are retained for subsequent processing. In the example above, there are only 5 initial candidate boxes, not exceeding N, and all are retained in the candidate box set.
[0072] Furthermore, the image frame containing the candidate bounding box set and the natural language instruction are input into the semantic model to obtain the semantic recognition output. The semantic recognition output refers to the recognition result given by the semantic model after understanding the content of the image frame and the natural language instruction, such as judging whether each target in the image matches the instruction description. During input, the image frame and the natural language instruction can be organized into a question-and-answer session, requiring the semantic model to identify the target in the image that matches the instruction description. Selecting the target that matches the natural language instruction description from the semantic recognition output yields the target identity, which is the target the user actually refers to. In the example above, the semantic model understands the meaning of "the person wearing green clothes" and selects the person wearing a green shirt from the five people in the image as the target identity.
[0073] In this embodiment, the semantic model is a large visual language model. The large visual language model outputs a rough bounding box representing the target's identity, thus providing the target's identity information. The rough bounding box refers to the location bounding box provided by the large visual language model for the target's identity. While the large visual language model can accurately identify the target, its bounding boxes often exhibit offset, looseness, or tilt, resulting in lower boundary accuracy compared to geometric detectors. If the rough bounding box is directly used as the target's locking bounding box, subsequent tracking may fail. The geometric detector's bounding box is close to the target but doesn't understand semantics like "green," and will only provide five identical bounding boxes for five people. In the example above, the large visual language model outputs a rough bounding box S (495, 150, 735, 705) for the person wearing a green shirt, which is significantly looser than B3. The semantic model is responsible for answering "who is it?", while the geometric detector is responsible for answering "where is it?" Each model handles its strengths, avoiding the burden of a single model simultaneously fulfilling both semantic accuracy and geometric precision requirements.
[0074] In step S105, the target identity information is mapped to the candidate box set to determine a unique locked box. Matching the target identity information with the candidate box set means finding the candidate box in the candidate box set that corresponds to the target indicated by the target identity information. Matching can be spatial matching, that is, based on spatial matching metrics such as the degree of overlap, containment relationship, or center distance between two boxes, the target indicated by the target identity information is mapped to a certain candidate box. Spatial matching metrics can also be learned matching metrics. Among them, the higher the degree of overlap between two boxes, the greater the probability that they point to the same target; containment relationship means that one box is inside another box. The position given by the semantic model is often relatively loose and will often include the precise box given by the selected detector; center distance is the distance between the center points of two boxes. The smaller the distance, the more likely they correspond to the same target. In addition, when the target identity information is the candidate box number, the matching is simplified to retrieving the corresponding candidate box by the number index, and spatial alignment is not required.
[0075] The matching result is not unique, meaning that more than one candidate box still corresponds to the target identity information based solely on the matching. In this case, the disambiguation clues obtained in step S103 are used to narrow the gap step by step. Step-by-step narrowing means that multiple criteria are sequentially linked according to the disambiguation strategy of the configured instance. Each level of criteria eliminates a portion of the candidate boxes until only one candidate box remains. Criteria may include label consistency, spatial proximity, color, group score, nearby reference objects, directional prior, and geometric selection, etc. Criteria at each level can be arbitrarily combined and added or deleted, and are all pluggable instances within the same framework; color, orientation, and other components in the disambiguation clues participate in the scoring here. If a certain level of criteria fails, subsequent criteria can still continue to narrow the gap; each level of criteria has a fallback measure, so no result will be obtained due to a certain level of criteria being too strict.
[0076] Using the matched candidate bounding box as the locked box means that the final locked box is the candidate bounding box given by the selected detector, not the location given by the semantic model. The identity is selected by semantic criteria, and the boundary is taken from the candidate bounding box of the selected detector. Therefore, the locked box is both the target the user actually points to and has the precise boundary given by the selected detector. Both semantic correctness and geometric accuracy are satisfied simultaneously in a single locking operation, without having to choose one over the other. Figure 1 As shown, the lock box obtained in step S105 is used as the input for step S106.
[0077] In one embodiment, step S105 includes: The spatial matching degree is obtained by calculating the intersection-union ratio (IUU) between the rough bounding box in the target identity information and each candidate bounding box in the candidate bounding box set. Candidate boxes that meet the preset matching threshold in terms of spatial matching degree and whose labels match the query representation are selected to obtain matching candidate boxes; When there is more than one matching candidate box, they are sorted according to their distance from the anchor box in the target description data to obtain the initial candidate boxes; The initial candidate boxes are filtered using the color cues in the disambiguation cues and scored in conjunction with neighboring reference objects to obtain the score candidate boxes; The highest score of the candidate scoring box is selected. If no matching candidate box is found, the coarse box is backtracked and marked as low precision to obtain the locked box.
[0078] In this embodiment, the intersection-union ratio (IUR) of the rough bounding box in the target identity information with each candidate bounding box in the candidate box set is first calculated as the spatial matching degree. As mentioned earlier, the IUR is the ratio of the intersection area to the union area of two boxes, and its calculation formula is: IoU = |A∩B| / |A∪B|
[0079] Where A is the rough bounding box, B is a candidate bounding box in the candidate box set, |A∩B| is the area of their intersection, and |A∪B| is the area of their union. The intersection-union ratio (IU) is 0 when the two boxes do not overlap at all and 1 when they completely overlap. Spatial matching degree refers to the degree of spatial correspondence between the rough bounding box and the candidate bounding box, expressed as the IU. In the example above, the rough bounding box S is (495, 150, 735, 705), with an area of 240 × 555 = 133200 square pixels; the human bounding box B3 falls completely within S, the intersection area is the area of B3 (180 × 510 = 91800 square pixels), and the union area is the area of S, with an IU of approximately 0.69; B2 overlaps S only horizontally by 5 pixels, with an IU of approximately 0.01; the IU of B4 overlaps S by approximately 0.01; B1 and B5 do not overlap with S, with an IU of 0.
[0080] Furthermore, candidate boxes with a spatial matching score reaching a preset matching threshold and whose labels match the query representation are selected to obtain matching candidate boxes. The preset matching threshold can be, for example, 0.5. Labels refer to the category labels of the candidate boxes. Label matching the query representation means that the label of the candidate box is consistent with the category indicated by the query representation. For example, if the query representation is "person," only candidate boxes with the label "person" are retained. This selection is called label consistency filtering, which can exclude boxes that are mistakenly identified as other categories. In the example above, only B3 has a spatial matching score of 0.5 and the label "person." Therefore, B3 is the only matching candidate box, and the matching result is unique; B3 is the locked box.
[0081] When there is more than one matching candidate box, they are sorted by their distance from the anchor box in the target description data to obtain the initial candidate boxes. The anchor box is the box given by the higher-level semantic module in the target description data that represents the location of the target to be locked; the distance to the anchor box can be calculated using the Euclidean distance between the center of the candidate box and the center of the anchor box, using the following formula: d = √((xc -x a ) 2 + (y c -y a ) 2 )
[0082] Where d is the distance between the candidate box and the anchor box, (x c y c (x) represents the pixel coordinates of the center of the candidate box. a y a Let d be the pixel coordinates of the anchor box center. Candidate boxes are sorted in ascending order of d, with those closer to the anchor box appearing first. These sorted candidate boxes are the initial screening candidate boxes. For example, if another person is standing slightly to the right behind the person wearing a green shirt, their body bounding box B6 is (590, 160, 735, 700), and its intersection-union ratio with the coarse bounding box S is approximately 0.59, reaching the preset matching threshold. In this case, the two candidate boxes are B3 and B6. The anchor box's pixel bounding box is (499, 151, 730, 706), with its center at (614.5, 428.5); B3's center is (610, 435), approximately 7.9 pixels away from the anchor box center; B6's center is (662.5, 430), approximately 48 pixels away. After sorting, B3 appears first, followed by B6.
[0083] Furthermore, the initial candidate boxes are filtered using color cues from the disambiguation cues. Color cues refer to the components in the disambiguation cues that describe the color of the target to be locked, such as green (shirt). During filtering, color features of the corresponding area within the initial candidate boxes are extracted. For example, if the color cue indicates "shirt," the color features of the upper half of the candidate box are extracted and compared with the color cue, retaining candidate boxes with matching colors. In the example above, B3's shirt is green, and B6's shirt is gray; B6 is therefore eliminated.
[0084] Based on color filtering, candidate boxes are scored by combining nearby reference objects to obtain scored candidate boxes. Nearby reference objects refer to other objects located near the candidate target, easily identifiable, and relevant to the user's description, such as the deliveryman in "the deliveryman's electric scooter." During scoring, the color features of the candidate boxes, nearby reference objects, and the relative relationships between candidate boxes are combined to perform group candidate scoring. Candidate boxes whose colors match color cues, whose relationship with reference objects matches the description, and whose relative position within the same category matches the description, receive higher scores. For example, if a user says "the deliveryman's electric scooter," and there are three electric scooters in the image, only one of which has a person in a delivery uniform standing next to it; this scooter receives the highest score after reference object scoring. If a user says "the cat on the left," and there are two cats in the image, the one on the left receives a higher score based on the relative relationships between candidate boxes. Scored candidate boxes are the candidate boxes that have been scored.
[0085] Finally, the highest-scoring candidate box is selected as the lock box. The lock box is taken from the candidate box set, not the coarse box, thus ensuring both semantic correctness and geometric precision. If the aforementioned screening fails to yield any matching candidate boxes (i.e., no candidate box's spatial matching degree reaches the preset matching threshold), a coarse box is used as the lock box, and it is marked as low precision. Low precision refers to the lower boundary precision of the lock box; this label is passed along with the lock box, and subsequent processing can differentiate accordingly. This backoff measure ensures that a lock box is provided even if spatial matching fails, and no empty result is returned. For example, if a person wearing a green shirt is severely obscured by a pedestrian in front, and the selected detector fails to output their body bounding box, then no candidate box in the candidate box set has an intersection-union ratio (IoU) of 0.5 with S. In this case, S is used as the lock box and marked as low precision.
[0086] The above process sequentially completes five steps: label consistency filtering, anchor point box spatial proximity sorting, color feature screening, group candidate scoring, and final box selection, forming a five-step disambiguation pipeline. The output of the previous step is the input of the next step. If a single step cannot distinguish between the two, the subsequent steps continue to narrow down the selection, and multiple candidates of the same type eventually converge to a unique locked box.
[0087] In step S106, an identity benchmark is established for the locking bounding box, and the locking result is output. Appearance features refer to feature vectors extracted from the image region that characterize the target's appearance, reflecting its color, texture, contour, and other appearance information. Extracting appearance features from the locking bounding box involves converting the area enclosed by the locking bounding box in the image frame into appearance features. Anchor point features are appearance features extracted and fixed during locking, serving as the identity benchmark for the target. This is equivalent to taking an identity photo of the locked target; subsequent steps can compare the appearance features of targets in other frames with the anchor point features to determine if they are still the same target, thus providing a reliable basis. Anchor point features are extracted during locking because the locking bounding box has already undergone semantic judgment and geometric localization confirmation, and the area within the bounding box best represents the target pointed to by the user.
[0088] The locking result refers to the final output of this locking task, including the locked bounding box, anchor point features, and configuration identifiers of the configuration instance. Regardless of which front-end configuration is selected in step S102, the composition of the locking result is the same; subsequent processing only needs to read it in the same format, making the locking result a standardized handover document. The configuration identifier indicates which front-end configuration derived the locking result. The locking result is then used by subsequent target tracking and following control. For example, a single-target template tracker can use the locked bounding box to initialize the template, then perform template regression frame by frame, outputting the current bounding box and quality score. Figure 1 As shown, step S106 is the end point of the entire process, thus completing a natural language-based target locking operation.
[0089] In one embodiment, step S106 includes: The region within the locked box in the image frame is input into the appearance feature model borrowed by the configuration instance to obtain the appearance feature; The appearance features are normalized using the second norm and fixed as the first frame features of this locking task to obtain the anchor point features; The coordinates of the locking box corresponding to the anchor point feature are normalized according to the size of the image frame to obtain the normalized locking box; The locking confidence level is obtained by classifying the levels according to whether the normalized locking box comes from the matched candidate box; The normalized locking bounding box, anchor point features, locking confidence level, and configuration identifier are encapsulated and output together to obtain the locking result.
[0090] In this embodiment, the region within the locked box in the image frame is first cropped out and input into the appearance feature model borrowed by the configuration instance to obtain the appearance features. The appearance feature model refers to a model that takes the image region as input and outputs a fixed-dimensional appearance feature vector. Its backbone network can be, for example, a metric learning network, which is a network trained with the goal of features of the same target being close to each other and features of different targets being far apart. The appearance feature model borrowed by the configuration instance refers to the appearance feature model that has already been loaded and referenced by the configuration instance.
[0091] Regardless of the front-end configuration used, appearance features are extracted within the same appearance representation framework after locking. Most front-end configurations share the same general appearance feature model and its feature space. For open category targets with greater appearance differences, a more discriminative high-discriminative appearance feature model is used. Both appearance feature models follow the same interface contract, meaning the input and output formats are identical. The high-discriminative appearance feature model only needs to rewrite the scoring and database entry strategy hooks separately. Scoring refers to calculating the similarity between the appearance features of the candidate target and existing appearance features, and database entry refers to storing the appearance features in the feature library. The strategy hooks are interfaces reserved for these two operations that can be replaced with specific implementations. Therefore, the anchor features obtained by each front-end configuration are under a unified identity modeling framework.
[0092] Next, the appearance features are normalized using the L2 norm, i.e., L2 normalization. The calculation formula is as follows: e = f / ||f||2, ||f||2 = √(f1 2 + f2 2 + … + f n 2 )
[0093] Where f is the appearance feature vector output by the appearance feature model, f1 to f nLet n be the dimension of the vector, ||f||² be the L2 norm of the vector (the square root of the sum of the squares of its components), and e be the normalized appearance feature. The normalized vector has a length of 1. The appearance features of different targets differ only in direction. The dot product of two normalized vectors is their cosine similarity, facilitating direct comparison later. For example, during subsequent tracking, the normalized appearance features of a candidate target in a frame are multiplied by the anchor feature; the closer the resulting cosine similarity is to 1, the more likely it is to be the same target. The normalized appearance features are fixed as the first frame features of this locking task, resulting in the anchor feature. The first frame feature refers to the feature extracted in the first frame of this locking task and not updated during the tracking process. Fixing it prevents appearance drift during tracking, ensuring that the anchor feature always represents the target pointed to by the user at the time of locking.
[0094] It should be noted that the appearance features are calculated only once for the same image region. If appearance features have already been extracted for the region containing the bounding box during the progressive narrowing process, they are directly reused. The same set of features is used simultaneously for scoring during narrowing and for establishing anchor point features, without being calculated repeatedly. The backbone network of the appearance feature model can also be replaced with other metric learning networks. When comparing appearance features subsequently, the similarity metric can be cosine similarity, Euclidean distance, or a learned metric.
[0095] Then, the coordinates of the bounding box corresponding to the anchor point features are normalized according to the size of the image frame to obtain the normalized bounding box. The calculation formula is as follows: x1′ = x1 / W, y1′ = y1 / H, x2′ = x2 / W, y2′ = y2 / H
[0096] Where (x1, y1) and (x2, y2) are the pixel coordinates of the top-left and bottom-right corners of the bounding box, respectively; W and H are the width and height of the image frame, respectively; and (x1′, y1′) and (x2′, y2′) are the normalized coordinates. In the example above, the bounding box B3 is (520, 180, 700, 690), the image frame is 1280 pixels wide and 720 pixels high, and the normalized bounding box is approximately (0.406, 0.250, 0.547, 0.958). The normalized bounding box is independent of the image resolution, and can be directly converted and used even when using images of different resolutions in subsequent processing.
[0097] The locking confidence level is then determined by whether the normalized bounding box originates from a matched candidate bounding box. The locking confidence level indicates the degree of reliability of the locking result: when the normalized bounding box originates from a matched candidate bounding box, the bounding box possesses both semantic correctness and geometric precision, and is classified as a higher level; when the normalized bounding box does not originate from a matched candidate bounding box, such as when a match fails and the position given by the semantic model is used as the bounding box, the boundary precision of the bounding box is limited, and it is classified as a lower level, i.e., low-precision locking. Subsequent processing can be differentiated based on the locking confidence level.
[0098] Finally, the normalized bounding box, anchor features, locking confidence level, and configuration identifier are encapsulated and output together to obtain the locking result. The locking result is a handover component consisting of a single bounding box (normalized coordinates), the anchor features of the first frame, the locking confidence level, and the configuration identifier of the front-end configuration used. Regardless of the front-end configuration used upstream or the subsequent processing method used downstream, the handover format of the locking result is completely consistent. In the example above, the locking result includes the normalized bounding box (0.406, 0.250, 0.547, 0.958), the anchor features of region B3 after L2 normalization, the higher locking confidence level, and the configuration identifier of the front-end configuration used in this case.
[0099] In summary, the natural language-based target locking method provided in this embodiment of the invention receives target description data issued by a higher-level semantic module according to natural language instructions and simultaneously acquires image frames. It selects and instantiates a front-end configuration based on the task mode identifier and target category text. Then, according to the semantic understanding capability level of the selected detector, it converts the natural language instructions into query representations and disambiguation cues. The query representation drives the selected detector to generate a set of candidate boxes, and the semantic model determines the target identity information. The two are matched, and if necessary, the target is narrowed down step by step with the help of disambiguation cues to obtain the locked box. Finally, anchor point features are extracted and the locking result is output. The entire method adopts a structure of first assigning and then processing in two layers: first, it determines which front-end configuration to use for this locking; the first layer completes intent adaptation according to the semantic understanding capability of the selected detector; the second layer completes candidate generation, matching, and disambiguation, and finally outputs a unique locked box.
[0100] For embedded devices like mobile following robots, computing power is a hard constraint, and simply replacing them with larger models is not feasible. The expressive capacity of the detector is determined by the model itself, and adding rules to the detector cannot fill in the semantic gaps it lacks. Calling large cloud models frame by frame is difficult to meet requirements in terms of latency, bandwidth, and offline availability. This method organizes the approach from two structural levels: how the upper layer asks questions of the detector and how multiple models divide the work. This approach has the following effects: First, the upper layer reads the semantic understanding level of the selected detector and then generates a query representation that it can parse. It is no longer fixed to a specific detector, and the detector becomes a replaceable component during deployment. When changing detectors, the downstream locking and disambiguation logic does not need to be modified. Second, the semantic components not carried by the query representation are converted into disambiguation clues and continue to participate in convergence among multiple similar candidates. Natural language instructions with attributes and referential meanings can reliably converge to a unique target. Third, the semantic model determines which target is identified, while the selected detector determines the target boundary. Finally, the matched candidate box is used as the locking box, achieving both semantic correctness and geometric accuracy in one locking operation. Fourth, locking is a sparse event throughout the entire process. Models with high computational overhead are only invoked during locking and do not enter the frame-by-frame execution path. Within the computational budget of the embedded computing unit, it simultaneously satisfies the two requirements of the target category being arbitrarily specified by natural language and timely locking response. Fifth, the locking result is uniformly composed of the locking box, anchor point features, and configuration identifiers. Regardless of the front-end configuration used upstream, the handover format between the lock and subsequent processing is completely consistent.
[0101] Combination Figure 2 As shown, Figure 2 A schematic block diagram of a natural language-based target locking device provided in an embodiment of the present invention. The natural language-based target locking device 200 includes: The data acquisition module 201 is used to receive target description data issued by the upper semantic module according to the natural language instructions describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; The configuration assignment module 202 is used to select and instantiate a set of pre-set front-end configurations according to the task mode identifier and target category text in the locked input data to obtain a configuration instance. The intent adaptation module 203 is used to convert the natural language instruction into a query representation according to the semantic understanding ability level of the detector selected in the configuration instance, and to convert the corresponding uncarried semantic components into disambiguation clues; The candidate generation module 204 is used to drive the selected detector to generate a set of candidate boxes in the image frame using the query representation, and to determine the target identity information by a preset semantic model according to the natural language instructions. The locking disambiguation module 205 is used to match the target identity information with the candidate box set. When the matching result is not unique, it combines the disambiguation clues to narrow down the selection step by step, and takes the matched candidate box as the locking box. The lock output module 206 is used to extract the appearance features of the lock box and lock them as anchor point features, and output the lock box, the anchor point features and the configuration identifier of the configuration instance to obtain the lock result.
[0102] In this embodiment, the data acquisition module 201 is used to receive target description data issued by the upper-level semantic module according to the natural language instruction describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain locking input data; the configuration assignment module 202 is used to select one set from a set of preset front-end configurations according to the task mode identifier and target category text in the locking input data and instantiate it to obtain a configuration instance; the intent adaptation module 203 is used to convert the natural language instruction into a query representation according to the semantic understanding ability level of the detector selected in the configuration instance, and convert the corresponding uncarried semantic components into disambiguation. Clues; Candidate generation module 204, used to drive the selected detector to generate a set of candidate boxes in the image frame using the query representation, and determine the target identity information by a preset semantic model according to the natural language instructions; Locking disambiguation module 205, used to match the target identity information with the set of candidate boxes, and when the matching result is not unique, combine the disambiguation clues to narrow down the selection step by step, and take the matched candidate box as the locked box; Locking output module 206, used to extract appearance features from the locked box and lock it as anchor features, and output the locked box, the anchor features and the configuration identifier of the configuration instance to obtain the locking result.
[0103] like Figure 2 As shown, in the natural language-based target locking device 200, the data acquisition module 201, configuration assignment module 202, intent adaptation module 203 and candidate generation module 204 are connected in sequence. The candidate generation module 204 is connected to the locking disambiguation module 205. The locking disambiguation module 205 is connected to the locking output module 206. The data obtained by the previous module is used as the input of the next module. The six modules respectively execute the above steps S101 to S106.
[0104] In one embodiment, the data acquisition module 201 is specifically used for: Receive the target category text and task mode identifier issued by the higher-level semantic module according to the natural language instruction, and obtain the basic fields; The normalized anchor point box, color hints, and sound source azimuth angle of the first frame sent together are incorporated into the basic field to obtain the target description data; Synchronize with the received target description data, acquire image frames captured by the color camera, and obtain the current image frame; Acquire the 3D point cloud output by the depth sensor, which is synchronized with the current image frame, to obtain the depth point cloud; The target description data, the current image frame, and the depth point cloud are combined to obtain the locked input data.
[0105] In one embodiment, the configuration dispatch module 202 is specifically used for: When the task mode is identified as fast mode, the first preset configuration is selected; when the preset open vocabulary forced switch is turned on, the second preset configuration is selected, and the selected configuration is obtained. When the selected configuration is empty, the target category text is lowercase and whitespace is removed to obtain the normalized category text; The normalized category text is matched bidirectionally with the self-built vocabulary of the local closed set detection model to obtain the vocabulary hit result. Based on the word list hit results, the third preset configuration is selected when a hit occurs, and the fourth preset configuration is selected when a hit does not occur, thus obtaining the selected configuration; The required model is borrowed from the global model repository for the selected configuration and its cross-task runtime is reset to obtain a configuration instance.
[0106] In one embodiment, the intent adaptation module 203 is specifically used for: Read the semantic understanding capability level declared by the selected detector in the configuration instance to obtain the capability level; When the capability level is language-based, the natural language command is lightly rewritten using normalization to obtain the query representation; When the capability level is an open vocabulary phrase type, the central noun and key attribute words of the natural language instruction are extracted to obtain the query representation; When the capability level is a closed-set category type, the category label that is closest to the semantics of the natural language instruction in the vocabulary is taken to obtain the query representation; The query representation is structured by uncarried color, material, orientation, reference relationship and ordinal component to obtain disambiguation clues.
[0107] In one embodiment, the candidate generation module 204 is specifically used for: The selected detector, which acts as a geometric detector, detects the image frame according to the query representation to obtain an initial candidate box; The initial candidate boxes are sorted in descending order of detection confidence and truncated to the first preset number to obtain a candidate box set; The image frame containing the candidate box set and the natural language instruction are input into the semantic model to obtain the semantic recognition output; Select the target that matches the natural language instruction from the semantic recognition output to obtain the target identity; The semantic model, which serves as a large model of visual language, outputs a rough bounding box of the target identity to obtain the target identity information.
[0108] In one embodiment, the locking disambiguation module 205 is specifically used for: The spatial matching degree is obtained by calculating the intersection-union ratio (IUU) between the rough bounding box in the target identity information and each candidate bounding box in the candidate bounding box set. Candidate boxes that meet the preset matching threshold in terms of spatial matching degree and whose labels match the query representation are selected to obtain matching candidate boxes; When there is more than one matching candidate box, they are sorted according to their distance from the anchor box in the target description data to obtain the initial candidate boxes; The initial candidate boxes are filtered using the color cues in the disambiguation cues and scored in conjunction with neighboring reference objects to obtain the score candidate boxes; The highest score of the candidate scoring box is selected. If no matching candidate box is found, the coarse box is backtracked and marked as low precision to obtain the locked box.
[0109] In one embodiment, the locking output module 206 is specifically used for: The region within the locked box in the image frame is input into the appearance feature model borrowed by the configuration instance to obtain the appearance feature; The appearance features are normalized using the second norm and fixed as the first frame features of this locking task to obtain the anchor point features; The coordinates of the locking box corresponding to the anchor point feature are normalized according to the size of the image frame to obtain the normalized locking box; The locking confidence level is obtained by classifying the levels according to whether the normalized locking box comes from the matched candidate box; The normalized locking bounding box, anchor point features, locking confidence level, and configuration identifier are encapsulated and output together to obtain the locking result.
[0110] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0111] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0112] This invention also provides a computer device, which may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the computer device may also include various network interfaces, a power supply, a graphics card, etc., to utilize the graphics card's performance to operate the model, such as for inference and training.
[0113] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0114] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A target locking method based on natural language, characterized in that, include: Receive target description data issued by the upper semantic module according to the natural language instructions describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; Based on the task mode identifier and target category text in the locked input data, select one set from multiple preset front-end configurations and instantiate it to obtain a configuration instance; According to the semantic understanding ability level of the detector selected in the configuration instance, the natural language instruction is converted into a query representation, and the corresponding uncarried semantic components are converted into disambiguation clues; The query representation drives the selected detector to generate a set of candidate boxes in the image frame, and the preset semantic model determines the target identity information according to the natural language instructions. The target identity information is matched with the candidate box set. If the matching result is not unique, the candidate box is narrowed down step by step by combining the disambiguation clues, and the matched candidate box is taken as the lock box. Extract the appearance features of the locked frame and lock them as anchor point features. Output the locked frame, the anchor point features, and the configuration identifier of the configuration instance to obtain the locking result.
2. The natural language-based target locking method according to claim 1, characterized in that, The receiving upper-level semantic module sends target description data according to the natural language instructions describing the target to be locked, synchronously acquires image frames captured by the camera, and integrates them to obtain locking input data, including: Receive the target category text and task mode identifier issued by the higher-level semantic module according to the natural language instruction, and obtain the basic fields; The normalized anchor point box, color hints, and sound source azimuth angle of the first frame sent together are incorporated into the basic field to obtain the target description data; Synchronize with the received target description data, acquire image frames captured by the color camera, and obtain the current image frame; Acquire the 3D point cloud output by the depth sensor, which is synchronized with the current image frame, to obtain the depth point cloud; The target description data, the current image frame, and the depth point cloud are combined to obtain the locked input data.
3. The natural language-based target locking method according to claim 1, characterized in that, The step involves selecting and instantiating a pre-set set of front-end configurations based on the task mode identifier and target category text in the locked input data, resulting in a configuration instance, including: When the task mode is identified as fast mode, the first preset configuration is selected; when the preset open vocabulary forced switch is turned on, the second preset configuration is selected, and the selected configuration is obtained. When the selected configuration is empty, the target category text is lowercase and whitespace is removed to obtain the normalized category text; The normalized category text is matched bidirectionally with the self-built vocabulary of the local closed set detection model to obtain the vocabulary hit result. Based on the word list hit results, the third preset configuration is selected when a hit occurs, and the fourth preset configuration is selected when a hit does not occur, thus obtaining the selected configuration; The required model is borrowed from the global model repository for the selected configuration and its cross-task runtime is reset to obtain a configuration instance.
4. The natural language-based target locking method according to claim 1, characterized in that, The step of converting the natural language instruction into a query representation and converting the corresponding uncarried semantic components into disambiguation clues according to the semantic understanding capability level of the detector selected in the configuration instance includes: Read the semantic understanding capability level declared by the selected detector in the configuration instance to obtain the capability level; When the capability level is language-based, the natural language command is lightly rewritten using normalization to obtain the query representation; When the capability level is an open vocabulary phrase type, the central noun and key attribute words of the natural language instruction are extracted to obtain the query representation; When the capability level is a closed-set category type, the category label that is closest to the semantics of the natural language instruction in the vocabulary is taken to obtain the query representation; The query representation is structured by uncarried color, material, orientation, reference relationship and ordinal component to obtain disambiguation clues.
5. The natural language-based target locking method according to claim 1, characterized in that, The step of driving the selected detector to generate a set of candidate boxes in the image frame using the query representation, and determining the target identity information by a preset semantic model according to the natural language instructions, includes: The selected detector, which acts as a geometric detector, detects the image frame according to the query representation to obtain an initial candidate box; The initial candidate boxes are sorted in descending order of detection confidence and truncated to the first preset number to obtain a candidate box set; The image frame containing the candidate box set and the natural language instruction are input into the semantic model to obtain the semantic recognition output; Select the target that matches the natural language instruction from the semantic recognition output to obtain the target identity; The semantic model, which serves as a large model of visual language, outputs a rough bounding box of the target identity to obtain the target identity information.
6. The natural language-based target locking method according to claim 1, characterized in that, The step of matching the target identity information with the candidate box set, and when the matching result is not unique, narrowing down the selection step by step using the disambiguation clues, and taking the matched candidate box as the lock box, includes: The spatial matching degree is obtained by calculating the intersection-union ratio (IUU) between the rough bounding box in the target identity information and each candidate bounding box in the candidate bounding box set. Candidate boxes that meet the preset matching threshold in terms of spatial matching degree and whose labels match the query representation are selected to obtain matching candidate boxes; When there is more than one matching candidate box, they are sorted according to their distance from the anchor box in the target description data to obtain the initial candidate boxes; The initial candidate boxes are filtered using the color cues in the disambiguation cues and scored in conjunction with neighboring reference objects to obtain the score candidate boxes; The highest score of the candidate scoring box is selected. If there is no matching candidate box, the coarse box is backed down and marked as low precision to obtain the locked box.
7. The natural language-based target locking method according to claim 1, characterized in that, The process of extracting appearance features from the locked frame and locking them as anchor point features, then outputting the locked frame, the anchor point features, and the configuration identifier of the configuration instance to obtain the locking result includes: The region within the locked box in the image frame is input into the appearance feature model borrowed by the configuration instance to obtain the appearance feature; The appearance features are normalized using the second norm and fixed as the first frame features of this locking task to obtain the anchor point features; The coordinates of the locking box corresponding to the anchor point feature are normalized according to the size of the image frame to obtain the normalized locking box; The locking confidence level is obtained by classifying the levels according to whether the normalized locking box comes from the matched candidate box; The normalized locking bounding box, anchor point features, locking confidence level, and configuration identifier are encapsulated and output together to obtain the locking result.
8. A target locking device based on natural language, characterized in that, include: The data acquisition module is used to receive target description data issued by the upper semantic module according to the natural language instructions describing the target to be locked, synchronously acquire image frames captured by the camera, and integrate them to obtain the locking input data; The configuration assignment module is used to select and instantiate a set of pre-set front-end configurations based on the task mode identifier and target category text in the locked input data to obtain a configuration instance; The intent adaptation module is used to convert the natural language instruction into a query representation according to the semantic understanding capability level of the selected detector in the configuration instance, and to convert the corresponding uncarried semantic components into disambiguation clues. The candidate generation module is used to drive the selected detector to generate a set of candidate boxes in the image frame using the query representation, and to determine the target identity information by a preset semantic model according to the natural language instructions. The locking disambiguation module is used to match the target identity information with the candidate box set. When the matching result is not unique, it combines the disambiguation clues to narrow down the selection step by step, and takes the matched candidate box as the locking box. The lock output module is used to extract the appearance features of the lock box and lock them as anchor point features, and output the lock box, the anchor point features and the configuration identifier of the configuration instance to obtain the lock result.
9. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the natural language-based target locking method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the natural language-based target locking method as described in any one of claims 1 to 7.
