Infrared image long-shot filtering method and device, terminal equipment and storage medium

By performing instance segmentation and edge feature extraction on infrared images, contour information is obtained and used to train the vision filtering model, the problem of low vision filtering accuracy in infrared images in the prior art is solved, and higher filtering accuracy is achieved.

CN119600289APending Publication Date: 2025-03-11GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411650343.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art has low infrared image vision filtering accuracy in power infrared patrol, mainly due to the influence of edge blur in training label acquisition.

Method used

By performing instance segmentation and edge feature extraction of the infrared image to be processed, contour information is obtained, and used to build a training sample set of the vision filtering model, thereby improving the accuracy of the model.

Benefits of technology

The accuracy of infrared image vision filtering is improved, edge information is avoided, and the model's ability to identify vision targets is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600289A_ABST
    Figure CN119600289A_ABST
Patent Text Reader

Abstract

The invention discloses an infrared image long-shot filtering method and device, terminal equipment and a storage medium. The method comprises the following steps: acquiring a to-be-processed infrared image; performing instance segmentation and edge feature extraction on the to-be-processed infrared image to obtain contour information of each first instance segmentation image of the to-be-processed infrared image; determining a to-be-filtered infrared image according to the contour information of each first instance segmentation image and the to-be-processed infrared image; inputting the to-be-filtered infrared image into a long-shot filtering model so as to enable the long-shot filtering model to output a plurality of second instance segmentation images with long-shot filtered; wherein the construction of the distant view filtering model comprises the following steps: obtaining a training sample set; constructing an initial distant view filtering model; and training the initial long-shot filtering model by using the training sample set until the loss function of the initial long-shot filtering model is minimum, and generating the long-shot filtering model. According to the invention, the precision of long-shot filtering of the infrared image can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an infrared image long-range filtering method, device, terminal equipment and storage medium. Background Art

[0002] In the infrared inspection of electric power, the accuracy of temperature measurement using infrared images taken by infrared cameras drops sharply as the distance increases, and distant targets need to be filtered. Therefore, it is necessary to perform depth estimation of infrared images and filter distant targets. The method of filtering distant targets is mainly to filter through the distance information provided by the depth estimation. Among them, the depth estimation of infrared images refers to a technology for reconstructing three-dimensional space from two-dimensional images. It aims to restore the depth information of the scene from a single or multiple two-dimensional images, that is, the physical distance of each pixel from the camera.

[0003] At present, there are many ways to obtain distance, such as monocular depth estimation algorithm, multi-eye depth estimation, motion parallax, structured light camera, laser radar scanning, millimeter wave radar system, and Tof (Time-of-Flight) camera system. Although the hardware methods such as structured light camera, laser radar scanning, and millimeter wave radar system have high accuracy in obtaining depth, they are costly and are not applicable in power infrared inspection scenarios. The multi-eye camera method or Tof (Time-of-Flight) camera system requires multiple hardware and multiple related photos to reconstruct the three-dimensional world coordinate system, which is also costly and computationally complex. Compared with the above hardware deployment method, the method of constructing image processing models by deep learning has better compatibility and lower cost, and is mainly used in existing power infrared inspection scenarios. However, the existing deep learning method obtains training labels by directly obtaining images taken in power infrared inspection scenarios. This method of directly obtaining images taken in power infrared inspection scenarios as training labels is affected by the edge blur caused by directly taking images, resulting in low filtering accuracy of distant targets in infrared images by the final model. Summary of the invention

[0004] The embodiments of the present invention provide an infrared image long-range filtering method, an apparatus, a terminal device and a storage medium, which can improve the accuracy of infrared image long-range filtering.

[0005] An embodiment of the present invention provides an infrared image long-range filtering method, comprising:

[0006] Acquire an infrared image to be processed;

[0007] Perform instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmentation image of the infrared image to be processed;

[0008] Determine the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed;

[0009] Inputting the infrared image to be filtered into a distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views;

[0010] The construction of the prospect filtering model includes:

[0011] Acquire a training sample set; the training sample set includes a number of infrared image samples to be filtered and a number of instance segmented image samples of filtered distant scenes corresponding to each infrared image sample to be filtered;

[0012] Constructing an initial prospect filtering model;

[0013] The initial distant view filtering model is trained with the training sample set until the loss function of the initial distant view filtering model is minimized, thereby generating a distant view filtering model.

[0014] Furthermore, the step of performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmented image of the infrared image to be processed includes:

[0015] Segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed;

[0016] Extracting edge features from each first instance segmented image to obtain edge features of each first instance segmented image;

[0017] Contour information of each first instance segmented image is determined according to the edge features of each first instance segmented image.

[0018] Furthermore, the step of inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view includes:

[0019] Inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered;

[0020] For each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image;

[0021] The third instance segmented images whose average distance points are less than a preset distance point threshold are filtered to obtain a plurality of second instance segmented images of filtered distant scenes.

[0022] Furthermore, the loss function is specifically:

[0023]

[0024]

[0025] g i =log y i ′-log y i ;

[0026] Where L is the loss function; α is the convergence constant; D(g) is the sum of the variance and weighted average in the depth logarithmic space; T is the number of valid true value pixels; y i ′ is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; y i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant.

[0027] Based on the above method embodiment, the present invention provides a corresponding device embodiment;

[0028] An embodiment of the present invention provides an infrared image long-range filtering device, including: an image acquisition module, a preprocessing module, a filtering module and a filtering model building module;

[0029] The image acquisition module is used to acquire the infrared image to be processed;

[0030] The preprocessing module is used to perform instance segmentation and edge feature extraction on the infrared image to be processed, and obtain the contour information of each first instance segmented image of the infrared image to be processed; determine the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed;

[0031] The filtering module is used to input the infrared image to be filtered into the distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views;

[0032] The filtering model building module is used to obtain a training sample set; the training sample set includes a number of infrared image samples to be filtered and a number of instance segmented image samples of filtered distant views corresponding to each infrared image sample to be filtered; an initial distant view filtering model is built; the initial distant view filtering model is trained with the training sample set until the loss function of the initial distant view filtering model is minimized, thereby generating a distant view filtering model.

[0033] Furthermore, the step of performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmented image of the infrared image to be processed includes:

[0034] Segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed;

[0035] Extracting edge features from each first instance segmented image to obtain edge features of each first instance segmented image;

[0036] Contour information of each first instance segmented image is determined according to the edge features of each first instance segmented image.

[0037] Furthermore, the step of inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view includes:

[0038] Inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered;

[0039] For each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image;

[0040] The third instance segmented images whose average distance points are less than a preset distance point threshold are filtered to obtain a plurality of second instance segmented images of filtered distant scenes.

[0041] Furthermore, the loss function is specifically:

[0042]

[0043]

[0044] g i =logy i ′-logy i ;

[0045] Where L is the loss function; α is the convergence constant; D(g) is the sum of the variance and weighted average in the depth logarithmic space; T is the number of valid true value pixels; y i ′ is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; y i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant.

[0046] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, an infrared image distant view filtering method described in the above-mentioned embodiment of the invention is implemented.

[0047] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the infrared image distant view filtering method described in the above-mentioned embodiment of the invention.

[0048] The following beneficial effects are achieved by implementing the present invention:

[0049] The present invention provides an infrared image long-range filtering method, device, terminal equipment and storage medium. The method acquires an infrared image to be processed, performs instance analysis and edge feature extraction on the infrared image to be processed, and uses the contour information of each first instance segmented image of the infrared image to determine the infrared image to be filtered based on the contour information of each first instance segmented image and the infrared image to be processed. After obtaining the infrared image to be processed, the acquired infrared image is preprocessed, the contour information of the infrared image to be processed is refined and extracted, and then the infrared image to be filtered containing the contour information is obtained, and then the infrared image to be filtered is input into a distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view, thereby avoiding the problem of loss of edge information of the infrared image to be processed caused by directly obtaining the infrared image to be processed and inputting the model for filtering. When training the distant view filtering model, a training sample set including a plurality of infrared image samples to be filtered and a plurality of instance segmented image samples of the filtered distant view corresponding to each infrared image sample to be filtered is used for training. Infrared images with complete contour information are used in both the model training process and the application process, so that the model can extract more image features, improve the accuracy of infrared image distant view filtering, and make the obtained plurality of second instance segmented images of the filtered distant view have higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 The figure is a flow chart of an infrared image distant view filtering method provided by an embodiment of the present invention.

[0051] Figure 2 This is a flowchart of image preprocessing provided by an embodiment of the present invention.

[0052] Figure 3 This is a filtering flow chart provided by an embodiment of the present invention.

[0053] Figure 4 This is a flowchart of a monocular depth estimation framework provided by an embodiment of the present invention.

[0054] Figure 5 The figure is a schematic structural diagram of an infrared image long-range filtering device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] like Figure 1 As shown, an infrared image distant view filtering method provided by an embodiment of the present invention includes:

[0057] Step S1: obtaining an infrared image to be processed;

[0058] Step S2: performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmentation image of the infrared image to be processed;

[0059] Step S3: determining the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed;

[0060] Step S4: inputting the infrared image to be filtered into the distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view;

[0061] In step S1, an infrared image to be processed is collected by an infrared camera.

[0062] For step S2 and step S3, in a preferred embodiment, the instance segmentation and edge feature extraction of the infrared image to be processed to obtain the contour information of each first instance segmented image of the infrared image to be processed includes: segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed; performing edge feature extraction on each first instance segmented image to obtain the edge features of each first instance segmented image; and determining the contour information of each first instance segmented image according to the edge features of each first instance segmented image.

[0063] Specifically, Figure 2 The figure shows an image preprocessing flow chart provided by the present invention. First, the infrared image to be processed is segmented into n first instance segmented images by an instance segmentation algorithm, and the first instance segmented images are binary mask images; for each first instance segmented image, an edge feature extraction operation is performed by a Prewitt operator edge detection algorithm to obtain edge features of each first instance segmented image; wherein the Prewitt operator is a 3x3 matrix, which are a horizontal matrix, a vertical matrix, a left diagonal matrix, and a right diagonal matrix respectively;

[0064] The horizontal matrix is ​​as follows:

[0065]

[0066] The vertical matrix is ​​as follows:

[0067]

[0068] The left diagonal matrix looks like this:

[0069]

[0070] The right diagonal matrix looks like this:

[0071]

[0072] The edge features extracted by the Prewitt operator are convolved with the binary mask corresponding to each first instance segmented image to extract the contour information of each first instance segmented image, and the contour information matrix of n first instance segmented images is obtained. The n contour information matrices are merged into the infrared image to be processed to form a (3+n) channel infrared image to be filtered. At this time, the contour and details of the processed infrared image to be filtered are clearer than those of the infrared image to be processed. In the present invention, the infrared image is an RGB image, which includes three channels of red, green and blue, corresponding to three matrices respectively. Therefore, when the contour information matrix is ​​merged into the infrared image to be processed, a 3+n channel infrared image to be filtered can be formed.

[0073] In step S4, the infrared image to be filtered is input into the distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view.

[0074] In a preferred embodiment, the step of inputting the infrared image to be filtered into a distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of the filtered distant view comprises: inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered; for each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image; filtering each third instance segmented image whose average distance point is less than a preset distance point threshold to obtain a plurality of second instance segmented images of the filtered distant view.

[0075] Specifically, Figure 3 The figure shows a filtering flow chart provided by the present invention, wherein: Figure 3The depth map in is the infrared image to be filtered of the present invention; when the infrared image to be filtered is input into the distant view filtering model, the distant view filtering model performs binary mask segmentation on the infrared image to be filtered to obtain n third instance segmented images of the infrared image to be filtered. For each third instance segmented image, the average value of all pixel distance points in the third instance segmented image is calculated to obtain the average distance point of each third instance segmented image. After completing the calculation of the average value of the distance points of each third instance segmented image, filter out several third instance segmented images whose average distance points are less than d (d is the preset distance point threshold, which is taken as the maximum effective distance of infrared temperature measurement in the present invention), and after filtering several third instance segmented images that do not meet the requirements, obtain several second instance segmented images that have completed filtering of distant view.

[0076] For the construction of the distant view filtering model, it is first necessary to obtain a training sample set, which must include several infrared image samples to be filtered and several instance segmented images of the filtered distant view corresponding to each infrared image sample to be filtered. Preferably, in actual use, the data in the training sample set cannot be directly obtained by camera shooting. Usually, infrared images and their corresponding depth values ​​are collected by infrared cameras and depth cameras, and the corresponding depth values ​​are marked in the infrared images; wherein, the depth values ​​are marked in the image in the form of JSON tags. Then, the infrared image after marking is passed through the following method: Figure 2 The data shown is processed to obtain the training sample set.

[0077] Construct an initial distant view filtering model. In the present invention, the initial distant view filtering model is constructed based on a monocular depth estimation framework Deeper Depth Prediction with Fully Convolutional Residual Networks (FCRN), such as Figure 4 The figure shows a flow chart of a monocular depth estimation framework. In this monocular depth estimation framework, the depth estimation method uses a decoding method, which can adapt to pictures of various formats and sizes. Based on this architecture, a deep learning network DenseNet is added to build an initial distant view filtering model.

[0078] After completing the construction of the initial distant view filtering model, the initial distant view filtering model is trained through a training sample set, with the infrared image samples to be filtered as input and several instance segmentation image samples of the filtered distant view corresponding to the infrared image samples to be filtered as output. When the loss function of the initial distant view filtering model is minimized, a distant view filtering model is generated.

[0079] It should be noted that the loss functions of the monocular depth estimation framework usually include berHu Loss and mean square loss L2 Loss. BerHu Loss includes two parts: one-norm loss and two-norm loss. When the difference between the predicted value and the true value is not large, the one-norm loss is used, and when it is too large, the two-norm loss is used:

[0080]

[0081] δ=0.2max|y i -y i ′|

[0082] Among them, y i represents the true value; y i ' indicates the predicted value.

[0083] In the construction of the above loss function, the loss is controlled between [-δ,δ], the purpose of which is to provide strict supervision so that the model can achieve better prediction results as much as possible. Depth estimation is more dependent on scene semantics, so it requires diversified data set training. The data set is not uniform on the scale axis. If berHu Loss or L2 Loss is used directly, it is difficult to correctly train the correct distance information. Therefore, the present invention proposes to use a multi-scale invariant loss function as the loss function of the initial distant view filtering model.

[0084] In a preferred embodiment, the loss function is specifically:

[0085]

[0086]

[0087] g i =logy i ′-logy i ;

[0088] Wherein, L is the loss function; α is the convergence constant, which is a constant used to improve convergence and is taken as 10 in the present invention; D(g) is the sum of the variance and the weighted average value in the depth logarithmic space; T is the number of effective true value pixels; y i ′ is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; y i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant. The increase of λ can make D(g) pay more attention to variance minimization.

[0089] Based on the above method embodiment, the present invention provides a corresponding device embodiment.

[0090] like Figure 5 As shown, an embodiment of the present invention provides an infrared image long-range filtering device, including: an image acquisition module, a preprocessing module, a filtering module and a filtering model building module;

[0091] The image acquisition module is used to acquire the infrared image to be processed;

[0092] The preprocessing module is used to perform instance segmentation and edge feature extraction on the infrared image to be processed, and obtain the contour information of each first instance segmented image of the infrared image to be processed; determine the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed;

[0093] The filtering module is used to input the infrared image to be filtered into the distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views;

[0094] The filtering model building module is used to obtain a training sample set; the training sample set includes a number of infrared image samples to be filtered and a number of instance segmented image samples of filtered distant views corresponding to each infrared image sample to be filtered; an initial distant view filtering model is built; the initial distant view filtering model is trained with the training sample set until the loss function of the initial distant view filtering model is minimized, thereby generating a distant view filtering model.

[0095] In a preferred embodiment, the step of performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmented image of the infrared image to be processed includes:

[0096] Segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed;

[0097] Extracting edge features from each first instance segmented image to obtain edge features of each first instance segmented image;

[0098] Contour information of each first instance segmented image is determined according to the edge features of each first instance segmented image.

[0099] In a preferred embodiment, the step of inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views comprises:

[0100] Inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered;

[0101] For each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image;

[0102] The third instance segmented images whose average distance points are less than a preset distance point threshold are filtered to obtain a plurality of second instance segmented images of filtered distant scenes.

[0103] In a preferred embodiment, the loss function is specifically:

[0104]

[0105]

[0106] g i =log y i ′-logy i ;

[0107] Where L is the loss function; α is the convergence constant; D(g) is the sum of the variance and weighted average in the depth logarithmic space; T is the number of valid true value pixels; y i ′ is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; y i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant.

[0108] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0109] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0110] Based on the above method item embodiments, the present invention provides corresponding terminal device item embodiments.

[0111] An embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, an infrared image distant view filtering method described in any one of the present invention is implemented.

[0112] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0113] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0114] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0115] Based on the above method item embodiments, the present invention provides a corresponding storage medium item embodiment.

[0116] An embodiment of the present invention provides a storage medium, wherein the storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute any one of the infrared image distant view filtering methods described in the present invention.

[0117] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.

[0118] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for filtering infrared images from a distant view, characterized in that: include: Acquire an infrared image to be processed; Perform instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmentation image of the infrared image to be processed; Determine the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed; Inputting the infrared image to be filtered into a distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views; The construction of the prospect filtering model includes: Acquire a training sample set; the training sample set includes a number of infrared image samples to be filtered and a number of instance segmented image samples of filtered distant scenes corresponding to each infrared image sample to be filtered; Constructing an initial prospect filtering model; The initial distant view filtering model is trained with the training sample set until the loss function of the initial distant view filtering model is minimized, thereby generating a distant view filtering model.

2. The infrared image long-range filtering method according to claim 1, characterized in that: The step of performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmented image of the infrared image to be processed includes: Segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed; Extracting edge features from each first instance segmented image to obtain edge features of each first instance segmented image; Contour information of each first instance segmented image is determined according to the edge features of each first instance segmented image.

3. The infrared image long-range filtering method according to claim 2, characterized in that: The step of inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views comprises: Inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered; For each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image; The third instance segmented images whose average distance points are less than a preset distance point threshold are filtered to obtain a plurality of second instance segmented images of filtered distant scenes.

4. The infrared image long-range filtering method according to claim 1, characterized in that: The loss function is specifically: g i =logy′ i -logy i ; Where L is the loss function; α is the convergence constant; D(g) is the sum of the variance and weighted average in the depth logarithmic space; T is the number of valid true value pixels; y′ i is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant.

5. An infrared image long-range filtering device, characterized in that: include: Image acquisition module, preprocessing module, filtering module and filtering model building module; The image acquisition module is used to acquire the infrared image to be processed; The preprocessing module is used to perform instance segmentation and edge feature extraction on the infrared image to be processed, and obtain the contour information of each first instance segmented image of the infrared image to be processed; determine the infrared image to be filtered according to the contour information of each first instance segmented image and the infrared image to be processed; The filtering module is used to input the infrared image to be filtered into the distant view filtering model, so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views; The filtering model building module is used to obtain a training sample set; the training sample set includes a number of infrared image samples to be filtered and a number of instance segmented image samples of filtered distant views corresponding to each infrared image sample to be filtered; an initial distant view filtering model is built; the initial distant view filtering model is trained with the training sample set until the loss function of the initial distant view filtering model is minimized, thereby generating a distant view filtering model.

6. The infrared image long-range filtering device according to claim 5, characterized in that: The step of performing instance segmentation and edge feature extraction on the infrared image to be processed to obtain contour information of each first instance segmented image of the infrared image to be processed includes: Segmenting the infrared image to be processed into a plurality of first instance segmented images of the infrared image to be processed; Extracting edge features from each first instance segmented image to obtain edge features of each first instance segmented image; Contour information of each first instance segmented image is determined according to the edge features of each first instance segmented image.

7. The infrared image long-range filtering device according to claim 6, characterized in that: The step of inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model outputs a plurality of second instance segmented images of filtered distant views comprises: Inputting the infrared image to be filtered into the distant view filtering model so that the distant view filtering model segments the infrared image to be filtered to obtain a plurality of third instance segmented images of the infrared image to be filtered; For each third instance segmented image, calculating the average value of all distance points in the third instance segmented image to obtain the average distance point of each third instance segmented image; The third instance segmented images whose average distance points are less than a preset distance point threshold are filtered to obtain a plurality of second instance segmented images of filtered distant scenes.

8. The infrared image long-range filtering device according to claim 5, characterized in that: The loss function is specifically: g i =logy′ i -logy i ; Where L is the loss function; α is the convergence constant; D(g) is the sum of the variance and weighted average in the depth logarithmic space; T is the number of valid true value pixels; y i ′ is the predicted value of the i-th infrared image sample to be filtered output by the initial distant view filtering model; y i is the true value corresponding to the predicted value of the i-th infrared image sample to be filtered; g i is the prediction error of the i-th training; λ is the variance constant.

9. A terminal device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, an infrared image long-range filtering method as claimed in any one of claims 1 to 4 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute the infrared image distant view filtering method as claimed in any one of claims 1 to 4.