Target detection method, electronic equipment and computer readable storage medium
By performing parameter analysis and image enhancement processing on the original image, the problem of degradation of detection accuracy caused by the difference in image quality of the object detection model under different perception devices or environments is solved, and higher detection accuracy and applicability are achieved.
Patent Information
- Application Number
- CN202311010316.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, when the object detection model faces images collected by different perception devices or different environments, the detection accuracy is easily reduced, especially the target deformation, scaling and blurring caused by differences in image quality.
By performing parameter analysis on the original image, it is determined whether it meets the reference parameter range of the object detection model. If the range is out, image enhancement processing is performed, including scaling adjustment, deblurring, light and dark processing, etc., until the reference parameter range is met, and then the enhanced image is input to the pre-trained object detection model for detection.
The applicability of the object detection model is improved, so that it can maintain good detection effect when facing images collected by different perception devices or different environments, and improve detection accuracy.
Smart Images

Figure CN119478474A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a target detection method, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the scene perception system, target detection is a key link. It mainly uses the perception device to collect images of the scene, and then inputs the collected images into the target detection model to output the corresponding detection results through the target detection model to achieve the perception and classification of the scene. Generally speaking, the image acquisition effect of the perception device will greatly affect the effect of target detection in the scene. For example, different perception device installation heights and viewing angles will cause different degrees of deformation or scaling of the targets in the collected images; for outdoor application environments, image quality is easily affected by environmental weather, such as rainy days, foggy days, cloudy days, etc. The above factors will greatly reduce the accuracy of target detection. Summary of the invention
[0003] The embodiments of the present application provide a target detection method, an electronic device, and a computer-readable storage medium, which are intended to at least ensure the accuracy of target detection when facing images collected by different sensing devices or in different environments.
[0004] In a first aspect, an embodiment of the present application provides a target detection method, the method comprising:
[0005] Collecting an original image and obtaining image parameters of the original image;
[0006] When the image parameter of the original image exceeds the corresponding reference parameter range, performing image enhancement processing on the original image to obtain an enhanced image;
[0007] The enhanced image is input into a pre-trained target detection model to obtain a target detection result.
[0008] In a second aspect, an embodiment of the present application provides a target detection device, the device comprising:
[0009] An image acquisition module, used to acquire an original image and obtain image parameters of the original image;
[0010] An image enhancement module, configured to perform image enhancement processing on the original image to obtain an enhanced image when the image parameters of the original image exceed the corresponding reference parameter range;
[0011] The image detection module is used to input the enhanced image into a pre-trained target detection model to obtain a target detection result.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0013] one or more processors;
[0014] A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the target detection method as described in the first aspect above.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the target detection method as described in the first aspect above is implemented.
[0016] In the embodiment of the present application, for the collected original image, parameter analysis is performed on the original image to obtain the image parameters of the original image; then the image parameters of the original image are compared with the corresponding reference parameter range to determine whether the original image meets the detection conditions of the target detection model according to the comparison result; in the embodiment of the present application, when the image parameters of the original image exceed the corresponding reference parameter range, it is considered that the original image does not meet the detection conditions of the target detection model, and the original image is subjected to image enhancement processing to obtain an enhanced image that meets the detection conditions of the target detection model; and then the enhanced image is input into the pre-trained target detection model to obtain the target detection result. Through the scheme of the embodiment of the present application, the applicability of the target detection model can be improved, so that the target detection model can obtain good detection effects when facing images collected by different sensing devices or different environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the steps of a target detection method provided in an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of the steps of image enhancement processing provided by an embodiment of the present application;
[0019] Figure 3 It is a schematic diagram of a step of determining a reference parameter range provided in an embodiment of the present application;
[0020] Figure 4 yes Figure 3 A schematic diagram of sub-steps of step S250 in FIG.
[0021] Figure 5 This is a schematic diagram of a step of obtaining image parameters provided by an embodiment of the present application;
[0022] Figure 6 It is a schematic diagram of the training steps of a target detection model provided in an embodiment of the present application;
[0023] Figure 7 It is a flowchart of a target detection method provided in an embodiment of the present application;
[0024] Figure 8a This is a schematic diagram of an application scenario of the target detection method of an embodiment of the present application;
[0025] Figure 8b is a schematic diagram of another application scenario of the target detection method of an embodiment of the present application;
[0026] Fig. 9 is a structural schematic diagram of a target detection device provided in an embodiment of the present application;
[0027] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solution of the present application, the target detection method, electronic device and computer-readable storage medium provided by the present application are described in detail below in conjunction with the accompanying drawings.
[0029] Hereinafter, example embodiments will be described more fully in conjunction with the accompanying drawings, but the described example embodiments may be embodied in different forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make this application thorough and complete, and will enable those skilled in the art to fully understand the scope of this application.
[0030] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0031] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0032] In the description of the embodiments of the present application, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0033] In the description of the embodiments of the present application, any embodiment or design scheme of "exemplary", "for example" or "for example" should not be understood as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0034] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0035] In order to facilitate understanding of the solutions of the embodiments of the present application and to provide a clear and concise description of the following embodiments, a brief introduction to the relevant technology is first given.
[0036] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0037] Scene perception refers to the use of perception devices to perceive the dynamic information of the surrounding environment, analyze and judge the user's current environment, and provide more intelligent and personalized services. Object detection is a key link in scene perception. Generally, the scene images collected by the perception device are processed by the object detection model, and the corresponding object detection results are output, and then the scene is perceived and classified according to the object detection results. Under normal circumstances, the image acquisition effect of the perception device will greatly affect the effect of object detection in the scene. For example, different perception device installation heights and viewing angles will cause different degrees of deformation or scaling of the objects in the collected images; for outdoor application environments, the image quality is easily affected by environmental weather, such as rainy days, foggy days, cloudy days, etc. The above factors will greatly reduce the accuracy of object detection.
[0038] The scene perception system can be applied to the vehicle's advanced driver assistance systems (ADAS) and automated driving systems (ADS), as well as to various driving functions (such as adaptive cruise control (ACC) and automatic emergency braking (AEB), etc. It can also be applied to device to device communication (D2D), vehicle to everything (V2X), vehicle to vehicle (V2V), long term evolution-vehicle (LTE-V), long term evolution-machine (LTE-M) and other scenarios.
[0039] In a possible application example of vehicle traffic scene perception, an image acquisition device is used to capture the surrounding environment of the vehicle, generate an image, and transmit the image to a target detection device. Then, the target detection device performs target detection based on the image captured by the image acquisition device. The target may include but is not limited to parking spaces, people, obstacles, lane lines, construction areas, buildings, signs, trees, etc. Based on the target detection results, the surrounding environment of the vehicle is understood to achieve scene perception, so that the vehicle control system can make corresponding decisions. Among them, the target detection device can be loaded on the vehicle terminal or on a server connected to the vehicle terminal. The target detection device is deployed with a trained target detection model, which can be but is not limited to an R-CNN model, a Fast R-CNN model, a Faster R-CNN model, a Mask R-CNN model, a YOLO model, an SSD model, and the like.
[0040] The image acquisition device may include one or more cameras (i.e., perception devices) installed on the vehicle body, such as a surround view camera, a monocular camera, a binocular camera, etc. Due to differences in the installation angles or viewing angles of different cameras, the images captured by different cameras may have deviations in image quality. For example, when a vehicle is driving at high speed, the images captured by individual cameras may be deformed. The above situation causes the target detection device to have different accuracy when performing target detection on images captured by different cameras.
[0041] When the vehicle is in different outdoor environments, the quality of the images collected by the camera will also be biased. For example, in rainy or cloudy environments, the images collected by the camera may be less bright than those collected on sunny days, which will affect the accuracy of target detection. For another example, when the vehicle is traveling in a poorly lit tunnel, the images collected by the camera may also have insufficient brightness. The above situation will also cause the target detection device to have accuracy differences when performing target detection on images collected in different environments.
[0042] In addition, the data sets used for training target detection models are usually images collected under normal conditions. Once the target detection model changes its deployment equipment or the image acquisition device, the model needs to be retrained and adjusted, otherwise it will not be able to adapt well to the changing target forms in the scene.
[0043] In order to solve the problem that the target detection device has different detection accuracy when facing different perception devices or images collected in different environments, the embodiments of the present application provide a target detection method, an electronic device and a computer-readable storage medium. In the embodiments of the present application, for the collected original image, the original image is subjected to parameter analysis to obtain the image parameters of the original image; then the image parameters of the original image are compared with the corresponding reference parameter range to determine whether the original image meets the detection conditions of the target detection model according to the comparison result; in the embodiments of the present application, when the image parameters of the original image exceed the corresponding reference parameter range, it is considered that the original image does not meet the detection conditions of the target detection model, and the original image is subjected to image enhancement processing to obtain an enhanced image that meets the detection conditions of the target detection model; and then the enhanced image is input into the pre-trained target detection model to obtain the target detection result. Through the scheme of the embodiments of the present application, the applicability of the target detection model can be improved, so that the target detection model can obtain good detection effects when facing images collected by different perception devices or different environments.
[0044] The execution subject of the target detection method of the embodiment of the present application can be a terminal device. The terminal device can be an intelligent roadside device, such as a road side edge computing (REC) device, a road side unit (RSU) or a roadside sensing device of a smart park, etc. The terminal device can also be an intelligent vehicle-mounted device, a smart phone, a game console, a desktop computer, a tablet computer, a laptop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, etc. It can also be other terminal devices such as intelligent transportation equipment, smart home equipment, robots, and drones.
[0045] The execution subject of the target detection method of the embodiment of the present application can be a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. This embodiment of the present application is not limited to this.
[0046] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0047] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on the attribute information or attribute information set of an object (such as a user, etc.) and other data related to the characteristics of the object, the permission or consent of the corresponding object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the attribute information of an object, a separate permission or separate consent of the corresponding object will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the corresponding object, the relevant data of the object necessary for the normal operation of the embodiment of the present application is obtained.
[0048] The target detection method, target detection device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the target detection method in the embodiments of the present application is described.
[0049] See also Figure 1 , Figure 1 Schematic diagram of the steps of a target detection method provided in an embodiment of the present application. Figure 1As shown, the target detection method includes the following steps S110-S130, and each step is introduced in turn below:
[0050] Step S110, collecting an original image and obtaining image parameters of the original image.
[0051] The original image can be acquired through a sensing device, which can be a camera, a radar, such as a millimeter wave radar or a laser radar, or other sensors such as a light sensor, such as a CMOS or CCD image sensor. The object generates an optical image through a lens and projects it onto a photosensitive element, which can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing, and the DSP converts the digital image signal into an image signal in a standard RGB (also known as a blue-green-red (BGR) color space), YUV (where Y represents brightness (Luminance or Luma), U represents hue, and V represents saturation) and other formats.
[0052] In an embodiment of the present application, the original image may be a static image captured by a camera, or a video frame in a dynamic video captured by a camera.
[0053] In the embodiment of the present application, the image parameters may include one or more of the following parameters: an image size parameter, an image deformation degree parameter, an image blur degree parameter, or an image brightness parameter.
[0054] Regarding the image size parameter, it will affect the size of the target object in the image, which is caused by the different distances between the sensor device and the target object. Regarding the image deformation degree parameter, it will affect the deformation of the same target in the image, which is caused by the inconsistent height of the sensor device. The target objects in the pictures obtained by the sensor at different heights are also deformed to different degrees. Regarding the image blur, this is because the sensor device is installed in an outdoor environment and will be affected by the weather, such as heavy rain, sandstorms, fog, etc. The line of sight of the sensor is impaired, which will cause the image to be blurred and affect the detection effect. Regarding the brightness parameter, this influencing factor will also affect the detection effect when the pictures collected by the sensor are dark on cloudy days, dark days, etc., so it also needs to be adjusted. In addition to the above four parameters, other parameters such as contrast, exposure factor, etc., all parameters that affect the image quality can be taken into account.
[0055] The image size parameters can be determined by detecting the pixel values of the image. For example, if the width of the image is 100 pixels and the height is 200 pixels, then the size of the image is 100x200 pixels.
[0056] The image deformation degree parameter can be obtained by inputting the original image into a pre-trained image deformation detection model, and the image deformation detection model performs deformation detection on the target area in the image and outputs the corresponding image deformation degree parameter. The image deformation detection model can be a typical classification model, and the image deformation degree parameter can be represented by a deformation degree label. For example, the deformation degree label output by the image deformation detection model is 0, indicating that the image is not deformed; the deformation degree label output by the image deformation detection model is 1, indicating that the image is deformed.
[0057] The image blur degree parameter can be obtained by inputting the original image into a pre-trained image blur detection model, which performs blur detection on the target area in the image and outputs the corresponding image blur degree parameter. The image blur detection model can be a typical classification model, and the image blur degree parameter can be represented by a blur degree label. For example, the blur degree label output by the image blur detection model is 0, indicating that the image is not blurred; the blur degree label output by the image blur detection model is 1, indicating that the image is blurred.
[0058] The image brightness parameter can be determined by detecting the brightness value of the pixel points in the target area of the image. The unit of the image brightness parameter can be candela per square meter (cd / m2) or nits.
[0059] In an embodiment of the present application, after the original image is acquired, parameter analysis is performed on the original image to determine image parameters of the original image, so as to determine whether the quality of the original image meets the detection conditions for target detection based on the image parameters of the original image.
[0060] Step S120: When the image parameters of the original image exceed the corresponding reference parameter range, image enhancement processing is performed on the original image to obtain an enhanced image.
[0061] In an embodiment of the present application, the reference parameter range can be determined based on image parameters of a successful verification image set, wherein the successful verification image set includes multiple successful verification images, and the successful verification images represent images that are successfully detected by the target detection model.
[0062] For example, a sample image is manually labeled as a road construction warning sign. The sample image is input into the target detection model. The target detection model outputs a road construction warning sign, that is, the target detection model output is consistent with the manually labeled information. Then, the sample image is considered to be successfully detected by the target detection model, and the sample image is summarized as a successfully verified image. For a successfully verified image, it can generally be considered that its image quality can meet the conditions for target detection in order to be successfully detected by the target detection model. Therefore, the embodiment of the present application collects successfully verified images and performs parameter statistical analysis on the images of the successfully verified images to obtain a benchmark parameter range that meets the target detection conditions.
[0063] In the embodiment of the present application, the image parameters may include parameters of multiple parameter categories, and each parameter category has a corresponding reference parameter range. That is, the image parameters of an image include parameters of multiple parameter categories, and there are also multiple reference parameter ranges, and the multiple reference parameter ranges correspond to the parameters of the multiple parameter categories one by one. For example, the image parameters of the original image are represented by the set {A1, A2, ..., A n} means that the set {A1, A2, …, A n} includes parameters of n parameter categories, each parameter category corresponds to a reference parameter range, and the reference parameter ranges corresponding to all parameter categories are available in the set {B1, B2, ..., B n}express.
[0064] See also Figure 2 , Figure 2 Schematic diagram of the steps of image enhancement processing provided by the embodiment of the present application. Figure 2 As shown, when the image parameters of the original image exceed the corresponding reference parameter range, the original image is subjected to image enhancement processing to obtain an enhanced image, which may specifically include the following steps S121 and S122:
[0065] Step S121, comparing the image parameters of each parameter category of the original image with the corresponding reference parameter range, and determining the parameter category of the original image that exceeds the reference parameter range;
[0066] Step S122, performing corresponding image enhancement processing on the original image according to the parameter category exceeding the reference parameter range to obtain an enhanced image.
[0067] In a possible exemplary embodiment, the image parameters corresponding to the original image are obtained by parameter analysis, and the image parameters corresponding to the original image include parameters of multiple parameter categories, namely: image size parameter A1, image deformation degree parameter A2, image blur degree parameter A3 and image brightness parameter A4. Obtain the reference parameter range B1 corresponding to the image size parameter A1, obtain the reference parameter range B2 corresponding to the image deformation degree parameter A2, obtain the reference parameter range B3 corresponding to the image blur degree parameter A3, and obtain the reference parameter range B4 corresponding to the image brightness parameter A4, that is, obtain the reference parameter range corresponding to each parameter category. Then, compare the parameters of each parameter category with the corresponding reference parameter range to determine whether there is at least one parameter category whose parameters exceed the corresponding reference parameter range. If there is at least one parameter category whose parameters exceed the corresponding reference parameter range, perform corresponding image enhancement processing on the original image according to the parameter category that exceeds the reference parameter range, so that the original image can meet the reference parameter range after the enhancement processing.
[0068] In a possible exemplary embodiment, performing corresponding image enhancement processing on the original image according to the parameter category exceeding the reference parameter range may include at least one of the following steps:
[0069] In the case where the parameter category exceeding the reference parameter range is an image size parameter, scaling and adjusting processing is performed on the original image, so as to adjust the image size parameter of the original image to within the corresponding reference parameter range through the scaling and adjustment processing;
[0070] In the case where the parameter category exceeding the reference parameter range is an image deformation degree parameter, a scale adjustment process is performed on the original image, so as to adjust the image deformation parameter of the original image to within the corresponding reference parameter range through the scale adjustment process;
[0071] In the case where the parameter category exceeding the reference parameter range is an image blur degree parameter, performing image deblurring processing on the original image, so as to adjust the image blur degree parameter of the original image to within the corresponding reference parameter range through the deblurring processing;
[0072] When the parameter category exceeding the reference parameter range is an image brightness parameter, image shading processing is performed on the original image to adjust the image brightness parameter of the original image to within the corresponding reference parameter range through the image shading processing.
[0073] It is understandable that if the image size parameter of the original image exceeds the corresponding reference parameter range, the original image can be scaled and adjusted to adjust the image size. The image scaling and adjustment processing includes two processings: reducing the image and enlarging the image. Among them, reducing the image can be achieved by downsampling or downsampling, and enlarging the image can be achieved by upsampling or image interpolation.
[0074] It is understood that if the image blur parameter of the original image exceeds the corresponding reference parameter range, the original image may be resized to reduce the degree of image deformation. The resizing process may include adjusting the ratio of the width and height of the target area in the image, such as by stretching or compressing the image to achieve the purpose of eliminating image deformation.
[0075] It is understandable that if the image deformation degree parameter of the original image exceeds the corresponding reference parameter range, the original image can be deblurred to improve the clarity of the image. The deblurring process can be performed by interpolating the low-resolution image, then detecting the edge of the high-resolution image, and then performing special processing on the edge and nearby pixels to remove blur and enhance the edge of the image.
[0076] It is understandable that if the image brightness parameter of the original image exceeds the corresponding reference parameter range, then the original image may be subjected to image shading processing to make the image brightness within the reference parameter range. Image shading processing includes image brightness enhancement processing or image brightness reduction processing, which may be implemented through an image contrast and brightness adjustment algorithm, such as through a gamma transformation algorithm in a spatial domain method.
[0077] In an embodiment of the present application, at least one image parameter of the original image is obtained, and it is determined whether each image parameter exceeds the corresponding benchmark parameter range. If any image parameter exceeds the corresponding benchmark parameter range, corresponding image enhancement processing is performed so that each image parameter of the image is within the corresponding benchmark parameter range, and the image finally obtained by the enhancement processing is used as the enhanced image.
[0078] Step S130, inputting the enhanced image into a pre-trained target detection model to obtain a target detection result.
[0079] In an embodiment of the present application, if the image parameters of the original image exceed the reference parameter range, the original image is first enhanced to obtain an enhanced image, and then the enhanced image is input into the target detection model to obtain the corresponding target detection result.
[0080] It can be understood that, for the original image, if the image parameters of each parameter category do not exceed the corresponding reference parameter range, then the original image can be directly input into the target detection model to obtain the corresponding target detection result.
[0081] See also Figure 3 , Figure 3 Schematic diagram of a step for determining a reference parameter range provided in an embodiment of the present application. Figure 3 As shown, the reference parameter range involved in the embodiment of the present application can be determined by the following steps S210-S250:
[0082] Step S210, obtaining a verification data set, wherein the verification data set includes a plurality of verification sample images and annotation information corresponding to each verification sample image;
[0083] Step S220, inputting each verification sample image into the target detection model respectively to obtain the target detection result corresponding to each verification sample image;
[0084] Step S230, determining a plurality of successful verification images from the plurality of verification sample images according to the annotation information and the target detection results corresponding to each verification sample image;
[0085] Step S240, obtaining image parameters corresponding to all successfully verified images;
[0086] Step S250: Statistically analyze the image parameters corresponding to all successfully verified images to obtain a reference parameter range.
[0087] In the embodiment of the present application, each verification sample image is input into the trained target detection model, and the target detection result corresponding to each verification sample image is output by the target detection model. Then, for each verification sample image, the annotation information corresponding to the verification sample image and the target detection result are compared. If the corresponding annotation information and the target detection result match, it is considered that the verification sample image is successfully detected by the target detection model, and then the verification sample image is used as a successful verification image. Collect multiple successful verification images, perform parameter analysis on all successful verification images, obtain image parameters corresponding to each successful verification image, perform statistical analysis on the image parameters corresponding to all successful verification images, and obtain a reference parameter range. The reference parameter range obtained in this way can reflect the image quality requirements of the target detection model for the input image. Therefore, the implementation of the present application uses the reference parameter range obtained according to the successful verification image as the detection condition parameter of the target detection model, and determines whether the original image meets the detection condition parameter of the target detection model according to the image parameters of the original image. If not, the original image is subjected to image enhancement processing until the image parameters meet the reference parameter range.
[0088] The verification data set can be a sample image set in a specific scenario, such as a sample image set for a V2X scenario, which contains hundreds or thousands of sample images. Label each verification sample image according to the target classification that needs to be detected (such as vehicles, pedestrians, obstacles, etc.) to obtain the annotation information corresponding to the verification sample image.
[0089] Target detection results can include target classification results, see Figure 4 , Figure 4 yes Figure 3 Schematic diagram of sub-steps of step S250 in FIG. Figure 4 As shown, performing statistical analysis on the image parameters corresponding to all successfully verified images to obtain a reference parameter range may include the following steps S251-S253:
[0090] Step S251, classifying the target classification results corresponding to each successfully verified image to obtain successfully verified images of multiple classification categories;
[0091] Step S252, for each classification category, average the image parameters corresponding to all successfully verified images belonging to the same classification category to obtain the image parameter average of the corresponding classification category;
[0092] Step S253, performing statistical analysis based on the image parameter means of all classification categories to obtain a reference parameter range.
[0093] It is understandable that the successfully verified image is input into the target detection model, and the target detection result output by the target detection model is the target classification result. For the successfully verified image, according to the target classification result of the successfully verified image, the successfully verified image is added to the corresponding classification directory. The image parameters of all successfully verified images under the same classification directory are obtained, and the mean of the image parameters of all successfully verified images is calculated. The mean of the image parameters of all classification categories is statistically analyzed, and the statistical analysis includes but is not limited to variance, standard deviation, mean square error, mean calculation, etc., so as to obtain the reference parameter range.
[0094] The following is an example of calculating the reference parameter range corresponding to the image size parameter. In a possible embodiment, according to the target classification result, the successfully verified image is divided into multiple classification categories of successfully verified images, for example, divided into classification categories such as vehicles, pedestrians and obstacles. According to the classification category, the mean image size parameter of the successfully verified images of each classification category is calculated, for example, the mean image size parameter of the successfully verified images of the vehicle category, the mean image size parameter of the successfully verified images of the pedestrian category, and so on. Then, the image size parameter means of all classification categories are statistically analyzed to obtain the reference parameter range corresponding to the image size parameter. By analogy, the reference parameter range corresponding to the image deformation degree parameter, the image blur degree parameter, and the image brightness parameter can be calculated in a similar manner.
[0095] In a possible exemplary embodiment, the image parameters include static parameters and dynamic parameters. The static parameters may include at least one of an image size parameter and an image deformation degree parameter, and the dynamic parameters may include at least one of an image blur degree parameter and an image brightness parameter. For images captured by the same sensing device, the static parameters of each frame of the image generally do not differ too much, while there may be large differences between the dynamic parameters of each frame of the image. Therefore, for images captured by the same sensing device, only the static parameters of the first frame of the image can be calculated, and the calculated static parameters can be used in subsequent images; while the dynamic parameters need to be calculated for each frame of the image.
[0096] See also Figure 5 , Figure 5 Schematic diagram of the steps for obtaining image parameters provided by the embodiment of the present application. Figure 5 As shown, collecting the original image and obtaining the image parameters of the original image may include the following steps S111 to S112:
[0097] Step S111, obtaining a first frame of original image captured by a sensing device, determining corresponding static parameters according to the first frame of original image, and using the static parameters corresponding to the first frame of original image as static parameters corresponding to each frame of original image;
[0098] Step S112, acquiring the original image captured by the sensing device at a preset time interval, and performing dynamic parameter analysis on each frame of the captured original image to obtain dynamic parameters corresponding to the original image.
[0099] For example, the sensing device is turned on, the first frame image captured by the sensing device is obtained, and the static parameters and dynamic parameters of the first frame image are calculated. If the image size parameter (a static parameter) of the first frame image exceeds the corresponding reference parameter range, the first frame image is scaled and adjusted. The second frame image captured by the sensing device is continuously obtained, and the static parameters of the first frame image are applied to the second frame image. The static parameters are no longer calculated repeatedly, and only the dynamic parameters of the second frame image are calculated. If the image brightness parameter (a dynamic parameter) of the second frame image exceeds the corresponding reference parameter range, the second frame image is subjected to image brightness processing. In addition, the second frame image continues to use the image size parameter of the first frame image, that is, the image size parameter of the second frame image also exceeds the corresponding reference parameter range, and the second frame image needs to be scaled and adjusted.
[0100] It can be understood that since the static parameters of each frame of image captured by the same sensing device generally do not differ too much, this embodiment only calculates the static parameters of the first frame of image, and uses the calculated static parameters of the first frame of image in subsequently captured images to improve processing efficiency; and there may be large differences between the dynamic parameters of each frame of image, so dynamic parameter calculation is performed on each frame of image to ensure the accuracy of quality judgment of each frame of image.
[0101] See also Figure 6 , Figure 6 Schematic diagram of the training steps of a target detection model provided in the embodiment of the present application. Figure 6 As shown, the target detection model can be trained through the following steps:
[0102] Step S310, obtaining a training data set, wherein the training data set includes a plurality of training sample images and annotation information corresponding to each training sample image, and the annotation information corresponding to the training sample image includes target position annotation information and classification annotation information;
[0103] Step S320, inputting a plurality of training sample images into the initial neural network model respectively, and obtaining target detection results corresponding to each training sample image, wherein the target detection results include target position detection results and target classification results;
[0104] Step S330, determining a loss value according to the target position detection result, target position labeling information, target classification result and classification labeling information corresponding to each training sample image;
[0105] Step S340, when the loss value meets the preset training end condition, the current neural network model is used as the target detection model;
[0106] Step S350, when it is determined according to the loss value that the training end condition is not met, the model parameters of the neural network model are adjusted, and the neural network model with the adjusted model parameters is continued to be trained based on the training data set.
[0107] It can be understood that the annotation information corresponding to the training sample image includes target position annotation information and classification annotation information, and the target detection result output by the neural network model for the training sample image includes target position detection result and target classification result. The first loss value can be calculated based on the target position annotation information and the target position detection result, and the second loss value can be calculated based on the classification annotation information and the target classification result. The total loss value can be determined based on the first loss value and the second loss value. The total loss value is used to determine whether the current neural network model meets the training end condition. If it does, the current neural network model is used as the target detection model, otherwise the model parameters of the neural network model are adjusted, and the neural network model with the adjusted model parameters is continuously trained based on the training data set. In this embodiment, the target position annotation information and the classification annotation information are used as training targets so that the model can accurately detect the position of the target object, that is, locate the target object, and then accurately detect the classification corresponding to the target object based on the located target object, thereby improving the detection accuracy of the target detection model.
[0108] In an embodiment of the present application, AI image enhancement technology is integrated with scene perception technology, and AI image enhancement technology is used to preprocess the sequence images collected by the perception unit to make them meet the requirements of the target detection model and improve the target detection recognition rate.
[0109] In an embodiment of the present application, the determination of the benchmark parameters includes: training a target detection model, using the model to perform target detection and identification on the scene verification data set collected by the perception device one by one, and extracting and saving pictures that can successfully detect the target according to the classification directory according to the target classification actually required to be detected (such as vehicles, pedestrians, obstacles, etc.); then calculating the parameters of all successfully detected pictures (including but not limited to four parameters: proportion, degree of deformation, degree of blur, and brightness), and then calculating the mean value by classification, and finally performing further statistical analysis and calculation on the parameters of all target classifications to obtain the optimal picture parameter range that conforms to the model. The parameter range calculated here is the parameter benchmark range in this method.
[0110] In an embodiment of the present application, the judgment of whether the collected image needs parameter adjustment and the specific image parameter adjustment process include: the proportion, deformation degree, blur degree, and brightness parameter of the image collected by the computing device perception sensor (not limited to these four parameters here, and other parameters that may affect the image quality may also be added or deleted), and the four parameters are compared with the reference range respectively. If the parameters are all within the reference error range, it is regarded as a qualified image and directly output to the next step for target detection and identification; if the parameter difference exceeds the reference error range, it is regarded as an unqualified image, and an adaptive AI image enhancement process is performed on it so that its various parameters are within the allowable error range before it can be output to the next step for detection. For example, first determine which parameter is out of range and then input the image into the corresponding image processing module. If the blur degree is unqualified, the image is deblurred. If the image size is out of range, the image is scaled. If the image brightness is out of range, the image is shaded. If the image deformation degree is out of range, the image scale is adjusted. If there are other parameters to be considered, they can also be customized to be added to the module for judgment analysis and adaptive adjustment until all parameters meet the requirements, otherwise the process is looped.
[0111] In the related art, the method of improving the universality of target detection model equipment mainly focuses on multi-sensor fusion perception. Once the deployment equipment is replaced, the model needs to be retrained and adjusted, otherwise it cannot adapt well to the changing target forms in the scene. From the perspective of image processing, the embodiment of the present application adopts an AI image enhancement method that can adaptively pre-process images such as target scale, deformation, blur, too dark and other problems, so that it can adapt to the assembly height and viewing angle of various scene perception devices, adaptively solve various problems of poor target detection caused by image quality problems, and achieve stable target detection effect.
[0112] The AI image enhancement methods in related technologies all perform some specific enhancement on images, such as defogging, magnification, and contrast enhancement. This method sets up a classification enhancement mechanism, which synchronously trains the image parameter range that the model can successfully detect when training the target detection model, and then adopts different image enhancement strategies through parameter analysis, so that it can adaptively enhance images with various problems to meet the image requirements of the target detection model.
[0113] See also Figure 7 , Figure 7 is a flow chart of a target detection method provided in an embodiment of the present application, such as Figure 7 As shown, the target detection method includes the following steps:
[0114] Acquire a training data set, wherein the training data set includes a plurality of training sample images and annotation information corresponding to each training sample image, and the annotation information corresponding to the training sample image includes target position annotation information and classification annotation information;
[0115] Inputting multiple training sample images into the initial neural network model respectively, obtaining target detection results corresponding to each training sample image, wherein the target detection results include target position detection results and target classification results;
[0116] Determine the loss value according to the target position detection results, target position annotation information, target classification results and classification annotation information corresponding to each training sample image;
[0117] The neural network model is trained according to the loss value to obtain a trained target detection model;
[0118] Acquire a verification data set, wherein the verification data set includes a plurality of verification sample images and annotation information corresponding to each verification sample image;
[0119] Input each verification sample image into the target detection model respectively to obtain the target detection result corresponding to each verification sample image;
[0120] Determine multiple successful verification images from multiple verification sample images according to the annotation information and target detection results corresponding to each verification sample image;
[0121] Perform parameter analysis on all successfully verified images to obtain image parameters corresponding to each successfully verified image;
[0122] Perform statistical analysis on the image parameters corresponding to all successfully verified images to obtain the benchmark parameter range;
[0123] Obtaining the original image captured by the sensing device and obtaining image parameters of the original image;
[0124] If the image size parameter exceeds the corresponding reference parameter range, the original image is scaled and adjusted;
[0125] If the image deformation degree parameter exceeds the corresponding reference parameter range, the original image is scaled;
[0126] If the image blur degree parameter exceeds the corresponding reference parameter range, the original image is deblurred;
[0127] If the image brightness parameter exceeds the corresponding reference parameter range, the original image is subjected to image shading processing;
[0128] Obtaining an enhanced image according to the enhanced original image;
[0129] The enhanced image is input into the pre-trained target detection model to obtain the target detection result.
[0130] See also Figure 8a , Figure 8a It is a schematic diagram of an application scenario of the target detection method of an embodiment of the present application. Figure 8a The scene shown includes an intelligent roadside device and multiple roadside sensing devices. The intelligent roadside device can be installed on a roadside pole and communicated with multiple roadside sensing devices. The roadside sensing device can be a camera, a radar, or other device. The intelligent roadside device receives the original images collected by each roadside sensing device, and performs the following steps for each original image collected by the camera: obtaining the image parameters of the original image, and then comparing the image parameters of the original image with the corresponding reference parameter range to determine whether the original image meets the detection conditions of the target detection model according to the comparison result; when the image parameters of the original image exceed the corresponding reference parameter range, it is considered that the original image does not meet the detection conditions of the target detection model, and the original image is subjected to image enhancement processing to obtain an enhanced image that meets the detection conditions of the target detection model; and then the enhanced image is input into the pre-trained target detection model to obtain the target detection result.
[0131] See also Figure 8b , Figure 8b It is a schematic diagram of another application scenario of the target detection method of an embodiment of the present application. Figure 8b The scene shown includes a vehicle, the vehicle includes an on-board terminal and multiple sensing devices, the multiple sensing devices include an interior camera, a rear-view camera, a front camera, a side-view camera, and a surround-view camera, and each camera is connected to the on-board terminal. The on-board terminal receives the original images collected by each camera, and for each original image collected by the camera, performs the following steps: obtain image parameters of the original image, and then compare the image parameters of the original image with the corresponding reference parameter range to determine whether the original image meets the detection conditions of the target detection model according to the comparison result; when the image parameters of the original image exceed the corresponding reference parameter range, it is considered that the original image does not meet the detection conditions of the target detection model, and the original image is subjected to image enhancement processing to obtain an enhanced image that meets the detection conditions of the target detection model; and then the enhanced image is input into the pre-trained target detection model to obtain the target detection result.
[0132] It is to be understood that, although the operations are described in a specific order in the drawings in the embodiments of the present application, it should not be understood as requiring the operations to be performed in the specific order or serial order shown, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0133] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of a target detection device provided in an embodiment of the present application. Fig. 9 As shown, the target detection device comprises:
[0134] An image acquisition module, used for acquiring original images;
[0135] An image parameter acquisition module, used to acquire image parameters of the original image;
[0136] An image enhancement module is used to perform image enhancement processing on the original image to obtain an enhanced image when the image parameters of the original image exceed the corresponding reference parameter range;
[0137] The image detection module is used to input the enhanced image into the pre-trained target detection model to obtain the target detection result.
[0138] In one embodiment, the target detection device further includes a reference parameter determination module, and the reference parameter determination module includes:
[0139] A verification data acquisition unit is used to acquire a verification data set, input each verification sample image into the target detection model, and obtain the target detection result corresponding to each verification sample image, wherein the verification data set includes multiple verification sample images and annotation information corresponding to each verification sample image;
[0140] A verification successful image determination unit is used to determine multiple verification successful images from multiple verification sample images according to the annotation information and target detection results corresponding to each verification sample image, and perform parameter analysis on all the verification successful images to obtain image parameters corresponding to each verification successful image;
[0141] The reference parameter determination unit is used to perform statistical analysis on the image parameters corresponding to all successfully verified images to obtain the reference parameter range.
[0142] In one embodiment, the target detection result includes a target classification result; the benchmark parameter determination unit is specifically used to: classify according to the target classification results corresponding to each successfully verified image to obtain successfully verified images of multiple classification categories; for each classification category, calculate the mean of image parameters corresponding to all successfully verified images belonging to the same classification category to obtain the mean of image parameters of the corresponding classification category; perform statistical analysis based on the mean of image parameters of all classification categories to obtain a benchmark parameter range.
[0143] In one embodiment, the image parameters include parameters of multiple parameter categories, and the parameters of each parameter category correspond to a reference parameter range.
[0144] In one embodiment, the image parameter includes one or more of the following parameters: an image size parameter, an image deformation degree parameter, an image blur degree parameter, or an image brightness parameter.
[0145] In one embodiment, the image enhancement module includes:
[0146] A comparison unit, used to compare the image parameters of each parameter category of the original image with the corresponding reference parameter range, and determine the parameter category of the original image that exceeds the reference parameter range;
[0147] The enhancement processing unit is used to perform corresponding image enhancement processing on the original image according to the parameter category exceeding the reference parameter range to obtain an enhanced image.
[0148] In one embodiment, the enhancement processing unit includes at least one of the following:
[0149] A scaling adjustment unit, used for performing scaling adjustment processing on the original image when the parameter category exceeding the reference parameter range is an image size parameter, so as to adjust the image size parameter of the original image to within the corresponding reference parameter range through the scaling adjustment processing;
[0150] A scale adjustment unit, configured to perform scale adjustment processing on the original image when the parameter category exceeding the reference parameter range is an image deformation degree parameter, so as to adjust the image deformation parameter of the original image to within the corresponding reference parameter range through the scale adjustment processing;
[0151] a deblurring processing unit, configured to perform image deblurring processing on the original image when the parameter category exceeding the reference parameter range is an image blur degree parameter, so as to adjust the image blur degree parameter of the original image to within the corresponding reference parameter range through the deblurring processing;
[0152] The shading processing unit is used to perform image shading processing on the original image when the parameter category exceeding the reference parameter range is the image brightness parameter, so as to adjust the image brightness parameter of the original image to within the corresponding reference parameter range through the image shading processing.
[0153] In one embodiment, the image parameters include static parameters and dynamic parameters; the image parameter acquisition module is specifically used to:
[0154] Acquire a first frame of original image captured by the sensing device, determine corresponding static parameters according to the first frame of original image, and use the static parameters corresponding to the first frame of original image as static parameters corresponding to each frame of original image;
[0155] Acquire the original image collected by the sensing device at a preset time interval, and perform dynamic parameter analysis on each frame of the original image collected to obtain the dynamic parameters corresponding to the original image;
[0156] The static parameter includes at least one of an image size parameter and an image deformation degree parameter, and the dynamic parameter includes at least one of an image blur degree parameter and an image brightness parameter.
[0157] In one embodiment, the target detection device further includes a training module, which is used to:
[0158] Acquire a training data set, wherein the training data set includes a plurality of training sample images and annotation information corresponding to each training sample image, and the annotation information corresponding to the training sample image includes target position annotation information and classification annotation information;
[0159] Inputting multiple training sample images into the initial neural network model respectively, obtaining target detection results corresponding to each training sample image, wherein the target detection results include target position detection results and target classification results;
[0160] Determine the loss value according to the target position detection results, target position annotation information, target classification results and classification annotation information corresponding to each training sample image;
[0161] When the loss value meets the preset training end condition, the current neural network model is used as the target detection model;
[0162] When it is determined according to the loss value that the training end condition is not met, the model parameters of the neural network model are adjusted, and the neural network model with the adjusted model parameters is continuously trained based on the training data set.
[0163] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0164] See also Fig.10 , is an electronic device provided in an embodiment of the present application, and the electronic device 900 includes but is not limited to:
[0165] at least one processor 910;
[0166] At least one memory 920, used to store at least one program;
[0167] When at least one program is executed by at least one processor 910 , the object detection method described in any of the above embodiments is performed.
[0168] It should be understood that the processor 910 and the memory 920 may be connected via a bus or other means.
[0169] It should be understood that the processor 910 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. Alternatively, the processor 910 may be one or more integrated circuits for executing related programs to implement the technical solutions provided in the embodiments of the present application.
[0170] The memory 920 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs, such as the target detection method described in any embodiment of the present application. The processor 910 implements the above-mentioned target detection method by running the non-transitory software program and instructions stored in the memory 920.
[0171] The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store and execute the above-mentioned target detection method. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 920 may optionally include a memory remotely arranged relative to the processor 910, and these remote memories may be connected to the processor 910 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0172] The non-transient software programs and instructions required to implement the above-mentioned target detection method are stored in the memory 920, and when executed by one or more processors 910, the target detection method provided by any embodiment of the present application is executed.
[0173] An embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the target detection method described in any of the above embodiments.
[0174] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0175] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0176] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0177] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the present application.
Claims
1. A target detection method, the method comprising: Collecting an original image and obtaining image parameters of the original image; When the image parameter of the original image exceeds the corresponding reference parameter range, performing image enhancement processing on the original image to obtain an enhanced image; The enhanced image is input into a pre-trained target detection model to obtain a target detection result.
2. The method according to claim 1, characterized in that The reference parameter range is determined by the following steps: Acquire a verification data set, wherein the verification data set includes a plurality of verification sample images and annotation information corresponding to each of the verification sample images; Input each of the verification sample images into the target detection model respectively to obtain the target detection results corresponding to each of the verification sample images; Determining a plurality of successful verification images from a plurality of the verification sample images according to the annotation information corresponding to each of the verification sample images and the target detection result; Obtaining image parameters corresponding to all the successfully verified images; Statistical analysis is performed on the image parameters corresponding to all the successfully verified images to obtain the reference parameter range.
3. The method according to claim 2, characterized in that The target detection result includes a target classification result; the image parameters corresponding to all the successfully verified images are statistically analyzed to obtain the reference parameter range, including: Classify the target classification results corresponding to each of the successful verification images to obtain the successful verification images of multiple classification categories; For each of the classification categories, average calculation is performed on the image parameters corresponding to all the successfully verified images belonging to the same classification category to obtain the image parameter average corresponding to the classification category; The reference parameter range is obtained by performing statistical analysis based on the mean values of the image parameters of all the classification categories.
4. The method according to any one of claims 1 to 3, characterized in that: The image parameters include parameters of multiple parameter categories, and each parameter of the parameter category corresponds to a reference parameter range.
5. The method according to claim 4, characterized in that The image parameters include one or more of the following parameters: an image size parameter, an image deformation degree parameter, an image blur degree parameter or an image brightness parameter.
6. The method according to claim 4, characterized in that When the image parameter of the original image exceeds the corresponding reference parameter range, performing image enhancement processing on the original image to obtain an enhanced image includes: Comparing the image parameters of each parameter category of the original image with the corresponding reference parameter range, and determining the parameter category of the original image that exceeds the reference parameter range; The original image is subjected to corresponding image enhancement processing according to the parameter category exceeding the reference parameter range to obtain the enhanced image.
7. The method according to claim 6, characterized in that The performing corresponding image enhancement processing on the original image according to the parameter category exceeding the reference parameter range includes at least one of the following: In the case where the parameter category exceeding the reference parameter range is an image size parameter, performing a scaling adjustment process on the original image, so as to adjust the image size parameter of the original image to within the corresponding reference parameter range through the scaling adjustment process; In the case where the parameter category exceeding the reference parameter range is an image deformation degree parameter, performing a scale adjustment process on the original image, so as to adjust the image deformation parameter of the original image to within the corresponding reference parameter range through the scale adjustment process; In a case where the parameter category exceeding the reference parameter range is an image blur degree parameter, performing image deblurring processing on the original image, so as to adjust the image blur degree parameter of the original image to within the corresponding reference parameter range through the deblurring processing; In a case where the parameter category exceeding the reference parameter range is an image brightness parameter, image shading processing is performed on the original image, so as to adjust the image brightness parameter of the original image to within the corresponding reference parameter range through the image shading processing.
8. The method according to claim 1, characterized in that The image parameters include static parameters and dynamic parameters; The collecting of the original image and obtaining the image parameters of the original image includes: Acquire a first frame of original image captured by a sensing device, determine the corresponding static parameters according to the first frame of original image, and use the static parameters corresponding to the first frame of original image as the static parameters corresponding to each frame of the original image; The original image captured by the sensing device is acquired at a preset time interval, and for each frame of the original image captured, dynamic parameter analysis is performed on the original image to obtain the dynamic parameters corresponding to the original image.
9. The method according to claim 8, characterized in that The static parameter includes at least one of an image size parameter and an image deformation degree parameter, and the dynamic parameter includes at least one of an image blur degree parameter and an image brightness parameter.
10. The method according to claim 1, characterized in that The target detection model is trained by the following steps: Acquire a training data set, wherein the training data set includes a plurality of training sample images and annotation information corresponding to each of the training sample images, and the annotation information corresponding to the training sample images includes target position annotation information and classification annotation information; Inputting the plurality of training sample images into the initial neural network model respectively, and obtaining target detection results corresponding to the respective training sample images, wherein the target detection results include target position detection results and target classification results; Determine a loss value according to the target position detection result, the target position annotation information, the target classification result and the classification annotation information corresponding to each of the training sample images; When the loss value satisfies a preset training end condition, using the current neural network model as the target detection model; When it is determined according to the loss value that the training end condition is not met, the model parameters of the neural network model are adjusted, and the neural network model with the adjusted model parameters is continuously trained based on the training data set.
11. A target detection device, comprising: An image acquisition module, used to acquire an original image and obtain image parameters of the original image; An image enhancement module, configured to perform image enhancement processing on the original image to obtain an enhanced image when the image parameters of the original image exceed the corresponding reference parameter range; The image detection module is used to input the enhanced image into a pre-trained target detection model to obtain a target detection result.
12. An electronic device comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the target detection method as described in any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the target detection method according to any one of claims 1 to 10 is implemented.