Method and device for detecting foreign matter discharging behaviors during vehicle weighing and computer equipment
By detecting and tracking the location of the vehicle through surveillance video, and using the current frame and historical frame images for foreign object detection, it solves the problem of low efficiency of manual monitoring, improves the detection efficiency and accuracy of vehicle weighing and emission of foreign objects, and reduces the loss of the shipper. .
Patent Information
- Application Number
- CN202410866980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-01
AI Technical Summary
In the existing technology, manual monitoring of vehicles weighing and discharging foreign matter is inefficient and can easily lead to missed detection or misdetection. Especially when the material delivery area is large and there are many vehicles, it is difficult to effectively supervise, resulting in losses for the shipper.
By obtaining surveillance video of the material shipping area, we can detect and track the location of transport vehicles, use current frame and historical frame images to detect foreign objects, determine whether the vehicle has weighed and discharged foreign objects, and improved detection efficiency and accuracy.
It improves the detection efficiency and accuracy of vehicle weighing and emission of foreign matter, enhances the monitoring effect of weighing cheating during material shipping, and reduces the loss of the shipper.
Smart Images

Figure CN118840686A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment, storage medium and computer program product for detecting the behavior of vehicles discharging foreign objects during weighing. Background Art
[0002] When shipping materials in industries such as coal mining, metallurgy, building materials, and grain, a weighbridge system is usually used for weighing and measuring. The transport vehicle is 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.
[0003] Since there is usually a certain distance between the weighbridge and the loading location, in actual applications, there are cheating methods such as adding water to the water tank or hiding heavy objects such as stones before the vehicle passes the tare weight, and draining or discharging other hidden heavy objects before passing the gross weight to affect the net weight value, causing losses to the shipper. In related technologies, in order to supervise such cheating behaviors, manual monitoring can be used to check whether the vehicle has discharged foreign objects between two weighings. However, this 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 method, device, computer equipment, computer-readable storage medium and computer program product for detecting the behavior of vehicles emitting foreign objects during weighing in order to solve the above-mentioned technical problems, which can improve the efficiency and accuracy of detecting the behavior of vehicles emitting foreign objects during weighing, thereby improving the supervision effect of weighing cheating in the material shipment process and reducing the losses of the shipper.
[0005] In a first aspect, the present application provides a method for detecting the behavior of a vehicle discharging foreign matter during weighing. The method comprises:
[0006] Obtain surveillance video of the material shipping area, and perform vehicle detection and tracking on the surveillance video to obtain the position of the transport vehicle in each frame of the surveillance video image;
[0007] When the transport vehicle enters the foreign object detection area, the circumscribed rectangular area of the current frame detection frame area and the historical frame retention area of the transport vehicle in the current frame monitoring video image is determined as the current frame passing area of the transport vehicle; the historical frame retention area is the intersection area of the historical frame detection frame area and the foreign object detection area or the area in the historical frame passing area where foreign object detection is not performed;
[0008] Performing a first foreign object detection on a current frame image of a target area in the current frame passing area to obtain a first foreign object detection result, and if the first foreign object detection result indicates that a target foreign object is detected, performing a second foreign object detection on a current frame control image of the target area to obtain a second foreign object detection result;
[0009] It is determined whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
[0010] In one of the embodiments, performing a first foreign object detection on a current frame image of a target area in a current frame passing area to obtain a first foreign object detection result includes:
[0011] Determine the area of the current frame passing area other than the current frame detection frame area as the target area;
[0012] A first foreign body detection is performed on the current frame image of the target area to obtain a first foreign body detection result.
[0013] In one of the embodiments, performing a first foreign object detection on a current frame image of a target area in a current frame passing area to obtain a first foreign object detection result includes:
[0014] Divide the area of the current frame passing area except the current frame detection frame area into a plurality of peripheral sub-areas according to the boundary lines of the detection frame, and determine the peripheral sub-areas that meet the preset resolution requirements in each of the peripheral sub-areas as the target area;
[0015] A first foreign body detection is performed on the current frame image of the target area to obtain a first foreign body detection result.
[0016] In one of the embodiments, determining the surrounding sub-region that meets the preset resolution requirement among the surrounding sub-regions as the target region includes:
[0017] Determine the region with the largest area among the peripheral sub-regions as a candidate region;
[0018] If the area of the candidate region is greater than a preset threshold and the aspect ratio meets a preset requirement, the candidate region is determined as a target region.
[0019] In one embodiment, performing a second foreign body detection on the current frame control image of the target area to obtain a second foreign body detection result includes:
[0020] According to the historical frame monitoring video image, the image of the area other than the historical frame reserved area in the historical frame comparison image of the foreign object detection area is updated to obtain the current frame comparison image of the foreign object detection area;
[0021] An image of the target area is intercepted from the current frame comparison image of the foreign object detection area to perform a second foreign object detection to obtain a second foreign object detection result.
[0022] In one embodiment, judging whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result includes:
[0023] If the second foreign object detection result indicates that the target foreign object is not detected, or the target foreign object is detected and the size of the target foreign object is smaller than the size of the target foreign object in the first foreign object detection result, it is determined that the transport vehicle has over-weighed and discharged foreign objects.
[0024] In one embodiment, the method further comprises:
[0025] When it is determined that the transport vehicle has discharged foreign objects after being weighed, an image of the transport vehicle is captured from the current frame monitoring video image, and an alarm message is issued.
[0026] In a second aspect, the present application also provides a device for detecting the behavior of a vehicle discharging foreign matter during weighing. The device comprises:
[0027] The tracking module is used to obtain the surveillance video of the material delivery area, and perform vehicle detection and tracking on the surveillance video to obtain the position of the transport vehicle in each frame of the surveillance video image;
[0028] A determination module, used for determining, when the transport vehicle enters the foreign object detection area, a circumscribed rectangular area of a current frame detection frame area and a historical frame retention area of the transport vehicle in a current frame monitoring video image as a current frame passing area of the transport vehicle;
[0029] A detection module, configured to perform a first foreign object detection on a current frame image of a target area in the current frame passing area to obtain a first foreign object detection result, and if the first foreign object detection result indicates that a target foreign object is detected, perform a second foreign object detection on a current frame control image of the target area to obtain a second foreign object detection result;
[0030] A judgment module is used to judge whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] The above-mentioned detection method, device, computer equipment, storage medium and computer program product for the behavior of vehicles discharging foreign objects during weighing are used to detect and track vehicles through the monitoring video of the material shipping area, identify the position of each transport vehicle, and when the transport vehicle enters the foreign object detection area, determine the current frame detection frame area of the transport vehicle and the circumscribed rectangular area of the historical frame retention area as the current frame passing area of the transport vehicle, and then perform foreign object detection on the current frame image of the passing area. If foreign objects are detected, the foreign object detection result is compared with the current frame comparison image of the passing area. Among them, the historical frame retention area is the intersection area of the historical frame detection frame area and the foreign object detection area or the area in the historical frame passing area where foreign object detection is not performed. The circumscribed rectangular area of the current frame detection frame area and the historical frame retention area can cover the area where the transport vehicle passes, and the comparison image of the passing area is obtained based on the historical frame monitoring video image, which can reflect the ground conditions before the transport vehicle passes through the area. If there are foreign objects on the ground after the transport vehicle passes through the area, and there are no foreign objects or only a smaller amount of foreign objects on the ground before passing, it can be judged that the transport vehicle has the behavior of discharging foreign objects during weighing. Compared with manual supervision, this solution can improve the efficiency and accuracy of detecting the emission of foreign objects during vehicle weighing, thereby improving the supervision effect of weighing cheating during material shipment and reducing the loss of the shipper. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a method for detecting the behavior of foreign matter discharged from a vehicle during weighing in one embodiment;
[0036] Figure 2a This is a schematic diagram of the material shipping area in an example;
[0037] Figure 2b A schematic diagram of a travel area in an example;
[0038] Figure 2c is a schematic diagram of the target area in an example;
[0039] Figure 2d is a schematic diagram of a peripheral sub-region in an example;
[0040] Figure 3It is a structural block diagram of a device for detecting the behavior of foreign matter discharge during vehicle weighing 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 the behavior of foreign matter discharged by a vehicle during weighing is provided, and the method can be applied to computer equipment such as a server, and includes the following steps:
[0044] Step 102, acquiring surveillance video of the material shipping area, and performing vehicle detection and tracking on the surveillance video to obtain the position of the transport vehicle in each frame of the surveillance video image.
[0045] In implementation, surveillance cameras (which can be monocular cameras such as gun 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 server can use target detection and tracking technology to detect and track vehicles for each frame of the surveillance video or a few frames of video images, and obtain the position of each transport vehicle in each frame of the video image, usually the coordinate information of a rectangular detection frame. Among them, the target detection technology can 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. The tracking technology can use the ByteTrack multi-target tracking model. 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.
[0046] Step 104, when the transport vehicle enters the foreign object detection area, the circumscribed rectangular area of the current frame detection frame area and the historical frame retention area of the transport vehicle in the current frame monitoring video image is determined as the current frame passing area of the transport vehicle.
[0047] Among them, after the transport vehicle is weighed at the pico scale node in the material shipping area, it drives to the material loading area and then drives to the gross scale node for weighing. All areas that may be passed through can be designated as foreign object detection areas. The vehicle may discharge foreign objects in this area to cheat on weighing. Figure 2a As shown, the foreign body detection area consists of two parts. It can be understood that Figure 2a The layout of the nodes is for illustration only. Usually, vehicles do not travel in a straight line in the foreign object detection area. In order to disperse traffic and increase the utilization rate of regional space, the layout of the nodes can be used to allow vehicles to turn during driving and extend the driving path.
[0048] The server can determine whether the transport vehicle has entered the foreign object detection area based on the position information of the transport vehicle in the video image and the position information of the foreign object detection area. If the vehicle detection frame intersects with the foreign object detection area, it can be determined that the transport vehicle has entered the foreign object detection area. For the current frame monitoring video image, its corresponding historical frame monitoring video image refers to the video image of the previous frame for vehicle detection and tracking (depending on the number of interval frames of vehicle detection). For ease of description, the historical frame monitoring video image in this embodiment refers to the previous frame monitoring video image, and accordingly, the historical frame reserved area is the intersection area of the detection frame area of the transport vehicle in the previous frame monitoring video image and the foreign object detection area (if the vehicle completely enters the foreign object detection area, the intersection area is the detection frame area, if it partially enters the foreign object detection area, the intersection area is the partial detection frame area), or the area in the travel area of the previous frame monitoring video image where no foreign object detection is performed, which at least includes the intersection area of the detection frame area of the transport vehicle in the previous frame and the foreign object detection area.
[0049] 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 discharges foreign objects in the detection frame area based on the current frame video image, so the area is reserved for detection in subsequent frame video images. In addition, in order to improve the detection accuracy, the server can only perform foreign object detection on the local passing area that meets certain conditions in the current frame (see below for details, no further description here), so the passing area that has not been detected for foreign objects can be retained, so that accurate foreign object detection can be performed after accumulating through multiple frames (the vehicle has been driving for a period of time) until the conditions are met. As mentioned above, vehicles usually do not travel in a straight line, so using the circumscribed rectangular area of the detection frame and the reserved area as the passing area can cover the area where the vehicle may travel through and avoid missed detection. Since there may be multiple transport vehicles, in order to avoid obstruction and interference from other transport vehicles and to accurately match the detected foreign objects 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 foreign object detection, rather than accumulating all areas that the vehicle has passed through in the foreign object detection area and then performing foreign object detection uniformly. Therefore, this solution has higher detection accuracy.
[0050] Step 106, performing a first foreign object detection on the current frame image of the target area in the current frame passing area to obtain a first foreign object detection result. If the first foreign object detection result indicates that the target foreign object is detected, performing a second foreign object detection on the current frame control image of the target area to obtain a second foreign object detection result.
[0051] Among them, the target area can be the entire area or part of the area in the current frame. For example, the image of the area where the current frame passes can be intercepted from the current frame surveillance video image and input into the pre-trained foreign body detection model for foreign body detection. If the target foreign body is detected, the image of the target area can be intercepted from the current frame control image of the foreign body detection area for foreign body detection, and then the foreign body detection results of the two can be compared. The foreign body detection model can adopt the yolov8 neural network model. The foreign body can be water stains, stones or other objects. The corresponding foreign body detection model can be trained in advance using sample images containing relevant foreign bodies. It can be understood that if the target area is the entire area, the reserved area of the current frame (as the historical frame reserved area corresponding to the next frame) is the intersection area of the current frame detection frame area and the foreign body detection area.
[0052] The current frame comparison image of the foreign object detection area can reflect the ground conditions before the transport vehicle passes through the area, and can be obtained based on the historical frame video image before the current frame, for example, it can be the previous frame video image, or it can be a superposition of multiple historical frame video images. Specifically, for the first frame video image in which the vehicle is detected to enter the foreign object detection area, its comparison image can be the previous frame video image before the vehicle enters the area. It can be understood that the historical frame reserved area corresponding to the first frame video image is empty, so the current frame passing area corresponding to the first frame image is the intersection area of the vehicle detection frame area and the foreign object detection area, and the intersection area is also the reserved area of the first frame image. Then, the image outside the reserved area position in the comparison image of the first frame image can be updated to the image information in the first frame image, while the image within the reserved area position is not updated, and the image obtained by superposition is used as the comparison image corresponding to the second frame image. Similarly, the comparison image of the subsequent frame image is obtained by updating the image outside the reserved area in the comparison image of the previous frame image.
[0053] Step 108 , judging whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
[0054] In implementation, if the first foreign object detection result is that no foreign object is detected, it can be determined that the transport vehicle currently does not have the behavior of discharging foreign objects by weighing, and monitoring and detection can continue. If foreign objects are detected in the area where the transport vehicle passes in a certain frame, the control image of the area passed is detected. If no foreign object is detected in the control image, or the size of the detected foreign object (such as the size of the detection frame) is smaller than the size of the foreign object in the current frame image of the area passed, that is, additional foreign objects appear after the vehicle passes, it can be determined that the transport vehicle currently has the behavior of discharging foreign objects by weighing. If the size and position of the foreign object detected in the control image are the same as the size and position of the foreign object detected in the current frame image of the area passed, it can be determined that the transport vehicle currently does not have the behavior of discharging foreign objects by weighing. Furthermore, in the case of determining that the transport vehicle has the behavior of discharging foreign objects by weighing, the server can capture the image of the transport vehicle from the current frame monitoring video image and issue an alarm message to facilitate the supervision of cheating in weighing.
[0055] The above-mentioned detection method of the behavior of vehicles discharging foreign objects during weighing is to detect and track the vehicles through the monitoring video of the material shipping area, identify the position of each transport vehicle, and when the transport vehicle enters the foreign object detection area, determine the current frame detection frame area of the transport vehicle and the circumscribed rectangular area of the historical frame retention area as the current frame passing area of the transport vehicle, and then perform foreign object detection on the current frame image of the passing area. If foreign objects are detected, the foreign object detection result is compared with the current frame control image of the passing area. Among them, the historical frame retention area is the intersection area of the historical frame detection frame area and the foreign object detection area or the area in the historical frame passing area where foreign object detection is not performed. The circumscribed rectangular area of the current frame detection frame area and the historical frame retention area can cover the area where the transport vehicle passes, and the control image of the passing area is obtained based on the historical frame monitoring video image, which can reflect the ground conditions before the transport vehicle passes through the area. If there are foreign objects on the ground after the transport vehicle passes through the area, and there are no foreign objects or only a smaller amount of foreign objects on the ground before passing, it can be judged that the transport vehicle has the behavior of discharging foreign objects during weighing. Compared with manual supervision, this solution can improve the efficiency and accuracy of detecting the emission of foreign objects during vehicle weighing, thereby improving the supervision effect of weighing cheating during material shipment and reducing the loss of the shipper.
[0056] In one implementation, the first foreign object detection in step 106 includes the following steps: determining the area in the current frame passing area except the current frame detection frame area as the target area; performing the first foreign object detection on the current frame image of the target area to obtain the first foreign object detection result.
[0057] In this embodiment, the area other than the detection frame area in the current frame's passing area can be subjected to foreign object detection, that is, foreign object detection is not performed in the detection frame area, so as to avoid wasting computing resources by detecting the vehicle-occluded area. It can be understood that the area in the current frame's passing area that is not subjected to foreign object detection is the intersection area of the detection frame area and the foreign object detection area, which is the reserved area of the current frame and will be used as the historical frame reserved area corresponding to the next frame of the video image, so as to determine the passing area of the next frame when executing step 104. Figure 2b As shown in the figure, D i is the detection box area of the current frame (i-th frame), D i-1 is the detection frame area (reserved area) of the i-1th frame. There is a partial overlap between the two. The blue rectangular box is the circumscribed rectangular area of the two, which is the passing area of the current frame. i The area outside is the target area in the current frame passing area, such as Figure 2c The L-shaped frame area of the red line is shown (it can be understood that the L-shape is only an example, and in other examples, the target area may be other shapes).
[0058] In another implementation, the first foreign object detection in step 106 includes the following steps: dividing the area in the current frame passing area except the current frame detection frame area into multiple peripheral sub-areas according to the boundary lines of the detection frame, and determining the peripheral sub-areas in each peripheral sub-area that meet the preset resolution requirements as the target area; performing the first foreign object detection on the current frame image of the target area to obtain a first foreign object detection result.
[0059] In this embodiment, the area in the passing area except the current frame detection frame area can be divided into a plurality of peripheral sub-areas according to the boundary lines of the detection frame. Figure 2d In the example, the detection box D i The boundary line is extended to intersect with the boundary of the passing area, and the L-shaped frame area is divided into three rectangular areas S1, S2, and S3. The three rectangular areas can be used as peripheral sub-areas respectively, or the two rectangular areas (S1+S2) and S3 can be used as peripheral sub-areas, or the two rectangular areas (S2+S3) and S1 can be used as peripheral sub-areas, or the two rectangular areas (S1+S2) and (S2+S3) can be used as peripheral sub-areas, that is, the peripheral sub-areas can have intersections. The server can determine the peripheral sub-areas that meet the preset resolution requirements in each peripheral sub-area as the target area for foreign body detection. Since the input image of the foreign body detection model is required to be a rectangular image and has certain requirements on the resolution, and the passing area outside the detection frame area is usually not a rectangular area (such as L-shaped or other shapes), if the area outside the detection frame is all foreign body detection, it is necessary to divide the detection area and input the model for detection multiple times. Moreover, 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, this embodiment can further improve the accuracy of foreign body detection by performing foreign body detection on the areas that meet the resolution requirements in the peripheral sub-areas of the rectangle.
[0060] Specifically, the area with the largest area among the surrounding sub-areas can be determined as the candidate area. If the area of the candidate area is greater than a preset threshold and the aspect ratio meets the preset requirements, the candidate area is determined as the target area. For areas that do not meet the requirements, they are retained for cumulative detection with subsequent frame images. That is, the retained area of the current frame usually includes the current frame detection frame area and the surrounding sub-areas that are not detected (excluding the intersection with the target area). Figure 2d In the example, if the surrounding sub-region (S1+S2) is the target region, then (D i+ S3) is the reserved area of the current frame. Since the surrounding sub-areas are divided according to the detection frame boundary, the reserved area is a rectangular area, and then the circumscribed rectangular area of the reserved area and the detection frame area of the next frame can be determined as the passing area of the next frame, so that the reserved area can be accumulated so that foreign object detection can be performed after the detection requirements are met, thereby improving the accuracy of foreign object detection.
[0061] Accordingly, the control image of the foreign object detection area needs to be updated based on the reserved area. Specifically, the server can retain the image of the reserved area position in the current frame control image, and update the image information outside the reserved area to the image information of the corresponding position in the current frame video image, and obtain the control image corresponding to the next frame video image, so as to be used when performing the second foreign object detection in step 106. That is, the current frame control image can be obtained by updating the image of the area except the reserved area of the previous frame in the control image of the previous frame according to the previous frame of the monitoring video image. As a result, the image of the passing area before the vehicle passes and the foreign object detection has not been performed will be retained in each frame of the control image, so as to accurately reflect the ground conditions before the vehicle passes through the area, thereby ensuring the accuracy of the foreign object detection result.
[0062] 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.
[0063] Based on the same inventive concept, the embodiment of the present application also provides a detection device for vehicle overweight emission of foreign matter for implementing the above-mentioned detection method for vehicle overweight emission of foreign matter. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the detection device for vehicle overweight emission of foreign matter provided below can be referred to the limitations of the above-mentioned detection method for vehicle overweight emission of foreign matter, and will not be repeated here.
[0064] In one embodiment, Figure 3 As shown, a detection device 300 for the behavior of foreign matter discharge during vehicle weighing is provided, comprising: a tracking module 301, a determination module 302, a detection module 303 and a judgment module 304, wherein:
[0065] The tracking module 301 is used to obtain the monitoring video of the material shipping area, and perform vehicle detection and tracking on the monitoring video to obtain the position of the transport vehicle in each frame of the monitoring video image.
[0066] The determination module 302 is used to determine the current frame detection frame area and the circumscribed rectangular area of the historical frame retention area of the transport vehicle in the current frame monitoring video image as the current frame passing area of the transport vehicle when the transport vehicle enters the foreign object detection area.
[0067] The detection module 303 is used to perform a first foreign object detection on the current frame image of the target area in the current frame passing area to obtain a first foreign object detection result. If the first foreign object detection result indicates that the target foreign object is detected, a second foreign object detection is performed on the current frame control image of the target area to obtain a second foreign object detection result.
[0068] The judgment module 304 is used to judge whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
[0069] In one of the embodiments, the detection module 303 is further used to: determine the area in the current frame passing area except the current frame detection frame area as the target area; perform a first foreign object detection on the current frame image of the target area to obtain a first foreign object detection result.
[0070] In one of the embodiments, the detection module 303 is also used to: divide the area in the current frame passing area except the current frame detection frame area into multiple peripheral sub-areas according to the boundary lines of the detection frame, and determine the peripheral sub-areas in each of the peripheral sub-areas that meet the preset resolution requirements as the target area; perform a first foreign object detection on the current frame image of the target area to obtain a first foreign object detection result.
[0071] In one of the embodiments, the detection module 303 is further used to determine the area with the largest area among the peripheral sub-areas as the candidate area; if the area of the candidate area is greater than a preset threshold and the aspect ratio meets the preset requirements, the candidate area is determined as the target area.
[0072] In one of the embodiments, the detection module 303 is also used to: update the area image of the historical frame control image of the foreign object detection area except the historical frame retained area according to the historical frame monitoring video image to obtain the current frame control image of the foreign object detection area; intercept the image of the target area from the current frame control image of the foreign object detection area to perform a second foreign object detection to obtain a second foreign object detection result.
[0073] In one embodiment, the judgment module 304 is also used to: if the second foreign object detection result indicates that the target foreign object is not detected, or the target foreign object is detected and the size of the target foreign object is smaller than the size of the target foreign object in the first foreign object detection result, then it is judged that the transport vehicle has the behavior of over-weighing and discharging foreign objects.
[0074] In one of the embodiments, the device further includes an alarm module for capturing an image of the transport vehicle from the current frame monitoring video image and issuing an alarm message when it is determined that the transport vehicle has discharged foreign matter after being weighed.
[0075] Each module in the above-mentioned detection device for the behavior of foreign matter discharged from a vehicle during weighing can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0076] 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 through 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 over-weighing emission foreign matter behavior detection method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting the vehicle over-weighing emission foreign matter behavior is implemented.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] Those skilled 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), magnetoresistive 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 to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0083] 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.
[0084] 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 the emission of foreign matter from a vehicle during weighing, characterized in that: The method comprises: Obtain surveillance video of the material shipping area, and perform vehicle detection and tracking on the surveillance video to obtain the position of the transport vehicle in each frame of the surveillance video image; When the transport vehicle enters the foreign object detection area, the circumscribed rectangular area of the current frame detection frame area and the historical frame retention area of the transport vehicle in the current frame monitoring video image is determined as the current frame passing area of the transport vehicle; the historical frame retention area is the intersection area of the historical frame detection frame area and the foreign object detection area or the area in the historical frame passing area where foreign object detection is not performed; Performing a first foreign object detection on a current frame image of a target area in the current frame passing area to obtain a first foreign object detection result, and if the first foreign object detection result indicates that a target foreign object is detected, performing a second foreign object detection on a current frame control image of the target area to obtain a second foreign object detection result; It is determined whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
2. The method according to claim 1, characterized in that: The performing first foreign body detection on the current frame image of the target area in the current frame passing area to obtain a first foreign body detection result includes: Determine the area of the current frame passing area other than the current frame detection frame area as the target area; A first foreign body detection is performed on the current frame image of the target area to obtain a first foreign body detection result.
3. The method according to claim 1, characterized in that The performing first foreign body detection on the current frame image of the target area in the current frame passing area to obtain a first foreign body detection result includes: Divide the area of the current frame passing area except the current frame detection frame area into a plurality of peripheral sub-areas according to the boundary lines of the detection frame, and determine the peripheral sub-areas that meet the preset resolution requirements in each of the peripheral sub-areas as the target area; A first foreign body detection is performed on the current frame image of the target area to obtain a first foreign body detection result.
4. The method according to claim 3, characterized in that The step of determining the surrounding sub-region that meets the preset resolution requirement among the surrounding sub-regions as the target region comprises: Determine the region with the largest area among the peripheral sub-regions as a candidate region; If the area of the candidate region is greater than a preset threshold and the aspect ratio meets a preset requirement, the candidate region is determined as a target region.
5. The method according to claim 1, characterized in that The performing a second foreign body detection on the current frame control image of the target area to obtain a second foreign body detection result includes: According to the historical frame monitoring video image, the image of the area other than the historical frame reserved area in the historical frame comparison image of the foreign object detection area is updated to obtain the current frame comparison image of the foreign object detection area; An image of the target area is intercepted from the current frame comparison image of the foreign object detection area to perform a second foreign object detection to obtain a second foreign object detection result.
6. The method according to claim 1, characterized in that The determining, according to the first foreign object detection result and the second foreign object detection result, whether the transport vehicle has an over-weighing and foreign object discharge behavior includes: If the second foreign object detection result indicates that the target foreign object is not detected, or the target foreign object is detected and the size of the target foreign object is smaller than the size of the target foreign object in the first foreign object detection result, it is determined that the transport vehicle has over-weighed and discharged foreign objects.
7. The method according to claim 1, characterized in that The method further comprises: When it is determined that the transport vehicle has discharged foreign objects after being weighed, an image of the transport vehicle is captured from the current frame monitoring video image, and an alarm message is issued.
8. A detection device for the emission of foreign matter from a vehicle during weighing, characterized in that: The device comprises: The tracking module is used to obtain the surveillance video of the material delivery area, and perform vehicle detection and tracking on the surveillance video to obtain the position of the transport vehicle in each frame of the surveillance video image; A determination module, used for determining, when the transport vehicle enters the foreign object detection area, a circumscribed rectangular area of a current frame detection frame area and a historical frame retention area of the transport vehicle in a current frame monitoring video image as a current frame passing area of the transport vehicle; A detection module, configured to perform a first foreign object detection on a current frame image of a target area in the current frame passing area to obtain a first foreign object detection result, and if the first foreign object detection result indicates that a target foreign object is detected, perform a second foreign object detection on a current frame control image of the target area to obtain a second foreign object detection result; A judgment module is used to judge whether the transport vehicle has discharged foreign objects during weighing according to the first foreign object detection result and the second foreign object detection result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: 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, 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
Method for remotely monitoring vehicle weighing cheating by using video analyzing
CN103630221A
Vehicle weighing method and device based on video recognition, storage medium and processor
CN114441021A
Unattended weight checking anti-cheating method, device and system and readable medium
CN117173637A
Wagon balance intelligent control management system
CN117557175A
Methods and systems for monitoring human body weight with vehicle sensors and big data ai analytics
US20210312169A1
Cited By
Vehicle abnormal drainage behavior detection method and device and computer equipment
CN119131704A
Method, device and computer equipment for detecting abnormal vehicle drainage behavior
CN119131704B
