Obstruction target detection method and device, electronic equipment and storage medium

By combining deep learning and traditional image processing techniques, and utilizing Gaussian mixture model and frame difference method, the false alarm rate in road obstruction target detection is reduced, and the detection accuracy of fast-moving objects is improved. This method is applicable to road obstruction target detection in various scenarios.

CN117218593BActive Publication Date: 2026-03-24THUNDERSOFT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-06
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing road obstruction target detection schemes are prone to false alarms when detecting fast-moving objects, and deep learning-based schemes have limited applicability, while schemes based on traditional image processing techniques are sensitive to parameters and easily affected by lighting and motion interference.

Method used

This paper proposes a method that combines a deep learning-based target detection model with traditional image processing techniques. By using a pre-defined target segmentation strategy, Gaussian mixture model and frame difference method, combined with inertial filtering and morphological processing, the interference of non-road-occupying targets is reduced, thereby improving the detection accuracy.

Benefits of technology

It effectively reduces the false alarm rate, improves the detection accuracy of fast-moving objects, is suitable for detecting road obstruction targets in various scenarios, and reduces the complexity of parameter settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117218593B_ABST
    Figure CN117218593B_ABST
Patent Text Reader

Abstract

The application discloses an occupancy target detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a to-be-detected image at a current time; detecting a non-occupancy target in the to-be-detected image at the current time by using a preset target detection model to obtain a detection result of the non-occupancy target; performing target segmentation on the to-be-detected image at the current time by using a preset target segmentation strategy based on the detection result of the non-occupancy target to obtain a target segmentation result of the to-be-detected image at the current time; and determining an occupancy target in the to-be-detected image at the current time according to the target segmentation result. The occupancy target detection method provided in the application embodiment fuses a target segmentation algorithm based on a traditional image processing technology and a target detection algorithm based on a deep convolutional network, avoids interference caused by the movement of the non-occupancy target on the detection of the occupancy target, and reduces the false positive rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target detection, and particularly relates to a lane-occupying target detection method and device, electronic equipment and a storage medium. BACKGROUND

[0002] Lane-occupying target detection is usually used in the field of security monitoring, and a camera is used to observe whether important patrol visual fields such as fire passages and safety exits are blocked. In addition, the lane-occupying target detection can also be applied to the field of lost object detection. When an object is found to be left in a detection area for a period of time, an alarm is sent to remind.

[0003] However, the lane-occupying target detection scheme in the prior art, especially the target detection scheme based on deep learning, can only detect a limited number of objects of learned categories. When a scheme based on traditional image processing technology, especially the frame difference method or the Gaussian mixture model method, is used, the variance and mean of background information jump obviously when encountering fast-moving objects such as pedestrians and vehicles, false positives are prone to occur, and the scheme is very sensitive to parameter settings. SUMMARY

[0004] Embodiments of the present application provide a lane-occupying target detection method and device, electronic equipment and a storage medium to improve the accuracy of lane-occupying target detection and reduce the false positive rate.

[0005] Embodiments of the present application adopt the following technical scheme:

[0006] In a first aspect, the embodiments of the present application provide a lane-occupying target detection method, which comprises:

[0007] obtaining a to-be-detected image at a current time;

[0008] detecting non-lane-occupying targets in the to-be-detected image at the current time by using a preset target detection model to obtain a detection result of the non-lane-occupying targets;

[0009] performing target segmentation on the to-be-detected image at the current time by using a preset target segmentation strategy based on the detection result of the non-lane-occupying targets to obtain a target segmentation result of the to-be-detected image at the current time;

[0010] determining lane-occupying targets in the to-be-detected image at the current time according to the target segmentation result.

[0011] Optionally, the preset target segmentation strategy comprises a target segmentation strategy based on a Gaussian mixture model, the detection result of the non-lane-occupying targets comprises a detection box of the non-lane-occupying targets, and performing target segmentation on the to-be-detected image at the current time by using a preset target segmentation strategy based on the detection result of the non-lane-occupying targets to obtain a target segmentation result of the to-be-detected image at the current time comprises:

[0012] determine a relative position relationship between the pixel point in the image to be detected at the current moment and the detection frame of the non-lane-occupying target;

[0013] determine the plurality of Gaussian models at the current moment corresponding to the pixel point according to the plurality of Gaussian models at the previous moment corresponding to the pixel point and the relative position relationship between the pixel point in the image to be detected at the current moment and the detection frame of the non-lane-occupying target;

[0014] determine the target segmentation result of the image to be detected at the current moment according to the relative position relationship between the pixel point in the image to be detected at the current moment and the detection frame of the non-lane-occupying target and the plurality of Gaussian models at the current moment corresponding to the pixel point.

[0015] Optionally, the determining the plurality of Gaussian models at the current moment corresponding to the pixel point according to the plurality of Gaussian models at the previous moment corresponding to the pixel point and the relative position relationship between the pixel point in the image to be detected at the current moment and the detection frame of the non-lane-occupying target comprises:

[0016] determining whether the pixel point in the image to be detected at the current moment falls into a region where the detection frame of the non-lane-occupying target is located;

[0017] if yes, determining the plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at the previous moment corresponding to the pixel point and a first background modeling strategy;

[0018] otherwise, determining the plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at the previous moment corresponding to the pixel point and a second background modeling strategy.

[0019] Optionally, the determining the plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at the previous moment corresponding to the pixel point and the first background modeling strategy comprises:

[0020] directly taking the weights of the plurality of Gaussian models at the previous moment corresponding to the pixel point as the weights of the plurality of Gaussian models at the current moment corresponding to the pixel point.

[0021] Optionally, the determining the plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at the previous moment corresponding to the pixel point and the second background modeling strategy comprises:

[0022] determining whether there is a Gaussian model matching the pixel point in the plurality of Gaussian models at the previous moment corresponding to the pixel point;

[0023] if yes, updating the Gaussian model at the previous moment matching the pixel point by using a first updating strategy;

[0024] If not, a Gaussian model corresponding to a previous moment of the pixel point is updated by using a second updating strategy.

[0025] Optionally, the target segmentation result includes pixel points of a lane-occupying target and pixel points of a non-lane-occupying target, and the target segmentation result of the current moment of the to-be-detected image is determined according to a relative positional relationship between a pixel point in the current moment of the to-be-detected image and a detection box of the non-lane-occupying target and a plurality of Gaussian models corresponding to the pixel point in the current moment, and includes:

[0026] a Gaussian model corresponding to a background pixel point is determined according to a weight of the plurality of Gaussian models corresponding to the pixel point in the current moment;

[0027] the pixel point in the current moment of the to-be-detected image is matched with the Gaussian model corresponding to the background pixel point;

[0028] if the pixel point in the current moment of the to-be-detected image does not fall into a region where the detection box of the non-lane-occupying target is located and does not match the Gaussian model corresponding to the background pixel point, the pixel point is determined as a pixel point of the lane-occupying target;

[0029] otherwise, the pixel point is determined as a pixel point of the non-lane-occupying target.

[0030] Optionally, the preset target segmentation strategy includes a target segmentation strategy based on a preset frame difference method, the detection result of the non-lane-occupying target includes a detection box of the non-lane-occupying target, and the target segmentation result of the current moment of the to-be-detected image is obtained by performing target segmentation on the current moment of the to-be-detected image by using a preset target segmentation strategy based on the detection result of the non-lane-occupying target, and includes:

[0031] a region where the detection box of the non-lane-occupying target is located is masked to obtain a to-be-detected image of the current moment after masking;

[0032] a background image is obtained, and the background image is obtained by fusing a plurality of continuous images based on inertial filtering;

[0033] the to-be-detected image of the current moment after masking and the background image are subjected to difference operation by using the preset frame difference method, to obtain pixel points of a lane-occupying target in the current moment of the to-be-detected image as the target segmentation result of the current moment of the to-be-detected image.

[0034] Optionally, the target segmentation result includes a plurality of pixel points corresponding to a lane-occupying target, and the lane-occupying target in the current moment of the to-be-detected image is determined according to the target segmentation result, and includes:

[0035] determine a binary image corresponding to a plurality of pixel points of the jaywalking target;

[0036] perform morphological processing on the binary image to obtain a morphological processing result;

[0037] determine a connected domain according to the morphological processing result;

[0038] in a case where an area of the connected domain exceeds a preset area threshold, determine that a target corresponding to the connected domain is a jaywalking target.

[0039] In a second aspect, an embodiment of the present application further provides a jaywalking target detection device, and the device comprises:

[0040] an acquisition unit configured to acquire a to-be-detected image at a current time;

[0041] a detection unit configured to detect a non-jaywalking target in the to-be-detected image at the current time by using a preset target detection model to obtain a detection result of the non-jaywalking target;

[0042] a target segmentation unit configured to perform target segmentation on the to-be-detected image at the current time by using a preset target segmentation strategy based on the detection result of the non-jaywalking target to obtain a target segmentation result of the to-be-detected image at the current time;

[0043] a determination unit configured to determine a jaywalking target in the to-be-detected image at the current time according to the target segmentation result.

[0044] In a third aspect, an embodiment of the present application further provides an electronic device, and the device comprises:

[0045] a processor; and

[0046] a memory arranged to store computer executable instructions that, when executed, cause the processor to perform any of the aforementioned methods.

[0047] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores one or more programs, which, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform any of the aforementioned methods.

[0048] The at least one technical solution adopted by the embodiment of the present application can achieve the following beneficial effects: the lane-occupying object detection method of the embodiment of the present application first acquires a to-be-detected image at a current time; then, a preset object detection model is used to detect non-lane-occupying objects in the to-be-detected image at the current time, to obtain a detection result of the non-lane-occupying objects; then, based on the detection result of the non-lane-occupying objects, a preset object segmentation strategy is used to perform object segmentation on the to-be-detected image at the current time, to obtain an object segmentation result of the to-be-detected image at the current time; finally, according to the object segmentation result, a lane-occupying object in the to-be-detected image at the current time is determined. The lane-occupying object detection method of the embodiment of the present application combines a target segmentation algorithm based on a traditional image processing technology and a target detection algorithm based on a deep convolutional network, avoids interference of motion of non-lane-occupying objects on detection of lane-occupying objects, and reduces a false positive rate. BRIEF DESCRIPTION OF DRAWINGS

[0049] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, but do not constitute improper limitations on the present application. In the drawings:

[0050] Figure 1 FIG. 1 is a flowchart of a lane-occupying object detection method according to an embodiment of the present application;

[0051] Figure 2 FIG. 2 is a structural diagram of a lane-occupying object detection device according to an embodiment of the present application;

[0052] Figure 3 FIG. 3 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0054] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the drawings.

[0055] In order to facilitate the understanding of the embodiments of the present application, several lane-occupying object detection schemes in the prior art are provided, one of which is a background modeling scheme based on a mixed Gaussian model, which realizes foreground segmentation by establishing a background model and matching each pixel point in an image with the background model, but does not consider false positives caused by passing motion targets such as pedestrians.

[0056] Another solution is to use video frames and bottom library contrast video frame structure similarity comparison, while the similar value size can be set to determine what kind of object and whether it is an occupying object, but this solution cannot exclude the interference of specific objects.

[0057] Another solution is to obtain the gray image of the image in the fire lane detection area in the normal state as the bottom image, then obtain the camera video frame and the bottom image in turn, obtain the shape of the foreground object by using frame difference method, and then obtain the minimum bounding box coordinates of the object according to the morphological operation, and then perform fire lane detection area abnormal object detection and abnormal situation reporting according to the obtained minimum bounding box and fire lane detection information library. This solution also cannot avoid false positives caused by some interference, and is very sensitive to time parameters.

[0058] Another solution is an occupying lane target recognition scheme based on deep learning, which obtains a suspected obstacle region in an image according to an image of a to-be-detected road and a road obstacle detection model for identifying the suspected obstacle region in the image; and then screens the suspected obstacle region according to a preset screening mechanism to obtain an obstacle region in the image. This solution cooperates to detect the urban road through the road obstacle detection model and the preset screening mechanism, and judges the obstacle in the to-be-detected road. However, this solution is very sensitive to training data sets and is limited to recognizing a limited number of preset categories of targets.

[0059] It can be seen that the existing solutions can be mainly divided into two categories: the first category is a target detection scheme based on deep learning, and the second category is a target segmentation method based on traditional image processing techniques such as frame difference method or Gaussian mixture model, and the core is to segment the foreground target.

[0060] However, the two existing solutions mainly have the following problems:

[0061] 1) The target detection based on deep learning can only recognize the target categories that have been known and involved in the training of the deep convolutional network, which belongs to a kind of white list detection scheme, and its scope of application is limited. When other abnormal categories of objects appear, the model needs to be retrained.

[0062] 2) The detection based on traditional image processing techniques, such as the method using frame difference method or Gaussian mixture model, has strong universality and does not need to know the categories of the to-be-detected objects in advance, and can be widely used in position categories. However, this solution is not only sensitive to parameters, but also prone to false positives when light or moving foreground objects appear.

[0063] Based on this, the embodiments of the present application provide an occupying lane target detection method, such as Figure 1As shown, a flowchart of a lane-occupying object detection method in an embodiment of the present application is provided, and the method comprises at least the following steps S110-S140.

[0064] In step S110, a to-be-detected image at a current time is acquired.

[0065] The lane-occupying object in the embodiment of the present application can be defined differently according to different application scenarios. For example, in a fire passage scenario, the lane-occupying object can be an object blocking the fire passage, and in a left-behind object detection scenario, the lane-occupying object can be an object left or lost in the monitoring area. Of course, which types of lane-occupying objects are included is defined flexibly by those skilled in the art according to actual application scenarios, and is not limited here.

[0066] In the lane-occupying object detection, a to-be-detected image at a current time is first acquired, which can be acquired by a camera arranged at a fixed shooting position.

[0067] In step S120, a preset object detection model is used to detect non-lane-occupying objects in the to-be-detected image at the current time, to obtain a detection result of the non-lane-occupying objects.

[0068] After the to-be-detected image at the current time is obtained, a preset object detection model trained in advance can be used to detect non-lane-occupying objects in the to-be-detected image at the current time. The non-lane-occupying objects can be understood as objects insensitive to lane-occupying detection, such as people, non-motor vehicles, motor vehicles, etc. in the image. The occupation of this type of object to a fire passage, etc. usually occurs temporarily, such as a person temporarily passing through the camera field of view. The appearance or existence of these non-lane-occupying objects will interfere with the detection of the lane-occupying object, so the detection of the lane-occupying object needs to be insensitive to this type of object.

[0069] The preset object detection model is mainly used to detect non-lane-occupying objects in the image, so the non-lane-occupying objects can be regarded as objects of interest of the preset object detection model. Since the categories of these objects of interest are relatively fixed, the trained preset object detection model can basically meet most detection scenarios. The preset object detection model in the embodiment of the present application can be trained by the following method.

[0070] Firstly, a training image is acquired and a target of interest in the training image is labeled. The label data is the specific pixel coordinates of the target of interest in the training image, which can be represented by a closed rectangular box. For example, x and y represent the positions of the upper left corner of the rectangular box, and w and h represent the width and height of the rectangular box, respectively. Of course, other representation forms can also be used. Then, a detection network based on FCOS (Fully Convolutional One-Stage Object Detection) or a detection network based on YOLO can be used for training. The training image is divided into a first data set and a second data set. The first data set is used for training of the model, and the second data set is used for verification of the model. The division ratio can be 9:1 or other ratios. Finally, the weight parameters of the target detection network are trained using the first data set. After training for a certain period, the performance of the model can be verified using the second data set. When the performance meets the preset requirements or the loss function tends to converge, or when both conditions are met, the training of the target detection network can be ended, thereby obtaining a trained target detection model.

[0071] Of course, it should be noted that the embodiments of the present application do not limit the use of any target detection method to detect the above-mentioned non-lane-occupying target. Any target detection method or a method similar to the embodiments of the present application should fall within the protection scope of the present application.

[0072] In step S130, based on the detection result of the non-lane-occupying target, a target segmentation strategy is used to perform target segmentation on the to-be-detected image at the current time to obtain a target segmentation result of the to-be-detected image at the current time.

[0073] The detection result of the non-lane-occupying target obtained by the foregoing steps can be regarded as a target detection result output based on deep learning technology. Therefore, the detection result of the non-lane-occupying target can be used to affect the detection of the lane-occupying target based on the target segmentation strategy based on traditional image processing technology. For example, the region of the non-lane-occupying target can be masked, so that the appearance or existence of the non-lane-occupying target in the image can be avoided to interfere with the preset target segmentation strategy.

[0074] In step S140, according to the target segmentation result, a lane-occupying target in the to-be-detected image at the current time is determined.

[0075] Since the foregoing steps have excluded the interference of the non-lane-occupying target, the target segmentation result is mainly a segmentation result of a foreground target, i.e., a lane-occupying target. That is, it is determined which pixel points in the to-be-detected image are pixel points of the lane-occupying target and which pixel points are background pixel points.

[0076] The lane-occupying object detection method of the embodiment of the application fuses the object segmentation algorithm based on the traditional image processing technology and the object detection algorithm based on the deep convolution network, avoids the interference of the motion of the non-lane-occupying object on the detection of the lane-occupying object, and reduces the false alarm rate.

[0077] In an embodiment of the application, the preset object segmentation strategy includes a target segmentation strategy based on a mixed Gaussian model, the detection result of the non-lane-occupying object includes a detection frame of the non-lane-occupying object, and the target segmentation of the current image to be detected by using the preset object segmentation strategy based on the detection result of the non-lane-occupying object includes the following steps: determining the relative position relationship between a pixel point in the current image to be detected and the detection frame of the non-lane-occupying object; determining a plurality of Gaussian models of the current time corresponding to the pixel point according to a plurality of Gaussian models of the previous time corresponding to the pixel point and the relative position relationship between the pixel point in the current image to be detected and the detection frame of the non-lane-occupying object; and determining the target segmentation result of the current image to be detected according to the relative position relationship between the pixel point in the current image to be detected and the detection frame of the non-lane-occupying object and the plurality of Gaussian models of the current time corresponding to the pixel point.

[0078] The preset object segmentation strategy used in the embodiment of the application can be a target segmentation strategy based on a mixed Gaussian model. The traditional idea of the mixed Gaussian model is that each pixel point in an image is independent of each other, and for each pixel point, the change of the pixel value in the sequence image can be regarded as a random process of values, so that the Gaussian model can be used to describe the presentation rule of each pixel point. The mixed Gaussian model is mainly used to segment the foreground object and the background in the image, and the reason why it can segment the two is mainly based on the following two facts: 1) in a long-term observation scene, the background occupies most of the time, so more data support the background distribution; 2) even the moving object with relatively consistent color also produces more changes than the background, and in general, the object is with different colors.

[0079] Specifically, the mixed Gaussian model uses K Gaussian models to represent the distribution rule of each pixel point in the image, and the value of K is generally 3-5, and of course it can be flexibly adjusted according to actual needs. Then the mixed Gaussian model is continuously updated through the continuous generation of new image frames, and finally each pixel point in the current latest image is matched with the updated mixed Gaussian model. If the matching is successful, the pixel point is a background pixel point, and if the matching fails, the pixel point is a foreground pixel point, so as to realize the segmentation of the foreground object and the background.

[0080] For the convenience of understanding the embodiment of the application, further examples are given. It is assumed that x t= (r t , g t , b t ) is the image to be detected at time t. x t obeys the following mixed Gaussian distribution probability density function in a period of time:

[0081] η(x t , μ t , τ t ), (1)

[0082] wherein μ t is the mean value, τ t is the covariance matrix, and δ t is the variance, I is the unit matrix.

[0083] For the mixed Gaussian model, the change of each pixel point satisfies the multi-peak rule, specifically, the superposition of multiple Gaussian models with different weights is used for modeling, and each Gaussian model corresponds to a change rule. The mixing weight of multiple Gaussian models and their respective probability density parameters can be dynamically learned. Generally, 3-5 Gaussian models can be used for weighted mixing, η i (x t , μ i,t , τ i,t ) represents the i-th Gaussian model. When the system is started for detection at the beginning, or after the system is reset for the first time, the initial state of the Gaussian model can be established, and the pixel value at the position of the pixel point is used as the mean value to initialize the system, and the variance is initially given a preset variance value.

[0084] Based on this, the embodiments of the present application are based on the traditional mixed Gaussian model, and further introduce the detection result of the non-lane-occupying target obtained based on the deep learning algorithm in the process of foreground and background segmentation based on the mixed Gaussian model. The detection result of the non-lane-occupying target specifically can include the detection frame of the non-lane-occupying target. The purpose of the improved process is to avoid the interference of the motion of the non-lane-occupying target on the detection of the lane-occupying target.

[0085] Therefore, the relative position relationship between the pixel point in the image to be detected at the current time and the detection frame of the non-lane-occupying target can be determined first, that is, whether the pixel point at the current time is the pixel point of the non-lane-occupying target is determined. Since the target segmentation strategy of the mixed Gaussian model needs to constantly update the weight and parameters of each Gaussian model, at this time, the multiple Gaussian models corresponding to the pixel point at the previous time can be obtained first, and the relative position relationship between the pixel point at the current time and the detection frame of the non-lane-occupying target is combined to determine the multiple Gaussian models corresponding to the pixel point at the current time, that is, the update process of the mixed Gaussian model is affected by the detection result of the non-lane-occupying target, so as to ensure that the preset target segmentation strategy is not sensitive to the detection of the non-lane-occupying target.

[0086] In an embodiment of the present application, the determining the plurality of Gaussian models corresponding to the pixel point at the current time according to the plurality of Gaussian models corresponding to the pixel point at the previous time and the relative position relationship between the pixel point in the image to be detected at the current time and the detection frame of the non-lane-occupying target comprises: determining whether the pixel point in the image to be detected at the current time falls into the region where the detection frame of the non-lane-occupying target is located; if yes, determining the plurality of Gaussian models corresponding to the pixel point at the current time by using the plurality of Gaussian models corresponding to the pixel point at the previous time and the first background modeling strategy; otherwise, determining the plurality of Gaussian models corresponding to the pixel point at the current time by using the plurality of Gaussian models corresponding to the pixel point at the previous time and the second background modeling strategy.

[0087] In the embodiment of the present application, when the plurality of Gaussian models corresponding to each pixel point at the current time are determined, it can be first judged whether the pixel point falls into the rectangular region where the detection frame of the non-lane-occupying target is located. If the pixel point falls into the rectangular region, it is indicated that the pixel point is a pixel point of the non-lane-occupying target. If the pixel point does not fall into the rectangular region, it is indicated that the pixel point is not a pixel point of the non-lane-occupying target. For the pixel points corresponding to two different results, different background modeling strategies can be used to determine the plurality of Gaussian models corresponding to the pixel point at the current time. For example, for the pixel point of the non-lane-occupying target, a background modeling strategy with stronger inertia can be used to realize insensitivity to specific non-lane-occupying targets. For the pixel point which is not a pixel point of the non-lane-occupying target, a traditional background modeling strategy of the mixed Gaussian model can be used to realize sensitivity to lane-occupying targets.

[0088] In an embodiment of the present application, the determining the plurality of Gaussian models corresponding to the pixel point at the current time according to the plurality of Gaussian models corresponding to the pixel point at the previous time and the first background modeling strategy comprises: directly using the weights of the plurality of Gaussian models corresponding to the pixel point at the previous time as the weights of the plurality of Gaussian models corresponding to the pixel point at the current time.

[0089] If the pixel point falls into the rectangular region, i.e., the pixel point is a pixel point of the non-lane-occupying target, at this time, the background modeling strategy adopted is that the weights of the plurality of Gaussian models corresponding to the pixel point are not updated, i.e., the weights of the plurality of Gaussian models corresponding to the pixel point at the previous time are directly assigned to the weights of the plurality of Gaussian models corresponding to the pixel point at the current time.

[0090] The background modeling strategy described above is a more lazy strategy. For a Gaussian model of a mixture Gaussian model, the greater the weight of the Gaussian model, the more data the Gaussian model represents, and the more likely it is to be a Gaussian model of a background pixel. Therefore, for a pixel of a non-occupied target, by not updating the weights of the plurality of Gaussian models corresponding to the pixel, the weights of the Gaussian models can at least be ensured not to be decayed, and the pixel of the non-occupied target can be ensured not to be mis-detected as a pixel of an occupied target.

[0091] In an embodiment of the present application, the determining the plurality of Gaussian models of the current time instant using the plurality of Gaussian models of the previous time instant corresponding to the pixel and the second background modeling strategy comprises: determining whether there is a Gaussian model matching the pixel in the plurality of Gaussian models of the previous time instant corresponding to the pixel; if there is, updating the Gaussian model of the previous time instant matching the pixel using the first updating strategy; and if there is not, updating the plurality of Gaussian models of the previous time instant corresponding to the pixel using the second updating strategy.

[0092] If the pixel does not fall within the rectangular region, i.e., is not a pixel of a non-occupied target, the updating of the Gaussian model can be performed according to the conventional background updating strategy of a mixture Gaussian model. For example, the pixel can be matched with the plurality of Gaussian models of the previous time instant corresponding to the pixel. If there is a Gaussian model matching the pixel in the plurality of Gaussian models of the previous time instant, the Gaussian model of the previous time instant matching the pixel can be updated using the first updating strategy. Otherwise, the plurality of Gaussian models of the previous time instant corresponding to the pixel can be updated using the second updating strategy.

[0093] Specifically, for a to-be-detected image of a current time instant, the Gaussian model matching the image can be analyzed pixel by pixel. For example, the matching can be determined in the following manner:

[0094] |x t -μ i,t-1 |<=2.5δ i, t-1 , (2)

[0095] If the distance between the pixel X t and the mean of the i-th Gaussian model of the mixture Gaussian model is less than 2.5 times the standard deviation of the i-th Gaussian model, it is considered that the i-th Gaussian model matches the pixel value X t .

[0096] The first updating strategy described above can update the weight of the matching Gaussian model in the following manner:

[0097] w k,t =(1-α)w k,t-1 +α, (3)

[0098] wherein w k,t-1 is the weight of the Gaussian model at the previous time, w k,t is the weight of the Gaussian model at the current time, and a is the learning rate of the parameter estimation.

[0099] In addition, the parameters of the matched Gaussian model can also be updated in the following manner:

[0100] p = a * η(x t | μ k ,σ k ), (4)

[0101] μ t = (1 - p) * μ t-1 + p * x t , (5)

[0102]

[0103] The second updating strategy can update the Gaussian models corresponding to the pixel point in the following manner:

[0104] w k,t = (1 - a) w k,t-1 , (7)

[0105] It can be seen that when the pixel point does not fall into the rectangular region and has no matched Gaussian model, the weight of the Gaussian model corresponding to the pixel point is decayed, and the mean and covariance matrix of the corresponding Gaussian model remain unchanged, thereby reducing the contribution of the pixel point to the background model and ensuring that the Gaussian model corresponding to the pixel point has a large probability of being a Gaussian model of a background pixel point.

[0106] Throughout the Gaussian model, the mean and variance are two parameters that determine the model, and therefore different learning mechanisms for learning the mean and variance will directly affect the stability, accuracy and convergence of the model. Since the embodiments of the present application extract and model the background of a moving target, the mean and variance of the Gaussian model need to be updated in real time. In order to improve the learning ability of the model, different learning rates can be used to update the mean and variance.

[0107] In addition, in order to improve the detection effect of large and slow moving targets in a busy scene, the embodiments of the present application can further introduce the concept of weight mean, that is, the weights of the Gaussian models corresponding to the pixel points in the image to be detected are averaged to establish the Gaussian model of the background image and update it in real time, and then the pixel points are classified into foreground and background in combination with the weights of the Gaussian models, the weight mean and the background image.

[0108] In addition, it also needs to be explained that if the pixel point neither falls into the rectangular region corresponding to the non-lane-occupying target nor finds the matching Gaussian model according to the matching method, the Gaussian model with the minimum weight will be replaced by a new Gaussian model, and a smaller initial weight will be given according to a preset rule. For the pixel point not falling into the rectangular region, the weights of the Gaussian models corresponding to the pixel point can also be re-normalized.

[0109] In an embodiment of the present application, the target segmentation result includes pixel points of a lane-occupying target and pixel points of a non-lane-occupying target, and the determining of the target segmentation result of the current frame of the image to be detected according to the relative position relationship between the pixel point in the current frame of the image to be detected and the detection frame of the non-lane-occupying target and the plurality of Gaussian models corresponding to the pixel point includes: determining a Gaussian model corresponding to a background pixel point according to the weights of the plurality of Gaussian models corresponding to the pixel point in the current frame; matching the pixel point in the current frame of the image to be detected with the Gaussian model corresponding to the background pixel point; if the pixel point in the current frame of the image to be detected does not fall into the region where the detection frame of the non-lane-occupying target is located and does not match the Gaussian model corresponding to the background pixel point, determining that the pixel point is a pixel point of the lane-occupying target; otherwise, determining that the pixel point is a pixel point of the non-lane-occupying target.

[0110] After the parameters of the Gaussian mixture model corresponding to each pixel point in the image to be detected are updated, it is necessary to determine which Gaussian models in the Gaussian mixture model are generated by the background process, or in other words, which Gaussian models can best describe the background process, that is, for K Gaussian models, it is necessary to estimate which Gaussian models represent the background pixel points.

[0111] Specifically, after the current frame of the image to be detected is processed, the parameters of the Gaussian model need to be updated, so the background model needs to be re-estimated for each frame of image. Generally, the Gaussian distribution with more data support and smaller variance is the one that we need to focus on, because it has a greater possibility of representing the background model. Two cases are considered. One case is when the background object is persistently stationary, at this time, the Gaussian distribution generated on the surface of the object represents the background distribution, so the data supporting this distribution will continue to accumulate, and its variance will become smaller and smaller. The other case is when a new object blocks the original background object, either a new distribution is generated or the variance of an existing distribution is increased. In addition, when the new object is a moving object, it will generally maintain greater changes than the background pixels until it stops. Therefore, from the above two cases, it can be seen that the two important factors affecting whether a Gaussian model is a Gaussian model corresponding to a background pixel point are: 1) the proportion of the data generated by the distribution; 2) the variance of the distribution.

[0112] Based on the two factors, the embodiment of the present application can adopt the following method to estimate the Gaussian model corresponding to the background pixel point, and the K mixed Gaussian models corresponding to each pixel point are sorted in descending order according to the ratio of w to w k represents the proportion of the data generated by the Kth Gaussian model, represents the variance of the Kth Gaussian model, The greater the value of w

[0113] After the Gaussian model corresponding to the background pixel point is determined, each pixel point X t in the current moment to be detected image is matched with the B Gaussian models corresponding thereto respectively. If the pixel point X t matches any one of the B Gaussian models, the pixel point is segmented as a background pixel point. If the pixel point X t does not match any one of the B Gaussian models, and the pixel point also does not fall into the rectangular region, the pixel is segmented as a foreground pixel point, i.e., a pixel point of the road-occupying target, thereby achieving the purpose of segmenting the road-occupying target from the background.

[0114] In an embodiment of the present application, the preset target segmentation strategy includes a target segmentation strategy based on a preset frame difference method, the detection result of the non-road-occupying target includes a detection frame of the non-road-occupying target, and the target segmentation of the current moment to be detected image based on the detection result of the non-road-occupying target includes: performing mask on the region where the detection frame of the non-road-occupying target is located to obtain the current moment to be detected image after mask; obtaining a background image, the background image being obtained by fusing multiple continuous images based on inertial filtering; and performing difference operation on the current moment to be detected image after mask and the background image by using the preset frame difference method to obtain the pixel point of the road-occupying target in the current moment to be detected image as the target segmentation result of the current moment to be detected image.

[0115] The traditional frame difference method is also called temporal difference. The idea of the method is that the video frame sequence captured by the camera has continuity. If there is no moving target in the scene, the change between the continuous frames is very weak. If there is a moving target, there will be obvious change between the continuous frames, i.e., the position of the target in different image frames is different. Therefore, by performing difference operation on two or three image frames in time sequence, the absolute value of the gray difference is determined by subtracting the pixel points corresponding to different image frames. When the absolute value exceeds a certain threshold, it is determined that there is a moving target, so as to realize the target detection function.

[0116] The preset frame difference method of the embodiment of the application can improve the traditional frame difference method. On the one hand, the embodiment of the application fuses multiple continuous image frames in the video sequence in time sequence using inertial filtering. The fusion result can be used to represent background information, so as to obtain a background image as the basis for subsequent difference operation. Compared with the way of performing difference operation on two or three image frames in the traditional frame difference method, the noise interference can be reduced and the accuracy of moving target detection can be improved.

[0117] On the other hand, since the non-lane-occupying target is also a moving target, if the foreground target is segmented directly based on the traditional frame difference processing flow, the moving non-lane-occupying targets such as people and motor vehicles will also be segmented, thereby causing false alarms. Therefore, the embodiment of the application can mask and shield the non-lane-occupying target region in the to-be-detected image based on the non-lane-occupying target detected by the deep learning algorithm. Then, when performing the inter-frame difference operation, the pixel points in the image region outside the mask and shield are subtracted. In this way, according to the comparison between the difference operation result and the preset difference threshold, it is determined which pixel points in the to-be-detected image at the current time are foreground target pixel points, i.e., lane-occupying target pixel points, and which are background pixel points. In this way, the interference of the non-lane-occupying target is avoided, and the false alarm rate is reduced.

[0118] In an embodiment of the application, the target segmentation result includes multiple pixel points corresponding to the lane-occupying target, and the lane-occupying target in the to-be-detected image at the current time is determined according to the target segmentation result, including: determining a binary image corresponding to the multiple pixel points of the lane-occupying target; performing morphological processing on the binary image to obtain a morphological processing result; determining a connected domain according to the morphological processing result; and determining that the target corresponding to the connected domain is a lane-occupying target if the area of the connected domain exceeds a preset area threshold.

[0119] Since the detection of the lane-occupying target in the foregoing embodiments is pixel-level processing, the final target segmentation result is also the pixel points corresponding to the lane-occupying target. In order to further improve the accuracy of the lane-occupying target detection, the embodiments of the present application can perform morphological operation on the binary image corresponding to each pixel point of the lane-occupying target to remove isolated pixel points. Then, connected component calculation is performed, and when the area of the connected component is greater than a preset area threshold, it can be determined that the target corresponding to the connected component is an abnormal target, and then an alarm can be triggered.

[0120] Of course, in order to further reduce the false positive rate, the embodiments of the present application can continuously detect the abnormal target, and trigger the alarm when the abnormal target continuously appears and exceeds a certain preset time.

[0121] In summary, the lane-occupying target detection method of the present application at least achieves the following technical effects:

[0122] 1) When applied to a lane-occupying detection scene, it can effectively reduce false positives caused by motion targets such as people and motor vehicles based on traditional image processing methods such as frame difference method and Gaussian mixture model.

[0123] 2) It is not sensitive to a limited number of targets in the white list, and also has good detection effect on other unknown (no need to be defined in advance) targets.

[0124] 3) Simple parameter setting, no need for complex parameter giving, good robustness.

[0125] The embodiments of the present application also provide a lane-occupying target detection device 200, as shown in Figure 2 The structure schematic diagram of a lane-occupying target detection device in the embodiments of the present application is provided, and the device 200 comprises an acquisition unit 210, a detection unit 220, a target segmentation unit 230 and a determination unit 240, wherein:

[0126] The acquisition unit 210 is configured to acquire a to-be-detected image at a current time;

[0127] The detection unit 220 is configured to detect non-lane-occupying targets in the to-be-detected image at the current time by using a preset target detection model to obtain a detection result of the non-lane-occupying targets;

[0128] The target segmentation unit 230 is configured to perform target segmentation on the to-be-detected image at the current time based on the detection result of the non-lane-occupying targets by using a preset target segmentation strategy to obtain a target segmentation result of the to-be-detected image at the current time;

[0129] The determination unit 240 is configured to determine a lane-occupying target in the to-be-detected image at the current time according to the target segmentation result.

[0130] In an embodiment of the present application, the preset target segmentation strategy includes a target segmentation strategy based on a Gaussian mixture model, and the detection result of the non-lane-occupying target includes a detection frame of the non-lane-occupying target. The target segmentation unit 230 is specifically configured to: determine a relative position relationship between a pixel point in a to-be-detected image at the current moment and the detection frame of the non-lane-occupying target; determine a plurality of Gaussian models at the current moment corresponding to the pixel point according to a plurality of Gaussian models at a previous moment corresponding to the pixel point and the relative position relationship between the pixel point and the detection frame of the non-lane-occupying target in the to-be-detected image at the current moment; and determine a target segmentation result of the to-be-detected image at the current moment according to the relative position relationship between the pixel point and the detection frame of the non-lane-occupying target in the to-be-detected image at the current moment and the plurality of Gaussian models at the current moment corresponding to the pixel point.

[0131] In an embodiment of the present application, the target segmentation unit 230 is specifically configured to: determine whether a pixel point in a to-be-detected image at the current moment falls into a region where the detection frame of the non-lane-occupying target is located; if yes, determine a plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at a previous moment corresponding to the pixel point and a first background modeling strategy; and if not, determine the plurality of Gaussian models at the current moment corresponding to the pixel point by using the plurality of Gaussian models at the previous moment corresponding to the pixel point and a second background modeling strategy.

[0132] In an embodiment of the present application, the target segmentation unit 230 is specifically configured to: directly use the weights of the plurality of Gaussian models at the previous moment corresponding to the pixel point as the weights of the plurality of Gaussian models at the current moment corresponding to the pixel point.

[0133] In an embodiment of the present application, the target segmentation unit 230 is specifically configured to: determine whether there is a Gaussian model matched with the pixel point in the plurality of Gaussian models at the previous moment corresponding to the pixel point; if yes, update the Gaussian model at the previous moment matched with the pixel point by using a first updating strategy; and if not, update the Gaussian model at the previous moment corresponding to the pixel point by using a second updating strategy.

[0134] In an embodiment of the present application, the target segmentation result includes pixel points of the lane-occupying target and pixel points of the non-lane-occupying target, and the target segmentation unit 230 is specifically configured to: determine a Gaussian model corresponding to a background pixel point according to weights of a plurality of Gaussian models corresponding to a current moment of the pixel point; match the pixel point in the to-be-detected image of the current moment with the Gaussian model corresponding to the background pixel point; if the pixel point in the to-be-detected image of the current moment does not fall within a region where a detection box of the non-lane-occupying target is located and does not match the Gaussian model corresponding to the background pixel point, determine the pixel point as the pixel point of the lane-occupying target; otherwise, determine the pixel point as the pixel point of the non-lane-occupying target.

[0135] In an embodiment of the present application, the preset target segmentation strategy includes a target segmentation strategy based on a preset frame difference method, and the detection result of the non-lane-occupying target includes a detection box of the non-lane-occupying target, and the target segmentation unit 230 is specifically configured to: mask a region where the detection box of the non-lane-occupying target is located to obtain a to-be-detected image of the current moment after masking; acquire a background image, the background image being obtained by fusing a plurality of continuous images based on inertial filtering; and perform difference operation on the to-be-detected image of the current moment after masking and the background image by using the preset frame difference method to obtain pixel points of the lane-occupying target in the to-be-detected image of the current moment as a target segmentation result of the to-be-detected image of the current moment.

[0136] In an embodiment of the present application, the determination unit 240 is specifically configured to: determine a binary image corresponding to a plurality of pixel points of the lane-occupying target; perform morphological processing on the binary image to obtain a morphological processing result; determine a connected domain according to the morphological processing result; and determine a target corresponding to the connected domain as the lane-occupying target in a case where an area of the connected domain exceeds a preset area threshold.

[0137] It can be understood that the lane-occupying target detection device described above can implement each step of the lane-occupying target detection method performed by the clearing server provided in the foregoing embodiments, and the related explanations about the lane-occupying target detection method are all applicable to the lane-occupying target detection device, which will not be described herein again.

[0138] Figure 3 is a structural schematic diagram of an electronic device of an embodiment of the present application. Please refer to Figure 3At the hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The memory can include a memory such as a random-access memory (RAM), and can further include a non-volatile memory such as at least one disk memory. Of course, the electronic device can further include other hardware required by the business.

[0139] The processor, the network interface, and the memory can be connected to each other through the internal bus, which can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, and a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0140] The memory is used to store a program. Specifically, the program can include program code including computer operation instructions. The memory can include a memory and a non-volatile memory, and provide instructions and data to the processor.

[0141] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, and forms a lane-occupying object detection device at the logical level. The processor executes the program stored in the memory, and is specifically used for executing the following operations:

[0142] Obtain a to-be-detected image at a current time;

[0143] Detect a non-lane-occupying object in the to-be-detected image at the current time by using a preset object detection model, to obtain a detection result of the non-lane-occupying object;

[0144] Based on the detection result of the non-lane-occupying object, perform object segmentation on the to-be-detected image at the current time by using a preset object segmentation strategy, to obtain an object segmentation result of the to-be-detected image at the current time;

[0145] According to the object segmentation result, determine a lane-occupying object in the to-be-detected image at the current time.

[0146] The above as described in the present application Figure 1The method performed by the lane-occupying object detection apparatus disclosed in the embodiments shown can be applied in a processor or implemented by the processor. The processor can be an integrated circuit chip with processing capability of signals. In the implementation process, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor mentioned above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.

[0147] The electronic device can also execute Figure 1 the method performed by the lane-occupying object detection apparatus in the middle of the lane, and realize the function of the lane-occupying object detection apparatus in Figure 1 the embodiments shown. The embodiments of the present application will not be repeated here.

[0148] The embodiments of the present application also propose a computer readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by an electronic device including a plurality of applications, can cause the electronic device to execute Figure 1 the method performed by the lane-occupying object detection apparatus in the embodiments shown, and specifically for executing

[0149] obtaining a to-be-detected image at the current time;

[0150] detecting non-lane-occupying objects in the to-be-detected image at the current time by using a preset object detection model to obtain a detection result of the non-lane-occupying objects;

[0151] Based on the detection result of the non-occupying target, a preset target segmentation strategy is used to perform target segmentation on the current time image to be detected, so as to obtain a target segmentation result of the current time image to be detected.

[0152] According to the target segmentation result, an occupying target in the current time image to be detected is determined.

[0153] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0154] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce an apparatus that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart

[0155] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 means for performing the functions specified in the flowchart

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks ​ means for performing the functions specified in the flowchart

[0157] In one typical arrangement, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0158] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) having a cache area for the temporary storage of data. The memory can also include non-volatile memory, such as read only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory, or other non-volatile memory. The memory can be another form of computer-readable media.

[0159] Computer-readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for the storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0160] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements in the list, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the identified element.

[0161] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code.

[0162] The above merely provides an example of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A method for detecting road obstruction targets, characterized in that, The method includes: Obtain the image to be detected at the current moment; The non-road-occupying targets in the image to be detected at the current time are detected using a preset target detection model to obtain the detection results of the non-road-occupying targets; Based on the detection results of the non-road-occupying targets, a preset target segmentation strategy is used to segment the target in the image to be detected at the current time, thereby obtaining the target segmentation result of the image to be detected at the current time. Based on the target segmentation results, determine the road-occupying targets in the image to be detected at the current moment; The preset target detection model is a model that has been pre-trained based on training images containing non-road-occupying targets. The preset target segmentation strategy includes a target segmentation strategy based on a Gaussian mixture model. The detection result of the non-road-obstructing target includes the detection box of the non-road-obstructing target. Based on the detection result of the non-road-obstructing target, the preset target segmentation strategy is used to segment the target in the image to be detected at the current time to obtain the target segmentation result of the image to be detected at the current time, including: Determine the relative positional relationship between the pixels in the image to be detected at the current moment and the detection box of the non-road-occupying target; Based on the multiple Gaussian models corresponding to the pixel at the previous time step, and the relative positional relationship between the pixel in the image to be detected at the current time step and the detection box of the non-road-occupying target, the multiple Gaussian models corresponding to the pixel at the current time step are determined. Based on the relative positional relationship between the pixels in the image to be detected at the current moment and the detection box of the non-road-occupying target, and the multiple Gaussian models corresponding to the pixels at the current moment, the target segmentation result of the image to be detected at the current moment is determined. The multiple Gaussian models corresponding to the pixels at the current time are determined by employing different background modeling strategies.

2. The method according to claim 1, wherein, The step of determining the multiple Gaussian models corresponding to the pixel at the current time based on the multiple Gaussian models corresponding to the pixel at the previous time step, and the relative positional relationship between the pixel in the image to be detected at the current time step and the detection box of the non-road-occupying target, includes: Determine whether a pixel in the image to be detected at the current moment falls within the area of ​​the detection box of the non-road-occupying target; If so, then the multiple Gaussian models corresponding to the pixel at the previous time step and the first background modeling strategy are used to determine the multiple Gaussian models corresponding to the pixel at the current time step. Otherwise, the multiple Gaussian models corresponding to the pixel at the previous time step and the second background modeling strategy are used to determine the multiple Gaussian models corresponding to the pixel at the current time step.

3. The method according to claim 2, wherein, The step of determining the multiple Gaussian models at the current moment using the multiple Gaussian models corresponding to the pixel at the previous moment and the first background modeling strategy includes: The weights of the multiple Gaussian models corresponding to the pixel at the previous time step are directly used as the weights of the multiple Gaussian models corresponding to the pixel at the current time step.

4. The method according to claim 2, wherein, The step of determining the multiple Gaussian models at the current moment using the multiple Gaussian models corresponding to the pixel at the previous time step and the second background modeling strategy includes: Determine whether there exists a Gaussian model that matches the pixel among the multiple Gaussian models corresponding to the previous time step; If it exists, the Gaussian model of the previous time step that matches the pixel is updated using the first update strategy; If it does not exist, the Gaussian model corresponding to the pixel at the previous time step is updated using the second update strategy.

5. The method according to claim 1, wherein, The target segmentation result includes pixels of the target occupying the road and pixels of the target not occupying the road. The step of determining the target segmentation result of the image to be detected at the current moment, based on the relative positional relationship between the pixels in the image to be detected at the current moment and the detection boxes of the target not occupying the road, and the multiple Gaussian models corresponding to the pixels at the current moment, includes: Based on the weights of multiple Gaussian models corresponding to the pixel at the current time, determine the Gaussian model corresponding to the background pixel. The pixels in the image to be detected at the current moment are matched with the Gaussian models corresponding to the background pixels; If a pixel in the image to be detected at the current moment does not fall within the detection box of the non-road-occupying target and does not match the Gaussian model corresponding to the background pixel, then the pixel is determined to be the pixel of the road-occupying target. Otherwise, the pixel is determined to be a pixel of the non-road-occupying target.

6. The method according to claim 1, wherein, The preset target segmentation strategy includes a target segmentation strategy based on a preset frame difference method. The detection result of the non-road-obstructing target includes the detection box of the non-road-obstructing target. Based on the detection result of the non-road-obstructing target, the preset target segmentation strategy is used to segment the target in the image to be detected at the current time to obtain the target segmentation result of the image to be detected at the current time, including: The area where the detection box of the non-road-occupying target is located is masked to obtain the masked image to be detected at the current time. A background image is obtained, which is obtained by fusing multiple consecutive images based on inertial filtering; Using the preset frame difference method, a difference operation is performed on the image to be detected at the current time behind the mask and the background image to obtain the pixels of the target occupying the road in the image to be detected at the current time, which is used as the target segmentation result of the image to be detected at the current time.

7. The method according to any one of claims 1 to 6, wherein, The target segmentation result includes multiple pixels corresponding to the road-occupying target. Determining the road-occupying target in the current moment's image based on the target segmentation result includes: Determine the binary image corresponding to multiple pixels of the road-occupying target; The binary image is subjected to morphological processing to obtain the morphological processing result; The connected components are determined based on the morphological processing results; If the area of ​​the connected region exceeds a preset area threshold, the target corresponding to the connected region is determined to be a road-occupying target.

8. A device for detecting road obstruction targets, characterized in that, The device includes: The acquisition unit is used to acquire the image to be detected at the current time. The detection unit is used to detect non-road-occupying targets in the image to be detected at the current time using a preset target detection model, and obtain the detection result of non-road-occupying targets; The target segmentation unit is used to perform target segmentation on the image to be detected at the current time based on the detection result of the non-road-occupying target and using a preset target segmentation strategy to obtain the target segmentation result of the image to be detected at the current time. The determining unit is used to determine the road-occupying target in the image to be detected at the current time based on the target segmentation result; The preset target detection model is a model that has been pre-trained based on training images containing non-road-occupying targets. The preset target segmentation strategy includes a target segmentation strategy based on a Gaussian mixture model, and the detection result of the non-road-occupying target includes the detection box of the non-road-occupying target. The target segmentation unit is specifically used for: Determine the relative positional relationship between the pixels in the image to be detected at the current moment and the detection box of the non-road-occupying target; Based on the multiple Gaussian models corresponding to the pixel at the previous time step, and the relative positional relationship between the pixel in the image to be detected at the current time step and the detection box of the non-road-occupying target, the multiple Gaussian models corresponding to the pixel at the current time step are determined. Based on the relative positional relationship between the pixels in the image to be detected at the current moment and the detection box of the non-road-occupying target, and the multiple Gaussian models corresponding to the pixels at the current moment, the target segmentation result of the image to be detected at the current moment is determined. The multiple Gaussian models corresponding to the pixels at the current time are determined by employing different background modeling strategies.

9. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • A real-time detection method of track occupancy phenomenon based on digital image processing

    CN109359563A

  • Fire fighting access occupation self-adaptive detection method based on monitoring video

    CN112132043A