A moving target detection method based on semantic features and color information

By introducing a joint detection method of semantic features and color information into the moving target detection algorithm, an adaptive multi-feature semantic background model is established, which solves the problem of poor detection results in complex background environments and achieves high-accuracy and real-time motion detection. Target detection.

CN114943914BActive Publication Date: 2024-09-17SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210483725.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-09-17
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

Existing moving target detection algorithms have poor detection results in complex dynamic background environments, and it is difficult to ensure real-time performance and accuracy, especially under the influence of factors such as lighting changes, shadows of moving targets, and camouflage phenomena.

Method used

Using a moving target detection method based on semantic features and color information, the semantic feature map of the image is obtained through the semantic segmentation network, an adaptive multi-feature semantic background model is established, and combined with color information modeling for joint detection, using pixel distance and probability judgment to Improve detection accuracy.

Benefits of technology

It significantly improves the accuracy of moving target detection in complex dynamic background environments and improves the detection accuracy of small target objects. It does not rely on a large amount of labeled data, is highly adaptable, and can be deployed in any scenario.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943914B
    Figure CN114943914B
Patent Text Reader

Abstract

The present invention provides a moving target detection method based on semantic features and color information, and the steps include: S1 video frames are processed by a semantic segmentation network to obtain a basic semantic feature map of the image; S2 an adaptive multi-feature semantic background model is established, and the basic semantic feature map is loaded into each sample contained in the adaptive multi-feature semantic background model; S3 the pixels in the semantic feature map to be tested are judged as target pixels through the adaptive multi-feature semantic background model, and the result is recorded as #imgabs0#; S4 the probability P of each pixel in the semantic feature map to be tested being the target pixel is calculated and compared with the preset threshold value #imgabs1 #The comparison result is recorded as #imgabs2#; S5 is a motion target detection algorithm based on color information modeling, and the target pixel judgment result of the pixels in the semantic feature map to be tested is recorded as #imgabs3#; S6 is a target pixel judgment result of the same pixel in adjacent frames in the semantic feature map to be tested is recorded as #imgabs4#; S7 processes #imgabs5#, #imgabs6# and #imgabs7# through a voting mechanism to generate #imgabs8#, and then uses #imgabs9# to correct #imgabs10# to obtain #imgabs11#.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of moving target detection, and in particular to a moving target detection technology based on semantic features and color information. Background Art

[0002] The moving target detection algorithm is an important basis for realizing many common applications. It aims to extract the foreground moving targets in the video sequence and obtain the foreground objects. In general, the detection results of the moving target detection algorithm play a vital role in the smooth progress of subsequent tasks. However, the video scenes used for detection usually have various uncertain factors, which bring the following difficulties to the detection algorithm: light and dark changes, moving target shadows, camouflage phenomena and dynamic natural environments.

[0003] Faced with complex actual scenes, how to extract moving targets is still a huge challenge. At the same time, under the premise of ensuring correctness, the real-time performance of the moving target detection algorithm is difficult to guarantee, because once the background changes, the algorithm needs to re-learn or maintain the background. Therefore, studying the moving target detection algorithm in complex actual scenes has high practical value and practical significance.

[0004] At present, the existing moving target detection algorithms can be roughly divided into three categories, namely, moving target detection algorithms based on color information modeling, moving target detection algorithms based on deep learning, and moving target detection algorithms based on semantic information modeling.

[0005] First, the motion target detection algorithm based on color information modeling usually uses color information or texture information to establish a background model, and then compares the current frame image with the background model at the pixel level to finally obtain the detection result. This type of algorithm lacks the support of high-level semantic features and has good detection effects in fixed scenes shot by static cameras, but has poor detection effects for dynamic scenes shot by mobile cameras.

[0006] Secondly, motion target detection algorithms based on deep learning can adapt to many complex environments, but the high performance of such algorithms heavily relies on a large amount of manually labeled data, and these labeled data are difficult to obtain in a timely manner in real life. Therefore, algorithms based on deep learning are not easy to deploy in real life.

[0007] Third, the motion target detection algorithm based on semantic information modeling uses semantic information to establish a semantic background model, and then compares the semantic information of the current frame image with the semantic background model at the pixel level to finally obtain the detection result. At present, the semantic background model structure of this type of algorithm is relatively simple, and a lot of useful semantic information is lost.

[0008] It can be seen that the three types of moving target detection algorithms in the prior art mentioned above have their own advantages and disadvantages. Summary of the invention

[0009] To this end, the main purpose of the present invention is to provide a method for detecting moving targets based on semantic features and color information, so as to utilize semantic information to establish a new semantic background model, and combine the color background model to perform fusion detection on the image, thereby greatly improving the accuracy of detection.

[0010] In order to achieve the above object, according to one aspect of the present invention, a moving target detection method based on semantic features and color information is provided, the steps comprising:

[0011] S1 inputs the Nth frame image of the video into the semantic segmentation network to obtain the basic semantic feature map of the image; inputs the N+1th frame image of the video into the semantic segmentation network to obtain the semantic feature map to be tested of the image;

[0012] S2 establishes an adaptive multi-feature semantic background model, and loads the basic semantic feature map into each sample included in the adaptive multi-feature semantic background model;

[0013] S3 performs target pixel judgment on the pixels in the semantic feature map to be tested based on the adaptive multi-feature semantic background model in step S2, and records the detection result as ;

[0014] S4 calculates the probability that each pixel in the semantic feature map to be tested is the target pixel P And with the preset threshold Compare and record the test results as ;

[0015] S5 is a moving target detection algorithm based on color information modeling. It determines the target pixel in the semantic feature map to be tested and records the detection result as ;

[0016] S6 performs target pixel judgment on the same pixel in adjacent frames in the semantic feature map, and records the result as ;

[0017] S7 command test results , and Participate in the preset voting mechanism to generate detection results After that, let Correction To obtain the final target pixel judgment result .

[0018] In a possible preferred embodiment, the target pixel determination step in step S3 includes: calculating the pixel distance value between the semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model, so as to compare the pixel distance value with the preset threshold value. Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the detection results as .

[0019] In a possible preferred implementation, the pixel distance value calculation step in step S3 includes:

[0020] Calculation formula: ,

[0021] in Represents the distance value between pixel (i, j) and the semantic background, represents the semantic background model of pixel (i,j), Represents the semantic vector of the current pixel, represents the nth background sample of pixel (i,j), Represents the semantic distance between pixel (i, j) and the nth sample.

[0022] In a possible preferred embodiment, the target pixel determination step in step S4 includes: summing the values ​​contained in the semantic feature vector of each pixel in the semantic feature map to be tested to obtain the probability that each pixel is a foreground pixel. P , the probability P With preset threshold Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the detection results as .

[0023] In a possible preferred embodiment, the target pixel determination step in step S6 includes: comparing the color distance value of the same pixel in adjacent frames in the semantic feature map to be tested with a preset threshold value. Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the results as .

[0024] In a possible preferred embodiment, the semantic segmentation network in step S1 includes: an encoder and a decoder, wherein the encoder is a deep convolutional neural network, and each convolutional layer in each convolutional block in the deep convolutional neural network is set to be connected to the convolutional layer behind it.

[0025] In a possible preferred embodiment, the basic semantic feature map obtained in step S1 is ( ), the adaptive multi-feature semantic background model in step S2 is recorded as:

[0026]

[0027] in Each sample also contains a background potency counter To represent the corresponding semantic feature vector The validity of each sample expression is:

[0028] .

[0029] In a possible preferred implementation, it also includes step S8 of updating the adaptive multi-feature semantic background model, which includes:

[0030] S81 determines whether each sample of the adaptive multi-feature semantic background model satisfies the first condition. If so, the value of the effectiveness counter of the sample is increased by 1, and the semantic vector in the sample is adjusted. If not, the value of the effectiveness counter of the sample is decreased by 1, until the value of the effectiveness counter of the sample is ≤0, and the sample is defined as an invalid sample.

[0031] S82 When the adaptive multi-feature semantic background model mistakenly determines that a background pixel in the semantic feature map to be tested is a foreground pixel, the semantic vector of the background pixel and the background sample with the smallest effectiveness counter value in the adaptive multi-feature semantic background model are combined into a backup background sample to replace the failed sample.

[0032] In a possible preferred embodiment, the first condition includes: ,in is the semantic distance between pixel (i, j) and the nth sample, Represents the effectiveness counter value of the nth sample of pixel (i, j).

[0033] In a possible preferred implementation, the step of adjusting the semantic vector in the sample in step S81 includes: calculating ,in is the semantic vector of the nth sample in the background model, is the semantic vector of the current pixel to be detected.

[0034] In a possible preferred embodiment, the preset threshold and The value range of is: to , preset threshold The value range is: 0.8 to 1.0.

[0035] In order to achieve the above object, according to another aspect of the present invention, a moving target detection method based on semantic features and color information is provided, the steps comprising:

[0036] S1 inputs the Nth frame image of the video into the semantic segmentation network to obtain the basic semantic feature map of the image; inputs the N+1th frame image of the video into the semantic segmentation network to obtain the semantic feature map to be tested of the image;

[0037] S2 establishes an adaptive multi-feature semantic background model, and loads the basic semantic feature map into each sample included in the adaptive multi-feature semantic background model;

[0038] S3 enables the adaptive multi-feature semantic background model to perform target detection on the semantic feature map to be tested, so as to calculate the pixel distance value between the semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model. If the distance is greater than the preset threshold, , then define the pixel as a foreground pixel, and record the detection result as ;

[0039] S4 sums the values ​​contained in the semantic feature vector of each pixel in the semantic feature map to be tested to obtain the probability that each pixel is a foreground pixel P , the probability P With preset threshold If it is less than , the pixel is determined to be a foreground pixel, and the detection result is recorded as ;

[0040] S5 is a moving target detection algorithm based on color information modeling. It detects the semantic feature map to be tested, and judges the pixels in the semantic feature map to be tested as foreground and background pixels, and records the detection result as ;

[0041] S6 determines the color distance value of the same pixel in adjacent frames in the semantic feature map to be tested. If the color distance is less than or equal to the preset threshold, , then define the pixel as a background pixel, and record the result as ;

[0042] S7 command test results , and Participate in the preset voting mechanism and generate test results by majority vote After that, let Correction To obtain the final test results , that is, to determine whether each pixel in the semantic feature map to be tested belongs to a background pixel or a foreground pixel.

[0043] In a possible preferred embodiment, the preset threshold and The value range of is: to , preset threshold The value range is: 0.8 to 1.0.

[0044] Through the motion target detection method based on semantic features and color information provided by the present invention, a semantic background model can be established from the semantic features of the input frame, and the background model based on semantic and color information can be jointly detected, thereby improving the detection accuracy of complex dynamic background environments. At the same time, in some preferred embodiments, the semantic segmentation network provided in this case can further improve the detection accuracy of the semantic segmentation network for small target objects in complex environments. In addition, the solution of the present invention does not require a large amount of labeled data, and can be deployed in any scenario for use, and has strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0046] Figure 1 Schematic diagram of the novel semantic segmentation network structure in the example of the present invention;

[0047] Figure 2 Schematic diagram of the DCNN structure in the example of the present invention;

[0048] Figure 3 It is a flow chart of a moving target detection method based on semantic features and color information of the present invention;

[0049] Figure 4 A schematic diagram of a sample structure in an adaptive multi-feature background model in an example of the present invention;

[0050] Figure 5 This is a flow chart for updating samples in the adaptive multi-feature semantic background model in the example of the present invention.

[0051] Figure 6 This is a schematic diagram of the effect of detecting a moving target in an example of the present invention;

[0052] Figure 7 This is a schematic diagram of the effect of the existing technology on moving target detection. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the technical solution of the present invention, the specific technical solution of the present invention will be clearly and completely described in conjunction with the embodiments below to help those skilled in the art further understand the present invention. Obviously, the embodiments described in this case are only embodiments of a part of the present invention, not all of the embodiments. It should be pointed out that for those of ordinary skill in the art, the embodiments in this application and the features in the embodiments can be combined with each other without departing from the concept of the present invention and without conflicting with each other. Based on the embodiments in the present invention, all other embodiments obtained without creative work by those of ordinary skill in the art should belong to the disclosure and protection scope of the present invention.

[0054] In addition, the terms "first", "second", "S1", "S2", etc. in the specification, claims and drawings of the present invention 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 invention described herein can be implemented in an order other than those described herein. At the same time, the terms "including" and "having" and any variations thereof in the present invention are intended to cover non-exclusive inclusions. In addition, for ordinary technicians in this field, the specific meanings of the above terms in this case can be understood according to specific circumstances and in combination with the prior art.

[0055] The motion target detection method based on semantic features and color information of the present invention attempts to introduce advanced semantic feature information to fuse color information or texture information to solve the problem that traditional motion target detection algorithms cannot accurately detect when encountering complex dynamic background environments.

[0056] In this embodiment, the semantic segmentation network example is used to detect cars, pedestrians, trucks and sailboats in the video as potential moving targets. Semantic features can effectively solve the difficulties of traditional moving target detection algorithms based on color information modeling in problems such as "ghosting".

[0057] See also Figures 1 to 6 As shown, the moving target detection method based on semantic features and color information provided by the present invention comprises the following steps:

[0058] S1 inputs the Nth frame image of the video into the semantic segmentation network to obtain the basic semantic feature map of the image; inputs the N+1th frame image of the video into the semantic segmentation network to obtain the semantic feature map to be tested of the image;

[0059] S2 establishes an adaptive multi-feature semantic background model, and loads the basic semantic feature map into each sample included in the adaptive multi-feature semantic background model;

[0060] S3 enables the adaptive multi-feature semantic background model to perform target detection on the semantic feature map to be tested, so as to calculate the pixel distance value between the semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model. If the distance is greater than the preset threshold, , then define the pixel as a foreground pixel, and record the detection result as ;

[0061] S4 sums the values ​​contained in the semantic feature vector of each pixel in the semantic feature map to be tested to obtain the probability that each pixel is a foreground pixel P , the probability P With preset threshold If it is less than , the pixel is determined to be a foreground pixel, and the detection result is recorded as ;

[0062] S5 is a moving target detection algorithm based on color information modeling. It detects the semantic feature map to be tested, and judges the pixels in the semantic feature map to be tested as foreground and background pixels, and records the detection result as ;

[0063] S6 determines the color distance value of the same pixel in adjacent frames in the semantic feature map to be tested. If the color distance is less than or equal to the preset threshold, , then define the pixel as a background pixel, and record the result as ;

[0064] S7 command test results , and Participate in the preset voting mechanism and generate test results by majority vote After that, let Correction To obtain the final test results , that is, to determine whether each pixel in the semantic feature map to be tested belongs to a background pixel or a foreground pixel.

[0065] Specifically, firstly, in order to improve the stability of semantic segmentation network in detecting complex environments, this paper proposes a new semantic segmentation network structure based on DeepLabV3+. Figure 1 As shown in FIG. 1 , the new semantic segmentation network is composed of two parts: Encoder and Decoder. The main body of Encoder is DCNN (Deep Convolutional Neural Network). The present invention improves it to increase the network depth while ensuring that the underlying feature information is not lost. Its structure is as follows: Figure 2As shown in the figure, each convolutional layer (represented by circles in the figure) in each Block in DCNN is connected to the convolutional layer behind it, which effectively solves the vanishing gradient problem that occurs with the increase of network depth, thus improving the detection effect of small target objects.

[0066] In the example, the semantic segmentation network in the present invention is preferably implemented using the Tensorflow2.0 deep learning framework and pre-trained on a computer consisting of AMD Ryzen7 2700x and NVIDA GeForce RT2080Ti with 11G memory. In addition, the detection process is also implemented on the same platform. The overall detection process structure is as follows Figure 3 shown.

[0067] In step S1, To represent all object categories, It can be expressed by formula (1). Represents the i-th object)

[0068]

[0069] Secondly, the improved DeepLabV3+ network can be used to generate a Generate a vector , including the probability that the pixel belongs to each corresponding object category, as shown in formula (2). Unlike other algorithms that add the semantic probabilities of potential moving objects to detect foreground moving targets, the algorithm proposed in this invention does not detect foreground targets in this process, but retains the semantic feature map generated by the semantic segmentation network and establishes an adaptive multi-feature semantic background model to perform the foreground moving target detection task.

[0070]

[0071] in Represents the semantic vector of pixel (i,j), Represents the semantic probability value that pixel (i, j) belongs to the cth object.

[0072] Furthermore, in order to establish an adaptive multi-feature semantic background model, the basic semantic feature map obtained in step S1 is ( ), the adaptive multi-feature semantic background model in step S2 is recorded as:

[0073]

[0074] in Each sample also contains a background potency counter To represent the corresponding semantic feature vector The effectiveness of the sample expression is shown in formula (3).

[0075] In this example, the first The semantic feature map of the frame is loaded into the adaptive multi-feature semantic background model containing samples, and at the same time The value in the background effectiveness counter of the first sample is set to a smaller value. Then, the adaptive multi-feature semantic background model can be used to Frame starts with foreground object detection.

[0076]

[0077] in, represents the nth background sample of pixel (i,j), Represents the semantic vector of the nth sample of pixel (i, j), Represents the effectiveness counter value of the nth sample of pixel (i, j).

[0078] Furthermore, in order to detect the moving foreground target with the help of the adaptive multi-feature semantic background model, in the example of step S3, the distance value between the current semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model is first calculated, as shown in formula (4).

[0079]

[0080] in, Represents the distance value between pixel (i, j) and the semantic background, represents the semantic background model of pixel (i,j), Represents the semantic vector of the current pixel, represents the nth background sample of pixel (i,j), Represents the semantic distance between pixel (i, j) and the nth sample.

[0081] Furthermore, if the pixel The distance between the semantic feature vector of and any valid sample is less than the threshold , then the pixel is judged as a background pixel (BG), otherwise, the pixel is judged as a foreground pixel (FG), and the detection result is recorded as The detection rule is shown in formula (5). The range is preferably controlled between 0.8 and 1.0.

[0082]

[0083] in, represents the nth background sample of pixel (i,j), represents the semantic distance between pixel (i, j) and the nth sample, Represents the effectiveness counter value of the nth sample of pixel (i, j).

[0084] Furthermore, in order to directly detect the moving foreground target with the help of the semantic feature map, in step S4, first, the semantic feature vector of each pixel is converted into The values ​​contained in are added to obtain the probability of each pixel being a foreground pixel (denoted as ), as shown in formula (6).

[0085]

[0086] in, Represents the sum of C semantic probability values ​​of pixel (i, j).

[0087] Secondly, With threshold For comparison. Less than threshold , then the pixel is determined to be a foreground pixel, and the detection result is recorded as Its detection rules can be summarized as shown in formula (7). When the value is small (such as to ), this example will have better performance.

[0088]

[0089] Furthermore, in step S5, the moving foreground target can be detected by using the existing moving target detection algorithm based on color information modeling. Since there are many traditional target detection algorithms based on color information modeling, the present invention needs to use any algorithm result and record the detection result as .

[0090] Furthermore, in order to further reduce the noise impact of the semantic segmentation network with the help of the original low-level color information, the present invention additionally introduces a threshold in step S6. To solve the above problem. For pixel (i, j), if the color distance between two adjacent frames is small, then the pixel can be directly judged as a background pixel, and the detection result is finally recorded as The process is shown in formula (8).

[0091]

[0092] in, Represents the color distance value between adjacent frames of pixel (i, j), Represents the color value of the pixel (i, j) in the nth frame. Represents the color value of pixel (i, j) in the n-1th frame.

[0093] In addition, when The smaller the value, the easier it is for the pixel (i, j) to be detected as a background pixel, and vice versa. Therefore, this case prefers exist to ,when When within this range, the case will have better performance.

[0094] Furthermore, in order to integrate multiple test results, in step S7 of this case, first, the test results , and Participate in the voting mechanism to generate temporary test results The voting detection mechanism is shown in Table 1, which can be defined as a majority vote system; secondly, through To correct temporary test results , to generate the final detection result .

[0095] In an optional embodiment, if When the detected pixel is a background pixel, the final result can also be directly determined as a background pixel to correct The results in When the detected pixel is a foreground pixel, The result in is the final test result , so no correction is made.

[0096] #timg# #timg# #timg# #timg# BG BG BG BG BG BG FG BG BG FG BG BG BG FG FG FG FG BG BG BG FG BG FG FG FG FG FG FG FG FG BG FG

[0097] Table 1 Voting mechanism rules

[0098] Furthermore, in order to continuously update the adaptive multi-feature semantic background model to improve the detection accuracy, the update flow chart is as follows: Figure 5 shown.

[0099] For each sample of the adaptive multi-feature semantic background model, first, if condition 1 is satisfied, that is, ,in represents the semantic distance between pixel (i, j) and the nth sample, Represents the effectiveness counter value of the nth sample of pixel (i, j).

[0100] If the sample determines that the pixel to be detected is a background pixel, the value of the effectiveness counter of the sample increases by 1, and the semantic feature value stored in the sample is also fine-tuned. The fine-tuning process is shown in formula (9). Secondly, if condition 1 is not met, only the effectiveness counter of the background sample is reduced by 1. Finally, when the value of the effectiveness counter of the background sample is less than or equal to 0, the sample becomes invalid and waits for a new background sample to replace it.

[0101]

[0102] in, Represents the semantic vector of the nth sample in the background model, Represents the semantic vector of the current pixel to be detected.

[0103] Furthermore, in order to achieve the replacement of failed samples. In this example, spare background samples are used to replace failed samples in the background model. The generation process of spare background samples is as follows: if the background pixel to be detected is misdetected as a foreground pixel by the semantic background model, the semantic vector of the background pixel and a smaller background counter value (1 to 10) are combined into a spare background sample.

[0104] Since the failure of samples in the semantic background model and the acquisition of alternative background samples do not occur at the same time, the latest generated alternative background samples are used to replace the failed samples. When there are failed samples in the background model, it does not affect the operation of the entire algorithm, so there is no need to replace the failed samples in time.

[0105] In addition, it should be noted that the target pixel referred to in the present invention can be a background pixel or a foreground pixel. Therefore, the detection process for background pixels in the above embodiment is also applicable to the detection of foreground pixels. Therefore, those skilled in the art can make several alternative implementations based on the implementation of this case without departing from the inventive concept of this case. Therefore, these alternative implementations are also within the scope of the example disclosure of this case.

[0106] In summary, through the motion target detection method based on semantic features and color information provided by the present invention, a semantic background model can be established from the semantic features of the input frame, and the background model based on semantic and color information can be jointly detected, thereby improving the detection accuracy of complex dynamic background environments. At the same time, in some preferred embodiments, the semantic segmentation network provided in this case can further improve the detection accuracy of the semantic segmentation network for small target objects in complex environments. In addition, the solution of the present invention does not require a large amount of labeled data, and can be deployed in any scenario for use, and has strong adaptability.

[0107] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is only limited by the claims and their full scope and equivalents. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0108] In addition, all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.

[0109] In addition, various implementations of the embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.

Claims

1. A moving target detection method based on semantic features and color information, comprising the following steps: S1 inputs the Nth frame of the video into the semantic segmentation network to obtain the basic semantic feature map of the image; Input the N+1 frame image of the video into the semantic segmentation network to obtain the semantic feature map to be tested of the image; S2 establishes an adaptive multi-feature semantic background model, and loads the basic semantic feature map into each sample included in the adaptive multi-feature semantic background model; S3, based on the adaptive multi-feature semantic background model of step S2, performs target pixel judgment on pixels in the semantic feature map to be tested, including: calculating the pixel distance value between the semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model, so as to compare the pixel distance value with the preset threshold value. Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the detection results as ; S4 calculates the probability P of each pixel in the semantic feature map to be tested being the target pixel and compares it with the preset threshold The comparison step includes: summing the values ​​contained in the semantic feature vector of each pixel in the semantic feature map to be tested to obtain the probability P of each pixel being a foreground pixel, and comparing the probability P with the preset threshold value. Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the detection results as ; S5 is a moving target detection algorithm based on color information modeling. It determines the target pixel in the semantic feature map to be tested and records the detection result as ; S6: the step of determining the target pixel for the same pixel in adjacent frames of the semantic feature map to be tested includes: comparing the color distance value of the same pixel in adjacent frames of the semantic feature map to be tested with a preset threshold value. Compare and then obtain the judgment results of foreground and background pixels of the pixels in the semantic feature map to be tested, and record the results as ; S7 command test results , and Participate in the preset voting mechanism to generate detection results After that, let Correction To obtain the final target pixel judgment result .

2. The moving target detection method based on semantic features and color information according to claim 1, wherein the pixel distance value calculation step in step S3 comprises: Calculation formula: , in Represents the distance value between pixel (i, j) and the semantic background, represents the semantic background model of pixel (i,j), Represents the semantic vector of the current pixel, represents the nth background sample of pixel (i,j), Represents the semantic distance between pixel (i, j) and the nth sample.

3. The moving target detection method based on semantic features and color information according to claim 1, wherein the semantic segmentation network in step S1 comprises: An encoder and a decoder, wherein the encoder is a deep convolutional neural network, and each convolutional layer in each convolutional block in the deep convolutional neural network is set to be connected to the convolutional layer behind it.

4. The moving target detection method based on semantic features and color information according to claim 1, wherein the basic semantic feature map obtained in step S1 is ( ), the adaptive multi-feature semantic background model in step S2 is recorded as: ;in Each sample also contains a background potency counter To represent the corresponding semantic feature vector The validity of each sample expression is: 。 5. The method for detecting moving objects based on semantic features and color information according to claim 1, further comprising updating the adaptive multi-feature semantic background model in step S8, the steps comprising: S81 determines whether each sample of the adaptive multi-feature semantic background model satisfies the first condition. If so, the value of the effectiveness counter of the sample is increased by 1, and the semantic vector in the sample is adjusted. If not, the value of the effectiveness counter of the sample is decreased by 1, until the value of the effectiveness counter of the sample is ≤0, and the sample is defined as an invalid sample. S82 When the adaptive multi-feature semantic background model mistakenly determines that a background pixel in the semantic feature map to be tested is a foreground pixel, the semantic vector of the background pixel and the background sample with the smallest effectiveness counter value in the adaptive multi-feature semantic background model are combined into a backup background sample to replace the failed sample.

6. A moving target detection method based on semantic features and color information, comprising: S1 inputs the Nth frame of the video into the semantic segmentation network to obtain the basic semantic feature map of the image; Input the N+1 frame image of the video into the semantic segmentation network to obtain the semantic feature map to be tested of the image; S2 establishes an adaptive multi-feature semantic background model, and loads the basic semantic feature map into each sample included in the adaptive multi-feature semantic background model; S3 enables the adaptive multi-feature semantic background model to perform target detection on the semantic feature map to be tested, so as to calculate the pixel distance value between the semantic feature map to be tested and each sample in the adaptive multi-feature semantic background model. If the distance is greater than the preset threshold, , then define the pixel as a foreground pixel, and record the detection result as ; S4 Sum the values ​​contained in the semantic feature vector of each pixel in the semantic feature map to be tested to obtain the probability P of each pixel being a foreground pixel, and compare the probability P with the preset threshold If it is less than , the pixel is determined to be a foreground pixel, and the detection result is recorded as ; S5 is a moving target detection algorithm based on color information modeling. It detects the semantic feature map to be tested, and judges the pixels in the semantic feature map to be tested as foreground and background pixels, and records the detection result as ; S6 determines the color distance value of the same pixel in adjacent frames in the semantic feature map to be tested. If the color distance is less than or equal to the preset threshold, , then define the pixel as a background pixel, and record the result as ; S7 command test results , and Participate in the preset voting mechanism and generate test results by majority vote After that, let Correction To obtain the final test results , that is, to determine whether each pixel in the semantic feature map to be tested belongs to a background pixel or a foreground pixel.

7. The moving target detection method based on semantic features and color information according to claim 6, wherein the preset threshold and The value range of is: to , preset threshold The value range is: 0.8 to 1.0.