Target detection method and device, storage medium and electronic equipment

By using a dynamic association mechanism between the dominant category detection box and the subordinate category label, the problems of poor dynamic consistency in category determination and poor robustness in tracking similar targets during target detection are solved, achieving the technical effects of stable target tracking and accurate category determination.

CN120931902APending Publication Date: 2025-11-11ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511053738.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In existing technologies, the dynamic consistency of the classification of detection boxes during the target detection process is poor, and the robustness of tracking similar targets is poor. In particular, in dynamic video scenes, the same target is easily classified into different categories.

Method used

A dynamic association mechanism between the dominant category detection box and the subordinate category label is adopted. By constructing a cross-frame collaborative processing architecture, the dominant category detection box and the subordinate detection box carrying the subordinate category label are output synchronously during the detection stage. During the box merging stage, the dominant box label is enhanced and redundant subordinate boxes are removed based on spatial overlap analysis. During the decision stage, the category determination logic is dynamically optimized based on the time window statistical strategy.

Benefits of technology

It achieves continuous transmission of stable target tracking markers and improves the accuracy of category determination, effectively overcomes the tracking interruption problem caused by similar target detection jumps, improves the robustness of category determination in complex scenarios, and forms a technical advantage of high detection accuracy and strong tracking continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931902A_ABST
    Figure CN120931902A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method and device, a storage medium and electronic equipment. The method comprises the steps that a dominant category detection frame and an affiliated category detection frame in an image to be detected are determined based on a pre-trained target detection model, the dominant category detection frame comprises a dominant category mark, and the affiliated category detection frame comprises an affiliated category mark; and adding an affiliated category mark to the dominant category detection frame based on the coincidence degree between the dominant category detection frame and each affiliated category detection frame, and determining the category of the detection frame in the to-be-detected image based on the occurrence frequency of the affiliated category mark in the to-be-detected image. According to the method and the device, the technical problems of relatively poor dynamic consistency of category judgment of a detection frame and relatively poor tracking robustness of similar targets in a target detection process in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a target detection method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] In the field of computer vision, object detection and tracking technologies are widely used in scenarios such as intelligent surveillance and autonomous driving. Their core task is to accurately locate and continuously track targets in video sequences. Existing technologies typically employ neural network models for object detection, outputting the target bounding box coordinates and category information, and then combining this with tracking algorithms to generate the target's trajectory. However, when detecting objects belonging to highly similar categories, such as tricycles and small motor vehicles, or specific types of drones and birds, existing technologies face significant challenges.

[0003] Traditional methods improve a model's ability to distinguish similar targets by optimizing the neural network structure or adjusting the weights of the loss function. For example, some schemes use a focus loss function to suppress easily classified weights or enhance detail recognition through multi-scale feature fusion. However, these methods have limitations in dynamic video scenes: the detection model's output of the category of similar targets is prone to jumps, causing the same target to be classified into different categories in different frames. This instability makes it difficult for subsequent tracking algorithms to maintain the consistency of target IDs, leading to problems such as trajectory breakage and duplicate counting, severely limiting the accuracy of statistical analysis and behavior prediction. Therefore, related technologies suffer from poor dynamic consistency in the category determination of detection boxes during target detection and poor robustness in tracking similar targets.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a target detection method and apparatus, storage medium and electronic device to at least solve the technical problems of poor dynamic consistency of the category determination of the detection box and poor robustness of similar target tracking in the related art.

[0006] According to one aspect of the embodiments of this application, a target detection method is provided, comprising: determining a dominant category detection box and a secondary category detection box in an image to be detected based on a pre-trained target detection model, wherein the dominant category detection box includes a dominant category label, the secondary category detection box includes a secondary category label, the training samples of the target detection model include incremental training samples, the category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the secondary category training samples; traversing the dominant category detection boxes, adding the secondary category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each secondary category detection box; and determining the category of the detection box in the image to be detected based on the frequency of occurrence of the secondary category label in the image to be detected.

[0007] According to another aspect of the embodiments of this application, an object detection apparatus is also provided, comprising: a detection module, configured to determine a dominant category detection box and a subordinate category detection box in an image to be detected based on a pre-trained object detection model, wherein the dominant category detection box includes a dominant category label, the subordinate category detection box includes a subordinate category label, the training samples of the object detection model include incremental training samples, the category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the subordinate category training samples; a traversal module, configured to traverse the dominant category detection boxes and add the subordinate category label to the dominant category detection boxes based on the degree of overlap between the dominant category detection boxes and each subordinate category detection box; and a determination module, configured to determine the category of the detection boxes in the image to be detected based on the number of times the subordinate category label appears in the image to be detected.

[0008] In an exemplary embodiment, the device is configured to traverse the dominant category detection box in the following manner, and add the subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box: traversing the dominant category detection box, sequentially determining the degree of overlap between the dominant category detection box and each subordinate category detection box, determining a target dominant category detection box and a target subordinate category detection box whose degree of overlap satisfies a preset condition; adding the subordinate category label to the target dominant category detection box; and deleting the target subordinate category detection box.

[0009] In an exemplary embodiment, the step of traversing the dominant category detection box, sequentially determining the overlap degree between the dominant category detection box and each of the subordinate category detection boxes, and determining the target dominant category detection box and the target subordinate category detection box whose overlap degree meets a preset condition includes: traversing the dominant category detection box, where each selected dominant category detection box is regarded as the current dominant category detection box, and each selected subordinate category detection box is regarded as the current subordinate category detection box, and performing the following steps: determining the intersection-union ratio (IUR) parameter between the current dominant category detection box and the current subordinate category detection box; and, if the IUR parameter is greater than or equal to a preset threshold, determining the current dominant category detection box and the current subordinate category detection box as the target dominant category detection box and the target subordinate category detection box, respectively.

[0010] In an exemplary embodiment, the apparatus is further configured to: before the pre-trained target detection model determines the dominant class detection box and the subordinate class detection box in the image to be detected, obtain initial training samples, wherein the initial training samples include initial dominant class training samples and initial subordinate class training samples; determine incremental training samples based on the initial training samples; merge the initial training samples and the incremental training samples to obtain target training samples; and train the initial detection model using the target training samples to obtain the target detection model.

[0011] In an exemplary embodiment, the apparatus is configured to determine incremental training samples based on the initial training samples by: obtaining the dominant category label of the initial dominant category training sample and the coordinate information of the initial subordinate category training sample; and generating the incremental training samples based on the dominant category label and the coordinate information.

[0012] In an exemplary embodiment, the apparatus is configured to determine a dominant category detection box and a secondary category detection box in an image to be detected based on a pre-trained object detection model in the following manner: determining a dominant category detection box and a secondary category detection box in N consecutive frames of the image to be detected based on the object detection model, wherein N is an integer and N is greater than 1; the apparatus is configured to determine the category of the detection box in the image to be detected based on the occurrence frequency of the secondary category marker in the image to be detected in the following manner: labeling the target detection boxes in the N consecutive frames of the image to be detected with a uniform identifier, wherein different target detection boxes use different uniform identifiers; determining the occurrence frequency of the secondary category marker in the image to be detected based on the occurrence frequency of each uniform identifier in the N consecutive frames of the image to be detected; determining the category of the target detection box as the category corresponding to the secondary category marker when the occurrence frequency of the secondary category marker in the image to be detected meets a preset frequency condition; determining the category of the target detection box as the category corresponding to the dominant category marker when the occurrence frequency of the secondary category marker in the image to be detected does not meet the preset frequency condition, wherein the dominant category detection box includes the dominant category marker.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described target detection method at runtime.

[0014] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the target detection method described above.

[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the target detection method described above through the computer program.

[0016] In this embodiment, a dynamic association mechanism between the dominant category detection box and the subordinate category label is adopted. By constructing a cross-frame collaborative processing architecture, the dominant category detection box and the subordinate detection box carrying the subordinate category label are output synchronously based on the pre-trained model during the detection stage. During the box merging stage, the dominant box label is enhanced and redundant subordinate boxes are removed based on spatial overlap analysis. During the decision stage, the category determination logic is dynamically optimized based on the time window statistical strategy, achieving the dual purpose of stabilizing target tracking labels and improving the accuracy of category determination, thereby realizing the technical effect of collaborative optimization of the detection and tracking system. By maintaining the stable transmission of tracking labels through the persistent features of the dominant box and recording the instantaneous classification results using the auxiliary features of the subordinate label, the tracking interruption problem caused by the jump in similar target detection is effectively overcome. At the same time, the decision mechanism based on cross-frame statistics transforms the single-frame detection error into a convergent probability distribution, which significantly improves the robustness of category determination in complex scenes, forming a technical advantage of high detection accuracy tolerance and strong tracking continuity. This provides a reliable solution for dynamic video analysis scenarios, thereby solving the technical problems of poor dynamic consistency of detection box category determination and poor robustness of similar target tracking in related technologies. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a schematic diagram of an application environment for an optional target detection method according to an embodiment of this application;

[0019] Figure 2 This is a flowchart illustrating an optional target detection method according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of an optional target detection method according to an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of another optional target detection method according to an embodiment of this application;

[0022] Figure 5 This is a schematic diagram of another optional target detection method according to an embodiment of this application;

[0023] Figure 6 This is a schematic diagram of another optional target detection method according to an embodiment of this application;

[0024] Figure 7 This is a schematic diagram of an optional target detection device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0028] Object detection: The model outputs the bounding rectangle of the target to be detected in the image and gives the category; the training set for training the object detection model contains images and the labels of the targets in them. Usually, the label includes the position coordinates of the target box and the category label. For example, for a target of category car, the position coordinates of the top left corner of the target box are (10, 20), the position coordinates of the bottom right corner are (100, 120), and the label car is mapped to the integer 0. Then, the label of car in this image can be represented by (0, 10, 20, 100, 120).

[0029] Target tracking: Obtain bounding boxes for target detection and determine the ID of each bounding box. For consecutive video frames, ensure that the same target has the same ID.

[0030] Intersection over Union (IOU) is a metric used in computer vision to measure the degree of overlap between two bounding boxes, and it is widely used, especially in object detection and tracking tasks.

[0031] The present application will be described below with reference to embodiments:

[0032] According to one aspect of the embodiments of this application, a target detection method is provided. Optionally, in this embodiment, the above-described target detection method can be applied to, for example... Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1 As shown, server 101 is connected to terminal 103 via a network and can be used to provide services to terminal devices or applications installed on terminal devices. The applications can be video applications, instant messaging applications, browser applications, educational applications, game applications, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a game data storage server. The network mentioned above can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks, metropolitan area networks, and wide area networks. The wireless network includes Bluetooth, WIFI, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, MID (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, virtual reality (VR) terminals, augmented reality (AR) terminals, mixed reality (MR) terminals, and other computer devices. The server mentioned above can be a single server, a server cluster composed of multiple servers, or a cloud server.

[0033] Combination Figure 1 As shown, the above target detection method can be executed by an electronic device, which can be a terminal device or a server. The above target detection method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.

[0034] The above is merely an example, and this embodiment does not impose any specific limitations.

[0035] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the above target detection method includes:

[0036] S202, Based on the pre-trained object detection model, determine the dominant category detection box and the subordinate category detection box in the image to be detected, wherein the dominant category detection box includes a dominant category label, the subordinate category detection box includes a subordinate category label, the training samples of the object detection model include incremental training samples, the category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the subordinate category training samples;

[0037] S204, Traverse the dominant category detection boxes, and add subordinate category labels to the dominant category detection boxes based on the degree of overlap between the dominant category detection boxes and each subordinate category detection box;

[0038] S206, determine the category of the detection box in the image to be detected based on the number of times the subordinate category marker appears in the image to be detected.

[0039] In step S202, the pre-trained object detection model generates detection results through forward inference. The dominant category detection box corresponds to the baseline category defined during training (e.g., motor vehicle), while the subordinate category detection boxes retain their original category labels (e.g., tricycle). For example, in a traffic monitoring scenario, after the model infers from a frame of image, it may output multiple detection boxes, some labeled as "motor vehicle" (dominant category) and others as "tricycle" (subordinate category). Each subordinate category detection box carries its original category information, but because it highly overlaps with the dominant category box, subsequent steps will merge them.

[0040] Optionally, in this embodiment, the dominant category detection box may include, but is not limited to, the detection box generated by adjusting the label during the model training phase. This detection box corresponds to the category selected as the baseline among similar categories. For example, in the training set, assuming there are similar categories "tricycle" and "motor vehicle," if "motor vehicle" is selected as the dominant category, then the target boxes of all subordinate categories (such as tricycle) will be copied and their labels modified to "motor vehicle." Thus, in the trained model, each subordinate category target will simultaneously generate a dominant category detection box that highly overlaps with it during detection. This design ensures that during the inference phase, even if the detection boxes of subordinate categories disappear due to model misjudgment, the dominant category detection box can still exist stably, providing a continuous basis for subsequent tracking. The selection of the dominant category is usually based on the number of targets or business needs. For example, in a traffic monitoring scenario, if the number of motor vehicles is dominant, then it can be set as the dominant category.

[0041] It should be noted that this application supports a flexible strategy for defining the dominant category to adapt to different scenario requirements. At the basic level, the dominant category is automatically determined by the number of samples in the training set, ensuring that the model prioritizes learning the features of high-frequency targets. At the advanced level, key categories can be forcibly specified based on business logic; for example, in a security monitoring scenario, "suspicious package" can be set as the dominant category to prioritize the detection stability of high-risk targets. At even higher levels, the system introduces online learning capabilities, dynamically adjusting the weight of the dominant category in conjunction with real-time data streams to adapt to complex situations such as changes in target appearance or fluctuations in ambient lighting.

[0042] Optionally, in this embodiment, the aforementioned subordinate category detection boxes may include, but are not limited to, target boxes that have similar features to the dominant category but were labeled as secondary categories during training. For example, in the case where the dominant category is "motor vehicle," "tricycle" is a subordinate category, and its original label is partially replaced with "motor vehicle" during the training phase, but it may still be detected as an independent category by the model during the inference phase. The characteristic of subordinate category detection boxes is that their spatial positions highly overlap with those of the dominant category detection boxes, but in business logic, their category classification needs to be ultimately determined based on the labeling frequency. For example, in video surveillance, if a target is frequently labeled as "tricycle" in consecutive frames, even if its dominant category is "motor vehicle," it may still be corrected to "tricycle" to meet the requirements of accurate statistics.

[0043] Optionally, in this embodiment, the aforementioned auxiliary category marker may include, but is not limited to, an identifier added to each dominant category detection box when merging detection boxes, used to record its association with the auxiliary category. For example, after the dominant category detection box and the auxiliary category detection box are merged, the auxiliary category name and its occurrence frequency are recorded in the metadata of the dominant box. This marker mechanism enables the subsequent logical analysis module to dynamically adjust the target category based on historical frequency. For example, if a dominant category detection box is marked as "tricycle" 70 times within 100 frames, its actual category can be determined to be "tricycle," thereby achieving category correction.

[0044] It should be noted that the statistical mechanism for ancillary category labeling is divided into two levels: spatial and temporal. In the spatial dimension, a sliding window is used to statistically analyze the labeling frequency of recent frames, suppressing the impact of single-frame detection noise on the classification results. In the temporal dimension, the system can combine the analysis of the target's motion trajectory persistence; for example, it can enhance the credibility of the ancillary labels for targets that remain in a specific area for a long time. Furthermore, the system supports fusing multi-source sensor data (such as infrared thermal imaging and LiDAR point clouds) for cross-modal statistics, improving decision robustness in complex environments.

[0045] Optionally, in this embodiment, the dominant category marker may include, but is not limited to, a unique identifier defined for the baseline category during the training phase, used to strengthen the feature learning of the dominant category during model training. For example, in a traffic scenario, if "motor vehicle" is set as the dominant category, all samples labeled "motor vehicle" retain their original labels during training, and the detection capability of the dominant category is further consolidated during training through label adjustment strategies (such as copying the subordinate category boxes and modifying their labels to the dominant category). The role of the dominant category marker is to ensure that the model prioritizes and stably outputs the detection boxes of the dominant category during the inference phase. Even if the detection results of the subordinate categories fluctuate, the continued existence of the dominant box can prevent tracking interruption. For example, in a traffic flow statistics system, the dominant category marker of motor vehicles ensures that its detection box is always visible in the video frame, providing a stable ID allocation basis for the subsequent tracking module.

[0046] In step S204, all dominant category detection boxes are traversed, and their spatial overlap with subordinate category detection boxes is calculated. For example, if the IOU value between a dominant category box and a subordinate category box is 0.95 (exceeding the threshold of 0.9), the subordinate category box is deleted, and a "tricycle" tag is added to the metadata of the dominant box. This process reduces the complexity of subsequent tracking algorithms by eliminating redundant detection boxes, while retaining the key information needed for category correction. For example, in a dense traffic scene, if multiple subordinate category boxes overlap with the same dominant box, the system will compare and merge them one by one to ensure that each dominant box retains only the most relevant subordinate tags.

[0047] Optionally, in this embodiment, the degree of overlap can include, but is not limited to, measuring the spatial overlap between two detection boxes using metrics such as Intersection over Union (IOU), center point distance, or shape similarity. Taking IOU as an example, it is calculated as the ratio of the intersection area to the union area of ​​the two boxes, and the threshold can be dynamically adjusted according to the actual scenario (e.g., 0.7-0.95). In industrial quality inspection scenarios, if the IOU value between the dominant box and the subordinate box exceeds the threshold, a merging operation is triggered; in medical image analysis, pixel-level semantic segmentation results can be combined to enhance the robustness of overlap determination. The design of this parameter directly affects the balance between the sensitivity of false positive filtering and the risk of false negatives.

[0048] It should be noted that the calculation methods for the aforementioned overlap degree may include, but are not limited to, Intersection over Union (IOU), center point distance, and overlap area ratio. For example, in scenarios with severe occlusion, center point distance can be used as an auxiliary indicator; when the target size differences are large, the merging strategy can be adjusted in conjunction with the overlap area ratio. Furthermore, the threshold selection can be dynamically adjusted according to business needs; for example, the threshold can be increased in scenarios prioritizing low false positives, while decreasing in scenarios prioritizing high recall. This application does not impose specific limitations in this regard.

[0049] In step S206, the target category is dynamically corrected by statistically analyzing the frequency of occurrence of secondary category markers in consecutive frames. For example, if a dominant category box is marked as "tricycle" 70 times in 100 consecutive frames, the logic analysis module will ultimately classify it as "tricycle." This mechanism effectively avoids the impact of misclassification in a single frame and improves the robustness of category determination. For instance, in scenarios where changes in lighting cause secondary category boxes to disappear intermittently, frequency-based determination still ensures stable results.

[0050] Optionally, in this embodiment, the aforementioned occurrence count may include, but is not limited to, the frequency at which the sub-category label is counted within a certain time window or consecutive frame number. For example, in a video surveillance system, the system can maintain a sliding window of length N frames (N=50) and count the number of times each dominant frame ID is labeled as a sub-category within this window. If the number of times a certain ID is labeled exceeds a threshold (e.g., 30 times), its final category is determined to be a sub-category. This method effectively suppresses noise caused by single-frame detection jumps through smoothing processing in the time dimension, and is suitable for scenarios such as continuous obstacle type recognition in autonomous driving.

[0051] It should be noted that the statistical logic for the frequency of occurrence mentioned above may include, but is not limited to, fixed-window statistics, sliding-window weighted statistics, and adaptive window adjustment. For example, in tracking high-speed moving targets, a shorter time window can be used to quickly respond to category changes; while in static or low-speed scenarios, a longer window can be used to improve statistical stability. Furthermore, frequency determination can be weighted in conjunction with confidence scores, for example, high-confidence markers have higher weights. This application does not impose specific limitations on this.

[0052] Optionally, in this embodiment, the category of the detection box may include, but is not limited to, the final classification result dynamically determined based on business logic. For example, in a retail shelf analysis scenario, if a dominant box is labeled as "Beverage A" more than 60% of the time, its category is corrected to "Beverage A"; in security monitoring, the classification strategy can be adjusted according to the spatiotemporal distribution pattern of the auxiliary labels (such as continuous occurrence in a specific area). This category determination mechanism supports plug-in design, allowing configuration of statistical rules according to different business needs, thereby improving the scalability of the solution.

[0053] It should be noted that the detection box merging strategy is designed in three layers: geometric layer, feature layer, and semantic layer. The geometric layer determines the spatial overlap based on the intersection-union ratio or center point distance of the detection boxes, forming the initial merging basis. The feature layer verifies the consistency of the target identity by comparing the similarity of deep features extracted by the convolutional neural network. The semantic layer combines prior knowledge of the scene (such as traffic rules and industrial quality inspection standards) to perform a secondary verification of the merging results, avoiding business logic errors caused by erroneous merging.

[0054] This application's embodiments employ a dynamic association mechanism between dominant category detection boxes and subordinate category labels. By constructing a cross-frame collaborative processing architecture, during the detection phase, dominant category detection boxes and subordinate detection boxes carrying subordinate category labels are synchronously output based on a pre-trained model. During the box merging phase, dominant box label enhancement and redundant subordinate box removal are achieved based on spatial overlap analysis. During the decision-making phase, the category determination logic is dynamically optimized using a time window statistical strategy. This achieves the dual goals of stabilizing target tracking labels and improving category determination accuracy, thus realizing the technical effect of collaborative optimization of the detection and tracking system. By maintaining stable transmission of tracking labels through the persistent features of the dominant box and recording instantaneous classification results using the auxiliary features of the subordinate labels, the tracking interruption problem caused by similar target detection jumps is effectively overcome. At the same time, the cross-frame statistical decision-making mechanism transforms single-frame detection errors into a convergent probability distribution, significantly improving the robustness of category determination in complex scenes. This results in technical advantages of high detection accuracy tolerance and strong tracking continuity, providing a reliable solution for dynamic video analysis scenarios. This solves the technical problems of poor dynamic consistency of detection box category determination and poor robustness of similar target tracking in related technologies.

[0055] As an optional approach, iterate through the dominant category detection boxes and add sub-category labels to the dominant category detection boxes based on the degree of overlap between the dominant category detection box and each sub-category detection box, including:

[0056] Traverse the dominant category detection boxes, determine the degree of overlap between the dominant category detection box and each subordinate category detection box, and determine the target dominant category detection box and the target subordinate category detection box whose degree of overlap meets the preset conditions;

[0057] Add a secondary category tag to the target dominant category detection box;

[0058] Delete the target's subordinate category detection box.

[0059] Optionally, in this embodiment, the aforementioned target dominant category detection boxes may include, but are not limited to, detection box types that are preferentially retained during the model inference stage. Their category is determined by the number of similar target samples in the training set or by business priority. For example, in a traffic monitoring scenario, if "motor vehicle" is defined as the dominant category, all detected motor vehicle boxes will be used as core tracking targets, while similar "tricycle" boxes may be classified as subordinate categories. The aforementioned target subordinate category detection boxes may include, but are not limited to, detection box types that have similar visual features to the dominant category but have lower priority.

[0060] Optionally, in this embodiment, the aforementioned preset conditions may include, but are not limited to, thresholds or rules set through experiments or business requirements, used to determine whether the dominant category detection box and the subordinate category detection box need to be merged. For example, in a traffic flow statistics scenario, if it is necessary to strictly avoid accidental deletion, the IOU threshold can be set to 0.95; while in scenarios with high real-time requirements, the threshold can be appropriately reduced to 0.85 to accelerate the processing flow. The setting of preset conditions needs to balance accuracy and efficiency. For example, in dense target scenarios, the threshold can be dynamically adjusted to adapt to the detection needs of different time periods.

[0061] For example, firstly, all dominant category detection boxes (such as the "motor vehicle" box) are traversed, and the spatial overlap between each box and all subordinate category detection boxes (such as the "tricycle" box) in the current frame is calculated. For instance, if the IOU value between a dominant box and a subordinate box is 0.92 (exceeding the preset threshold of 0.9), then the two are determined to meet the merging condition. This process filters out the box pairs that need to be merged by performing geometric matching on the dominant and subordinate boxes one by one. For example, in a traffic monitoring scenario, a tricycle may be detected as two boxes: "tricycle" (subordinate category) and "motor vehicle" (dominant category). By calculating the IOU value between the two, the system determines whether they need to be merged to eliminate redundancy.

[0062] Then, after determining the merging conditions, the system adds a subordinate category tag to the metadata of the dominant category detection box to record its association with the subordinate boxes. For example, after merging a dominant box (motor vehicle) and a subordinate box (tricycle), the system will record the "tricycle" tag and its frequency in the attributes of the motor vehicle box. The key to this step is to preserve the semantic information of the subordinate categories so that subsequent analysis modules can correct the target category based on historical data. For example, in a logistics sorting scenario, if the dominant category of a package is "ordinary package" but it is frequently marked as "fragile," it may eventually be classified as "fragile" to trigger a special processing procedure.

[0063] Finally, after adding the tags, the system deletes the subordinate category detection boxes that meet the merging conditions, retaining only the dominant category detection boxes and their subordinate tags. For example, after merging the tricycle and motor vehicle boxes, the system deletes the tricycle box to prevent the tracking algorithm from assigning multiple IDs to the same target. This step reduces the complexity of subsequent processing and ensures that the tracking module only needs to process the dominant box, thereby improving system efficiency. For example, in dense pedestrian traffic monitoring, if a pedestrian is detected as both an "adult" and a "child," deleting the subordinate boxes can prevent the tracking algorithm from misjudging the trajectory due to redundant data.

[0064] This application's embodiments traverse the dominant category detection boxes and calculate their overlap with subordinate category detection boxes, achieving accurate merging and label management of redundant detection boxes. During the detection phase, by dynamically determining the overlap degree and adding subordinate category labels, the semantic information of subordinate categories is preserved while avoiding tracking confusion caused by multiple coexisting boxes. For example, in traffic scenarios, after merging the detection boxes of tricycles and motor vehicles, the tracking algorithm only needs to process the dominant box (motor vehicle), while simultaneously recording the frequency of tricycle occurrences through labeling, ensuring the accuracy of subsequent statistics and trajectory analysis. The design of deleting redundant subordinate boxes significantly reduces computational resource consumption, making it particularly suitable for high frame rate video streams or large-scale monitoring systems. Furthermore, the flexible adjustment capability based on preset conditions allows this solution to adapt to different scenario requirements. For example, in the security field, increasing the threshold can reduce the risk of false merging, while in industrial quality inspection, lowering the threshold can improve the detection rate of small defective targets. Overall, this method effectively solves the category jump problem in similar target detection through a structured box merging and labeling mechanism, improving the system's robustness and business adaptability.

[0065] As an optional approach, the dominant category detection boxes are traversed, and the overlap between the dominant category detection boxes and each subordinate category detection box is determined sequentially. Target dominant category detection boxes and target subordinate category detection boxes whose overlap satisfies preset conditions are then identified, including:

[0066] Iterate through the dominant category checkboxes, treating each selected dominant category checkbox as the current dominant category checkbox and each selected secondary category checkbox as the current secondary category checkbox, and perform the following steps:

[0067] Determine the intersection-union ratio (IU) parameter between the current dominant category detection box and the current subordinate category detection boxes;

[0068] If the crossover ratio parameter is greater than or equal to a preset threshold, the current dominant category detection box and the current subordinate category detection box are respectively determined as the target dominant category detection box and the target subordinate category detection box.

[0069] Optionally, in this embodiment, the aforementioned intersection-to-union (IOU) parameter may include, but is not limited to, an index used to quantify the degree of spatial overlap between two detection boxes. It is typically calculated using the IOU formula, which is the ratio of the intersection area to the union area of ​​two boxes. For example, in a traffic scenario, if the intersection area of ​​a motor vehicle (dominant category) detection box and a tricycle (subordinate category) detection box is 90 pixels, and their union area is 100 pixels, then the IOU value is 0.9. The IOU parameter is the core basis for determining whether two boxes belong to the same target. Its value ranges from 0 to 1, with a value closer to 1 indicating a higher degree of overlap. It should be noted that the calculation of the IOU can be optimized for detection boxes of different shapes, such as rotated boxes or polygonal boxes, to adapt to the needs of complex scenarios.

[0070] Optionally, in this embodiment, the target dominant category detection box may include, but is not limited to, the dominant category detection box retained after overlap filtering, which meets a preset merging condition with a certain subordinate category detection box. For example, in traffic monitoring, when the IOU value between the motor vehicle (dominant category) box and the tricycle (subordinate category) box exceeds a threshold, the motor vehicle box is marked as the target dominant category detection box, and carries the subordinate label of the tricycle. The selection of the target dominant box ensures that subsequent tracking and analysis only need to process key detection results, avoiding redundant data interference. For example, in a highway scenario, if the detection boxes of truck (dominant category) and cargo box (subordinate category) highly overlap, the truck box is retained as the target dominant box, and the cargo box box is merged and deleted.

[0071] Optionally, in this embodiment, the target subordinate category detection box may include, but is not limited to, subordinate category detection boxes that meet the merging conditions with the target dominant category detection box. Their information is integrated into the dominant box's label and then deleted. For example, when the IOU value between the tricycle (subordinate category) box and the motor vehicle (dominant category) box reaches a threshold, the tricycle box is marked as the target subordinate box, its category information is recorded in the attributes of the motor vehicle box, and then removed from the detection results. This design ensures data simplification while retaining key category correction criteria. For example, in parking lot management, if the detection boxes for electric vehicles (subordinate category) and cars (dominant category) overlap, the frequency of occurrence of the electric vehicle box after merging will be used for the final category determination.

[0072] For example, firstly, all dominant category detection boxes (such as vehicle boxes) in the current frame are traversed, and each one is matched against all subordinate category detection boxes (such as tricycle boxes). For instance, in a traffic flow statistics scenario, the system first selects a vehicle box as the current dominant box, and then sequentially selects each tricycle box as the current subordinate box for subsequent calculations. This traversal mechanism ensures that the matching relationship between each pair of dominant and subordinate boxes is evaluated independently, avoiding missed or over-detection. For example, in intersection monitoring, if multiple vehicles and tricycles are intersecting, the system needs to compare each pair of boxes one by one to accurately determine the merging conditions.

[0073] The system then calculates the Intersection over Union (IOU) value between the dominant bounding box and its subordinate bounding boxes, which serves as the basis for deciding whether to merge them. For example, if the coordinates of a vehicle bounding box are (10, 20, 100, 120) and the coordinates of a tricycle bounding box are (15, 25, 95, 115), and their intersection area is 80 pixels and their union area is 90 pixels, then the IOU value is 0.89. If the preset threshold is 0.85, then the merging condition is met. This calculation process precisely quantifies the overlap between bounding boxes through geometric operations, providing an objective standard for subsequent operations. For example, in low-light nighttime scenes, the model may misdetect shadow areas as target boxes, but the IOU threshold can effectively filter out false overlaps.

[0074] Finally, when the IOU value reaches the threshold, the system marks the current dominant box as the target dominant box and the subordinate boxes as target subordinate boxes, triggering the merging process. For example, in a traffic congestion scenario, a tricycle is driving very close to a motor vehicle, and the IOU value of their detection boxes is 0.91 (threshold 0.9). In this case, the motor vehicle box is retained as the target dominant box, while the tricycle box is marked as a target subordinate box to be merged. This step dynamically determines the relationship between boxes, ensuring that only highly overlapping box pairs are processed, avoiding invalid operations. For example, during a lane change, briefly overlapping boxes may be ignored because their IOU value is below the threshold, thus reducing the risk of erroneous merging.

[0075] It should be noted that the aforementioned preset threshold can be flexibly adjusted based on scene characteristics, target size, or business requirements. For example, in densely trafficked urban roads, the threshold can be appropriately lowered (e.g., 0.85) to accelerate merging processing; while in highway scenarios, due to the larger vehicle spacing, the threshold can be increased (e.g., 0.95) to improve merging accuracy. Furthermore, the threshold can dynamically adapt to environmental changes. For instance, in rainy or foggy weather, the stability of the model's bounding boxes decreases; in this case, the threshold can be adjusted using a weighted approach based on confidence scores. This application does not impose specific limitations on this.

[0076] It should be noted that the calculation of the aforementioned intersection-union ratio (IOU) parameter can be extended to three-dimensional space or multimodal data fusion scenarios. For example, in autonomous driving systems, three-dimensional IOU can be calculated by combining LiDAR point cloud data; in UAV monitoring, detection boxes from infrared and visible light images can be fused for cross-modal overlap analysis. Furthermore, for non-rectangular boxes (such as rotated boxes or semantic segmentation masks), polygon intersection algorithms or pixel-level overlap rate calculations can be used. This application does not impose specific limitations on this.

[0077] This application's embodiments significantly improve the accuracy of similar target detection and tracking in traffic scenarios by calculating the intersection-union ratio (IUR) of dominant and subordinate category detection boxes pairwise and dynamically determining merging conditions based on preset thresholds. During the traversal matching process, the system independently evaluates the overlap of each pair of boxes to ensure refined merging decisions. For example, in mixed traffic scenarios, detection boxes for motor vehicles and tricycles are merged due to high overlap. The continuous and stable existence of the dominant box provides a reliable ID allocation basis for the tracking algorithm, avoiding trajectory breaks caused by category jumps. The design of deleting redundant subordinate boxes not only reduces the complexity of subsequent processing but also reduces memory and computing resource consumption, making it particularly suitable for traffic monitoring systems with high real-time requirements. Furthermore, the flexibility of the preset thresholds allows this solution to adapt to different scenario needs. For example, in complex urban road conditions, adjusting the thresholds balances accuracy and efficiency, or in adverse weather conditions, it enhances robustness by combining multi-sensor data. Overall, this method, through a structured box merging mechanism, effectively solves the problems of false detection and missed detection in similar target detection, providing efficient and reliable technical support for traffic management, traffic flow statistics, and other businesses.

[0078] As an optional approach, before determining the dominant class detection box and the secondary class detection box in the image to be detected based on the pre-trained object detection model, the above method further includes:

[0079] Obtain initial training samples, which include initial dominant class training samples and initial subordinate class training samples;

[0080] Incremental training samples are determined based on the initial training samples;

[0081] The initial training samples and incremental training samples are merged to obtain the target training samples;

[0082] The initial detection model is trained using target training samples to obtain the target detection model.

[0083] Optionally, in this embodiment, the initial training samples may include, but are not limited to, the original dataset used in the early stages of model training, which contains labeled samples of the dominant and subordinate categories. For example, in a traffic recognition scenario, the initial training samples may contain a large number of image samples labeled as "motor vehicles" (dominant category) and a small number of samples labeled as "tricycles" (subordinate category). These samples are generated through manual annotation or automated tools, and each sample contains the target's location coordinates and category label. The construction of the initial training samples needs to cover typical scenarios, such as urban roads, highways, and intersections, to ensure that the model has basic generalization ability. It should be noted that the number of samples in the dominant category is usually significantly larger than that in the subordinate categories to reflect the distribution characteristics in the actual scene.

[0084] Optionally, in this embodiment, the initial dominant category training samples may include, but are not limited to, labeled data defined as the baseline category in the training set, whose labels remain unchanged during training. For example, in a traffic monitoring scenario, if "motor vehicle" is set as the dominant category, all samples labeled "motor vehicle" will be directly used for model training without adjusting their category labels. These samples typically cover diverse target forms, such as images of motor vehicles under different vehicle types, colors, angles, and lighting conditions. The selection of the dominant category needs to be based on business priorities; for example, in a traffic flow statistics system, motor vehicles are prioritized as the baseline category due to their high proportion.

[0085] Optionally, in this embodiment, the initial training samples for the subordinate categories may include, but are not limited to, original data that has similar characteristics to the dominant category but is labeled as a secondary category. For example, in the initial training samples, "tricycle" is a subordinate category, and its original label will be partially replaced by the dominant category label (such as "motor vehicle") in subsequent training stages. These samples need to contain target instances that are easily confused with the dominant category, such as side views of tricycles and small motor vehicles. The annotation of the subordinate category samples needs to be refined to avoid introducing noise during training; for example, the accuracy of the annotation needs to be strictly verified in occluded or blurred scenes.

[0086] Optionally, in this embodiment, the incremental training samples may include, but are not limited to, supplementary data added or dynamically generated based on the initial training set, used to optimize model performance. For example, in a traffic scenario, the incremental set may include newly collected nighttime driving data, target images under rainy or snowy weather conditions, or rotated, scaled, or noise-perturbed samples generated through data augmentation techniques. The construction of the incremental set can be based on the model's performance after initial training, with targeted supplementary samples for weak areas (such as small target detection). It should be noted that the incremental data must maintain consistency in distribution with the initial set to avoid introducing neighborhood shift issues.

[0087] Optionally, in this embodiment, the target training samples may include, but are not limited to, the complete dataset resulting from the merging of the initial set and the incremental set, used for final model training. For example, in a traffic recognition scenario, the target training set may contain an initial set of 100,000 labeled images and an incremental set of 20,000 new samples, covering a more comprehensive range of scenes and target shapes. During the merging process, duplicate samples need to be removed, and the labeling format needs to be standardized, for example, converting coordinate formats from different sources (such as YOLO and COCO formats) into the standard form required by the model input. The size and quality of the target training set directly affect the model's ability to distinguish similar targets.

[0088] For example, firstly, the raw training data is collected and organized from the data source, distinguishing between dominant and subordinate category samples. For instance, in a traffic recognition task, the initial dominant category samples might contain 5000 images labeled "motor vehicles," while the subordinate category samples might contain 500 images labeled "tricycles." Data sources can include public datasets (such as COCO, KITTI), enterprise-owned surveillance videos, or third-party annotation services. It is necessary to ensure sample diversity, such as covering different time periods (day / night), weather conditions (sunny / rainy / foggy), and target poses (front / side view).

[0089] Then, incremental data is dynamically generated or filtered based on the initial training results or business needs. For example, if the initial model performs poorly in detecting tricycles at night, the incremental set can specifically add tricycle samples under low-light conditions. Incremental data can be collected from real-world scenarios (e.g., by adding new cameras), data augmentation (e.g., adjusting brightness, adding motion blur), or synthetically generated (e.g., using GANs to generate realistic images). The size of the incremental set needs to balance model performance and training cost; for example, lightweight incremental data can be used in embedded devices to avoid overload.

[0090] Finally, the initial set and the incremental set are integrated to form the final training dataset. For example, merging the 5,000 vehicle samples from the initial set with the 1,000 nighttime vehicle samples from the incremental set results in a target training set containing 6,000 vehicle samples, covering a more comprehensive range of scenarios. During the merging process, data cleaning is required, such as removing incorrectly labeled or low-quality images (e.g., excessively blurred or duplicate samples), and balancing the class distribution to avoid excessive skewness of dominant class samples, which could lead to model bias.

[0091] It should be noted that the methods for generating the aforementioned incremental training samples can include, but are not limited to, real-world scene acquisition, data augmentation, adversarial example generation, or cross-domain transfer. For example, in traffic recognition, the image color saturation can be adjusted to simulate road conditions in different seasons, or virtual occlusions (such as trees or billboards) can be added to enhance the model's robustness. Furthermore, incremental data can be combined with active learning strategies to dynamically select high-value samples based on the model's prediction uncertainty. This application does not impose specific limitations in this regard.

[0092] It should be noted that the specific implementation of the above-mentioned merging operation can include, but is not limited to, simple overlay, weighted sampling, or hierarchical integration. For example, in resource-constrained scenarios, random sampling can be used to draw samples proportionally from the initial set and the incremental set; in class-imbalanced scenarios, the distribution can be optimized by oversampling subordinate categories or undersampling dominant categories. Furthermore, a data version management mechanism can be introduced into the merging process to track the sample source and modification records. This application does not impose specific limitations on this.

[0093] This application's embodiments significantly improve the generalization ability and stability of the similar object detection model by utilizing phased construction and merging of training samples. The construction of initial training samples ensures the model's coverage of basic scenarios, such as the accuracy of daytime vehicle detection; the introduction of incremental training samples specifically addresses the shortcomings of the initial model, such as missed detections at night or in inclement weather. By merging to form target training samples, the model can learn more comprehensive feature representations, thereby reducing class jumps caused by environmental changes. For example, in traffic flow monitoring, the merged dataset enables the model to stably distinguish between motor vehicles and tricycles, maintaining high reliability even in low light conditions or when the target is partially occluded. Furthermore, the dynamic expansion mechanism of incremental data supports continuous model optimization, adapting to the evolving needs of business scenarios, such as rapid adaptation to new traffic signs or vehicle types. Overall, this method, through a structured data management strategy, provides a solid data foundation for similar object detection and tracking, enhancing the system's practicality and robustness in complex real-world scenarios.

[0094] As an optional approach, incremental training samples are determined based on the initial training samples, including:

[0095] Obtain the dominant category label of the initial dominant category training samples and the coordinate information of the initial subordinate category training samples;

[0096] Incremental training samples are generated based on dominant category labels and coordinate information.

[0097] Optionally, in this embodiment, the coordinate information of the initial training samples of the subordinate category may include, but is not limited to, the positional annotations of the subordinate category targets in the image, typically represented by the coordinates of the upper left and lower right corners of a bounding box. For example, in the training set, the coordinate information of a tricycle (subordinate category) may be labeled as (x1, y1, x2, y2), where (x1, y1) are the coordinates of the upper left corner of the box, and (x2, y2) are the coordinates of the lower right corner. This coordinate information is copied and modified into the label of the dominant category during the training phase, thereby generating new training samples. By reusing the coordinate information of the subordinate category, the model can learn the high degree of overlap between the dominant category and the subordinate category in spatial location, and thus more accurately merge redundant detection boxes during the inference phase. For example, in a parking lot monitoring scenario, the coordinate information of an electric vehicle (subordinate category) is used to generate a pseudo-label for a motor vehicle (dominant category), enabling the model to identify the spatial overlap features between the two.

[0098] For example, firstly, the label information of the dominant category and the spatial location data of the subordinate categories are extracted from the original training data. For instance, in a traffic recognition scenario, the initial dominant category sample (motor vehicle) is labeled "0," while the coordinates of the subordinate category sample (tricycle) are (10, 20, 100, 120). After parsing, the dominant category label is used to identify the training target of the baseline category, and the subordinate category coordinates are used to generate incremental samples. For example, during model training, the system reads the coordinate information of the tricycle, copies it, and modifies the label to "0" (motor vehicle), thereby generating new training samples and enhancing the model's ability to recognize the dominant category.

[0099] Then, using the dominant category label and the coordinate information of the subordinate categories, incremental training samples are generated through label replacement or data augmentation techniques. For example, for the coordinates (10, 20, 100, 120) of the subordinate category (tricycle), the system generates a new sample, retaining the same coordinates but modifying the category label to the dominant category (motor vehicle). This incremental data expands the diversity of the training set, enabling the model to learn the high degree of consistency between the dominant and subordinate categories in spatial distribution. For example, in nighttime traffic monitoring scenarios, incremental samples can include the coordinate information of tricycles under low-light conditions, and pseudo-labels for motor vehicles can be generated through label replacement, thereby improving the model's robustness in complex environments.

[0100] This application's embodiments significantly improve the model's ability to distinguish and detect similar targets by extracting the dominant category label and the coordinate information of the subordinate categories, and generating incremental training samples based on this. During the training phase, by reusing the coordinate information of the subordinate categories and replacing it with the dominant category label, the model can learn the high degree of overlap in the spatial distribution of the two types of targets, thus more accurately merging redundant detection boxes during the inference phase. For example, in traffic scenarios, the detection boxes of motor vehicles and tricycles are identified by the model as different category representations of the same spatial region due to incremental training, and then the merging operation eliminates jump interference. Reinforcement learning of the dominant category label ensures the continuous and stable output of detection boxes, providing a reliable ID allocation basis for the tracking module and avoiding trajectory breaks caused by category switching. The introduction of incremental training samples further expands the model's scene adaptability, enabling it to maintain high robustness under complex conditions such as low light, occlusion, or target deformation. Overall, this method effectively solves the problems of false detection and missed detection in similar target detection through a structured data generation strategy, providing efficient and reliable technical support for business scenarios such as traffic management and intelligent monitoring.

[0101] As an optional approach, the dominant class detection box and the secondary class detection box in the image to be detected are determined based on the pre-trained object detection model, including: determining the dominant class detection box and the secondary class detection box in N consecutive frames of the image to be detected based on the object detection model, where N is an integer and N is greater than 1;

[0102] The category of the detection box in the image to be detected is determined based on the frequency of occurrence of the auxiliary category marker in the image to be detected, including:

[0103] The target detection boxes in N consecutive frames of the image to be detected are marked with a uniform identifier, where different target detection boxes use different uniform identifiers;

[0104] The occurrence count of the subordinate category marker in the image to be detected is determined based on the occurrence count of each uniform identifier in N consecutive frames of the image to be detected;

[0105] If the number of times the auxiliary category label appears in the image to be detected meets a preset number condition, the category of the target detection box is determined to be the category corresponding to the auxiliary category label;

[0106] If the occurrence count of the subordinate category label in the image to be detected does not meet the preset count condition, the category of the target detection box is determined to be the category corresponding to the dominant category label, wherein the dominant category detection box includes the dominant category label.

[0107] Optionally, in this embodiment, the pre-trained target detection model may include, but is not limited to, a deep learning model pre-trained on a large-scale dataset, possessing basic target detection capabilities and able to output the location coordinates and category labels of targets in an image. For example, in traffic recognition scenarios, the model may employ architectures such as YOLO, Faster R-CNN, or DETR, and be trained on datasets containing categories such as motor vehicles, pedestrians, and tricycles. The pre-trained model adapts to specific tasks through transfer learning techniques; for example, in traffic monitoring, the model can be fine-tuned to optimize its ability to distinguish similar categories (such as motor vehicles and tricycles). Such models already possess high detection accuracy before deployment and can quickly adapt to real-world scenario requirements, such as multi-target tracking in real-time video streams.

[0108] Optionally, in this embodiment, the unified identifier may include, but is not limited to, a unique ID assigned to the same target in different video frames for cross-frame tracking and status updates. For example, in a continuous video stream, a tricycle is assigned ID "001" in the initial frame. If the same target is detected in subsequent frames, this ID is used and its trajectory is recorded. The generation of the unified identifier can be based on target appearance features, trajectory matching, or deep learning embedding vectors. In traffic monitoring, the stability of the unified identifier directly affects the accuracy of statistical data; for example, vehicle counting or trajectory analysis relies on the continuous consistency of the ID.

[0109] Optionally, in this embodiment, the aforementioned preset frequency condition may include, but is not limited to, a threshold set based on business needs, used to determine whether the sub-category labeling is frequent enough to correct the target category. For example, in 10 consecutive frames, if a dominant category detection box (motor vehicle) is labeled as a sub-category (tricycle) more than 7 times, then its actual category is determined to be a tricycle. The design of the preset frequency condition needs to balance the risk of misjudgment and response speed. For example, in scenarios requiring fast response (such as traffic violation detection), the threshold can be lowered to shorten the judgment cycle; while in scenarios requiring high accuracy (such as traffic statistics), the threshold can be increased to reduce false corrections.

[0110] For example, firstly, the system uses a pre-trained model to detect multiple consecutive frames of images, outputting detection boxes for the dominant category (e.g., motor vehicles) and secondary categories (e.g., tricycles). For instance, in a traffic monitoring video, the model infers from five consecutive frames, outputting multiple bounding boxes for motor vehicles and tricycles in each frame. Through multi-frame detection, the system can capture dynamic changes in targets, reducing the impact of false positives or false negatives in a single frame. For example, a tricycle might be falsely detected as a motor vehicle in the first frame, but is correctly identified in subsequent frames as its features become clearer. Multi-frame comprehensive analysis improves detection stability.

[0111] Secondly, a unique ID is assigned to each detection box for cross-frame tracking. For example, a vehicle is assigned ID "002" in consecutive frames, and its position and category information are recorded frame by frame. The generation of a unified identifier can be based on target motion trajectory matching, such as predicting the next frame's position using Kalman filtering and associating it with the actual detection box. In traffic scenarios, the stability of the unified identifier is crucial for trajectory analysis; for example, when a vehicle changes lanes or overtakes, the ID must remain consistent to avoid trajectory breaks.

[0112] Next, the frequency with which each ID is marked as a sub-category across multiple consecutive frames is counted. For example, if ID "002" is marked as a tricycle 4 times in 5 frames, then its sub-category occurrence count is 4. This statistical process is implemented through accumulation or a sliding window. For instance, in real-time monitoring, the system maintains a queue of length N to record the marking status of the most recent frames. Frequency statistics can be combined with a time decay factor, making the marking of recent frames have a greater impact on the results, thereby improving adaptability to dynamic scenes.

[0113] Next, when the frequency of the associated category marker reaches a threshold, the system corrects the target category. For example, if the preset condition is "appearing 3 times in 5 frames," and the associated marker for ID "002" appears 3 times, its final category is corrected to a tricycle. This mechanism effectively reduces the impact of single-frame misjudgments; for example, brief false detections caused by sudden changes in lighting will not trigger category correction. In traffic flow statistics, this correction logic can avoid counting errors caused by model fluctuations, improving data reliability.

[0114] Finally, if the frequency of secondary markers does not reach the threshold, the system maintains the dominant category determination. For example, if ID "003" is marked as a tricycle only once in 5 frames, its category remains motor vehicle. This design ensures that the stability of the dominant category is prioritized when information is insufficient, avoiding over-correction. For example, when the target is briefly occluded or partially visible, the continued presence of the dominant category marker provides a reliable basis for the tracking module, reducing the risk of ID jumps or loss.

[0115] It should be noted that the value of the aforementioned number of consecutive frames N can be flexibly adjusted based on scene dynamics, hardware processing capabilities, or real-time business requirements. For example, in highway scenes, where vehicles move at high speeds, a smaller N value (e.g., 3 frames) can be used to quickly respond to category changes; while in congested urban areas, where targets move slowly, a larger N value (e.g., 10 frames) can be used to improve judgment accuracy. Furthermore, the setting of N can be adaptively adjusted based on target size; for example, a longer window can be used for large vehicles (e.g., trucks), while a shorter window can be used for small targets (e.g., bicycles). This application does not impose specific limitations in this regard.

[0116] It should be noted that the generation strategy for the aforementioned unified identifier can include, but is not limited to, similarity calculation based on appearance feature matching, motion trajectory prediction, or deep learning embedding. For example, in scenes with frequent changes in lighting, color histograms and SIFT features can be combined for identifier association; in dense target scenes, the position of the next frame can be predicted based on motion direction and speed to achieve efficient matching. Furthermore, identifier management can introduce a lifecycle mechanism, such as reclaiming IDs that have not been updated for a long time to avoid memory leaks. This application does not impose specific limitations on this.

[0117] It should be noted that the preset number of occurrences can be set based on factors such as operational fault tolerance, target movement patterns, or environmental complexity. For example, in violation detection scenarios, a lower threshold (e.g., 2 occurrences in 5 frames) can be set to reduce false negatives; while in research-level data collection, a higher threshold (e.g., 8 occurrences in 10 frames) can be set to pursue higher accuracy. Furthermore, the threshold can dynamically adapt to target behavior; for example, stricter judgment conditions can be applied to vehicles that frequently change lanes. This application does not specifically limit this.

[0118] This application's embodiments significantly improve the robustness of similar target detection and classification in traffic scenarios by utilizing continuous multi-frame analysis and unified identifier management. The multi-frame detection capability of the pre-trained model ensures stable output of dominant and subordinate category boxes, while the cross-frame association mechanism of the unified identifier enables coherent recording of target states. By statistically analyzing the frequency of subordinate category markers in consecutive frames and dynamically correcting the target category based on preset conditions, the system can effectively suppress interference from single-frame misjudgments. For example, in traffic monitoring, a tricycle that is briefly obscured may be misjudged as a motor vehicle in a single frame, but multi-frame frequency statistics can accurately restore its true category, avoiding counting or trajectory analysis errors. The priority design of the dominant category marker further enhances the system's fault tolerance, ensuring reliable output even when information is insufficient. In addition, the flexible adaptation of parameters (such as N value and threshold) supports different scenario requirements, such as rapid response in highway conditions or fine-tuning in complex urban scenarios. Overall, this method, through the combination of temporal analysis and dynamic decision-making, provides a high-precision and highly stable technical foundation for intelligent traffic management.

[0119] The following specific examples will further explain this application:

[0120] I. Model training phase, such as Figure 3 As shown, including but not limited to the following steps:

[0121] S302. Assuming there are similar categories A and B (there may be more than two categories) in the training set, the category with the most similar elements is selected and named the "dominant category," and the remaining categories are called "subordinate categories," such as dominant category A and subordinate category B. For subordinate category B, the bounding box coordinates of the target box in category B are copied, but its category label is changed to A. For example, if the label of a target in category B is (b, x1, y1, x2, y2), adding a label (a, x1, y1, x2, y2) is intuitively understood as overlaying a box with the exact same bounding box but in category A onto the original target B.

[0122] S304: Train the network model using the newly generated labels along with the original labels. The models that can be selected include, but are not limited to, the YOLO series, the DETR series, etc. The result of this trained model is that the frame of the tricycle will always have a nearly overlapping frame of a motor vehicle.

[0123] II. Model reasoning stage, such as Figure 4 As shown, including but not limited to the following steps:

[0124] S402, use the trained detection model to infer the video frames;

[0125] S404, merging similar category bounding boxes. Specifically: iterate through all model output bounding boxes of the dominant category A. For one bounding box 'a', calculate its Interchange of Union (IOU) value with each subordinate category bounding box (e.g., bounding box 'b' of category B). If the IOU value is greater than a set threshold 't' (typically 0.9), delete bounding box 'b' and add a label for bounding box 'a' indicating its subordinate category as B, for easier subsequent analysis. Figure 5 As shown, including but not limited to the following steps:

[0126] S404-1, Calculate the IOU between category A box a and similar category B box b;

[0127] S404-2, Determine if IOU is greater than t;

[0128] S404-3, if the judgment result is yes, delete box b and add a label of subcategory b to the category of box a;

[0129] S404-4, If the judgment result is negative, the box deletion operation will not be performed;

[0130] S406, Use a tracking algorithm to assign IDs to all targets in this video frame. The tracking algorithm includes, but is not limited to, Sort, DeepSort, etc.

[0131] S408: Analyze the results of consecutive frames with a given ID and determine the target's category based on business requirements. Here's a simplified business logic: calculate the frequency of sub-category markers for the primary category within a specified number of video frames to determine the final category of the target with that ID. For example, if within the previous 100 frames of the current frame, the primary category is A, the target with ID 1 has sub-category B markers appearing 70 times and sub-category C markers appearing 50 times, then the final category of the target with ID 1 in the current frame is determined to be B.

[0132] like Figure 6 As shown, the entire system can be composed of the following modules:

[0133] Object detection module: Acquires detection results from the detected image, including the category and bounding box of each object;

[0134] Detection box merging module: Merges the rectangles of the subordinate categories based on the dominant category and the subordinate categories;

[0135] Tracking module: The tracking module assigns an ID to each target;

[0136] Logical Analysis Module: Analyzes the frequency of occurrence of the same ID's associated category tags to determine the final category of the ID.

[0137] This application defines the concepts of "dominant category" and "sub-category" for similar categories. A "dominant category" label box is generated on top of the label boxes of the "sub-category" categories, and a new training set is used to train the model. The model's output boxes are merged, sub-category boxes are deleted, and sub-category labels are added to the overlapping dominant category boxes. This solves the problem of tracking ID interruption caused by similar category detection jumps. By using a dominant category overlapping box method, it is guaranteed that there is always a highly overlapping dominant category box on the top box of each sub-category. The tracking algorithm tracks the dominant category, thus achieving uninterrupted tracking ID.

[0138] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0139] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0140] According to another aspect of the embodiments of this application, a target detection apparatus for implementing the above-described target detection method is also provided. For example... Figure 7 As shown, the device includes:

[0141] The detection module 702 is used to determine the dominant category detection box and the subordinate category detection box in the image to be detected based on the pre-trained target detection model. The dominant category detection box includes a dominant category label, the subordinate category detection box includes a subordinate category label, and the training samples of the target detection model include incremental training samples. The category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the subordinate category training samples.

[0142] The traversal module 704 is used to traverse the dominant category detection box and add a subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box.

[0143] The determination module 706 is used to determine the category of the detection box in the image to be detected based on the number of times the subordinate category marker appears in the image to be detected.

[0144] As an optional solution, the above-mentioned device is used to traverse the dominant category detection box in the following manner, and add a subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box: traverse the dominant category detection box, determine the degree of overlap between the dominant category detection box and each subordinate category detection box in turn, determine the target dominant category detection box and the target subordinate category detection box whose degree of overlap meets the preset conditions; add a subordinate category label to the target dominant category detection box; delete the target subordinate category detection box.

[0145] As an optional approach, the dominant category detection boxes are traversed, and the overlap between the dominant category detection boxes and each subordinate category detection box is determined sequentially. The target dominant category detection box and target subordinate category detection box whose overlap meets preset conditions are then determined. This includes: traversing the dominant category detection boxes, where each selected dominant category detection box is considered the current dominant category detection box, and each selected subordinate category detection box is considered the current subordinate category detection box. The following steps are performed: determining the intersection-union ratio (IUR) parameter between the current dominant category detection box and the current subordinate category detection box; and, if the IUR parameter is greater than or equal to a preset threshold, determining the current dominant category detection box and the current subordinate category detection box as the target dominant category detection box and the target subordinate category detection box, respectively.

[0146] As an optional approach, the above-mentioned apparatus is further configured to: obtain initial training samples before determining the dominant category detection box and the subordinate category detection box in the image to be detected based on the pre-trained object detection model, wherein the initial training samples include initial dominant category training samples and initial subordinate category training samples; determine incremental training samples based on the initial training samples; merge the initial training samples and the incremental training samples to obtain target training samples; and train the initial detection model using the target training samples to obtain the object detection model.

[0147] As an optional approach, the above-mentioned apparatus is used to determine incremental training samples based on initial training samples in the following manner: obtaining the dominant category label of the initial dominant category training sample and the coordinate information of the initial subordinate category training samples; generating incremental training samples based on the dominant category label and the coordinate information.

[0148] As an optional approach, the aforementioned apparatus is used to determine the dominant category detection box and the secondary category detection box in the image to be detected based on a pre-trained object detection model in the following manner: determining the dominant category detection box and the secondary category detection box in N consecutive frames of the image to be detected based on the object detection model, where N is an integer and N is greater than 1; the aforementioned apparatus is used to determine the category of the detection box in the image to be detected based on the occurrence frequency of the secondary category label in the image to be detected in the following manner: labeling the object detection boxes in the N consecutive frames of the image to be detected with a unified identifier, where different object detection boxes use different unified identifiers; determining the occurrence frequency of the secondary category label in the image to be detected based on the occurrence frequency of each unified identifier in the N consecutive frames of the image to be detected; if the occurrence frequency of the secondary category label in the image to be detected meets a preset frequency condition, determining the category of the object detection box as the category corresponding to the secondary category label; if the occurrence frequency of the secondary category label in the image to be detected does not meet the preset frequency condition, determining the category of the object detection box as the category corresponding to the dominant category label, where the dominant category detection box includes the dominant category label.

[0149] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0150] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0151] According to one aspect of this application, a computer program product is provided, comprising a central processing unit (CPU) capable of performing various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from storage into random access memory (RAM). The RAM also stores various programs and data required for system operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output interfaces (I / O interfaces) are also connected to the bus.

[0152] The following components are connected to the input / output interface: input sections including keyboards, mice, etc.; output sections including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage sections including hard drives; and communication sections including network interface cards such as LAN cards and modems. The communication section performs communication processing via a network such as the Internet. Drives are also connected to the input / output interface as needed. Removable media, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage section as required.

[0153] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions defined in the system of this application.

[0154] In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs the various functions provided in the embodiments of this application.

[0155] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described target detection method is also provided. This electronic device may be... Figure 1 The terminal device or server shown is illustrated in this embodiment, which uses the electronic device as an example. The electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to execute the steps in any of the method embodiments described above via the computer program.

[0156] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0157] Optionally, in this embodiment, the processor may be configured to execute the methods in the embodiments of this application via a computer program.

[0158] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the target detection method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned target detection method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0159] Optionally, the transmission device of the aforementioned electronic device is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device is a Radio Frequency (RF) module used to communicate with the Internet wirelessly.

[0160] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0161] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of an electronic device reads computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the electronic device to perform the target detection method provided in the various alternative implementations of the above-described target detection aspect.

[0162] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store methods for performing the embodiments of this application.

[0163] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0164] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0165] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.

[0166] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0167] In the several embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0168] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0169] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0170] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A target detection method, characterized in that, include: The pre-trained object detection model determines the dominant category detection box and the subordinate category detection box in the image to be detected. The dominant category detection box includes a dominant category label, and the subordinate category detection box includes a subordinate category label. The training samples of the object detection model include incremental training samples. The category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the subordinate category training samples. Iterate through the dominant category detection boxes and add the subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box; The category of the detection box in the image to be detected is determined based on the number of times the subordinate category marker appears in the image to be detected.

2. The method according to claim 1, characterized in that, The step of traversing the dominant category detection boxes and adding the subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box includes: Traverse the dominant category detection boxes, sequentially determine the degree of overlap between the dominant category detection boxes and each of the subordinate category detection boxes, and determine the target dominant category detection boxes and target subordinate category detection boxes whose degree of overlap meets preset conditions; Add the secondary category marker to the target dominant category detection box; Delete the target associated category detection box.

3. The method according to claim 2, characterized in that, The step of traversing the dominant category detection boxes and sequentially determining the overlap degree between the dominant category detection boxes and each of the subordinate category detection boxes, and determining the target dominant category detection boxes and target subordinate category detection boxes whose overlap degree meets preset conditions, includes: Iterate through the dominant category detection boxes, with each selected dominant category detection box considered as the current dominant category detection box, and each selected subordinate category detection box considered as the current subordinate category detection box, and perform the following steps: Determine the intersection-union ratio (IUGR) parameter between the current dominant category detection box and the current subordinate category detection box; If the intersection-union ratio parameter is greater than or equal to a preset threshold, the current dominant category detection box and the current subordinate category detection box are respectively determined as the target dominant category detection box and the target subordinate category detection box.

4. The method according to claim 1, characterized in that, Before the pre-trained object detection model determines the dominant class detection box and the secondary class detection box in the image to be detected, the method further includes: Obtain initial training samples, wherein the initial training samples include initial dominant category training samples and initial subordinate category training samples; Incremental training samples are determined based on the initial training samples; The initial training samples and the incremental training samples are combined to obtain the target training samples; The target detection model is obtained by training the initial detection model using the target training samples.

5. The method according to claim 4, characterized in that, The step of determining incremental training samples based on the initial training samples includes: Obtain the dominant category label of the initial dominant category training sample and the coordinate information of the initial subordinate category training sample; The incremental training samples are generated based on the dominant category label and the coordinate information.

6. The method according to any one of claims 1 to 5, characterized in that, The method for determining the dominant class detection box and the secondary class detection box in the image to be detected based on the pre-trained target detection model includes: determining the dominant class detection box and the secondary class detection box in N consecutive frames of the image to be detected based on the target detection model, where N is an integer and N is greater than 1; The step of determining the category of the detection box in the image to be detected based on the frequency of occurrence of the subordinate category marker in the image to be detected includes: The target detection boxes in N consecutive frames of the image to be detected are marked with a uniform identifier, wherein different target detection boxes use different uniform identifiers; The occurrence count of the subordinate category tag in the image to be detected is determined based on the occurrence count of each of the unified identifiers in N consecutive frames of the image to be detected; If the occurrence frequency of the subordinate category marker in the image to be detected meets a preset frequency condition, the category of the target detection box is determined to be the category corresponding to the subordinate category marker; If the occurrence count of the subordinate category marker in the image to be detected does not meet a preset number condition, the category of the target detection box is determined to be the category corresponding to the dominant category marker, wherein the dominant category detection box includes the dominant category marker.

7. A target detection device, characterized in that, include: The detection module is used to determine the dominant category detection box and the secondary category detection box in the image to be detected based on the pre-trained target detection model. The dominant category detection box includes a dominant category label, the secondary category detection box includes a secondary category label, the training samples of the target detection model include incremental training samples, the category label of the incremental training samples is the dominant category label, and the coordinate information of the incremental training samples is the coordinate information of the secondary category training samples. The traversal module is used to traverse the dominant category detection box and add the subordinate category label to the dominant category detection box based on the degree of overlap between the dominant category detection box and each subordinate category detection box; A determination module is used to determine the category of the detection box in the image to be detected based on the number of times the subordinate category marker appears in the image to be detected.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 6.

9. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 6.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.

Citation Information

Cited By

  • Traffic environment data labeling method, target detection model training method and equipment

    CN121392475A