Target detection method, vehicle and storage medium

By performing image transformation on the first and second sample images, more sample detection images containing uncommon obstacles are generated, and the target detection model is trained. This solves the problem of low accuracy in recognizing uncommon obstacles in advanced driver assistance systems and achieves higher recognition accuracy.

CN118692050BActive Publication Date: 2026-04-07BYD CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing advanced driver assistance systems have low accuracy in recognizing uncommon obstacles, resulting in inaccurate recognition results.

Method used

By performing image transformations on the first and second sample images, including image synthesis, image generation, and image data augmentation, more sample detection images containing uncommon obstacles are generated, and the target detection model is trained to improve the ability to recognize uncommon obstacles.

Benefits of technology

It improves the accuracy of recognizing uncommon obstacles, ensuring that the judgments of advanced driver assistance systems are more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692050B_ABST
    Figure CN118692050B_ABST
Patent Text Reader

Abstract

This disclosure relates to a target detection method, a vehicle, and a storage medium. The method includes: processing a target image using a target detection model to obtain a target detection result. The target detection model is trained on a base network based on sample detection images. The sample detection images are obtained by image transformation of a first sample image and a second sample image. The first sample image includes at least one target object from a plurality of preset target objects, and the second sample image does not include any preset target objects. This allows for processing of a first sample image containing uncommon obstacles and a second sample image not containing uncommon obstacles using various image transformation methods, resulting in sample detection images containing more uncommon obstacles. Consequently, the target detection model trained on the sample detection images has a better ability to recognize uncommon obstacles, improving the accuracy of uncommon obstacle recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and more specifically, to a target detection method, a vehicle, and a storage medium. Background Technology

[0002] Advanced driver assistance systems (ADAS) are automotive safety systems designed to alert or assist drivers. They support the driver's primary driving tasks by processing collected visual signals to enable advanced driver assistance.

[0003] In related technologies, during the processing of the acquired visual signals, the amount of sample data provided for model training by uncommon obstacles is small, resulting in a low accuracy rate for the model in recognizing uncommon obstacles. For example, the model may identify the white truck bed in front as the sky, the celebrity image on the vehicle advertisement in front as a pedestrian, and fail to recognize household appliances that have fallen onto the road, thus leading to inaccurate recognition results and affecting the judgment of the advanced driver assistance system. Summary of the Invention

[0004] The purpose of this disclosure is to provide a target detection method, a vehicle, and a storage medium. The method processes target images using a target detection model to obtain target detection results. The target detection model is trained on a base network based on sample detection images. The sample detection images are obtained by performing image transformations on a first sample image and a second sample image. The first sample image includes at least one target object from a plurality of preset target objects, while the second sample image does not include any preset target objects. The image transformation includes at least one of image synthesis, image generation, and image data augmentation. The preset target objects are uncommon objects. Therefore, by processing the first sample image containing uncommon obstacles and the second sample image not containing uncommon obstacles using various image transformation methods, sample detection images containing more uncommon obstacles can be obtained. This allows the target detection model trained on the sample detection images to have better recognition capabilities for uncommon obstacles, improving the accuracy of uncommon obstacle recognition.

[0005] According to a first aspect of the present disclosure, a target detection method is provided, comprising:

[0006] Acquire a target image, wherein the target image is an image obtained by image acquisition of a target region;

[0007] The target image is processed by a target detection model to obtain a target detection result. The target detection model is obtained by training a base network based on sample detection images. The sample detection images are obtained by performing image transformation on a first sample image and a second sample image. The first sample image includes at least one target object from a plurality of preset target objects, and the second sample image does not include the preset target object. The image transformation includes at least one of image synthesis, image generation, and image data enhancement.

[0008] Optionally, the basic network includes a backbone network and a detection head network, and the target detection model is obtained through the following steps:

[0009] Acquire multiple sample detection images;

[0010] The backbone network is trained unsupervised based on multiple unlabeled sample detection images to obtain the target backbone network.

[0011] The target detection model is obtained by supervising the target backbone network and the detection head network based on multiple labeled sample detection images.

[0012] Optionally, the backbone network includes a channel attention mechanism, a spatial attention mechanism, and a multispectral channel attention mechanism, which are sequentially connected before the global average pooling layer of the backbone network.

[0013] Optionally, the underlying network may also include a simplified network;

[0014] The step of performing supervised training on the target backbone network and the detection head network based on multiple labeled sample detection images to obtain the target detection model includes:

[0015] Based on multiple labeled sample detection images, the target backbone network and the detection head network are subjected to supervised training to obtain the original detection network;

[0016] Based on the detected images of multiple labeled samples, the target detection model is obtained by knowledge distillation training, using the original detection network as the teacher network and the simplified network as the student network.

[0017] Optionally, the sample detection image is obtained through the following steps:

[0018] Acquire multiple raw sample images;

[0019] Based on the plurality of preset target objects, determine the first sample image and the second sample image from the plurality of original sample images;

[0020] Image transformation is performed on the first sample image and the second sample image to obtain the plurality of sample detection images.

[0021] Optionally, the image transformation includes image synthesis;

[0022] The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes:

[0023] The preset target object in the first sample image is processed to obtain the cutout target;

[0024] Determine the target synthetic region in the second sample image;

[0025] The cut-out target is scaled and then composited into the target synthesis area in the second sample image to obtain multiple original composite images;

[0026] Style transfer is performed on the multiple original synthetic images to obtain multiple target synthetic images;

[0027] The first sample image, the second sample image, and the plurality of target composite images are determined as the plurality of sample detection images.

[0028] Optionally, the image transformation includes image generation;

[0029] The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes:

[0030] The first sample image and the second sample image are processed by the first generative model to obtain multiple first original generated images. The first generative model is obtained by training a first basic generative network based on the multiple original sample images.

[0031] The first sample image and the second sample image are processed by the second generation model to obtain multiple second original generated images. The second generation model is obtained by training a second basic generation network based on the multiple original sample images and the multiple first original generated images.

[0032] The plurality of sample detection images are obtained based on the plurality of original sample images, the plurality of first original generated images, and the plurality of second original generated images.

[0033] Optionally, the image transformation includes image data enhancement;

[0034] The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes:

[0035] For any one of the first sample image and the second sample image, that image is determined as the original image;

[0036] Determine a stitched image corresponding to the original image, wherein the stitched image is a copy of the original image, or the stitched image is another image of the first sample image and the second sample image that has the same size and resolution as the original image;

[0037] An enhanced image is obtained based on the original image and the stitched image corresponding to the original image;

[0038] Multiple enhanced images obtained from the first sample image and the second sample image, as well as the first sample image and the second sample image, are determined as the multiple sample detection images.

[0039] Optionally, the preset target object is an object whose probability of appearing in the target area is less than the target probability.

[0040] Optionally, the preset target object includes at least one of the following: a white truck bed, a vehicle body carrying an image of a human body, a household appliance, and furniture.

[0041] According to a second aspect of the present disclosure, a vehicle is provided, comprising:

[0042] processor;

[0043] Memory used to store processor-executable instructions;

[0044] The processor is configured to perform the steps of the target detection method provided in the first aspect of this disclosure.

[0045] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the steps of the target detection method provided in the first aspect of the present disclosure.

[0046] The above technical solution processes target images using a target detection model to obtain target detection results. The target detection model is trained on a base network based on sample detection images. The sample detection images are obtained by transforming a first sample image and a second sample image. The first sample image includes at least one of a plurality of preset target objects, while the second sample image does not include any preset target objects. The image transformation includes at least one of image synthesis, image generation, and image data augmentation. The preset target objects are uncommon objects. Therefore, by processing the first sample image containing uncommon obstacles and the second sample image not containing uncommon obstacles using various image transformation methods, sample detection images containing more uncommon obstacles can be obtained. This allows the target detection model trained on sample detection images to have a better ability to recognize uncommon obstacles, improving the accuracy of uncommon obstacle recognition.

[0047] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0048] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:

[0049] Figure 1 This is a flowchart illustrating a target detection method according to an exemplary embodiment.

[0050] Figure 2 This is a flowchart illustrating another target detection method according to an exemplary embodiment.

[0051] Figure 3 This is a flowchart illustrating a training method for an object detection model according to an exemplary embodiment.

[0052] Figure 4 This is a flowchart illustrating a method for acquiring a sample detection image according to an exemplary embodiment.

[0053] Figure 5 This is a flowchart illustrating a method for obtaining a sample detection image according to an exemplary embodiment.

[0054] Figure 6 This is a flowchart illustrating another method for obtaining a sample detection image according to an exemplary embodiment.

[0055] Figure 7 This is a flowchart illustrating yet another method for obtaining a sample detection image according to an exemplary embodiment.

[0056] Figure 8 This is a block diagram illustrating a vehicle according to an exemplary embodiment. Detailed Implementation

[0057] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.

[0058] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.

[0059] Figure 1 This is a flowchart illustrating a target detection method according to an exemplary embodiment. Figure 2 This is a flowchart illustrating another target detection method according to an exemplary embodiment, such as... Figure 1 and Figure 2 As shown, this method can be applied to vehicles, and the method may include the following steps:

[0060] In step S101, a target image is acquired, which is an image obtained by image acquisition of the target area.

[0061] In this embodiment, a target image can be obtained by acquiring an image using an image acquisition device. This image acquisition device can be a vehicle-mounted camera, a roadside camera, or other image acquisition equipment. The target area can be the image acquisition area of ​​the image acquisition device; for example, for a vehicle-mounted camera, the target acquisition area can be the area it is directly facing. By acquiring an image of the target area using the image acquisition device, a target image can be obtained. This target image can be any one of the acquired images, or it can be all the images in the acquired images.

[0062] In step S102, the target image is processed by the target detection model to obtain the target detection result. The target detection model is obtained by training the base network based on the sample detection image. The sample detection image is obtained by performing image transformation on the first sample image and the second sample image. The first sample image includes at least one target object among a plurality of preset target objects. The second sample image does not include the preset target objects. The image transformation includes at least one of image synthesis, image generation and image data enhancement.

[0063] In this embodiment, the preset target object is an uncommon object. Optionally, the preset target object can be an object whose probability of appearing in the target area is less than the target probability. The target probability can be set according to the actual situation. For example, the target probability can be 20%. For example, the preset target object may include at least one of a white truck bed, a vehicle carrying a human image, a household appliance, and furniture. Thus, a first sample image containing uncommon obstacles and a second sample image not containing uncommon obstacles can be processed using various image transformation methods to obtain sample detection images containing more uncommon obstacles. This allows the target detection model trained with multiple sample detection images containing uncommon obstacles to have a better ability to recognize uncommon obstacles, improving the accuracy of uncommon obstacle recognition. Processing the target image with the target detection model trained with multiple sample detection images containing uncommon obstacles yields a more accurate target detection result. The base network can be a CNN (Convolutional Neural Network).

[0064] like Figure 2 As shown, in step S201, a first sample image can be obtained, and in step S202, a second sample image can be obtained.

[0065] In step S203, image synthesis can be performed on the first sample image and the second sample image.

[0066] In step S204, image generation can be performed on the first sample image and the second sample image.

[0067] In step S205, image data enhancement can be performed on the first sample image and the second sample image.

[0068] In step S206, the model can be trained based on the images synthesized, generated, and augmented to obtain the target detection model.

[0069] In step S207, the target image can be acquired.

[0070] In step S208, the acquired target image can be processed using a target detection model.

[0071] In step S209, after processing the target image, the target detection result can be obtained.

[0072] Figure 3 This is a flowchart illustrating a training method for an object detection model according to an exemplary embodiment, such as... Figure 3 As shown, in one possible implementation, the base network includes a backbone network and a detection head network, and the target detection model is obtained through the following steps:

[0073] In step S301, multiple sample detection images are acquired.

[0074] In this embodiment, the sample detection image includes a first sample image containing uncommon objects and a second sample image not containing uncommon objects. Multiple sample detection images can be obtained by performing image transformation on the first and second sample images. The image transformation can include at least one of image synthesis, image generation, and image data enhancement. Image transformation can involve synthesizing the target object from the first sample image into the second sample image to obtain a new sample detection image. Image generation can use either the first or second sample image as real data, aiming to minimize the distance between the generated image and the real data, to generate a new sample detection image corresponding to either the first or second sample image. Image data enhancement involves using either the first or second sample image as a base image and performing data enhancement to obtain a new sample detection image corresponding to either the first or second sample image.

[0075] In step S302, the backbone network is trained unsupervised based on multiple unlabeled sample detection images to obtain the target backbone network.

[0076] In this embodiment, the backbone network can be a RepVGG model (specifically, RepVGG_B3g4). During training, multiple unlabeled sample detection images can be used to perform unsupervised training on the backbone network. For example, the idea of ​​contrastive learning can be adopted, and the SimCL v2 method in unsupervised learning can be used to improve the feature extraction capability of the model to obtain the target backbone network.

[0077] In one possible implementation, the backbone network includes a channel attention mechanism, a spatial attention mechanism, and a multispectral channel attention mechanism, which are sequentially connected before the global average pooling layer of the backbone network.

[0078] In this implementation, multiple attention mechanisms, such as channel attention, spatial attention, and FcaNet, can be added to the RepVGG backbone model to enhance the model's ability to extract features from valuable regions. These attention mechanisms can be added before the model's global average pooling layer, and in the following order: channel attention, spatial attention, and FcaNet attention.

[0079] In step S303, the target backbone network and the detection head network are trained in a supervised manner based on multiple labeled sample detection images to obtain the target detection model.

[0080] In this embodiment, after obtaining the target backbone network, a detection head network is added to the target backbone network. Specifically, the backbone network of the YOLOv5 model is replaced with the trained RepVGG model, and then supervised training is performed on it using labeled sample detection data to obtain the target detection model.

[0081] Figure 4 This is a flowchart illustrating a method for acquiring a sample detection image according to an exemplary embodiment, such as... Figure 4 As shown, in one possible implementation, determining the sample detection image may include the following steps:

[0082] In step S401, multiple raw sample images are acquired.

[0083] In this embodiment, the method for obtaining the original sample images can be as follows: acquiring open-source driving image datasets from the Internet, and driving image datasets specifically collected by test vehicles. Alternatively, existing uncommon datasets can be used to set up scenes in real-world locations or focus on specific image collection areas. If the driving perception algorithm has difficulty effectively identifying certain movable bollards, similar bollards can be placed on a dedicated test road section in the park, and then images can be collected from different angles using a test vehicle. If the driving perception algorithm has difficulty effectively identifying certain fixed walls, more image data can be collected from these fixed objects at different times, under different lighting and weather conditions, and from different driving perspectives. The dataset obtained after collecting data on some uncommon obstacles in this step can be used directly after annotation, or it can be annotated and used after the subsequent image synthesis and image generation processing steps of this invention. Using different methods to obtain images covering a wider range of scenes helps to improve the richness of the samples, thereby improving the generalization performance of the trained model to a certain extent.

[0084] Using the above method, multiple original sample images containing the first sample image and the second sample image can be obtained.

[0085] In step S402, based on multiple preset target objects, a first sample image and a second sample image are determined from multiple original sample images.

[0086] In this embodiment, multiple preset target objects can be pre-defined, which are uncommon obstacles. Based on whether the original sample image contains the preset target objects, a first sample image and a second sample image can be determined from the multiple original sample images. The first sample image includes at least one of the preset target objects, while the second sample image does not include any preset target objects.

[0087] In step S403, image transformation is performed on the first sample image and the second sample image to obtain multiple sample detection images.

[0088] In this embodiment, image transformation can be performed on the first sample image and the second sample image to obtain multiple sample detection images. The image transformation may include at least one of image synthesis, image generation, and image data enhancement.

[0089] Figure 5 This is a flowchart illustrating a method for obtaining a sample detection image according to an exemplary embodiment, such as... Figure 5 As shown, in one possible implementation, the image transformation can be image synthesis. A method for performing image transformation on a first sample image and a second sample image to obtain multiple sample detection images may include the following steps:

[0090] In step S501, the preset target object in the first sample image is processed to obtain the cutout target.

[0091] In this embodiment, the first sample image can be processed by image matting, that is, removing obstacles from the image. The matting method involves manually annotating a portion, then using a trained deep learning segmentation network, such as DeepLabv3+, to automatically matte the image, followed by manual fine-tuning.

[0092] In step S502, the target synthetic region in the second sample image is determined.

[0093] In this embodiment, the target synthesis region can be the drivable area of ​​the vehicle. In the existing second sample image, a region of interest (ROI) is selected. The ROI is selected by choosing the drivable area of ​​the vehicle (generally referring to the road surface). The ROI can be manually labeled in the early stage. After a portion is manually labeled, a deep dual-resolution network (DDRNet) can be used for training. Then, the trained deep dual-resolution model can process the second sample image to generate ROI regions. Then, the ROI regions generated by the model are manually judged to see if they are the drivable areas of the vehicle, and adjusted to ensure that the adjusted ROI regions match the drivable areas of the vehicle.

[0094] In step S503, the cut-out target is scaled and then composited into the target composite area in the second sample image to obtain multiple original composite images.

[0095] In this embodiment, the obtained cutout target can be scaled to fit the target synthesis region in the second sample image. Furthermore, considering that scaling at different ratios can improve sample richness, the cutout target is scaled at different ratios. Then, the scaled obstacle image is placed at different positions within the ROI region, resulting in a new sample image at each position. After these steps, multiple new samples are synthesized from the obstacle image extracted from the uncommon obstacle dataset and images from the common image dataset.

[0096] In step S504, style transfer is performed on multiple original synthetic images to obtain multiple target synthetic images.

[0097] In this embodiment, multiple original synthetic images are style-transferred using the CycleGANS model based on generative adversarial networks, along with corresponding second sample images. This step aims to avoid situations where the inserted matted target and the inserted second sample image have significantly different styles, causing the model to only learn to identify style-discrepancies without correctly understanding the true features of the intended target object. Specifically, style transfer uses a single image as a style image, and then applies an algorithm to the image to be transferred to acquire the style of the aforementioned image. This operation makes the processed synthetic target image more closely resemble the real scene.

[0098] In step S505, the first sample image, the second sample image, and the composite image of multiple targets are determined as multiple sample detection images.

[0099] In this embodiment, the first sample image, the second sample image, and the target composite image obtained by image synthesis can be determined together as multiple sample detection images.

[0100] By using the image synthesis method described above, more target composite images containing preset target objects can be synthesized based on the first sample image and the second sample image, thereby increasing the number of sample images containing uncommon obstacles, so that the trained target detection model can have a better recognition effect on uncommon obstacles.

[0101] Figure 6 This is a flowchart illustrating another method for obtaining a sample detection image according to an exemplary embodiment, such as... Figure 6 As shown, in one possible implementation, image transformation includes image generation; performing image transformation on the first sample image and the second sample image to obtain multiple sample detection images may include the following steps:

[0102] In step S601, the first sample image and the second sample image are processed by the first generation model to obtain multiple first original generated images. The first generation model is obtained by training a first basic generation network based on the multiple original sample images.

[0103] In step S602, the first sample image and the second sample image are processed by the second generation model to obtain multiple second original generated images. The second generation model is obtained by training a second basic generation network based on the multiple original sample images and the multiple first original generated images.

[0104] In step S603, multiple sample detection images are obtained based on multiple original sample images, multiple first original generated images, and multiple second original generated images.

[0105] In this embodiment, image generation refers to generating new images from existing images using algorithms. Image generation methods mainly include generation based on GAN networks and generation based on Variational Autoencoders (VAEs). A Variational Autoencoder is a structure consisting of an encoder and a decoder, trained to minimize the reconstruction error between the encoded / decoded data and the initial data. Specifically, a WGAN model is trained based on original sample images. After training, the trained WGAN model is used to process the first and second sample images to obtain multiple first original generated images. Following the above steps, the VAE model is trained using the multiple original sample images and the multiple first original generated images. The trained model is then used to process the first and second sample images to obtain multiple second original generated images. These multiple original sample images, multiple first original generated images, and multiple second original generated images can be defined as multiple sample detection images.

[0106] In one possible implementation, the generated images can be filtered based on the standard that they are closer to the real data. The images that meet the standard are selected to obtain the target generated image, and the multiple original sample images, multiple first original generated images, and multiple target generated images are determined as multiple sample detection images.

[0107] Figure 7 This is a flowchart illustrating yet another method for obtaining a sample detection image according to an exemplary embodiment, such as... Figure 7 As shown, in one possible implementation, the image transformation includes image data enhancement; performing image transformation on the first sample image and the second sample image to obtain multiple sample detection images may include the following steps:

[0108] In step S701, for any one of the first sample image and the second sample image, the image is determined as the original image.

[0109] In this embodiment, the first sample image can be the original image, and data augmentation can be performed on it. Alternatively, the second sample image can be the original image, and data augmentation can be performed on it to obtain more training samples and improve the recognition ability of the target detection model.

[0110] In step S702, a stitched image corresponding to the original image is determined. The stitched image is a copy of the original image, or the stitched image is another image of the same size and resolution as the original image, which is one of the first sample image and the second sample image.

[0111] In step S703, an enhanced image is obtained based on the original image and the stitched image corresponding to the original image.

[0112] In this embodiment, the stitched image can be rotated before being stitched with the original image, or it can be stitched directly with the original image.

[0113] In step S704, the multiple enhanced images obtained from the first sample image and the second sample image, as well as the first sample image and the second sample image, are determined as multiple sample detection images.

[0114] In this embodiment, data augmentation is performed by stitching together two or more images to maximize sample richness. Specific operations may include: copying an image and stitching it with itself in the left-right and up-down directions to obtain a stitched image; copying an image, rotating it 180 degrees clockwise, and then stitching it with itself in the left-right and up-down directions to obtain a stitched image; stitching an image with another image of the same size and resolution from the first and second sample images in the left-right and up-down directions to obtain a stitched image; rotating an image 180 degrees clockwise and then stitching it with another image of the same size and resolution from the first and second sample images in the left-right and up-down directions to obtain a stitched image.

[0115] By using the image enhancement methods described above, sample detection images containing more uncommon obstacles can be obtained. This enables the target detection model trained on the sample detection images to have a better ability to recognize uncommon obstacles, thereby improving the accuracy of uncommon obstacle recognition.

[0116] In one possible implementation, the base network further includes a simplified network; the target backbone network and the detection head network are supervisedly trained based on multiple labeled sample detection images to obtain a target detection model, including: supervising the target backbone network and the detection head network based on multiple labeled sample detection images to obtain an original detection network; and using the original detection network as the teacher network and the simplified network as the student network, knowledge distillation training is performed based on multiple labeled sample detection images to obtain a target detection model.

[0117] In this embodiment, a knowledge distillation approach is employed. The trained model serves as the teacher network, while a lightweight deep learning network, improved from the RepVGG_B1g2 model, acts as the student network. This ensures that the trained student network's recognition capabilities are as close as possible to those of the teacher network. This approach addresses the drawbacks of current deep learning models, such as high computational cost and demanding requirements for in-vehicle hardware, while also considering that adding attention mechanisms allows the model to focus on more meaningful regions. Therefore, multiple attention mechanisms are added to enhance the model's recognition ability, and knowledge distillation is used to significantly reduce the number of model parameters while maintaining the model's recognition accuracy as much as possible.

[0118] The model training method described above employs contrastive learning, introducing unsupervised learning into the training process. Unsupervised learning helps the model extract features more effectively, addressing the problem of limited data on uncommon obstacles hindering effective feature extraction and thus improving the model's accuracy and recall for identifying such obstacles. Furthermore, by modifying the backbone network of the YOLOv5 model and adding multiple detection head networks, it can not only identify obstacles in front of the vehicle but also be applicable to various tasks including lane detection and traffic sign detection.

[0119] Figure 8 This is a block diagram illustrating a vehicle according to an exemplary embodiment. Figure 8 As shown, the vehicle 800 may include a processor 801 and a memory 802. The vehicle 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.

[0120] The processor 801 controls the overall operation of the vehicle 800 to complete all or part of the steps in the target detection method described above. The memory 802 stores various types of data to support the operation of the vehicle 800. This data may include, for example, instructions for any application or method operating on the vehicle 800, and application-related data such as contact data, sent and received messages, images, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 802 or transmitted via communication component 805. The audio component also includes at least one speaker for outputting audio signals. I / O interface 804 provides an interface between processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 805 is used for wired or wireless communication between the vehicle 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 805 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0121] In an exemplary embodiment, the vehicle 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the target detection method described above.

[0122] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the target detection method described above. For example, the computer-readable storage medium may be the memory 802 including the program instructions described above, which may be executed by the processor 801 of the vehicle 800 to complete the target detection method described above.

[0123] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.

[0124] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.

[0125] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

Claims

1. A target detection method, characterized in that, include: Acquire a target image, wherein the target image is an image obtained by image acquisition of a target region; The target image is processed by a target detection model to obtain a target detection result. The target detection model is obtained by training a base network based on sample detection images. The sample detection images are obtained by performing image transformation on a first sample image and a second sample image. The first sample image includes at least one target object from a plurality of preset target objects. The second sample image does not include the preset target object. The image transformation includes at least one of image synthesis, image generation, and image data enhancement. The sample detection image is obtained through the following steps: Acquire multiple raw sample images; Based on the plurality of preset target objects, determine the first sample image and the second sample image from the plurality of original sample images; Image transformation is performed on the first sample image and the second sample image to obtain the plurality of sample detection images; The image transformation includes image generation; The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes: The first sample image and the second sample image are processed by the first generative model to obtain multiple first original generated images. The first generative model is obtained by training a first basic generative network based on the multiple original sample images. The first sample image and the second sample image are processed by the second generation model to obtain multiple second original generated images. The second generation model is obtained by training a second basic generation network based on the multiple original sample images and the multiple first original generated images. The plurality of sample detection images are obtained based on the plurality of original sample images, the plurality of first original generated images, and the plurality of second original generated images.

2. The target detection method according to claim 1, characterized in that, The image transformation includes image synthesis; The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes: The preset target object in the first sample image is processed to obtain the cutout target; Determine the target synthetic region in the second sample image; The cut-out target is scaled and then composited into the target synthesis area in the second sample image to obtain multiple original composite images; Style transfer is performed on the multiple original synthetic images to obtain multiple target synthetic images; The first sample image, the second sample image, and the plurality of target composite images are determined as the plurality of sample detection images.

3. The target detection method according to claim 1, characterized in that, The image transformation includes image data enhancement; The step of performing image transformation on the first sample image and the second sample image to obtain the plurality of sample detection images includes: For any one of the first sample image and the second sample image, that image is determined as the original image; Determine a stitched image corresponding to the original image, wherein the stitched image is a copy of the original image, or the stitched image is another image of the first sample image and the second sample image that has the same size and resolution as the original image; An enhanced image is obtained based on the original image and the stitched image corresponding to the original image; Multiple enhanced images obtained from the first sample image and the second sample image, as well as the first sample image and the second sample image, are determined as the multiple sample detection images.

4. The target detection method according to claim 1, characterized in that, The preset target object is an object whose probability of appearing in the target area is less than the target probability.

5. The target detection method according to claim 1, characterized in that, The preset target object includes at least one of the following: a white truck bed, a vehicle body carrying an image of a human body, a household appliance, and furniture.

6. The target detection method according to claim 1, characterized in that, The basic network includes a backbone network and a detection head network. The target detection model is obtained through the following steps: Acquire multiple sample detection images; The backbone network is trained unsupervised based on multiple unlabeled sample detection images to obtain the target backbone network. The target detection model is obtained by supervising the target backbone network and the detection head network based on multiple labeled sample detection images.

7. The target detection method according to claim 6, characterized in that, The backbone network includes a channel attention mechanism, a spatial attention mechanism, and a multispectral channel attention mechanism, which are sequentially connected before the global average pooling layer of the backbone network.

8. The target detection method according to claim 6, characterized in that, The basic network also includes a simplified network; The step of performing supervised training on the target backbone network and the detection head network based on multiple labeled sample detection images to obtain the target detection model includes: Based on multiple labeled sample detection images, the target backbone network and the detection head network are subjected to supervised training to obtain the original detection network; Based on the detected images of multiple labeled samples, the target detection model is obtained by knowledge distillation training, using the original detection network as the teacher network and the simplified network as the student network.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the target detection method according to any one of claims 1-8.

10. A vehicle, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the target detection method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Model training method, device, apparatus and storage medium

    CN109241998A

  • Target detection model training method and device, computer equipment and medium

    CN112734641A

  • Obstacle detection method, device and equipment, storage medium, chip and vehicle

    CN114842454A