Target detection method and system, electronic equipment and storage medium

By registering and setting channel parameter matching in the dinov3 backbone network within the MMDetection framework and integrating it with the ConvNext detection head, the integration challenge between the dinov3 backbone network and the MMDetection framework is solved, improving the accuracy and robustness of target detection, especially in vehicle detection tasks.

CN122066964APending Publication Date: 2026-05-19BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2025-12-25
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, the integration of the dinov3 backbone network with the MMDetection framework lacks native support, and the mismatch in the number of feature channels leads to a decrease in detection accuracy. Existing fusion models suffer from feature layer breakage and semantic information loss when dealing with small and dense targets.

Method used

In the MMDetection framework, the dinov3 backbone network is registered as a feature extraction module. The input channel parameters of the neck module are set to match the output feature map of the dinov3 backbone network. The dinov3 backbone network is integrated with the ConvNext detection head to build a target detection model. The plug-and-play mechanism is achieved through module registration and configuration inheritance. Combined with the cascaded mask R-CNN detection head structure, the detection accuracy is improved.

Benefits of technology

It achieves plug-and-play integration of the dinov3 backbone network, ensuring lossless feature transfer, improving the detection accuracy and generalization ability of small and dense targets, simplifying the engineering implementation process, and especially improving accuracy and robustness in vehicle detection tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122066964A_ABST
    Figure CN122066964A_ABST
Patent Text Reader

Abstract

The invention discloses a target detection method and system, electronic equipment and a storage medium, and relates to the technical field of target detection, and the method comprises the steps: registering a dinov3 backbone network in an MMDesection framework; setting input channel parameters of a neck module in the MMDesection framework, and enabling the number of input channels of the neck module to be the same as the number of channels of the multi-scale feature maps output by the dinov3 backbone network; the method comprises the following steps of: integrating a dinov3 backbone network and a ConvNext detection head in an MMDesection framework, and constructing a target detection model; training the target detection model; and performing target identification on a to-be-detected image by using the trained target detection model. According to the target detection model constructed by the invention, the universal visual feature extraction capability and the efficient decoding capability are combined, and the detection precision and generalization capability of the model on complex scenes, especially small targets and dense targets, are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and in particular to a target detection method, system, electronic device, and storage medium. Background Technology

[0002] Object detection is a core task in computer vision, with the core requirement being the accurate localization of target regions in images or video streams and the completion of category recognition. It is widely used in key areas such as intelligent monitoring, autonomous driving, industrial quality inspection, and robot vision. Currently, integrating cutting-edge self-supervised pre-trained backbone networks with efficient detection heads within a general open-source framework faces significant engineering and technical obstacles. Specifically, the integration of the advanced dinov3 backbone network with the MMDetection framework lacks native support, requiring complex custom development. Furthermore, the number of multi-scale feature channels output by the dinov3 backbone network is difficult to match with the number of input channels required by the detection head, resulting in poor feature adaptability. In addition, existing fusion models often suffer from decreased detection accuracy when processing small or dense targets due to feature layer fragmentation and loss of semantic information.

[0003] To address the scarcity of large-scale labeled data and leverage universal visual features, self-supervised learning techniques have been developed. Among them, Meta AI's dinov3 model, trained on 1.689 billion unlabeled images using unlabeled self-distillation, significantly improves the quality of dense features, providing both high-quality global semantic understanding and local geometric information, thus laying a feature foundation for downstream tasks. On the other hand, ConvNext, as an efficient CNN detection head representation, excels in target location regression and category prediction thanks to its hierarchical convolutional structure and feature fusion strategy, making it an ideal component for building high-performance detectors. Existing technologies include attempts to combine Transformer-type backbones with CNN detection heads, or directly using CNN models for end-to-end detection.

[0004] However, the aforementioned existing technologies have significant drawbacks. First, the MMDetection framework does not natively support the dinov3 model and lacks a clear custom module registration scheme to achieve plug-and-play integration, increasing the difficulty of engineering implementation. Second, even if integration is possible, the number of multi-scale feature channels output by the dinov3 backbone network does not match the input requirements of the detection head and neck modules. Improper parameter configuration can lead to feature transfer failure or performance loss. Furthermore, some existing fusion methods have limitations. For example, directly using the RPN detection head of Faster R-CNN to process the features output by the Transformer backbone can result in insufficient local feature localization accuracy. On the other hand, using ConvNext alone as an end-to-end model limits the model's generalization ability due to the lack of large-scale self-supervised pre-training support.

[0005] Therefore, it is necessary to explore a technical solution that can effectively overcome the above obstacles, aiming to deeply integrate the high-quality feature extraction capability of the dinov3 backbone network with the efficient decoding capability of the ConvNext detection head, and to achieve a simple and efficient engineering integration in the MMDetection framework, so as to improve the overall performance of target detection. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to address the shortcomings of the prior art, and specifically provides a target detection method, system, electronic device, and storage medium, as detailed below: 1) In a first aspect, the present invention provides a target detection method, the specific technical solution of which is as follows: Register the dinov3 backbone network in the MMDetection framework and use it as a feature extraction module. The dinov3 backbone network is used to output feature maps at multiple scales. Set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps at multiple scales output by the dinov3 backbone network. The dinov3 backbone network and the ConvNext detection head are integrated in the MMDetection framework to build an object detection model; Train the object detection model; The trained target detection model is used to identify targets in the image to be detected, thereby obtaining the category and location of the targets in the image.

[0007] The beneficial effects of the target detection method provided by this invention are as follows: A plug-and-play integration of the dinov3 backbone network into the MMDetection framework was achieved through a module registration mechanism. This overcomes the engineering obstacle of the MMDetection framework's native lack of support for the dinov3 model, providing a clear and feasible registration scheme and reducing the complexity and development cost of framework integration. By precisely setting the input channel parameters of the neck module, it is ensured that the number of input channels of the neck module is exactly the same as the number of channels of the multi-scale feature maps output by the dinov3 backbone network. This fundamentally solves the problem of poor feature channel adaptability, allowing the high-quality dense features extracted by dinov3 to be transferred to subsequent modules without loss, effectively avoiding the loss of semantic information due to feature mismatch. By integrating the dinov3 backbone network and the ConvNext detection head into the MMDetection framework, the constructed object detection model combines the former's general visual feature extraction capabilities with the latter's efficient decoding capabilities. This improves the model's detection accuracy and generalization ability in complex scenes, especially for small and dense targets. At the same time, the entire process is based on a configuration modification and inheritance mechanism, eliminating the need to reconstruct the detection head and significantly improving the efficiency of engineering implementation.

[0008] Based on the above scheme, the target detection method of the present invention can be further improved as follows.

[0009] Furthermore, the ConvNext detection head is a cascaded mask R-CNN detection head structure, and the detection heads are integrated through the configuration inheritance mechanism of the MMDetection framework.

[0010] The advantages of adopting the above-mentioned further scheme are as follows: The cascaded mask R-CNN detection head structure, with its multi-stage cascaded optimization design, improves the accuracy of target detection, especially for the localization and classification of targets of different sizes. Integrating this detection head through the configuration inheritance mechanism of the MMDetection framework allows for the direct reuse of existing and validated complete configuration parameters within the framework, avoiding the repetitive coding work required for manually reconstructing the network structure, reducing development complexity and the possibility of introducing errors, and ensuring the stability and reliability of the detection head implementation.

[0011] Furthermore, the dinov3 backbone network is registered in the MMDetection framework, including: The dinov3 backbone network is encapsulated into a module class named DinoV3ConvNeXt, and the DinoV3ConvNeXt module class is registered using a decorator so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework.

[0012] The beneficial effects of adopting the above further approach are: encapsulating the dinov3 backbone network into a DinoV3ConvNeXt module class and registering it using a decorator makes this backbone network a standard callable module in the MMDetection framework. This approach enables plug-and-play functionality for the dinov3 backbone network; users do not need to deeply modify the underlying source code of the framework, but only need to specify the backbone network type in the MMDetection framework's configuration file to complete the integration. This lowers the technical integration threshold and improves the reusability of the module and the convenience of project deployment.

[0013] Furthermore, the object detection model is trained, including: training the object detection model using a dataset containing vehicle category annotation information; The trained target detection model is used to identify targets in the image to be detected, and the category and location of the targets in the image to be detected are obtained. This includes: using the trained target detection model to identify targets in the image to be detected, and obtaining the category and location information of vehicles in the image to be detected.

[0014] The beneficial effects of adopting the above-mentioned further approach are: training the object detection model using a dataset containing vehicle category annotation information allows the model parameters to be specifically optimized for the visual features of vehicle targets, improving the model's accuracy and robustness in vehicle detection tasks. The trained object detection model then identifies the images to be detected and directly outputs the vehicle's category and location information, simplifying the result analysis process in vehicle-specific application scenarios and enhancing the practicality and implementation efficiency of the entire method in fields such as intelligent transportation and autonomous driving.

[0015] 2) In a second aspect, the present invention also provides a target detection system, the specific technical solution of which is as follows: It includes a registration module, a settings module, an integration module, a model training module, and an object detection module; The registration module is used to: register the dinov3 backbone network as a feature extraction module in the MMDetection framework, and the dinov3 backbone network is used to output feature maps at multiple scales; The settings module is used to: set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps at multiple scales output by the dinov3 backbone network; The integration module is used to: integrate the dinov3 backbone network with the ConvNext detection head in the MMDetection framework to build an object detection model; The model training module is used to train the object detection model; The object detection module is used to: use the trained object detection model to identify objects in the image to be detected, and obtain the category and location of the objects in the image to be detected.

[0016] Based on the above scheme, the target detection system of the present invention can be further improved as follows.

[0017] Furthermore, the ConvNext detection head is a cascaded mask R-CNN detection head structure, and the detection heads are integrated through the configuration inheritance mechanism of the MMDetection framework.

[0018] Furthermore, the registration module is specifically used to: encapsulate the dinov3 backbone network into a module class named DinoV3ConvNeXt, and register the DinoV3ConvNeXt module class using a decorator, so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework.

[0019] Furthermore, the model training module is specifically used to train the object detection model using a dataset containing vehicle category annotation information; The target detection module is specifically used to: use the trained target detection model to identify targets in the image to be detected, and obtain the category and location information of vehicles in the image to be detected.

[0020] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the electronic device to implement any of the above-mentioned target detection methods.

[0021] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described target detection methods.

[0022] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below: Figure 1 This is a flowchart illustrating a target detection method according to an embodiment of the present invention; Figure 2 A schematic diagram of the self-distillation structure in the dinov3 backbone network; Figure 3 This is a schematic diagram of the structure of a target detection system according to an embodiment of the present invention. Detailed Implementation

[0024] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0025] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0026] like Figure 1 As shown, an embodiment of the present invention provides a target detection method, which includes the following steps: S1. Register the dinov3 backbone network as a feature extraction module in the MMDetection framework. The dinov3 backbone network is used to output feature maps at multiple scales. Registering the dinov3 backbone network in the MMDetection framework includes: The dinov3 backbone network is encapsulated into a module class named DinoV3ConvNeXt, and a decorator is used to register the DinoV3ConvNeXt module class so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework. The specific implementation process is as follows: S10. Create a new Python file in the MMDetection framework's source code directory structure, for example, in the path mmdet / models / backbones / . In this file, define a class named DinoV3ConvNeXt. This class needs to inherit from the base class defining the backbone network in the MMDetection framework, such as BaseModule. In the __init__ method of the DinoV3ConvNeXt class, define the necessary constructor parameters, such as the parameter model_name to specify the dinov3 backbone network variant, and the path parameter pretrained to load the pre-trained weights. The initialization method internally needs to call the parent class's initialization method and complete the setting of class member variables.

[0027] S11. In the initialization method of the DinoV3ConvNeXt class, the dinov3 backbone network needs to be instantiated using PyTorch's model loading functionality. One feasible implementation is to use the torch.hub.load function and specify the path to the locally stored dinov3 model repository. For example, assuming the dinov3 model definition and pre-trained weights are stored in the local directory . / path / to / dinov3_repo, a specific dinov3 model instance can be loaded by calling torch.hub.load('. / path / to / dinov3_repo','dinov3_vitb14',source='local',pretrained=True), and assigned to a member variable of the class, such as self.dinov3. This step ensures that the dinov3 backbone network used carries weights pre-trained on the LVD-1689M dataset, which encode general visual feature prior knowledge.

[0028] S12. The `forward` method needs to be defined or overridden in the `DinoV3ConvNeXt` class. This method is responsible for defining the data flow process in the network. When an image tensor is input, the method internally calls the dinov3 backbone network represented by the member variable `self.dinov3` to process the image. The forward propagation process within the dinov3 backbone network calculates and outputs features from multiple intermediate layers. To achieve compatibility with subsequent CNN detection heads, feature maps from four specific stages need to be selectively extracted from the output of the dinov3 backbone network. These feature maps typically have a data format of [B, C, H, W], where B represents the batch size, i.e., the number of images input to the network at one time; C represents the number of channels in the feature map; and H and W represent the height and width of the feature map, respectively. These four extracted feature maps form a Python list or tuple and are returned as the value of the `forward` method. These are the "multi-scale feature maps" mentioned in subsequent steps, and the specific value of their channel number C is crucial for subsequent channel adaptation.

[0029] S13. After defining the DinoV3ConvNeXt class, in order for the MMDetection framework to recognize and manage this newly defined backbone network module, it must be registered in the framework's module repository. This is done using the registration decorator provided by the MMDetection framework. Above the class definition statement, add the line: `@MODELS.register_module()`. Here, `MODELS` needs to be a registry object imported from the corresponding module of the MMDetection framework, such as `mmdet.registry`. This decorator code registers the DinoV3ConvNeXt class in the MMDetection framework's model component registry and assigns it a name that can be referenced in the configuration file. After registration, in the MMDetection framework's configuration file, you can directly call this custom backbone network by setting `type='DinoV3ConvNeXt'` under the `model.backbone` field, thus achieving plug-and-play functionality of the dinov3 backbone network in the MMDetection framework.

[0030] Throughout the implementation, the self-distillation training mechanism within the dinov3 backbone network ensures the quality of its feature representation. Its teacher model parameters... The update depends on the student model parameters The exponential moving average is updated using the following formula: ,in, The parameters representing the teacher model, The parameters of the student model are represented by λ, a momentum coefficient that gradually approaches 1 from 0.996 following a cosine scheme, controlling the smoothness of parameter updates. This mechanism, combined with a loss function specifically optimized for local features, enables the multi-scale feature maps output by the dinov3 backbone network to possess both rich semantic information and accurate spatial details, laying a solid foundation for subsequent object detection tasks. Through the above four steps, the specific technical implementation of integrating the dinov3 backbone network into the MMDetection framework in a modular and configurable manner is completed.

[0031] Among them, the MMDetection framework is an open-source object detection toolkit based on PyTorch, which provides a rich set of predefined model components and a unified training and evaluation process. The framework adopts a modular design, allowing users to flexibly build models by registering custom modules and writing configuration files, greatly improving the efficiency of object detection algorithm development and engineering deployment.

[0032] The dinov3 backbone network is a general visual feature extraction model trained through self-supervised learning on a large-scale unlabeled image dataset. This model employs a teacher-student network architecture and a self-distillation mechanism for training, enabling it to simultaneously learn global semantic information and local detail features of an image. Its output typically consists of feature representations at multiple levels with different spatial resolutions and semantic abstraction levels, i.e., feature maps at multiple scales.

[0033] The MMDetection framework's configuration file is used to define the model structure, data pipeline, training strategy, and runtime settings, typically in YAML or Python format. In this configuration file, users can specify the types and specific parameters of components such as the backbone network, neck module, and detection head, allowing for flexible combination and adjustment of the model architecture without modifying the source code.

[0034] In this context, multi-scale feature maps refer to sets of feature tensors with varying sizes and numbers of channels output from intermediate layers of a deep learning model. In object detection tasks, utilizing multi-scale feature maps helps in simultaneously detecting targets of different sizes in an image. Lower-level feature maps have higher spatial resolution, containing richer details and location information, which is beneficial for detecting small targets; higher-level feature maps, after multiple downsampling steps, have lower spatial resolution but stronger semantic information, which is beneficial for recognizing large targets and complex scenes.

[0035] S2. Set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps at multiple scales output by the dinov3 backbone network. The specific implementation process is as follows: S20. After completing the integration and registration of the DinoV3 backbone network, a forward propagation test needs to be run to obtain the specific shape of its output features. Developers can write a simple test script that uses a simulated input tensor to call the registered DinoV3ConvNeXt module. The shape of the simulated input tensor is typically... ,in, This indicates the batch size; setting it to 1 simplifies testing. This indicates the number of channels in the input image, corresponding to the RGB three-channel format. and These represent the height and width of the input image, respectively, and can be set to a fixed size, such as 800 pixels multiplied by 1333 pixels. Through forward propagation, the dinov3 backbone network outputs a list containing multiple feature maps. The shape of each feature map in the list needs to be examined sequentially, and its channel count and dimension recorded. The value of . According to the technical disclosure document, the dinov3 backbone network outputs feature maps at four scales, with channel numbers of 128, 256, 512, and 1024 respectively. Therefore, the final list of channel numbers is as follows. This step is fundamental to subsequent configuration modifications, and it is essential to ensure that the recorded channel values ​​are accurate.

[0036] S21. The configuration file is the core file controlling the model architecture. It usually has a .py or .yaml extension and is located in the project's configuration directory. For example, the configuration file might be named cascade_mask_rcnn_convnext.py. Developers need to open this file using a code editor or integrated development environment (IDE). In the configuration file, the model structure is defined through a dictionary variable, usually named `model`. Within this `model` configuration dictionary, you need to find a field specifically for setting the neck module. This field usually has the key `neck`. The neck module configuration itself is also a dictionary, containing the module's type (`type`) and a series of initialization parameters. The key parameter `in_channels` specifies the number of channels in the neck module's input feature map. Its value must be a list, and the length of the list and the value of each element must correspond exactly to the list of channel counts determined in S20.

[0037] S22. After locating the neck field, developers need to modify the value of its `in_channels` parameter to the channel count list obtained in S20. Specifically, replace the existing line in the configuration file, such as `in_channels=[256,512,1024,2048]` (this example corresponds to the output channels of the original ResNet50 backbone network), with `in_channels=[128,256,512,1024]`. This modification ensures that during initialization, the number of input channels for the convolutional layers of each receiving branch within the neck module is correctly set to 128, 256, 512, and 1024, thus aligning with the four scale features output by the dinov3 backbone network. Figure 1 One match. If the configuration file is generated by inheriting from the base class configuration file, you may need to use the `_delete_=True` keyword to completely override the `in_channels` setting in the base class configuration to ensure that the custom parameters take effect.

[0038] S23. After modifying the configuration file, training cannot begin directly; verification must be performed first. Developers can write a verification script to dynamically build the model from the modified configuration file using the model building tools provided by the MMDetection framework. In the script, a complete detection model can be instantiated by calling the `build_detector` function and passing in the `model` dictionary from the configuration file. The instantiation process automatically assembles the registered DinoV3ConvNeXt backbone network, the adapted neck module, and the ConvNext detection head. To verify channel matching, a test tensor can be input into the model and a forward propagation can be performed. If the model can perform forward computation normally without throwing errors related to dimension mismatch, such as `RuntimeError` regarding matrix shape or channel number mismatch, it indicates that the input channel parameters of the neck module are set correctly. Furthermore, the weight shape of the first convolutional layer of the neck module can be printed out for manual verification to confirm that its input channel dimension is the expected 128.

[0039] Steps S20 to S23 complete the technical implementation of setting the input channel parameters of the neck module in the MMDetection framework. This process relies on accurate measurement of the output features of the dinov3 backbone network and a clear understanding of the MMDetection framework configuration file structure. This allows for simple parameter adjustments that solve the key problem of feature adaptation between different modules, laying the foundation for building a high-performance object detection model.

[0040] In the MMDetection framework, the neck module is a crucial component located between the backbone network and the detection head. It is responsible for fusing and enhancing feature maps at multiple scales extracted by the backbone network. In object detection models, the neck module is typically implemented as a feature pyramid network or similar structure, integrating features from different levels through top-down paths and lateral connections, thereby simultaneously improving the model's detection performance for both large and small targets. The number of input channels in the neck module needs to precisely match the number of channels in each scale of the feature map output by the backbone network to ensure that feature data flows into subsequent modules without loss, avoiding runtime errors or performance degradation caused by dimensionality mismatch.

[0041] S3. Integrate the dinov3 backbone network and the ConvNext detection head within the MMDetection framework to construct an object detection model. The ConvNext detection head is a concatenated mask R-CNN detection head structure, and the detection heads are integrated through the configuration inheritance mechanism of the MMDetection framework. The specific implementation process of S3 is as follows: S30. Building an object detection model requires defining the complete architecture of the model in a unified configuration file. Developers need to open or create a configuration file for the MMDetection framework, which is typically used to define a configuration dictionary named `model`. In this dictionary, the types and parameters of three key components must be explicitly specified: the backbone network, the neck module, and the detection head. For the backbone network, under the `backbone` field, set the `type` parameter to the class name previously registered via decorator, i.e., 'DinoV3ConvNeXt', and set its initialization parameters as needed, such as `model_name` and the `pretrained` path. For the neck module, under the `neck` field, ensure that the `type` parameter is set to the required feature pyramid network type (e.g., 'FPN'), and that its `in_channels` parameter has been accurately set to [128, 256, 512, 1024] as described above to match the output of the dinov3 backbone network. For the detection head, under relevant fields such as `rpn_head` and `roi_head`, set the `type` parameter to 'ConvNextHead' or a detection head identifier already existing in the configuration system that corresponds to the ConvNext architecture. This step is completed through text editing and essentially declares the logical connections between the various components of the model.

[0042] The S31 and MMDetection frameworks support configuration inheritance, which greatly simplifies integration. Developers do not need to write all the parameters of the ConvNext detection head from scratch. Specifically, at the top of the configuration file, the `_base_` parameter specifies an existing base configuration file containing the standard ConvNext detection head definition. For example, `_base_=['. / path / to / convnext_config.py']`. This base configuration file fully defines the internal structure of the ConvNext detection head, including the specific network layer parameters for its multi-scale feature fusion layer, object classification branch, and bounding box regression branch. In the model configuration of the local configuration file, for the detection head section, simply point to the detection head type already defined in the base configuration using the `type` parameter under the `rpn_head` and `roi_head` fields. During parsing, the framework will automatically merge the detection head definitions from the base configuration into the current configuration. This means that the complex internal implementation of the ConvNext detection head, such as the weight initialization method and loss function type of the fully connected layer for classification or the convolutional layer for regression, can be directly reused without redeclaration. This avoids errors that may be introduced by manually reconstructing the detection head structure and significantly reduces development complexity.

[0043] S32. After modifying and saving the configuration file, the integration proceeds to the actual build phase. In the training or evaluation script, the model building tools provided by the MMDetection framework are needed to create model instances based on the configuration file. Typically, this is achieved by calling the `mmdet.models.build_detector` function. Developers need to pass the entire `model` dictionary from the configuration file as a parameter to this function. The function's execution process is as follows: First, the builder finds and instantiates the corresponding class in the module registry based on the `type` value 'DinoV3ConvNeXt' in the `backbone` field, loads the dinov3 pre-trained weights, and completes the initialization of the dinov3 backbone network. Next, the builder instantiates the neck module based on the configuration of the `neck` field, and because its `in_channels` parameter is correctly set, this module can receive four-scale feature maps from the backbone network. Then, the builder instantiates the ConvNext detection head based on the configuration of the `rpn_head` and `roi_head` fields. Due to the use of inheritance, the detection head has a complete ConvNext architecture. Finally, the builder connects these three components into a computable object detection model according to the data flow conventions agreed upon by the MMDetection framework. The forward propagation logic of this model is as follows: the input image is processed by the dinov3 backbone network to extract multi-scale features; these features are then input into the neck module for fusion and enhancement; the processed features are then fed into the ConvNext detection head, where the classification branch of the detection head predicts the target category and the regression branch predicts the target bounding box.

[0044] S33. After model instantiation, verification must be performed to ensure successful integration. A simulated data tensor that meets the model input requirements can be constructed. ,in The shape is . Indicates the batch size. Indicates the number of RGB channels. and This indicates the image height and width. Input the data into the constructed model instance and perform a forward propagation. Observe the process for errors and check the format and content of the output. For object detection models, the expected output typically includes predicted bounding box coordinates, class labels, and confidence scores. A successful ensemble is characterized by a smooth forward propagation process without throwing any errors regarding inter-layer interface mismatches, dimensional inconsistencies, or undefined modules. This demonstrates that the dinov3 backbone network, the adapted neck module, and the ConvNext detection head have been correctly connected within the MMDetection framework to form a working object detection model.

[0045] Through steps S30 to S34 above, the entire technical implementation of integrating the dinov3 backbone network and the ConvNext detection head within the MMDetection framework is complete. The entire process relies on the modular design, configuration system, and builder API of the MMDetection framework. Through declarative configuration and automated construction, it combines an advanced pre-trained backbone network with an efficient detection head, laying the foundation for subsequent model training and inference.

[0046] S4. Train the object detection model. The specific implementation process is as follows: S40. Training the object detection model requires a dataset with annotation information. The annotation information in the dataset must include the category and precise location bounding box of the object in the image. Developers need to organize the dataset into a format supported by the MMDetection framework, such as COCO or VOC format. This includes preparing image files, annotation files, and metadata files defining the dataset categories. Next, the training-related configuration sections need to be completed in the MMDetection framework configuration file. This includes specifying the paths and formats of the training and validation sets under the `data` field; setting the optimizer type to AdamW or SGD under the `optimizer` field; and configuring the learning rate. Hyperparameters such as weight decay; gradient clipping strategies under the `optim_wrapper` field; learning rate scheduling strategies under the `param_scheduler` field, such as using cosine annealing scheduling, whose formula can be expressed as: ,in This represents the learning rate at the current moment. and These represent the minimum and maximum learning rate boundaries, respectively. Indicates the current iteration number. This indicates the total number of iterations; the `train_cfg` and `val_cfg` fields configure the specific training and validation processes; the `default_hooks` field configures hooks such as checkpoint saving and logging. Specifically, for vehicle detection tasks, the dataset should contain a large number of images with vehicle bounding box annotations.

[0047] S41. After configuration, start the training process using the training entry script provided by the MMDetection framework. Typically, this is done by executing the command `tools / train.py` and specifying the configuration file path. Once training begins, the framework automatically performs the following operations: loading training data in batches; inputting image data into the dinov3 backbone network to extract features; fusing the features through the neck module and then feeding them into the ConvNext detector head; the detector head outputs classification and bounding box prediction results; the framework calculates the loss function based on the prediction results and ground truth annotations; the loss function value is used to calculate the gradient using the backpropagation algorithm; the optimizer uses the gradient to update the model parameters, including all parameters of the trainable parts of the dinov3 backbone network, the neck module, and the ConvNext detector head. The entire training process continues for multiple rounds. During training, the framework periodically evaluates model performance on the validation set, calculating metrics such as mean precision to monitor whether the model is overfitting or underfitting. Developers need to observe the training logs and loss curves and adjust hyperparameters as needed. At the end of training, the framework automatically saves the optimal model weight file to a specified checkpoint directory according to the configuration.

[0048] S5. Using the trained target detection model, target recognition is performed on the image to be detected to obtain the category and location of the target in the image. The specific implementation process is as follows: S50. After model training is complete, the final model weight file is obtained, usually a .pth file. Before object recognition, a model instance with the exact same architecture as during training needs to be initialized. This can be achieved by calling the `mmdet.models.build_detector` function again and passing in the original model configuration file. Next, the trained weight file is loaded into this model instance using PyTorch's model loading function `load_state_dict`. Then, the model's `eval()` method must be called to set the model to evaluation mode. This step is crucial because evaluation mode disables the use of the moving average mean and variance from the training phase for Dropout and BatchNorm layers, thus ensuring the determinism and consistency of the inference results. After loading and mode setting are complete, the model is ready to receive new image inputs and make predictions.

[0049] S51. Before target recognition, the original image to be detected needs to undergo preprocessing consistent with the training phase. Preprocessing typically includes: adjusting the image size to the size specified by the model, for example, scaling the shorter side to 800 pixels; normalizing pixel values, converting the original 0-255 integer range to a 0-1 floating-point range; standardizing using the mean and standard deviation calculated during training; and finally converting the image from HWC format to CHW format and adding a batch processing dimension to form a shape... A tensor, where 1 represents a batch size of 1, and 3 represents RGB channels. and This represents the height and width of the preprocessed image. The processed tensor is fed into the model with pre-loaded weights. The model performs forward propagation, with the dinov3 backbone network, neck module, and ConvNext detector working sequentially, ultimately outputting a set of raw predictions. These results typically include the coordinates of multiple predicted bounding boxes and the class confidence score for each bounding box.

[0050] S52. The raw predictions directly output by the model are often numerous, requiring post-processing to obtain clear and usable detection results. The first step of post-processing is to apply a non-maximum suppression algorithm. This algorithm filters out a large number of overlapping, redundant, or low-confidence prediction boxes based on the intersection-union ratio (IU) and class confidence scores between the predicted bounding boxes, retaining only the most suitable bounding box for each target. The second step of post-processing is to set a confidence threshold, for example, 0.5, and only retain predictions with confidence scores higher than this threshold. After these steps, the final list of detection results is obtained. Each result in the list contains: bounding box coordinates, typically expressed as coordinates. The format indicates the target's position in the image's top-left and bottom-right corners; a category label, which, for vehicle detection tasks, points to the "vehicle" category; and a confidence score, indicating the model's confidence in the prediction. This information collectively constitutes the target's category and location information in the image to be detected, thus completing the target recognition task.

[0051] When the target is a vehicle, the target detection model is trained using a dataset containing vehicle category annotation information. The trained target detection model is then used to identify the target in the image to be detected, obtaining the vehicle category and location information in the image. The specific implementation process is as follows: 1) To train a model specifically for vehicle detection, a large number of images containing vehicles need to be collected, and bounding boxes and category labels need to be annotated for each vehicle target in the images, such as cars, trucks, and buses. Commonly used public datasets such as the COCO dataset with car, truck, and bus categories, or driving scene datasets such as BDD100K and KITTI can be used. Developers need to organize these datasets and convert them into a format readable by the MMDetection framework, such as the COCO JSON format. The data annotation file must contain a list of categories, with at least one entry whose id is 1 and name is vehicle (or a specific vehicle type such as car or truck). In the annotation information of each image, the annotations field must contain the bounding box coordinates of each vehicle instance (usually in the format [x_min, y_min, width, height]) and the corresponding category_id (set to 1). This step establishes a precise association between the model's learning target and the semantic concept of "vehicle".

[0052] 2) In the MMDetection framework configuration file used for training, the model output header and data loading section must be adjusted to match single-class vehicle detection. The key modification is located in the `bbox_head` subfield under the `roi_head` field of the `model` configuration dictionary. The `num_classes` parameter needs to be changed from 80 in a general dataset (such as COCO) to 1. This modification means that the output dimension of the classification branch of the ConvNext detection head changes from 81 (80 classes + background) to 2 (vehicle class + background). Accordingly, in the `metainfo` field under the `data` field in the configuration file, the list of classes needs to be set to `('vehicle',)`. In addition, in the `dataset` configuration of `train_dataloader` and `val_dataloader`, the metadata path of the dataset needs to be specified through the `metainfo` parameter or the class list needs to be directly overridden to ensure that the data loader can correctly parse the annotation corresponding to the `vehicle` class for `category_id` 1 in the dataset. This series of configuration modifications transforms the general object detection model into a model specializing in vehicle recognition and localization.

[0053] 3) Start the training process using the modified configuration file. The training command is to execute the `tools / train.py` script and specify the configuration file path. During training, the model learns to distinguish vehicle targets from the background in the input image. In each iteration, the optimizer updates its parameters by minimizing the loss function. The loss function typically includes a classification loss. and bounding box regression loss For vehicle detection tasks, the classification loss focuses on correctly determining whether a region proposal is a "vehicle" or "background." The regression loss, on the other hand, is dedicated to fine-tuning the position and size of the predicted bounding box to closely match the labeled vehicle bounding box. In the latter part of training, data augmentation strategies such as random horizontal flipping and multi-scale training can be enabled to improve the model's robustness to vehicles of different viewpoints and sizes. After training, the parameters saved in the model weight file, especially the classifier weights related to the "vehicle" category in the ConvNext detection header, have been fully optimized and can provide high-confidence responses to vehicle features.

[0054] 4) After training, select the model weight file (e.g., best_coco_bbox_mAP_epoch_50.pth) from the checkpoint directory that has the highest average accuracy on the validation set. In the inference script, first build the model architecture using the exact same model configuration as in the training phase, then call `torch.load` to load the weight file, and then load the weights into the model using the `model.load_state_dict()` method. Afterwards, `model.eval()` must be executed to switch the model to evaluation mode. This operation freezes the runtime statistics of the BatchNorm layer and disables random operations such as Dropout, ensuring that every inference for vehicle recognition is deterministic. At this point, a model specifically designed for vehicle detection, based on the dinov3 backbone network and the ConvNext detection head, is ready.

[0055] 5) Input an image to be detected that may contain vehicles. The preprocessing pipeline first standardizes the image size, for example, scaling the shorter side of the image to 800 pixels, and scaling the longer side proportionally but not exceeding 1333 pixels, using the formula: If the original image size is... Scaled size satisfy and Next, pixel values ​​are normalized and training set statistics (mean) are used. Standard deviation Standardize: ,in, It is the input image tensor. and These are pre-computed mean and standard deviation vectors for the three channels. The processed image is converted to tensor format and batch dimension is added, forming an input of shape [1,3,H_{new},W_{new}]. This tensor is fed into the loaded vehicle detection model, undergoes feature extraction from the dinov3 backbone network and feature fusion from the neck module, and finally the ConvNext detection head outputs the raw predictions about the vehicle position and confidence.

[0056] 6) The raw predictions output by the model include multiple candidate bounding boxes and a confidence score for each box belonging to the "vehicle" category. And the offset of the bounding boxes. First, a non-maximum suppression algorithm is applied to all predicted boxes. This algorithm calculates the intersection-union ratio (IU / R) between any two predicted boxes. The formula is ,in and This represents the regions of two predicted bounding boxes. If the two boxes... If the scores exceed a preset threshold (e.g., 0.5) and belong to the same category, boxes with higher confidence scores are retained, while boxes with lower scores are suppressed. Then, a confidence threshold is set. (e.g., 0.5), filter out the fractions. The prediction is processed to obtain a list, where each element corresponds to a detected vehicle. Each element contains: bounding box coordinates. This indicates the vehicle's position in the original input image coordinate system; a category label 'vehicle'; and a confidence score. This information constitutes the complete recognition result of the vehicle target in the input image.

[0057] By following these six steps, a complete technical workflow is achieved, from preparing vehicle annotation data and adjusting and training the model to finally loading the model and performing vehicle detection and information extraction on new images. This workflow ensures that the model built based on the fusion of dinov3 and ConvNext can be efficiently and accurately applied to real-world scenarios requiring precise vehicle perception, such as intelligent transportation and autonomous driving.

[0058] The vehicle category and location information in the images to be detected has broad and practical application value. This information can directly serve intelligent traffic management systems, used for real-time statistics of traffic flow across road sections, identification of vehicle type composition, and monitoring of illegal parking and obstruction of emergency lanes. In the field of autonomous driving, this information is the foundation for vehicles to perform environmental perception and decision-making, helping autonomous vehicles accurately identify the position, speed, and type of surrounding vehicles, enabling safe following, lane changing, and obstacle avoidance. In smart city construction, this information can be used to analyze regional traffic hotspots, optimize traffic light timing, and assess parking space utilization. Furthermore, in the field of vehicle safety and investigation, this information can assist in tasks such as tracking accident-causing vehicles and screening specific vehicle brands and models. All these applications rely on structured vehicle detection information automatically and accurately obtained from images.

[0059] The technical solution of the present invention will be further described through the following embodiments, specifically including: Step S101: Introduce dinov3 as the feature extraction backbone. dinov3 is a general-purpose visual model trained under self-supervised conditions on the LVD-1689M dataset (1.689 billion unlabeled images). It is trained using an unlabeled self-distillation method. Knowledge distillation refers to transferring the capabilities of one or more "knowledge-rich but complex" models (teacher models) to a "simple and more efficient" model (student models), ultimately allowing the smaller model to achieve performance close to that of the larger model while possessing faster inference speed and lower memory usage.

[0060] like Figure 2 As shown, in the self-distillation structure of the Dinov3 backbone network, the teacher and student networks have the same structure and are both randomly initialized. Both require parameter updates, and the pseudo-labels generated by the teacher network are used to train the student network, thus achieving true self-supervised training. Specifically, the teacher network's parameters are updated through the student network's parameters. The student model updates directly using gradient descent, while the teacher model's parameters are slowly updated using the student model's exponential moving average (EMA). The teacher model's parameters... The update follows the formula: in, The parameters representing the teacher model, The parameters representing the student model, During training, a cosine schedule from 0.996 to 1 is followed. Control the proportion of teachers retaining old parameters and the proportion of students absorbing new parameters.

[0061] Self-supervised learning faces a trade-off between global and local representations when scaling to large-scale models. Global semantic understanding focuses on "what is it," such as identifying high-level semantic information like object categories and scene types within an image. Local geometric understanding focuses on "where" and "what shape," requiring meaningful feature representations for every pixel location in the image, as seen in tasks like depth estimation, 3D matching, and semantic segmentation. However, these two goals are inherently conflicting. During large-scale, long-term training, this conflict can lead to dense feature collapse, where the model's dense feature maps gradually lose spatial accuracy and semantic consistency, becoming blurry and unusable (the model tends to prioritize the easier global objective, "abandoning" the local objective). Dinov 3 optimizes both global semantic understanding and local spatial details by combining DINO loss and iBOT loss. DINO loss, as an image-level objective, is primarily responsible for learning the overall semantic representation. It uses a knowledge distillation mechanism in a teacher-student network, allowing the student network to learn the teacher network's global understanding of the entire image. The iBOT loss focuses on potential reconstruction at the patch level. This goal ensures that the model can reconstruct lost information from the features of local patches, thus maintaining sensitivity to spatial details. The Koleo regularizer prevents feature collapse and promotes feature diversity by penalizing excessive similarity between features within a batch, encouraging the model to learn richer and more uniformly distributed feature representations.

[0062] The pre-trained weights obtained from dinov3 contain global semantic features and dense local features learned in the above manner. Importing these pre-trained weights into the MMDetection framework is the first step in the integration process. Specifically, in the MMDetection framework's source code directory structure, for example, in the path mmdet / models / backbones / , create a new Python file and define a class named DinoV3ConvNeXt. This class inherits from the MMDetection framework's base module class. In the class's initialization method, use the torch.hub.load() function to load the locally stored dinov3 model and its pre-trained weights. This class needs to override the forward propagation method to ensure that after the dinov3 backbone network processes the input image, the output format is as follows: The four scale feature maps, among which, Indicates the batch size. This represents the number of channels in the feature map. and These represent the height and width of the feature map, respectively. The number of channels for these four scale feature maps are 128, 256, 512, and 1024, respectively. After completing the class definition, the `@MODELS.register_module()` decorator is used to register the `DinoV3ConvNeXt` class. This operation adds the `DinoV3ConvNeXt` class to the module registry of the MMDetection framework, allowing it to be directly called by specifying the backbone network type as `DinoV3ConvNeXt` in the configuration file, achieving plug-and-play functionality.

[0063] S102. Construct the ConvNext detection head as a feature decoding module, including a multi-scale feature fusion layer, an object classification branch, and a bounding box regression branch. The specific implementation requires a series of modifications to the MMDetection framework's configuration file. First, in the `model.backbone` field of the configuration file, set `_delete_=True` to delete the original backbone network configuration (e.g., ResNet50) and specify the new backbone network type as the DinoV3ConvNeXt registered in step 1. Second, based on the feature output shape obtained from the forward propagation test of the dinov3 backbone network in step 1, precisely modify the `in_channels` parameter of the `model.neck` field to [128, 256, 512, 1024]. Each element in this list must correspond one-to-one with and be completely equal to the number of channels in the four scale feature maps output by the dinov3 backbone network. This ensures that the number of input channels of the neck module (e.g., the Feature Pyramid Network, FPN) perfectly matches the number of output channels of dinov3, thereby achieving effective feature transfer and lossless fusion from the backbone network to the neck module.

[0064] The detection head adopts the same cascaded mask R-CNN detection head structure as ConvNext, including the classification branch and bounding box regression branch, without requiring additional reconstruction. This reuse is achieved through the inheritance mechanism of the MMDetection framework's configuration file. Developers can specify a base configuration file containing the standard ConvNext detection head definition in the configuration file via the _base_ parameter. In the relevant fields such as model.roi_head and model.rpn_head in the local configuration file, only the type parameter needs to point to the detection head type defined in the base configuration. When parsing the configuration file, the framework automatically merges the inherited parameters, thereby directly reusing all the structural definitions and initialization parameters of the ConvNext detection head in the base configuration, significantly reducing development complexity and the probability of errors.

[0065] To address the problems of poor compatibility between pre-trained backbone networks and detection heads, low utilization of dense features, difficulty in integration with the MMDetection framework, and poor feature channel compatibility in existing object detection technologies, this invention provides an object detection method. This method integrates the dinov3 backbone network into the MMDetection framework through custom module registration. By precisely modifying the configuration file to adapt feature parameters, it fully leverages the dense feature advantages of the dinov3 backbone network and the decoding capabilities of the ConvNext detection head, thereby improving the accuracy of object detection and the efficiency of engineering implementation. Specifically, the first step is the initialization and adaptation of the dinov3 backbone network. This step involves the module registration and implementation of the dinov3 backbone network. Specifically, a class named DinoV3ConvNeXt is defined in the MMDetection framework directory, and the @MODELS.register_module() decorator is used to register this class, thus adding it to the MMDetection framework's module registry. In the implementation of the DinoV3ConvNeXt class, the locally stored dinov3 model and its pre-trained weights are loaded using the torch.hub.load() function. This class needs to override the forward propagation method to ensure that the dinov3 backbone network, after processing the input image, can output feature maps at four scales, each in the format [B, C, H, W]. Here, B represents the batch size, C represents the number of channels in the feature map, and H and W represent the height and width of the feature map, respectively. These four scale feature maps are CNN-compatible multi-scale feature maps, providing different levels of visual representation for subsequent detection. The second step is to construct the ConvNext detection head and integrate it with the dinov3 backbone network. The ConvNext detection head includes a multi-scale feature fusion layer, an object classification branch, and a bounding box regression branch. The detection head is integrated with the dinov3 backbone network through the MMDetection framework interface. The integration process depends on modifications to the MMDetection framework configuration file. First, in the model.backbone field of the configuration file, specify the backbone network type as the registered DinoV3ConvNeXt. Secondly, based on the specific number of channels in the four scale feature maps output by the dinov3 backbone network, the `in_channels` parameter in the `model.neck` field of the configuration file is precisely modified, for example, set to [128, 256, 512, 1024], to ensure that the number of input channels in the neck module perfectly matches the number of output channels in the backbone network. The entire method achieves plug-and-play functionality of the dinov3 backbone network through a module registration mechanism and solves the feature adaptation problem through precise neck parameter configuration.This method eliminates the need to reconstruct the detection head structure from scratch. It achieves efficient integration of the dinov3 backbone network and the ConvNext detection head simply through "module registration + configuration modification," simplifying the development process and enabling the detection head to fully utilize the high-quality dense features extracted by dinov3.

[0066] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation. The scheme after adjusting the order is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0067] like Figure 3 As shown, an embodiment of the present invention provides a target detection system 200, which includes a registration module 201, a setting module 202, an integration module 203, a model training module 204, and a target detection module 205. The registration module 201 is used to: register the dinov3 backbone network as a feature extraction module in the MMDetection framework, and the dinov3 backbone network is used to output feature maps at multiple scales; The setting module 202 is used to: set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps at multiple scales output by the dinov3 backbone network; Integration module 203 is used to: integrate the dinov3 backbone network with the ConvNext detection head in the MMDetection framework to build an object detection model; Model training module 204 is used to train the object detection model; The target detection module 205 is used to: use the trained target detection model to identify targets in the image to be detected, and obtain the category and location of the targets in the image to be detected.

[0068] Optionally, in the above technical solution, the ConvNext detection head is a cascaded mask R-CNN detection head structure, and the detection head is integrated through the configuration inheritance mechanism of the MMDetection framework.

[0069] Optionally, in the above technical solution, the registration module 201 is specifically used to: encapsulate the dinov3 backbone network into a module class named DinoV3ConvNeXt, and register the DinoV3ConvNeXt module class using a decorator, so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework.

[0070] Optionally, in the above technical solution, the model training module 204 is specifically used to: train the object detection model using a dataset containing vehicle category labeling information; The target detection module 205 is specifically used to: use the trained target detection model to identify targets in the image to be detected, and obtain the category and location information of vehicles in the image to be detected.

[0071] It should be noted that the beneficial effects of the target detection system 200 provided in the above embodiments are the same as those of the target detection method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0072] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-described target detection methods.

[0073] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described target detection methods.

[0074] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0075] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A target detection method, characterized in that, include: Register the dinov3 backbone network as a feature extraction module in the MMDetection framework; the dinov3 backbone network is used to output feature maps at multiple scales. Set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps of multiple scales output by the dinov3 backbone network. The dinov3 backbone network and the ConvNext detection head are integrated into the MMDetection framework to construct a target detection model; The target detection model is trained; The trained target detection model is used to identify targets in the image to be detected, thereby obtaining the category and location of the targets in the image.

2. The target detection method according to claim 1, characterized in that, The ConvNext detection head is a cascaded mask R-CNN detection head structure, and the detection head is integrated through the configuration inheritance mechanism of the MMDetection framework.

3. The target detection method according to claim 1, characterized in that, Registering the dinov3 backbone network in the MMDetection framework includes: The dinov3 backbone network is encapsulated into a module class named DinoV3ConvNeXt, and the DinoV3ConvNeXt module class is registered using a decorator so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework.

4. A target detection method according to any one of claims 1 to 3, characterized in that, Training the target detection model includes: training the target detection model using a dataset containing vehicle category labeling information; The trained target detection model is used to identify targets in the image to be detected, obtaining the category and location of the targets in the image, including: The trained target detection model is used to identify targets in the image to be detected, thereby obtaining the category and location information of vehicles in the image.

5. A target detection system, characterized in that, It includes a registration module, a settings module, an integration module, a model training module, and an object detection module; The registration module is used to: register in the MMDetection framework and use the dinov3 backbone network as a feature extraction module, wherein the dinov3 backbone network is used to output feature maps at multiple scales; The setting module is used to: set the input channel parameters of the neck module in the MMDetection framework so that the number of input channels of the neck module is the same as the number of channels of the feature maps of multiple scales output by the dinov3 backbone network; The integration module is used to: integrate the dinov3 backbone network and the ConvNext detection head in the MMDetection framework to construct a target detection model; The model training module is used to: train the target detection model; The target detection module is used to: use the trained target detection model to identify targets in the image to be detected, and obtain the category and location of the targets in the image to be detected.

6. The target detection system according to claim 5, characterized in that, The ConvNext detection head is a cascaded mask R-CNN detection head structure, and the detection head is integrated through the configuration inheritance mechanism of the MMDetection framework.

7. The target detection system according to claim 5, characterized in that, The registration module is specifically used to: encapsulate the dinov3 backbone network into a module class named DinoV3ConvNeXt, and register the DinoV3ConvNeXt module class using a decorator, so that the dinov3 backbone network can be called through the configuration file of the MMDetection framework.

8. A target detection system according to any one of claims 5 to 7, characterized in that, The model training module is specifically used to: train the target detection model using a dataset containing vehicle category labeling information; The target detection module is specifically used to: use the trained target detection model to identify targets in the image to be detected, and obtain the category and location information of vehicles in the image to be detected.

9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a target detection method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements a target detection method according to any one of claims 1 to 4.