Vehicle abnormal drainage behavior detection method and device and computer equipment

Tracking vehicles through video surveillance, dividing water stain detection areas and using pre-trained models to detect water stains, solving the problem of low detection efficiency of abnormal drainage behavior of vehicles, achieving efficient and accurate detection, and reducing losses of shippers.

CN119131704AActive Publication Date: 2024-12-13SUZHOU YIJI INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411123121.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-13
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

In the prior art, the net weight value caused by abnormal drainage behavior before and after loading is low, causing losses to the shipper, and manual monitoring efficiency is low, making it easy to miss inspection or miss inspection, especially in the case of intensive vehicles.

Method used

Track the vehicle through video surveillance, determine the passing area, divide the water stain detection area, use pre-trained models to detect water stains, judge abnormal drainage behavior, and improve detection accuracy by accumulating frame information.

Benefits of technology

It improves the efficiency and accuracy of vehicle abnormal drainage behavior detection, reduces losses from the shipper, and enhances the supervision effect of overweight cheating during material shipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131704A_ABST
    Figure CN119131704A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle abnormal drainage behavior detection method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: performing target tracking on a vehicle based on a monitoring video of a target area; determining an external rectangular region of the detection frame region of the ith frame and the reserved region of the (i-1) th frame as a line region of the ith frame; judging whether the i-th frame passing area is intersected with the detection frame area or the passing area of other vehicles, if so, updating the image of the intersection area in the i-th frame candidate detection image according to the (i-1)-th frame to-be-detected image to obtain the i-th frame to-be-detected image; and performing water stain detection on the image of the target water stain detection area in the ith frame of to-be-detected image, and judging whether the vehicle has an abnormal drainage behavior or not according to a water stain detection result. By adopting the method, the efficiency and accuracy of detecting the abnormal drainage behavior of the vehicle can be improved, and the method is particularly suitable for an application scene with dense vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of visual intelligence technology, and in particular to a method, device, computer equipment, storage medium and computer program product for detecting abnormal drainage behavior of a vehicle. Background Art

[0002] Coal mining, metallurgy, building materials, grain and other industries usually use weighbridge systems to weigh and measure materials when shipping materials. Transport vehicles are weighed before loading to obtain the tare weight, and then weighed again after loading to obtain the gross weight. The difference between the two is the net weight, which will be used for order accounting. In actual applications, vehicles may drain a lot of water abnormally after the tare weight and before the gross weight, making the net weight used for order accounting much smaller than the actual net weight of the material, causing great losses to the shipper.

[0003] In the related art, in order to supervise such behavior, manual monitoring can be used to check whether the vehicle has abnormal drainage behavior between two weighings. However, it consumes a lot of manpower and has low inspection efficiency. Especially when the material shipping area is large and there are many transport vehicles, it is easy to miss or misdetect due to insufficient manpower or manual fatigue. Summary of the invention

[0004] Based on this, it is necessary to provide a vehicle abnormal drainage behavior detection method, device, computer equipment, computer readable storage medium and computer program product to address the above-mentioned technical problems, which can improve the efficiency and accuracy of detecting vehicle abnormal drainage behavior, and is particularly suitable for application scenarios with densely populated vehicles.

[0005] In a first aspect, the present application provides a method for detecting abnormal drainage behavior of a vehicle. The method comprises:

[0006] Based on the surveillance video of the target area, the vehicles entering the target area are tracked to obtain the detection frame area of ​​each vehicle in each detection video frame;

[0007] For each of the vehicles, the detection frame area of ​​the vehicle in the i-th detection video frame and the circumscribed rectangular area of ​​the i-th frame reserved area are determined as the i-th frame passing area of ​​the vehicle, and the video image of the i-th frame passing area of ​​the vehicle in the i-th detection video frame is used as the i-th frame candidate detection image of the vehicle; the i-th frame reserved area is the area in the i-th frame passing area of ​​the vehicle that has not been detected for water stains;

[0008] Determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame; if not, determine the i-th frame candidate detection image of the vehicle as the i-th frame to be detected image of the vehicle; if intersecting, update the image of the intersecting area in the i-th frame candidate detection image of the vehicle according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle;

[0009] Divide the area except the detection frame area in the i-th frame passing area of ​​the vehicle into a plurality of candidate water stain detection areas according to a preset area division strategy, and determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area;

[0010] Perform water stain detection on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle, and determine whether the vehicle has abnormal drainage behavior based on the water stain detection result.

[0011] In one embodiment, the area other than the detection frame area in the i-th frame passing area of ​​the vehicle is divided into a number of candidate water stain detection areas according to a preset area division strategy, including:

[0012] Extending each boundary line of the detection frame of the i-th frame of the vehicle until it intersects with the boundary line of the i-th frame passing area, to obtain a boundary line composed of the detection frame boundary line and its extension line;

[0013] A rectangular area that does not include the detection frame area among the rectangular areas enclosed by the dividing line and the boundary line of the i-th frame passing area is determined as a candidate water stain detection area.

[0014] In one embodiment, determining the candidate water stain detection area that meets the preset size condition as the target water stain detection area includes:

[0015] The region with the largest area is determined among the candidate water stain detection regions. If the area of ​​the region is greater than a preset threshold and the aspect ratio meets a preset requirement, the region is determined as the target water stain detection region.

[0016] In one embodiment, performing water stain detection on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle, and judging whether the vehicle has abnormal drainage behavior according to the water stain detection result, includes:

[0017] Using a pre-trained water stain detection model, a water stain detection is performed on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle to obtain a first detection result;

[0018] If the first detection result indicates that water stains are detected, water stain detection is performed on the image of the target water stain detection area in the i-th frame comparison image to obtain a second detection result; the i-th frame comparison image is a ground image before the vehicle passes through the target water stain detection area;

[0019] It is determined whether the vehicle has abnormal drainage behavior based on the first detection result and the second detection result.

[0020] In one of the embodiments, the i-th frame reference image is obtained by updating the image of the i-1-th frame reference image except the i-1-th frame reserved area according to the i-1-th frame detection video frame.

[0021] In one embodiment, judging whether the vehicle has abnormal drainage behavior according to the first detection result and the second detection result includes:

[0022] If the difference between the area of ​​the water stain detected in the second detection result and the area of ​​the water stain detected in the first detection result is greater than a preset threshold, it is determined that the vehicle has abnormal drainage behavior.

[0023] In one embodiment, performing water stain detection on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle, and judging whether the vehicle has abnormal drainage behavior according to the water stain detection result, includes:

[0024] Perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle, and if the detection result shows that the vehicle has drainage behavior, record the number of times the drainage behavior is detected;

[0025] When the number of times the drainage behavior of the vehicle is detected reaches a preset number, it is determined that the vehicle has abnormal drainage behavior.

[0026] In a second aspect, the present application also provides a vehicle abnormal drainage behavior detection device. The device comprises:

[0027] A tracking module is used to track vehicles entering the target area based on the surveillance video of the target area, and obtain the detection frame area of ​​each vehicle in each detection video frame;

[0028] The first determination module is used to determine, for each of the vehicles, a detection frame area of ​​the vehicle in the i-th detection video frame and a circumscribed rectangular area of ​​the i-th frame reserved area as the i-th frame passing area of ​​the vehicle, and use a video image of the i-th frame passing area of ​​the vehicle in the i-th detection video frame as the i-th frame candidate detection image of the vehicle; the i-th frame reserved area is an area in the i-th frame passing area of ​​the vehicle that has not been detected for water stains;

[0029] The second determination module is used to determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame. If they do not intersect, the i-th frame candidate detection image of the vehicle is determined as the i-th frame to be detected image of the vehicle. If they intersect, the image of the intersecting area in the i-th frame candidate detection image of the vehicle is updated according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle;

[0030] A third determination module is used to divide the area except the detection frame area in the i-th frame passing area of ​​the vehicle into a plurality of candidate water stain detection areas according to a preset area division strategy, and determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area;

[0031] The detection module is used to perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle, and determine whether the vehicle has abnormal drainage behavior based on the water stain detection result.

[0032] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0034] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0035] The above-mentioned vehicle abnormal drainage behavior detection method, device, computer equipment, storage medium and computer program product obtain the detection frame area of ​​each vehicle in each detection video frame by performing video monitoring and target tracking on the vehicles entering the target area, and then determine the circumscribed rectangular area of ​​the vehicle's i-th frame detection frame area and the i-1-th frame retained area as the vehicle's i-th frame passing area, and then determine whether the i-th frame passing area intersects with the detection frame area or passing area of ​​other vehicles. If intersecting, the image of the intersecting area in the i-th frame candidate detection image of the vehicle (obtained from the i-th frame detection video frame) is updated according to the i-1-th frame to be detected image of the vehicle as the i-th frame to be detected image of the vehicle, and then the image of the target water stain detection area in the i-th frame to be detected image of the vehicle is subjected to water stain detection to determine whether the vehicle has abnormal drainage behavior.

[0036] Among them, the target water stain detection area is the area in the vehicle's passing area except the detection frame area and meets the preset size conditions. Correspondingly, the area that has not yet been detected for water stains is accumulated as a reserved area to the passing area of ​​the subsequent frame, so that water stain detection can be performed when the detection requirements are met, thereby improving the accuracy of water stain detection results and vehicle abnormal drainage behavior detection results. In addition, when the vehicles in the target area are densely populated, the passing area of ​​a vehicle in a certain frame may intersect with other vehicles. The pixels in the intersecting area are updated and accumulated through the historical frame image to be detected, and the non-intersecting area uses the pixels of the current frame video image, which can further improve the accuracy of the detection results. Therefore, compared with the manual supervision method, this solution can improve the efficiency and accuracy of detecting abnormal drainage behavior of vehicles, thereby improving the supervision effect of weighing cheating in the material shipment process and reducing the loss of the shipper. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a flow chart of a method for detecting abnormal drainage behavior of a vehicle in one embodiment;

[0038] Figure 2a A schematic diagram of a travel area in an example;

[0039] Figure 2b A schematic diagram of the division of a candidate water stain detection area in an example;

[0040] Figure 3 is a structural block diagram of a vehicle abnormal drainage behavior detection device in one embodiment;

[0041] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] In one embodiment, Figure 1 As shown, a method for detecting abnormal drainage behavior of a vehicle is provided. This embodiment takes the method applied to a server as an example for illustration. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0044] Step 101 , based on the surveillance video of the target area, target tracking is performed on vehicles entering the target area to obtain a detection frame area of ​​each vehicle in each detection video frame.

[0045] In implementation, surveillance cameras (which may be monocular cameras such as gun cameras and ball cameras, or multi-camera cameras such as array cameras) can be set up in material shipping areas (such as coal yards, mines, etc.) to shoot surveillance videos. The target area refers to the area where abnormal drainage behavior detection is required, and may be all or part of the material shipping area. For example, after a transport vehicle is weighed at a picoscale node in the material shipping area, it drives to the material loading area, and then drives to a gross scale node for weighing. All areas that may be passed through are designated as target areas, and the vehicle may implement abnormal drainage in this area to achieve the purpose of cheating in weighing. It is understandable that if the shooting range of the surveillance video is larger than the target area where drainage detection is required, it is possible to determine whether the vehicle has entered the target area based on the position of the vehicle's detection frame.

[0046] The server can use target detection and tracking technology to detect and track vehicles for each frame of the surveillance video or the video images of several frames at intervals (that is, the detection video frames can be adjacent video frames or interval video frames), and obtain the position of each transport vehicle in each detection video frame, usually the coordinate information of the rectangular detection frame. Among them, the target tracking technology can first use the yolov8 neural network model, input a frame of surveillance video image into the detection model for processing, and the model will output the detection frame coordinates of each transport vehicle (such as a truck) detected in the image. The vehicle detection model can be pre-trained with a data set containing trucks so that the position of the truck in the image can be identified. Then the ByteTrack multi-target tracking model can be used. ByteTrack uses the similarity between the detection frame and the tracking trajectory to remove the background from the low-score detection results while retaining the high-score detection results, and dig out the real objects (difficult samples such as occlusion and blur), thereby reducing missed detection and improving the coherence of the trajectory.

[0047] Step 102, for each vehicle, the detection frame area of ​​the vehicle in the i-th frame detection video frame and the circumscribed rectangular area of ​​the i-th frame retained area are determined as the i-th frame passing area of ​​the vehicle, and the video image of the i-th frame passing area of ​​the vehicle in the i-th frame detection video frame is used as the i-th frame candidate detection image of the vehicle.

[0048] In implementation, if a vehicle has abnormal drainage behavior in the target area, water stains can be detected in the area it passes through, so the server can detect water stains in the area (area it passes through) of each vehicle in each frame of the video frame to determine whether each vehicle in the target area has abnormal drainage behavior. Since vehicles usually do not travel in a straight line in the target area, especially in order to evacuate traffic and increase the utilization rate of regional space, the layout of nodes can be used to allow vehicles to turn during driving to extend the driving path. Therefore, this solution uses the detection frame of the vehicle's current frame (such as the i frame) and the reserved area of ​​the previous frame (such as the i-1 frame) as the detection box of the vehicle's current frame (such as the i-1 frame) The bounding rectangle area (which can be the minimum bounding rectangle area or the area that is magnified by a preset multiple of the minimum bounding rectangle area) is used as the passing area to be detected in the current frame, which can cover as many areas as possible that the vehicle may pass through to avoid missed detection. In addition, when there are many vehicles in the target area, in order to reduce the interference of occlusion from other transport vehicles and to accurately match the detected water stains with the vehicles, this solution accumulates the reserved area in the previous frame's passing area and the current frame's detection frame area as the current frame's passing area for drainage behavior detection, rather than accumulating all areas that the vehicle has passed through in the target area and then performing foreign object detection uniformly, so as to improve detection accuracy.

[0049] The reserved area refers to the area where the vehicle has not been detected for water stains in the previous frame. Since the passing area includes the detection frame area of ​​the vehicle in the frame image, and the detection frame area is blocked by the vehicle, it is impossible to detect whether the vehicle is draining water in the detection frame area based on the current frame video image, so the area is reserved for detection in subsequent frames of video images. In addition, in order to improve the detection accuracy, the server can only perform water stain detection on local areas (candidate water stain detection areas) that meet certain size conditions in the current frame, so the passing area that has not been detected for water stains can be reserved, so that accurate water stain detection can be performed after accumulating through multiple frames (the vehicle has been driving for a period of time) until the conditions are met.

[0050] After determining the i-th frame passing area of ​​each vehicle, the server can obtain an image of the area from the i-th frame detection video frame as the i-th frame candidate detection image of the corresponding vehicle.

[0051] Step 103, determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame. If they do not intersect, the i-th frame candidate detection image of the vehicle is determined as the i-th frame to be detected image of the vehicle. If they intersect, the image of the intersecting area in the i-th frame candidate detection image of the vehicle is updated according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle.

[0052] In implementation, when the transport vehicles in the material shipping area are densely populated and the distances between adjacent vehicles are close, when the reserved area for the vehicle (which may include part of the travel area of ​​multiple historical frames) is accumulated to the current frame, this part of the area may be blocked by other vehicles, or this part of the area will intersect with the travel area of ​​other vehicles, wherein the blocked part of the ground in the intersecting area cannot be detected for water stains. If the water stain detection continues to be accumulated to subsequent frames, it will be difficult to determine which vehicle discharged the water stains contained therein, and it is also difficult to match the detected water stains with the vehicle in the unblocked part, which will affect the accuracy of the detection result.

[0053] Therefore, in this solution, the server can determine whether the vehicle's i-th frame passing area intersects with the detection frame area of ​​other vehicles in the i-th frame detection video frame (or determine whether it intersects with the i-th frame passing area of ​​other vehicles). If not, the i-th frame candidate detection image of the vehicle is determined as the i-th frame to be detected image of the vehicle. If intersecting, the image of the intersection area in the i-th frame candidate detection image of the vehicle is updated according to the i-1-th frame to be detected image of the vehicle, so as to replace the image of the intersection area in the i-th frame candidate detection image with a frame image or a fusion image of multiple frames of historical frames when the vehicle passes through the intersection area in the historical frame and other vehicles have not passed (which will be included in the reserved area of ​​one or more historical frames), and obtain the i-th frame to be detected image of the vehicle, that is, in the current frame to be detected image, the image of the non-intersecting area is the latest image of the current frame detection video frame, and the image of the intersection area is accumulated by the pixels that are not blocked or intersected in the historical frame. It should be noted that the server may only determine whether the detection frame areas intersect, or only determine whether the i-th frame passing area intersects, and select one of the two as the judgment criterion.

[0054] Step 104 , the area except the detection frame area in the i-th frame passing area of ​​the vehicle is divided into a number of candidate water stain detection areas according to a preset area division strategy, and the candidate water stain detection area that meets the preset size condition is determined as the target water stain detection area.

[0055] Step 105 , performing water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle, and judging whether the vehicle has abnormal drainage behavior according to the water stain detection result.

[0056] In implementation, a target detection algorithm and sample images containing water stains can be used to train a water stain detection model in advance for water stain detection. Since the input image of the water stain detection model is required to be a rectangular image and has certain requirements on the size, if the resolution of the detection area is too low or the difference between the width and height is large (the aspect ratio is too large or too small, usually the aspect ratio needs to meet 3:1 or 4:1), it will affect the model detection results. Therefore, in order to improve the accuracy of water stain detection, this solution divides the area except the detection frame area in the passing area into several candidate water stain detection areas, and determines the candidate water stain detection area that meets the preset size conditions as the target water stain detection area, and then performs water stain detection on the image of the target water stain detection area in the image to be detected, so as to judge whether the vehicle has abnormal drainage behavior according to the water stain detection result. If water stains are detected and the water stain area is larger than the preset threshold, it can be judged that the vehicle has abnormal drainage behavior.

[0057] In one implementation method, the boundary lines of the i-th frame detection frame of the vehicle can be extended to intersect with the boundary lines of the i-th frame passing area, so as to obtain a dividing line composed of the detection frame boundary lines and their extended lines, and then the rectangular areas not containing the detection frame areas among the rectangular areas enclosed by the dividing lines and the boundary lines of the i-th frame passing area are determined as candidate water stain detection areas.

[0058] For example, Figure 2a As shown in the figure, D i is the detection box area of ​​a vehicle in the i-th frame of the video frame, M i-1 is the reserved area of ​​the i-1th frame, and the blue rectangle is the circumscribed rectangular area of ​​the two, which is the passing area of ​​the i-th frame. i The boundaries of M i-1 The boundary lines of i The area outside is divided into several candidate water stain detection areas, such as Figure 2b As shown, in this example, there are two candidate water stain detection areas, namely (S1+S2) and (S2+S3). Then, the server can determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area. The preset size condition can be that the area is greater than the preset threshold and the aspect ratio meets the preset requirement. If there is more than one candidate area that meets the size condition, the candidate area with the largest area is selected as the target water stain detection area to improve the detection efficiency. In this example, (S1+S2) can be determined as the target water stain detection area. Accordingly, (D i +S3) will be accumulated as the i-th frame reserved area to the next frame.

[0059] In one embodiment, since water stains may already exist in a certain area before the vehicle passes through the area, in order to improve the detection effect, when water stains are detected in the area after the vehicle passes through, the water stain detection result of the area before the vehicle passes through can be compared. Therefore, the process of judging whether the vehicle has abnormal drainage behavior in step 105 can specifically include: using a pre-trained water stain detection model to perform water stain detection on the image of the target water stain detection area in the i-th frame of the vehicle to be detected, and obtaining a first detection result; if the first detection result indicates that water stains are detected, then performing water stain detection on the image of the target water stain detection area in the i-th frame of the comparison image, and obtaining a second detection result; the i-th frame of the comparison image is the ground image before the vehicle passes through the target water stain detection area; judging whether the vehicle has abnormal drainage behavior according to the first detection result and the second detection result.

[0060] In implementation, the server may input the image of the target water stain detection area in the i-th frame of the image to be detected into the water stain detection model for water stain detection to obtain a first detection result. If the first detection result is that no water stain is detected, it can be determined that the vehicle currently does not have abnormal drainage behavior, and monitoring and detection can continue. If the first detection result indicates that water stains are detected, that is, there are water stains on the ground where the vehicle passes, then the control image of the target water stain detection area is detected. The control image can reflect the ground conditions before the vehicle passes through the area. For example, the i-th frame control image can be obtained by updating the image of the i-1 frame control image except the i-1 frame reserved area according to the i-1 frame detection video frame. It can be understood that for the video frame in which the vehicle is detected in the target area for the first time, it can be recorded as the first frame, and the video image of the target area taken by the previous frame of the video frame (at this time, there is no vehicle occlusion, which can reflect the ground conditions before the vehicle enters the target area) can be used as the first frame control image. For the control images of subsequent frames, the pixels in the reserved area of ​​each vehicle in the previous frame control image can be retained, and the remaining pixels use the corresponding pixels in the current frame video image. The comparison image can cover the entire target area, so that each vehicle can use the same comparison image and select its corresponding target detection area image for detection and comparison.

[0061] If no foreign matter is detected in the control image, or the size of the detected water stain (such as the size of the detection frame or the area of ​​the segmented area) is smaller than the size of the water stain in the current frame of the image to be detected (such as the difference in the area of ​​the water stain area is greater than the preset threshold), that is, the vehicle has additional water stains after passing through the area, then it can be determined that the vehicle currently has abnormal drainage behavior. The server can capture the image of the transport vehicle from the current frame of the monitoring video image and issue an alarm message to facilitate the supervision of weighing cheating.

[0062] Furthermore, in order to improve the accuracy of abnormal drainage behavior detection results, when a vehicle is detected to have drainage behavior in a certain frame, the number of times the vehicle's drainage behavior is detected can be recorded, and the vehicle can continue to be monitored and the number of times the drainage behavior is detected can be accumulated. When the number of times the vehicle's drainage behavior is detected reaches a preset number, it is judged that the vehicle has abnormal drainage behavior and an alarm is issued.

[0063] In the above-mentioned vehicle abnormal drainage behavior detection method, by performing video monitoring and target tracking on vehicles entering the target area, the detection frame area of ​​each vehicle in each detection video frame is obtained, and then the circumscribed rectangular area of ​​the vehicle's i-th frame detection frame area and the i-1-th frame reserved area is determined as the vehicle's i-th frame passing area, and then it is determined whether the i-th frame passing area intersects with the detection frame area or the passing area of ​​other vehicles. If it intersects, the image of the intersection area in the i-th frame candidate detection image of the vehicle (obtained from the i-th frame detection video frame) is updated according to the i-1-th frame to be detected image of the vehicle, as the i-th frame to be detected image of the vehicle, and then the image of the target water stain detection area in the i-th frame to be detected image of the vehicle is subjected to water stain detection to determine whether the vehicle has abnormal drainage behavior. Among them, the target water stain detection area is an area in the passing area except the detection frame area and meets the preset size condition. Correspondingly, the area that has not been subjected to water stain detection is accumulated as a reserved area to the passing area of ​​the subsequent frame, so that water stain detection is performed when the detection requirements are met, thereby improving the accuracy of the water stain detection results and the vehicle abnormal drainage behavior detection results. In addition, when the vehicles in the target area are dense, the area where a vehicle passes through in a certain frame may intersect with other vehicles. The pixels in the intersecting area are updated and accumulated by the historical frame image to be detected, while the non-intersecting area uses the pixels of the current frame video image, which can further improve the accuracy of the detection results. Therefore, compared with the manual supervision method, this solution can improve the efficiency and accuracy of detecting abnormal drainage behavior of vehicles, thereby improving the supervision effect of weighing cheating in the material shipment process and reducing the loss of the shipper.

[0064] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0065] Based on the same inventive concept, the embodiment of the present application also provides a vehicle abnormal drainage behavior detection device for implementing the vehicle abnormal drainage behavior detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more vehicle abnormal drainage behavior detection device embodiments provided below can refer to the above limitations on the vehicle abnormal drainage behavior detection method, and will not be repeated here.

[0066] In one embodiment, Figure 3 As shown, a vehicle abnormal drainage behavior detection device 300 is provided, comprising: a tracking module 301, a first determination module 302, a second determination module 303, a third determination module 304 and a detection module 305, wherein:

[0067] The tracking module 301 is used to track the vehicles entering the target area based on the monitoring video of the target area, and obtain the detection frame area of ​​each vehicle in each detection video frame.

[0068] The first determination module 302 is used to determine, for each of the vehicles, a detection frame area of ​​the vehicle in the i-th frame detection video frame and an circumscribed rectangular area of ​​the i-th frame retained area as the i-th frame passing area of ​​the vehicle, and use the video image of the i-th frame passing area of ​​the vehicle in the i-th frame detection video frame as the i-th frame candidate detection image of the vehicle; the i-th frame retained area is an area in the i-1-th frame passing area of ​​the vehicle that has not been detected for water stains.

[0069] The second determination module 303 is used to determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame. If they do not intersect, the i-th frame candidate detection image of the vehicle is determined as the i-th frame to be detected image of the vehicle. If they intersect, the image of the intersecting area in the i-th frame candidate detection image of the vehicle is updated according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle.

[0070] The third determination module 304 is used to divide the area except the detection frame area in the i-th frame passing area of ​​the vehicle into a number of candidate water stain detection areas according to a preset area division strategy, and determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area.

[0071] The detection module 305 is used to perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle, and determine whether the vehicle has abnormal drainage behavior according to the water stain detection result.

[0072] In one embodiment, the third determination module 304 is specifically used to extend each boundary line of the i-th frame detection frame of the vehicle to intersect with the boundary line of the i-th frame passing area, and obtain a dividing line composed of the detection frame boundary line and its extension line; and determine the rectangular area that does not include the detection frame area among the rectangular areas enclosed by the dividing line and the boundary line of the i-th frame passing area as a candidate water stain detection area.

[0073] In one embodiment, the third determination module 304 is further used to determine the largest area in each of the candidate water stain detection areas, and if the area of ​​the area is greater than a preset threshold and the aspect ratio meets a preset requirement, the area is determined as the target water stain detection area.

[0074] In one embodiment, the detection module 305 is also used to use a pre-trained water stain detection model to perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle to obtain a first detection result; if the first detection result indicates that water stains are detected, then water stain detection is performed on the image of the target water stain detection area in the i-th frame of the control image to obtain a second detection result; the i-th frame of the control image is a ground image before the vehicle passes through the target water stain detection area; and based on the first detection result and the second detection result, it is determined whether the vehicle has abnormal drainage behavior.

[0075] In one embodiment, the i-th frame reference image is obtained by updating the image of the i-1-th frame reference image except the i-1-th frame reserved area according to the i-1-th frame detection video frame.

[0076] In one embodiment, the detection module 305 is further configured to determine that the vehicle has abnormal drainage behavior if the difference between the area of ​​the water stain detected in the second detection result and the area of ​​the water stain detected in the first detection result is greater than a preset threshold.

[0077] In one embodiment, the detection module 305 is also used to perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle. If the detection result indicates that the vehicle has drainage behavior, the number of times the drainage behavior is detected is recorded; when the number of times the drainage behavior of the vehicle is detected reaches a preset number, it is determined that the vehicle has abnormal drainage behavior.

[0078] Each module in the above-mentioned vehicle abnormal drainage behavior detection device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0079] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data required or generated for executing the above-mentioned vehicle abnormal drainage behavior detection method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a vehicle abnormal drainage behavior detection method is implemented.

[0080] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0081] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0082] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0083] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0084] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0085] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.

[0086] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0087] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for detecting abnormal drainage behavior of a vehicle, It is characterized in that The method comprises: Based on the surveillance video of the target area, the vehicles entering the target area are tracked to obtain the detection frame area of ​​each vehicle in each detection video frame; For each of the vehicles, the detection frame area of ​​the vehicle in the i-th detection video frame and the circumscribed rectangular area of ​​the i-th frame reserved area are determined as the i-th frame passing area of ​​the vehicle, and the video image of the i-th frame passing area of ​​the vehicle in the i-th detection video frame is used as the i-th frame candidate detection image of the vehicle; the i-th frame reserved area is the area in the i-th frame passing area of ​​the vehicle that has not been detected for water stains; Determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame; if not, determine the i-th frame candidate detection image of the vehicle as the i-th frame to be detected image of the vehicle; if intersecting, update the image of the intersecting area in the i-th frame candidate detection image of the vehicle according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle; Divide the area except the detection frame area in the i-th frame passing area of ​​the vehicle into a plurality of candidate water stain detection areas according to a preset area division strategy, and determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area; Perform water stain detection on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle, and determine whether the vehicle has abnormal drainage behavior based on the water stain detection result.

2. The method according to claim 1, It is characterized in that The area except the detection frame area in the i-th frame passing area of ​​the vehicle is divided into a number of candidate water stain detection areas according to a preset area division strategy, including: Extending each boundary line of the detection frame of the i-th frame of the vehicle until it intersects with the boundary line of the i-th frame passing area, to obtain a boundary line composed of the detection frame boundary line and its extension line; A rectangular area that does not include the detection frame area among the rectangular areas enclosed by the dividing line and the boundary line of the i-th frame passing area is determined as a candidate water stain detection area.

3. The method according to claim 1, It is characterized in that The step of determining the candidate water stain detection area that meets the preset size condition as the target water stain detection area includes: The region with the largest area is determined among the candidate water stain detection regions. If the area of ​​the region is greater than a preset threshold and the aspect ratio meets a preset requirement, the region is determined as the target water stain detection region.

4. The method according to claim 1, It is characterized in that The step of performing water stain detection on an image of a target water stain detection area in the i-th frame of the image to be detected of the vehicle, and judging whether the vehicle has abnormal drainage behavior according to the water stain detection result, includes: Using a pre-trained water stain detection model, a water stain detection is performed on an image of a target water stain detection area in an i-th frame of the image to be detected of the vehicle to obtain a first detection result; If the first detection result indicates that water stains are detected, water stain detection is performed on the image of the target water stain detection area in the i-th frame comparison image to obtain a second detection result; the i-th frame comparison image is a ground image before the vehicle passes through the target water stain detection area; It is determined whether the vehicle has abnormal drainage behavior based on the first detection result and the second detection result.

5. The method according to claim 4, It is characterized in that The i-th frame comparison image is obtained by updating the image of the i-1-th frame comparison image except the i-1-th frame reserved area according to the i-1-th frame detection video frame.

6. The method according to claim 4, It is characterized in that The determining whether the vehicle has abnormal drainage behavior according to the first detection result and the second detection result includes: If the difference between the area of ​​the water stain detected in the second detection result and the area of ​​the water stain detected in the first detection result is greater than a preset threshold, it is determined that the vehicle has abnormal drainage behavior.

7. The method according to claim 1, It is characterized in that The step of performing water stain detection on an image of a target water stain detection area in the i-th frame of the image to be detected of the vehicle, and judging whether the vehicle has abnormal drainage behavior according to the water stain detection result, includes: Performing water stain detection on an image of a target water stain detection area in the i-th frame of the image to be detected of the vehicle, and if the detection result indicates that the vehicle has drainage behavior, recording the number of times the drainage behavior is detected; When the number of times the drainage behavior of the vehicle is detected reaches a preset number, it is determined that the vehicle has abnormal drainage behavior.

8. A vehicle abnormal drainage behavior detection device, It is characterized in that The device comprises: A tracking module is used to track vehicles entering the target area based on the surveillance video of the target area, and obtain the detection frame area of ​​each vehicle in each detection video frame; The first determination module is used to determine, for each of the vehicles, a detection frame area of ​​the vehicle in the i-th detection video frame and a circumscribed rectangular area of ​​the i-th frame reserved area as the i-th frame passing area of ​​the vehicle, and use a video image of the i-th frame passing area of ​​the vehicle in the i-th detection video frame as the i-th frame candidate detection image of the vehicle; the i-th frame reserved area is an area in the i-th frame passing area of ​​the vehicle that has not been detected for water stains; The second determination module is used to determine whether the i-th frame passing area of ​​the vehicle intersects with the detection frame area or the i-th frame passing area of ​​other vehicles in the i-th frame detection video frame. If they do not intersect, the i-th frame candidate detection image of the vehicle is determined as the i-th frame to be detected image of the vehicle. If they intersect, the image of the intersecting area in the i-th frame candidate detection image of the vehicle is updated according to the i-1-th frame to be detected image of the vehicle to obtain the i-th frame to be detected image of the vehicle; A third determination module is used to divide the area except the detection frame area in the i-th frame passing area of ​​the vehicle into a plurality of candidate water stain detection areas according to a preset area division strategy, and determine the candidate water stain detection area that meets the preset size condition as the target water stain detection area; The detection module is used to perform water stain detection on the image of the target water stain detection area in the i-th frame of the image to be detected of the vehicle, and determine whether the vehicle has abnormal drainage behavior based on the water stain detection result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Deep learning-based one-way lane vehicle converse driving detection method, system and equipment

    CN114898326A

  • Water quality detection method and device for water outlet, computer equipment and storage medium

    CN115980050A

  • Method and device for detecting foreign matter discharging behaviors during vehicle weighing and computer equipment

    CN118840686A

  • System for computationally efficient analysis of traffic details in traffic video stream and a method thereof

    US20210103735A1

  • Method and apparatus for detecting security check anomaly event, electronic device, and storage medium

    WO2022160569A1