Object recognition method and device, storage medium and electronic equipment
By using the denoising parameter prediction network in the image acquisition equipment in bad weather, the problem of poor image quality is solved and more accurate recognition of the target object is achieved.
Patent Information
- Application Number
- CN202411996230.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
The image quality collected by image acquisition equipment in bad weather is poor, resulting in a significant decrease in the recognition accuracy of target objects in video.
The target image is processed through the denoising parameter prediction network and a denoising parameter vector is generated, which is used to perform homomorphic filtering, multi-scale transform denoising and image enhancement processing to improve image quality.
This improves the illumination smoothness of the image, reduces image noise, and improves the picture clarity, thereby improving the recognition accuracy of the target object.
Smart Images

Figure CN119832258A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular, to an object recognition method and device, a storage medium, and an electronic device. Background Art
[0002] In recent years, with the rapid development of security monitoring technology, video-based target detection and target recognition have been widely used in the fields of public safety, traffic management, etc. However, in severe weather conditions (such as fog, rain, snow, etc.), the quality of the video captured by the image acquisition device is seriously affected by the influence of rain, particles, sand and dust on the camera, resulting in a significant decrease in the recognition accuracy of the target objects appearing in the video.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide an object recognition method and device, a storage medium, and an electronic device to at least solve the technical problem of low recognition accuracy of target objects in images due to poor image quality captured by image acquisition equipment in bad weather.
[0005] According to one aspect of an embodiment of the present application, there is provided an object recognition method, comprising: acquiring a target image to be recognized; processing the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for homomorphic filtering of illumination information of the target image, scale transformation parameters for multi-scale transformation denoising of the target image, and operating parameters for image enhancement of the target image; performing denoising on the target image according to the denoising parameter vector to obtain a denoised target image; and identifying a target object from the denoised target image through a target detection network.
[0006] As an optional implementation, the denoising process is performed on the target image according to the denoising parameter vector to obtain the denoised target image, including: performing at least one of the following processes on the target image according to the denoising parameter vector: performing homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain the filtered target image, wherein the illumination smoothness of the filtered target image is greater than the illumination smoothness of the target image; performing multi-scale transformation denoising on the basic color channel of the target image according to the scale transformation parameters to obtain the denoised target image, wherein the image noise of the denoised target image is less than the image noise of the target image; performing image enhancement on the target image according to the operating parameters to obtain the enhanced target image, wherein the picture clarity of the enhanced target image is higher than the picture clarity of the target image.
[0007] As an optional implementation, the above-mentioned homomorphic filtering processing is performed on the illumination information of the above-mentioned target image according to the above-mentioned filtering parameters to obtain the filtered target image, including: converting the above-mentioned target image into a target image in a grayscale state, wherein the pixel points in the target image in the above-mentioned grayscale state are represented by an illumination component and a reflection component; performing logarithmic transformation and Fourier transformation on the pixel points in the target image in the above-mentioned grayscale state to obtain a grayscale reference image; filtering the above-mentioned grayscale reference image using the above-mentioned filtering parameters; performing inverse Fourier transformation and exponential transformation on the pixel points in the above-mentioned grayscale reference image after filtering to obtain the above-mentioned filtered target image.
[0008] As an optional implementation, the above-mentioned performing multi-scale transformation denoising processing on the basic color channel of the above-mentioned target image according to the above-mentioned scale transformation parameters to obtain the denoised target image includes: performing multi-scale dehazing processing on the basic color channel of the above-mentioned target image according to the above-mentioned scale transformation parameters to obtain the above-mentioned denoised target image.
[0009] As an optional implementation, the target image is enhanced according to the operation parameters, and the enhanced target image includes at least one of the following: when the operation parameter is a weight parameter for adjusting the balance of the image, the balance of the target image is adjusted according to the weight parameter; when the operation parameter is a gamma value of the image, the gamma value of the target image is adjusted according to the gamma value; when the operation parameter is a contrast parameter for adjusting the contrast of the image, the image contrast of the target image is adjusted according to the contrast parameter; when the operation parameter is a sharpness parameter for adjusting the sharpness of the image, the image sharpness of the target image is adjusted according to the sharpness parameter.
[0010] As an optional implementation, after performing denoising processing on the target image according to the denoising parameter vector to obtain the denoised target image, it also includes: when the denoising parameter prediction network reaches the training convergence condition, inputting the denoised target image into the target detection network; when the denoising parameter prediction network has not yet reached the training convergence condition, comparing the difference between the pixel points in the denoised target image and the pixel points in the target image; determining the training feedback parameters that match the difference; and adjusting the network parameters in the denoising parameter prediction network according to the training feedback parameters.
[0011] As an optional implementation, before the target image is processed by the denoising parameter prediction network to obtain the denoising parameter vector predicted for the target image, it also includes: acquiring a first image data set and a second image data set, wherein the first image data set is an image collected under abnormal weather conditions, and the second image data set is an image collected under reference weather conditions; constructing an initialized denoising parameter prediction network; training the initialized denoising parameter prediction network using the first image data set and the second image training set until the training convergence condition is reached, wherein the training convergence condition includes: the pixel difference between the i-th input image used for training in the second image data set and the i-th training result image output by the denoising parameter prediction network is less than a preset threshold, i is a natural number greater than or equal to 1 and less than or equal to N, and N is the number of images input for training the denoising parameter prediction network.
[0012] As an optional implementation, after acquiring the first image data set and the second image data set, the method further includes: annotating abnormal objects appearing in the first image data set to generate an annotation text file, wherein the annotation information of each object in the annotation text file includes: object category representation, display position coordinates of the object in the image, and display width and display height of the object in the image.
[0013] As an optional implementation, after annotating the abnormal objects appearing in the above-mentioned first image data set and generating the annotated text file, it also includes: using the above-mentioned first image data set and the above-mentioned annotated text file to train the initialized target detection network according to preset iterative rounds until the confidence level of the match with the above-mentioned target detection network in training reaches the target threshold.
[0014] According to another aspect of an embodiment of the present application, an object recognition device is also provided, including: a first acquisition unit, used to acquire a target image to be recognized; a first processing unit, used to process the above-mentioned target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the above-mentioned target image, wherein the above-mentioned denoising parameter vector includes filtering parameters for performing homomorphic filtering processing on the illumination information of the above-mentioned target image, scale transformation parameters for performing multi-scale transformation denoising processing on the above-mentioned target image, and operating parameters for performing image enhancement processing on the above-mentioned target image; a second processing unit, used to perform denoising processing on the above-mentioned target image according to the above-mentioned denoising parameter vector to obtain a denoised target image; and an identification unit, used to identify the target object from the above-mentioned denoised target image through a target detection network.
[0015] As an optional implementation, the second processing unit includes at least one of the following: a filtering module, used to perform homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain a filtered target image, wherein the illumination smoothness of the filtered target image is greater than the illumination smoothness of the target image; a denoising module, used to perform multi-scale transformation denoising on the basic color channel of the target image according to the scale transformation parameters to obtain a denoised target image, wherein the image noise of the denoised target image is less than the image noise of the target image; an enhancement module, used to perform image enhancement on the target image according to the operating parameters to obtain an enhanced target image, wherein the picture clarity of the enhanced target image is higher than the picture clarity of the target image.
[0016] As an optional implementation, the filtering module includes: a conversion submodule, used to convert the target image into a target image in a grayscale state, wherein the pixel points in the target image in the grayscale state are represented by illumination components and reflection components; a first transformation submodule, used to perform logarithmic transformation and Fourier transformation on the pixel points in the target image in the grayscale state to obtain a grayscale reference image; and filter the grayscale reference image using the filtering parameters; and a second transformation submodule, used to perform inverse Fourier transformation and exponential transformation on the pixel points in the grayscale reference image after filtering to obtain the filtered target image.
[0017] As an optional implementation, the denoising module includes: a processing submodule, configured to perform multi-scale dehazing processing on the basic color channel of the target image according to the scale transformation parameters to obtain the denoised target image.
[0018] As an optional embodiment, the enhancement module includes at least one of the following: a first adjustment submodule, for adjusting the balance of the target image according to the weight parameter when the operation parameter is a weight parameter for adjusting the image balance; a second adjustment submodule, for adjusting the gamma value of the target image according to the gamma value when the operation parameter is a gamma value of the image; a third adjustment submodule, for adjusting the image contrast of the target image according to the contrast parameter when the operation parameter is a contrast parameter for adjusting the image contrast; a fourth adjustment submodule, for adjusting the image sharpness of the target image according to the sharpness parameter when the operation parameter is a sharpness parameter for adjusting the image sharpness.
[0019] As an optional embodiment, the above-mentioned device also includes: an input unit, which is used to perform denoising processing on the above-mentioned target image according to the above-mentioned denoising parameter vector to obtain the denoised target image, and when the above-mentioned denoising parameter prediction network reaches the training convergence condition, input the above-mentioned denoised target image into the above-mentioned target detection network; a third processing unit, which is used to compare the difference between the pixel points in the above-mentioned denoised target image and the pixel points in the above-mentioned target image when the above-mentioned denoising parameter prediction network has not yet reached the training convergence condition; determine the training feedback parameters that match the above-mentioned differences; and adjust the network parameters in the above-mentioned denoising parameter prediction network according to the above-mentioned training feedback parameters.
[0020] As an optional embodiment, the above-mentioned device also includes: a second acquisition unit, used to acquire a first image data set and a second image data set before processing the above-mentioned target image through the denoising parameter prediction network to obtain the denoising parameter vector predicted for the above-mentioned target image, wherein the above-mentioned first image data set is an image collected under abnormal weather conditions, and the above-mentioned second image data set is an image collected under reference weather conditions; a construction unit, used to construct an initialized denoising parameter prediction network; a first training unit, used to train the above-mentioned initialized denoising parameter prediction network using the above-mentioned first image data set and the above-mentioned second image training set until the training convergence condition is reached, wherein the above-mentioned training convergence condition includes: the pixel difference between the i-th input image used for training in the above-mentioned second image data set and the i-th training result image output by the above-mentioned denoising parameter prediction network is less than a preset threshold, i is a natural number greater than or equal to 1 and less than or equal to N, and N is the number of images input for training the denoising parameter prediction network.
[0021] As an optional embodiment, the above-mentioned device also includes: a labeling unit, which is used to label abnormal objects appearing in the above-mentioned first image data set after acquiring the first image data set and the second image data set, and generate a labeling text file, wherein the labeling information of each object in the above-mentioned labeling text file includes: object category representation, display position coordinates of the object in the image, display width and display height of the object in the image.
[0022] As an optional implementation, the device further includes: a second training unit, which is used to, after annotating the abnormal objects appearing in the first image data set and generating an annotation text file, train the initialized target detection network according to a preset number of iterations using the first image data set and the annotation text file until the confidence level of the match with the target detection network in training reaches a target threshold.
[0023] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned object recognition method when running.
[0024] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above object recognition method.
[0025] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the object recognition method through the computer program.
[0026] In an embodiment of the present application, after obtaining the target image to be identified, the target image is processed by a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for homomorphic filtering of the illumination information of the target image, scale transformation parameters for multi-scale transformation denoising of the target image, and operation parameters for image enhancement of the target image; the target image is denoised according to the denoising parameter vector to obtain a denoised target image; and the target object is identified from the denoised target image by a target detection network. Before identifying the target object in the image, the target image to be identified is denoised to improve the image quality, thereby achieving target object identification for a higher quality image, and further achieving the purpose of improving the accuracy of identifying the target object in the image, solving the technical problem of low recognition accuracy of the target object in the image due to the poor quality of the image collected by the image acquisition device in bad weather. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0028] Figure 1 is a schematic diagram of a hardware environment of an optional object recognition method according to an embodiment of the present application;
[0029] Figure 2 is a flow chart of an optional object recognition method according to an embodiment of the present application;
[0030] Figure 3 is a flowchart of another optional object recognition method according to an embodiment of the present application;
[0031] Figure 4 is a schematic structural diagram of an optional object recognition device according to an embodiment of the present application;
[0032] Figure 5 is a schematic diagram of the structure of an optional computer system according to an embodiment of the present application;
[0033] Figure 6 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] According to one aspect of an embodiment of the present application, an object recognition method is provided. Optionally, as an optional implementation, the object recognition method can be but is not limited to being applied to Figure 1In the object recognition system in the hardware environment shown. The object recognition system may include but is not limited to an image acquisition device 102, a prediction parameter server 104, an image enhancement server 106, a target detection server 108, a terminal device 110, and a database server 112. The image acquisition device 102 here is used to acquire the target image to be recognized through an image acquisition camera, and transmit the acquired target image data to the prediction parameter server 104. The prediction parameter server 104 here is deployed with a small convolutional neural network, which is used to generate a denoising parameter vector of the acquired image to be recognized, and transmit the parameters in the denoising parameter vector to the image enhancement server 106. In addition, the image enhancement server 106 here is deployed with an image enhancement filter group, which is used to perform image enhancement processing on the target image to be recognized according to the parameters received from the prediction parameter server 104, and transmit the enhanced image to the target detection server 108. The target detection server 108 is deployed with a target detection model, which is used to recognize the target object in the image according to the received enhanced image, and input the object recognition result to the terminal device 110. The terminal device 110 is used to perform corresponding processing according to the received target object recognition result. For example, when the received object recognition result indicates that the image has a safety hazard, the terminal device 110 issues a corresponding alarm message. In addition, the above-mentioned database server 112 stores image datasets and security object datasets under normal weather conditions, and transmits the above-mentioned image datasets and security object datasets under normal weather conditions to the prediction parameter server 104 and the target detection server 108, thereby providing data support for the training of the small convolutional neural network in the prediction parameter server and the target detection model in the target detection server.
[0037] Optionally, in this embodiment, the terminal device may be a terminal device configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a video client, an instant messaging client, a browser client, an education client, etc. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server. The above is only an example, and this embodiment does not impose any limitation on this.
[0038] Optionally, as an optional implementation, as Figure 2As shown, the above object recognition method includes:
[0039] S202, obtaining a target image to be identified;
[0040] Optionally, in this embodiment, the target image may be, but is not limited to, a low-quality image captured in bad weather by an image acquisition device such as a camera, for example, a surveillance video image, a road traffic image, etc.
[0041] S204, processing the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering processing on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising processing on the target image, and operation parameters for performing image enhancement processing on the target image;
[0042] Optionally, in this embodiment, the denoising parameter prediction network may be, but is not limited to, a small convolutional neural network, including: an input layer, a convolutional layer, a fully connected layer, and an output layer. The filtering parameters may include, but are not limited to, high-frequency gain, low-frequency gain, cutoff frequency, and constant coefficients used when performing homomorphic filtering on the target image. The scale transformation parameters may include, but are not limited to, at least one Gaussian surround scale used when performing scale transformation on the target image. The operating parameters may include, but are not limited to, the gamma value of the target image, a contrast parameter for adjusting the contrast of the target image, and a sharpness parameter for adjusting the sharpness of the target image.
[0043] S206, performing denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image;
[0044] Optionally, in this embodiment, the denoising process may be but is not limited to at least one of the following processes: performing homomorphic filtering on the illumination information of the target image according to the filtering parameters in the denoising parameter vector to correct the illumination information of the target image and improve the illumination smoothness of the target image; dividing the target image into three channels of R, G, and B according to the scale transformation parameters in the denoising parameter vector to perform defogging to enhance the clarity and contrast of the target image, thereby removing noise from the image and improving the quality of the target image; performing image enhancement processing on the image according to the operating parameters in the denoising parameter vector, for example, adjusting the gamma value and contrast of the target image. Sharpness adjustment, etc., to enhance the image quality of the target image.
[0045] S208, identifying the target object from the denoised target image through a target detection network.
[0046] Optionally, in this embodiment, the target object may be, but is not limited to, a security object that can indicate that there are potential safety hazards in the current actual scene. For example, the target object may be a fire, a cigarette butt, a knife, etc.
[0047] Through the embodiment provided by the present application, after obtaining the target image to be identified, the target image is processed through the denoising parameter prediction network to obtain the denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for homomorphic filtering of the illumination information of the target image, scale transformation parameters for multi-scale transformation denoising of the target image, and operation parameters for image enhancement of the target image; the target image is denoised according to the denoising parameter vector to obtain the denoised target image; the target object is identified from the denoised target image through the target detection network. Before identifying the target object in the image, the target image to be identified is first denoised to improve the image quality, thereby achieving target object identification for a higher quality image, and further achieving the purpose of improving the accuracy of identifying the target object in the image, solving the technical problem of low recognition accuracy of the target object in the image due to the poor quality of the image collected by the image acquisition device in bad weather.
[0048] As an optional solution, performing denoising processing on the target image according to the denoising parameter vector to obtain the denoised target image includes: performing at least one of the following processing on the target image according to the denoising parameter vector:
[0049] S1, performing homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain a filtered target image, wherein the illumination smoothness of the filtered target image is greater than the illumination smoothness of the target image;
[0050] S2, performing multi-scale transformation denoising processing on the basic color channel of the target image according to the scale transformation parameter to obtain a denoised target image, wherein the image noise of the denoised target image is smaller than the image noise of the target image;
[0051] Optionally, in this embodiment, the basic color channels may be, but are not limited to, three channels of R, G, and B.
[0052] S3, performing image enhancement processing on the target image according to the operation parameters to obtain an enhanced target image, wherein the picture definition of the enhanced target image is higher than the picture definition of the target image.
[0053] For example, the denoising parameter vector is: P i =(c,r H ,r L ,D 0 ,c1 ,c 2 ,c 3 ,w r ,w g ,w b ,g,z,s), where c,r H ,r L ,D 0 is the filtering parameter, c is a constant coefficient, r H is the high frequency gain, r L is the low frequency gain, D 0 is the cutoff frequency; c 1 ,c 2 ,c 3 is the scale transformation parameter; w r ,w g ,w b ,g,z,s are operation parameters, and w r 、w g 、w b is the white balance correction coefficient, g is the gamma value, z is the contrast adjustment coefficient, and s is the sharpening coefficient. According to the filtering parameters in the above vector, the input image A can be i Convert to grayscale image f i , for the grayscale image f i The pixel point f in i (x, y) is homomorphically filtered to obtain the grayscale image pixel g after homomorphic filtering. i (x, y), and according to the pixel point A of the input image i The R, G, B ratio of (x, y) is used to convert the grayscale image pixel g i (x, y) is restored to RGB image pixels, thus obtaining the homomorphic filtered image C i In addition, according to the scale transformation parameters in the above vector, the input image A can be i Defogging is performed; according to the operation parameters in the above vector, the input image A can be i Perform enhancement processing, for example, on the input image A i Gamma value adjustment, contrast adjustment, etc. are performed to obtain an input image with enhanced image quality.
[0054] Through the embodiments provided in the present application, homomorphic filtering of illumination information, multi-scale transform denoising processing on the basic color channel, or image enhancement processing is performed on the target image according to the denoising parameter vector, thereby improving the quality of the target image, thereby achieving the purpose of improving the accuracy of identifying the target object in the target image by changing the quality of the target image.
[0055] As an optional solution, homomorphic filtering is performed on the illumination information of the target image according to the filtering parameters, and the filtered target image includes:
[0056] S1, converting the target image into a target image in a grayscale state, wherein the pixel points in the target image in the grayscale state are represented by an illumination component and a reflection component;
[0057] S2, performing logarithmic transformation and Fourier transformation on the pixel points in the target image in the grayscale state to obtain a grayscale reference image;
[0058] S3, filtering the grayscale reference image using the filtering parameters;
[0059] S4, performing inverse Fourier transform and exponential transform on the pixel points in the filtered grayscale reference image to obtain a filtered target image.
[0060] For example, suppose the input target image is A i , then image A i The pixel point with coordinates (x, y) is A i (x, y), the components of its R, G, and B channels are A ir (x,y),A ig (x,y),A ib (x, y), then the process of converting the target image into the target image in grayscale state is shown in formula 1:
[0061] f i (x,y)=0.3*A ir (x,y)+0.6*A ig (x,y)+0.1*A ib (x,y) (1)
[0062] Among them, f i (x, y) is the target image f in grayscale state i The pixel point can be expressed as:
[0063] f i (x,y)=l(x,y)*r(x,y) (2)
[0064] Among them, l(x,y) is the illumination component, and r(x,y) is the reflection component. Taking the logarithm of formula 2, we can get:
[0065] lnf i (x,y)=lnl(x,y)+lnr(x,y) (3)
[0066] Performing Fourier transform on formula 3, we can get:
[0067] Fi (u,v)=L(u,v)+R(u,v) (4)
[0068] Among them, F i (u,v), L(u,v) and R(u,v) are lnf i Fourier transform of (x,y), lnl(x,y) and lnr(x,y). Use Gaussian high-pass filter H(u,v) to filter F i (u,v) is filtered, and we get
[0069] G i (u,v)=H(u,v)F i (u,v)=H(u,v)L(u,v)+H(u,v)R(u,v) (5)
[0070] The Gaussian high-pass filter can be expressed as:
[0071]
[0072] Where c is a constant coefficient, r H is the high frequency gain, r L is the low frequency gain, D 0 is the cutoff frequency. These four parameters are taken from the above denoising parameter vector P i , D(u,v) is the frequency (u,v) to the filter center (u 0 ,v 0 ), that is
[0073]
[0074] Then for G i (u,v) is inversely Fourier transformed, and the index is taken to obtain the grayscale image pixel g after filtering i (x,y)
[0075] g i (x,y)=exp{IDFT(G i (u,v))} (8)
[0076] Then according to the input image pixel A i The R, G, B ratio of (x, y) will convert the grayscale image pixel g i (x, y) is restored to RGB image pixels, and the final output image is C i , which is the image after homomorphic filtering.
[0077] Through the embodiments provided by the present application, the illumination information of the target image is homomorphically filtered according to the filtering parameters, thereby correcting the illumination information in the target image, making the illumination in the target image more uniform, and avoiding the influence of the image illumination on the object recognition. In addition, in the homomorphic filtering process, by first converting the image into a grayscale image, then filtering, and restoring the grayscale image after filtering to an RGB image, the amount of calculation during homomorphic filtering is simplified, the homomorphic filtering speed is improved, and the object recognition process is made more efficient.
[0078] As an optional solution, multi-scale transformation denoising is performed on the basic color channel of the target image according to the scale transformation parameters, and the denoised target image includes:
[0079] S1, performing multi-scale dehazing processing on the basic color channel of the target image according to the scale transformation parameters to obtain a denoised target image.
[0080] The above multi-scale defogging process can be implemented by using, but not limited to, existing image defogging methods. For example, the multi-scale Retinex algorithm is used to process the image in three channels: R, G, and B. i The pixel point with coordinates (x, y) is A i (x, y), the pixel point of the coordinate (x, y) of the output image R is R(x, y), then the defogging process is shown in formula 9:
[0081]
[0082] Among them, ω i is a fixed weight of 1 / 3, F i (x,y) is the center-surround function:
[0083]
[0084] where c i is the Gaussian surround scale, that is, the above vector P i c 1 、c 2 、c 3 σ i is the center-surround scale, which can be obtained by ∫∫F i (x,y)dxdy=1 is calculated.
[0085] Through the embodiments provided in the present application, multi-scale dehazing processing is performed on the target image according to the three channels of R, G, and B according to the scale transformation parameters, thereby enhancing the clarity and detail information of the image, thereby improving the image quality of the image to be identified, and further improving the accuracy of object recognition.
[0086] As an optional solution, the target image is enhanced according to the operation parameters, and the enhanced target image includes at least one of the following:
[0087] S1, when the operation parameter is a weight parameter for adjusting the balance of an image, adjusting the balance of a target image according to the weight parameter;
[0088] S2, when the operation parameter is the gamma value of the image, adjusting the gamma value of the target image according to the gamma value;
[0089] S3, when the operation parameter is a contrast parameter for adjusting image contrast, adjusting the image contrast of the target image according to the contrast parameter;
[0090] S4: When the operation parameter is a sharpness parameter for adjusting image sharpness, the image sharpness of the target image is adjusted according to the sharpness parameter.
[0091] For example, suppose the input target image is S, its pixel is represented by S(x, y), and its R, G, and B values are S r (x,y),S g (x,y),S b (x,y), the operating parameters are the above vector P i The white balance correction factor w in r 、w g 、w b In the case of, the white balance adjustment process of the input image is performed according to the white balance correction coefficient as shown in formula 11:
[0092] R(x,y)=(w r *S r (x,y),w g *S(x,y),w b *S b (x,y)) (11)
[0093] Among them, R(x,y) is the pixel point of the enhanced input image R. By adjusting the white balance of the input image, the color deviation of the image is corrected to ensure that the color in the image can be close to the real color under various abnormal lighting conditions (such as fog, rain, snow, etc.).
[0094] For another example, when the operating parameter is the above vector P i In the case of the gamma value g in , the gamma value adjustment process of the input image is performed according to the gamma value as shown in formula 12:
[0095] R(x,y)={[S(x,y)+0.5] / 256} g *256-0.5 (12)
[0096] Among them, R(x,y) is the pixel point of the enhanced input image R. By adjusting the gamma value of the input image, the contrast of the image can be adjusted, and then the dynamic range of the contrast of the image can be changed by adjusting the gamma value in the case of insufficient or excessive light, so that the details of the image in low light or high light environment are more obvious.
[0097] For another example, when the operating parameter is the above vector P i In the case of the contrast adjustment coefficient z in , the contrast adjustment process of the input image is performed according to the contrast adjustment coefficient as shown in formula 13:
[0098]
[0099] Among them, R(x,y) is the pixel point of the enhanced input image R, is the average brightness, that is, the average value of each pixel in the input image in grayscale state. By adjusting the contrast of the input image, the difference between different areas of the image is enhanced, making the distinction between the target and the background more obvious.
[0100] For another example, when the operating parameter is the above vector P i In the case of the sharpening coefficient s in , the image sharpening process of the input image is performed according to the sharpening coefficient as shown in formula 14:
[0101]
[0102] Among them, R(x,y) is the pixel point of the enhanced input image R, G x and G y is the horizontal convolution kernel, which can be expressed as:
[0103]
[0104] By sharpening the input image, the image edges and details are enhanced, making the image look clearer.
[0105] Through the embodiments provided in the present application, the target image is enhanced according to the operating parameters, thereby improving the clarity of the image, enriching the detail information in the image, and providing support for more accurate object recognition in the image.
[0106] As an optional solution, in the above step S206, after performing denoising processing on the target image according to the denoising parameter vector to obtain the denoised target image, the method further includes:
[0107] S1, when the denoising parameter prediction network reaches the training convergence condition, the denoised target image is input into the target detection network;
[0108] S2, when the denoising parameter prediction network has not yet reached the training convergence condition, compare the difference between the pixel points in the denoised target image and the pixel points in the target image; determine the training feedback parameters that match the differences; and adjust the network parameters in the denoising parameter prediction network according to the training feedback parameters.
[0109] Optionally, in this embodiment, the comparison process may be implemented by calculating the loss function value between the pixel points in the denoised target image and the pixel points in the target image. The training feedback parameter may be implemented by calculating the loss function value and the gradient descent value corresponding to the loss function value. For example, assuming that the pixel point at the coordinate (x, y) of the input image R of the denoising parameter prediction network is R(x, y), the denoised image V i The pixel point with coordinates (x, y) is V i (x,y), then the loss function value Loss(P i ) can be expressed as:
[0110]
[0111] Where size is the number of pixels in the image. Based on the calculated loss function value, the gradient descent value can be calculated according to the gradient descent formula As shown in formula 17 and formula 18:
[0112]
[0113] Where μ is the learning rate, which is usually a small value close to 0, such as 0.0001.
[0114] Through the embodiments provided by the present application, when the denoising parameter prediction network has not yet reached the training convergence conditions, the difference between the pixel points in the denoised target image and the pixel points in the target image is compared; the training feedback parameters matching the difference are determined; the network parameters in the denoising parameter prediction network are adjusted according to the training feedback parameters, so that the denoising parameter prediction network can be back-propagated and trained according to the calculated loss function value and gradient descent value, and the network parameters of the denoising parameter prediction network can be updated, so that the performance of the denoising parameter prediction network is more in line with the actual application situation, and the accuracy of the denoising parameter prediction network is improved.
[0115] As an optional solution, in the above step S204, before the target image is processed by the denoising parameter prediction network to obtain the denoising parameter vector predicted for the target image, the method further includes:
[0116] S1, acquiring a first image data set and a second image data set, wherein the first image data set is images collected under abnormal weather conditions, and the second image data set is images collected under reference weather conditions;
[0117] Optionally, in this embodiment, the abnormal weather conditions may include but are not limited to rain, snow, fog, etc. The reference weather conditions may include but are not limited to sunny, cloudy, etc.
[0118] S2, construct an initialized denoising parameter prediction network;
[0119] Optionally, in this embodiment, the denoising parameter prediction network may be, but is not limited to, a small convolutional neural network, and its network architecture may include, but is not limited to, an input layer, a convolutional layer, a fully connected layer, and an output layer.
[0120] For example, the above denoising parameter prediction network can be a small convolutional neural network consisting of 1 input layer, 4 convolutional layers, 1 fully connected layer and 1 output layer. The input layer has 3 input channels, and the input is an RGB image with a resolution of 256*256 pixels; the output channels of the 4 convolutional layers are 16, 32, 64, and 64 respectively. Each convolutional layer uses a 3*3 convolution kernel with a moving step of 1. The initial value of the convolution kernel weight matrix is randomly generated and optimized through training. The activation function is the LeakyReLU function:
[0121]
[0122] In addition, the above fully connected layer is used to receive the local features output by the last convolutional layer and refit the received local features to obtain global features, thereby capturing more complex details in the image and providing richer data for subsequent object recognition processes. The output layer is used to convert the features and information learned in the neural network into a denoising parameter vector and output it.
[0123] S3, using the first image data set and the second image training set to train the initialized denoising parameter prediction network until the training convergence condition is reached, wherein the training convergence condition includes: the pixel difference between the i-th input image used for training in the second image data set and the i-th training result image output by the denoising parameter prediction network is less than a preset threshold, i is a natural number greater than or equal to 1 and less than or equal to N, and N is the number of images input for training the denoising parameter prediction network.
[0124] Through the embodiments provided in the present application, after obtaining the first image data set and the second image data set, an initialized denoising parameter prediction network is constructed, and the initialized denoising parameter prediction network is trained using the first image data set and the second image training set until the training convergence condition is reached, thereby enabling the denoising parameter prediction network to process image data under various weather conditions, thereby improving the accuracy of object recognition.
[0125] As an optional solution, after acquiring the first image data set and the second image data set, the method further includes:
[0126] S1, annotate abnormal objects appearing in the first image data set to generate an annotation text file, wherein the annotation information of each object in the annotation text file includes: object category representation, display position coordinates of the object in the image, display width and display height of the object in the image.
[0127] Optionally, in this embodiment, the above-mentioned annotation may be, but is not limited to, annotating the images in the image data set using target detection annotation tools such as LabelImg. The above-mentioned abnormal objects may be, but are not limited to, objects indicating that the current image may have potential safety hazards, such as fire, cigarette butts, etc. The above-mentioned annotation text file may be, but is not limited to, a text file in YOLO format.
[0128] Through the embodiments provided in the present application, abnormal objects appearing in the first image data set are annotated and an annotation text file is generated, thereby pre-annotating abnormal objects in the image data and improving the object recognition speed.
[0129] As an optional solution, after annotating the abnormal objects appearing in the first image data set and generating the annotated text file, the method further includes:
[0130] S1, using the first image data set and the annotated text file, training the initialized target detection network according to a preset iteration round until the confidence level of the match with the target detection network in training reaches a target threshold.
[0131] Optionally, in this embodiment, the target detection network may be, but is not limited to, a model having a target detection function, for example, the target detection network may be a YOLOv5s model. The target threshold may be, but is not limited to, a preset value greater than 0 and less than 1.
[0132] Through the embodiments provided by the present application, the first image data set and the annotated text file are used to train the initialized target detection network according to preset iterative rounds until the confidence level of the match with the target detection network in training reaches the target threshold, thereby ensuring the detection accuracy of the target detection network and further ensuring the accuracy of object recognition.
[0133] Specific combination Figure 3 The process shown is used to illustrate the process of applying the embodiment of the present application to actual monitoring security scenarios:
[0134] S302, data acquisition; obtain a security object data set P = {cigarette butts, flames, ... helmets} from an existing image database, and obtain an image data set A = {A1 ,A 2 ,A 3 ,...,A n} and the normal weather image dataset V = {V 1 ,V 2 ,V 3 ,...,V n}, where the image dataset A under severe weather conditions and the image dataset V under normal weather conditions need to include the security objects in the security object dataset P.
[0135] S304, data labeling: use the target detection labeling tool LabelImg to label the security objects in the image dataset V and generate a labeling text file in YOLO format. The labeling text file includes: the category number of the target, the center coordinates of the target in the image, and the width and height of the target.
[0136] S306, model training; randomly divide the image data set V into two data subsets v with a ratio of 9:1 1 、v 2 . Subset the data v 1 As the training set, the data subset v 2 As the validation set. Select the target detection model as YOLOv5s, configure the parameters required for training the model: the input image size is 640*640, the number of training set batches is 30, the number of training rounds is 100, and the training set v is used. 1 Perform model training.
[0137] S308, determine whether the model effect meets the standard. Set the confidence threshold to 0.85 and use the validation set v 2 Verify that the model can detect the validation set v 2 If it can, it proves that the model effect has reached the standard, the training ends, and step S310 is executed; if it cannot, it proves that the model effect has not reached the standard, the image data set V is re-divided, and step S306 is re-executed to train the target detection model until the model effect reaches the standard.
[0138] S310, parameter vector calculation; construct a small convolutional neural network (CNN-SE), and configure its network parameters as follows: the size of the input image is 256*256, the number of training rounds is 70, and CNN-SE mainly includes an input layer, 4 convolutional layers, 1 fully connected layer, and 1 output layer. The input of the input layer is an RGB image with a resolution of 256*256 pixels, and the number of input channels is 3. The small convolutional neural network here has a total of 4 convolutional layers, each of which uses a convolution kernel of size 3*3, a moving step of 1, an activation function of LeakyReLU function, and the number of output channels of the four convolutional layers is 16, 32, 64, and 64 respectively. The fully connected layer is used to receive the local feature output from the last convolutional layer and refit the received local features. The output layer is used to convert the global features output by the fully connected layer into a denoising parameter vector, and output the obtained denoising parameter vector. The image dataset A under severe weather is input into the small convolutional neural network to obtain the denoising parameter vector of each image to be detected.
[0139] S312, image processing: according to the parameters in the denoising parameter vector, use the homomorphic filtering method to perform light smoothing on each image to be detected, and use the multi-scale Retinex algorithm to perform defogging on the light smoothed image. Subsequently, the defogging image is respectively subjected to white balance adjustment, gamma value adjustment, contrast adjustment, and sharpening, and finally the denoised target image is obtained.
[0140] S314, determine whether the network training is completed; if the training of the small convolutional neural network has not been completed, execute step S316; if the training of the small convolutional neural network has been completed, execute step S318.
[0141] S316, network parameter update; according to the denoised target image and the image to be detected before denoising, the loss function value and the gradient descent value are calculated, and the small convolutional neural network is reversely trained until its training is completed.
[0142] S318, target detection: input the denoised target image into the YOLOv5s model to obtain the recognition result of the security object in the image to be detected.
[0143] Through the embodiments of the present application, the following technical effects can be achieved:
[0144] 1) Enhance the image data of the monitoring location under bad weather conditions, and identify security objects based on the enhanced images, thereby improving the recognition accuracy of security objects.
[0145] 2) Before training the target detection model, the data set was randomly divided for training and verification to ensure that the YOLOv5s model could correctly learn the target detection features. By repeatedly training until the model effect reached the standard, the accuracy of the model in detecting targets in bad weather was improved.
[0146] 3) Through a series of image processing technologies such as illumination smoothing, defogging, white balance adjustment, gamma value adjustment, contrast adjustment and sharpening, the visual quality of images in bad weather is significantly improved, making image details clearer and target features more prominent.
[0147] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0148] According to another aspect of the embodiments of the present application, an object device for implementing the above object recognition method is also provided. Figure 4 As shown, the device comprises:
[0149] A first acquisition unit 402 is used to acquire a target image to be identified;
[0150] A first processing unit 404 is used to process the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering processing on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising processing on the target image, and operation parameters for performing image enhancement processing on the target image;
[0151] A second processing unit 406 is used to perform denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image;
[0152] The recognition unit 408 is used to recognize the target object from the denoised target image through a target detection network.
[0153] Optionally, the embodiments in this solution may be but are not limited to the above-mentioned reference method embodiments, which will not be described in detail here.
[0154] As an optional solution, the second processing unit includes at least one of the following:
[0155] A filtering module, used for performing homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain a filtered target image, wherein the illumination smoothness of the filtered target image is greater than the illumination smoothness of the target image;
[0156] A denoising module is used to perform multi-scale transformation denoising processing on the basic color channel of the target image according to the scale transformation parameter to obtain a denoised target image, wherein the image noise of the denoised target image is smaller than the image noise of the target image;
[0157] The enhancement module is used to perform image enhancement processing on the target image according to the operation parameters to obtain an enhanced target image, wherein the picture clarity of the enhanced target image is higher than the picture clarity of the target image.
[0158] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0159] As an optional solution, the filtering module includes:
[0160] A conversion submodule, used for converting a target image into a target image in a grayscale state, wherein pixels in the target image in the grayscale state are represented by an illumination component and a reflection component;
[0161] The first transformation submodule is used to perform logarithmic transformation and Fourier transformation on the pixel points in the target image in the grayscale state to obtain a grayscale reference image; and filter the grayscale reference image using the filtering parameters;
[0162] The second transformation submodule is used to perform inverse Fourier transformation and exponential transformation on the pixel points in the filtered grayscale reference image to obtain a filtered target image.
[0163] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0164] As an optional solution, the denoising module includes:
[0165] The processing submodule is used to perform multi-scale dehazing processing on the basic color channel of the target image according to the scale transformation parameters to obtain a denoised target image.
[0166] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0167] As an optional solution, the enhancement module includes at least one of the following:
[0168] A first adjustment submodule, configured to adjust the balance of the target image according to the weight parameter when the operation parameter is a weight parameter for adjusting the balance of the image;
[0169] a second adjustment submodule, configured to adjust the gamma value of the target image according to the gamma value when the operating parameter is the gamma value of the image;
[0170] A third adjustment submodule is used to adjust the image contrast of the target image according to the contrast parameter when the operating parameter is a contrast parameter for adjusting the image contrast;
[0171] The fourth adjustment submodule is used to adjust the image sharpness of the target image according to the sharpness parameter when the operating parameter is a sharpness parameter for adjusting the image sharpness.
[0172] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0173] As an optional solution, the device also includes:
[0174] An input unit, configured to perform denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image, and then input the denoised target image into the target detection network when the denoising parameter prediction network reaches a training convergence condition;
[0175] The third processing unit is used to compare the difference between the pixel points in the denoised target image and the pixel points in the target image when the denoising parameter prediction network has not yet reached the training convergence condition; determine the training feedback parameters that match the differences; and adjust the network parameters in the denoising parameter prediction network according to the training feedback parameters.
[0176] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0177] As an optional solution, the device also includes:
[0178] a second acquisition unit, configured to acquire a first image data set and a second image data set before processing the target image through the denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the first image data set is an image collected under abnormal weather conditions, and the second image data set is an image collected under reference weather conditions;
[0179] A construction unit, used to construct an initialized denoising parameter prediction network;
[0180] The first training unit is used to train the initialized denoising parameter prediction network using the first image data set and the second image training set until the training convergence condition is reached, wherein the training convergence condition includes: the pixel difference between the i-th input image used for training in the second image data set and the i-th training result image output by the denoising parameter prediction network is less than a preset threshold, i is a natural number greater than or equal to 1 and less than or equal to N, and N is the number of images input for training the denoising parameter prediction network.
[0181] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0182] As an optional solution, the device also includes:
[0183] A labeling unit is used to label abnormal objects appearing in the first image data set after acquiring the first image data set and the second image data set, and generate a labeling text file, wherein the labeling information of each object in the labeling text file includes: object category representation, display position coordinates of the object in the image, and display width and display height of the object in the image.
[0184] Optionally, the embodiments in this solution may be but are not limited to the reference method embodiments, which will not be described in detail here.
[0185] As an optional solution, the device also includes:
[0186] The second training unit is used to mark the abnormal objects appearing in the first image data set and generate a marked text file, and then use the first image data set and the marked text file to train the initialized target detection network according to a preset iterative round until the confidence level of the match with the target detection network in training reaches a target threshold.
[0187] Optionally, the embodiments in this solution may refer to but not be limited to the above method embodiments, which will not be described in detail here.
[0188] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations of the above-mentioned data table-based data processing method.
[0189] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0190] S1, obtaining the target image to be identified;
[0191] S2, processing the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising on the target image, and operation parameters for performing image enhancement processing on the target image;
[0192] S3, performing denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image;
[0193] S4, identifies the target object from the denoised target image through the target detection network.
[0194] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program / instruction. The computer program / instruction includes a program code for executing the method shown in the above flowchart.
[0195] Figure 5 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0196] It should be noted that Figure 5 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0197] like Figure 5 As shown, the computer system includes a central processing unit 501 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 502 (ROM) or the program loaded from the storage part 508 to the random access memory 503 (RAM). Various programs and data required for system operation are also stored in the random access memory 503. The central processing unit 501, the read-only memory 502 and the random access memory 503 are connected to each other through a bus 504. The input / output interface 505 (Input / Output interface, i.e., I / O interface) is also connected to the bus 504.
[0198] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0199] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processor 501, various functions defined in the system of the present application are executed.
[0200] According to another aspect of the embodiments of the present application, an electronic device for implementing the above object recognition method is also provided. Figure 6 As shown, the electronic device includes a memory 602 and a processor 604. The memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments through the computer program.
[0201] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0202] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0203] S1, obtaining the target image to be identified;
[0204] S2, processing the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising on the target image, and operation parameters for performing image enhancement processing on the target image;
[0205] S3, performing denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image;
[0206] S4, identifies the target object from the denoised target image through the target detection network.
[0207] Alternatively, a person skilled in the art may understand that: Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 6 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 6 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 6 Different configurations are shown.
[0208] Among them, the memory 602 can be used to store software programs and modules, such as program instructions / modules corresponding to the object recognition method and device in the embodiments of the present application. The processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, realizing the above-mentioned object recognition method. The memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include a memory remotely located relative to the processor 604, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 602 can be specifically, but not limited to, used to store information such as denoising parameter vectors. As an example, such as Figure 6 As shown, the memory 602 may include but is not limited to the first acquisition unit 402, the first processing unit 404, the second processing unit 406, and the recognition unit 408 in the object recognition device. In addition, it may also include but is not limited to other module units in the object recognition device, which will not be repeated in this example.
[0209] Optionally, the transmission device 606 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 606 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 606 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0210] In addition, the electronic device further includes: a display 608 for displaying the target video to be identified; and a connection bus 610 for connecting various module components in the electronic device.
[0211] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a point-to-point network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the point-to-point network.
[0212] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0213] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0214] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0215] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0219] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An object recognition method, characterized in that: include: Acquire a target image to be identified; Processing the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising on the target image, and operation parameters for performing image enhancement on the target image; Performing denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image; The target object is identified from the denoised target image through a target detection network.
2. The method according to claim 1, characterized in that The performing denoising on the target image according to the denoising parameter vector to obtain the denoised target image comprises: Perform at least one of the following processing on the target image according to the denoising parameter vector: Performing homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain a filtered target image, wherein the illumination smoothness of the filtered target image is greater than the illumination smoothness of the target image; Performing multi-scale transformation denoising processing on the basic color channel of the target image according to the scale transformation parameters to obtain a denoised target image, wherein the image noise of the denoised target image is smaller than the image noise of the target image; The target image is subjected to image enhancement processing according to the operation parameters to obtain an enhanced target image, wherein the picture definition of the enhanced target image is higher than the picture definition of the target image.
3. The method according to claim 2, characterized in that The performing homomorphic filtering on the illumination information of the target image according to the filtering parameters to obtain the filtered target image comprises: Converting the target image into a target image in a grayscale state, wherein pixels in the target image in the grayscale state are represented by an illumination component and a reflection component; Performing logarithmic transformation and Fourier transformation on the pixel points in the target image in the grayscale state to obtain a grayscale reference image; Performing filtering processing on the grayscale reference image using the filtering parameters; Perform inverse Fourier transform and exponential transform on the pixel points in the filtered grayscale reference image to obtain the filtered target image.
4. The method according to claim 2, characterized in that: The performing multi-scale transformation denoising processing on the basic color channel of the target image according to the scale transformation parameters to obtain the denoised target image comprises: Multi-scale defogging is performed on the basic color channel of the target image according to the scale transformation parameters to obtain the denoised target image.
5. The method according to claim 2, characterized in that: The target image is enhanced according to the operation parameters to obtain an enhanced target image, which includes at least one of the following: In a case where the operation parameter is a weight parameter for adjusting the balance of an image, adjusting the balance of the target image according to the weight parameter; In a case where the operation parameter is a gamma value of an image, adjusting the gamma value of the target image according to the gamma value; In a case where the operating parameter is a contrast parameter for adjusting image contrast, adjusting the image contrast of the target image according to the contrast parameter; In the case where the operation parameter is a sharpness parameter for adjusting image sharpness, the image sharpness of the target image is adjusted according to the sharpness parameter.
6. The method according to any one of claims 1 to 5, characterized in that After performing denoising processing on the target image according to the denoising parameter vector to obtain the denoised target image, the method further includes: When the denoising parameter prediction network reaches a training convergence condition, inputting the denoised target image into the target detection network; When the denoising parameter prediction network has not yet reached the training convergence condition, the difference between the pixel points in the denoised target image and the pixel points in the target image is compared; the training feedback parameters matching the difference are determined; and the network parameters in the denoising parameter prediction network are adjusted according to the training feedback parameters.
7. The method according to any one of claims 1 to 5, characterized in that Before the target image is processed by the denoising parameter prediction network to obtain the denoising parameter vector predicted for the target image, the method further includes: Acquire a first image data set and a second image data set, wherein the first image data set is images collected under abnormal weather conditions, and the second image data set is images collected under reference weather conditions; Construct an initialized denoising parameter prediction network; The initialized denoising parameter prediction network is trained using the first image data set and the second image training set until a training convergence condition is reached, wherein the training convergence condition includes: a pixel difference between an i-th input image used for training in the second image data set and an i-th training result image output by the denoising parameter prediction network is less than a preset threshold, i is a natural number greater than or equal to 1 and less than or equal to N, and N is the number of images input for training the denoising parameter prediction network.
8. The method according to claim 7, characterized in that After acquiring the first image data set and the second image data set, the method further includes: Abnormal objects appearing in the first image data set are labeled to generate a labeled text file, wherein the labeling information of each object in the labeled text file includes: object category representation, display position coordinates of the object in the image, display width and display height of the object in the image.
9. The method according to claim 8, characterized in that After annotating the abnormal objects appearing in the first image data set and generating an annotation text file, the method further includes: The initialized target detection network is trained using the first image data set and the annotated text file according to a preset number of iterations until the confidence level of the match with the target detection network in training reaches a target threshold.
10. An object recognition device, characterized in that: include: A first acquisition unit, used to acquire a target image to be identified; A first processing unit is used to process the target image through a denoising parameter prediction network to obtain a denoising parameter vector predicted for the target image, wherein the denoising parameter vector includes filtering parameters for performing homomorphic filtering processing on illumination information of the target image, scale transformation parameters for performing multi-scale transformation denoising processing on the target image, and operation parameters for performing image enhancement processing on the target image; A second processing unit, configured to perform denoising processing on the target image according to the denoising parameter vector to obtain a denoised target image; The recognition unit is used to recognize the target object from the denoised target image through a target detection network.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method described in any one of claims 1 to 9.
12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.
Citation Information
Cited By
Digital filtering optimization image processing method and system
CN121169700A