Compartment volume determination method and device, electronic equipment and storage medium

The camera collects videos and automatically identifies vehicle candidate images to determine the key points of the carriage, which solves the problems of low efficiency and unstable accuracy of carriage volume measurement, and achieves efficient and accurate carriage volume measurement.

CN118799377APending Publication Date: 2024-10-18CHINA POST INFORMATION TECH (BEIJING CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410924343.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, the manual measurement of carriage volume is inefficient and the measurement accuracy is unstable, making it difficult to meet the efficient operation needs of the express logistics industry.

Method used

Collect the video of the target lane through the shooting device, automatically identify and extract vehicle candidate images, determine the vehicle position information and key points, especially the vertices on the four adjacent surfaces of the carriage, and calculate the volume of the carriage.

Benefits of technology

It improves the accuracy and efficiency of cabin volume measurement, reduces labor costs and potential human errors, and is suitable for complex environments and multi-vehicle scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799377A_ABST
    Figure CN118799377A_ABST
Patent Text Reader

Abstract

The invention discloses a carriage volume determination method and device, electronic equipment and a storage medium. The carriage volume determination method comprises the following steps: acquiring a target video of a target lane through a shooting device, and determining a plurality of candidate images containing a target vehicle from a plurality of video frames of the target video; for each candidate image, vehicle position information and vehicle key points of the target vehicle in the candidate image are determined, the vehicle key points at least comprise at least four vertexes distributed on two adjacent surfaces of a carriage of the target vehicle, and the four vertexes comprise a common vertex of the two adjacent surfaces; and determining a target image from the plurality of candidate images according to the vehicle position information and the vehicle key points, and determining the volume of the carriage according to the plurality of vehicle key points in the target image. According to the technical scheme, compared with a mode of manually measuring the carriage volume, the carriage volume can be automatically determined through the lane video, and the measurement precision and efficiency of the carriage volume are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of volume measurement technology, and in particular to a method, device, electronic equipment and storage medium for determining the volume of a vehicle compartment. Background Art

[0002] With the rapid development of intelligent transportation technology, accurate and efficient vehicle size detection has become a key factor in improving traffic management. In particular, as the core transportation tool in the express delivery industry, the size of vans is directly related to their cargo carrying capacity.

[0003] In the related art, the volume of the vehicle compartment is determined by manual measurement. Due to the high compartment, the operation is inconvenient, time-consuming and labor-intensive, and inefficient, especially during the peak period of logistics, which seriously affects the vehicle turnover and package delivery time. Moreover, the measurement result is directly related to the measurement operation, and the measurement accuracy varies from person to person, making the measurement result unstable.

[0004] Therefore, there is an urgent need for a more economical, flexible and efficient automatic measurement method for van volume to meet the growing demand for efficient operations in the express logistics industry. Summary of the invention

[0005] The present invention provides a method, device, electronic device and storage medium for determining the volume of a vehicle compartment, so as to solve the technical problems of low efficiency and unstable measurement accuracy in manual measurement of the volume of a van.

[0006] According to one aspect of the present invention, a method for determining a compartment volume is provided, comprising:

[0007] Capturing a target video of a target lane by a camera, and determining a plurality of candidate images including a target vehicle from a plurality of video frames of the target video;

[0008] For each of the candidate images, determine the vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of the two adjacent surfaces;

[0009] A target image is determined from the plurality of candidate images according to the vehicle position information and the vehicle key points, and the volume of the vehicle compartment is determined according to the plurality of vehicle key points in the target image.

[0010] According to another aspect of the present invention, there is provided a vehicle compartment volume determination device, comprising:

[0011] A candidate image determination module, configured to capture a target video of a target lane through a camera, and determine a plurality of candidate images containing a target vehicle from a plurality of video frames of the target video;

[0012] A vehicle information determination module, for determining, for each of the candidate images, vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of the two adjacent surfaces;

[0013] A vehicle compartment volume determination module is used to determine a target image from a plurality of candidate images according to the vehicle position information and the vehicle key points, and determine the volume of the vehicle compartment according to the plurality of vehicle key points in the target image.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the vehicle compartment volume determination method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vehicle compartment volume determination method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention collects the target video of the target lane through the shooting device, determines multiple candidate images containing the target vehicle from multiple video frames of the target video, and can automatically identify and extract the target frame containing the target vehicle from the continuous video stream. Compared with manual review, the processing speed and accuracy are greatly improved, the labor cost and potential human errors are reduced, and by screening out the candidate images containing the vehicle, the redundant processing of irrelevant images is avoided, thereby saving computing resources and improving the processing speed, and providing basic data for subsequent vehicle recognition and analysis; then, for each of the candidate images, the vehicle position information and vehicle key points of the target vehicle in the candidate image are determined, and the vehicle position information in the candidate image is analyzed. The accurate determination of information and key points can realize the refined identification and positioning of the target vehicle, and can effectively distinguish and lock the target even in complex environments and multi-vehicle scenes, thereby improving the accuracy and robustness of vehicle identification. The vehicle key points at least include at least four vertices distributed on two adjacent faces of the car body of the target vehicle, and the four vertices include the common vertices of the two adjacent faces. Since the determined vehicle key points, especially the four key points of the car body, provide an accurate geometric basis for the subsequent volume calculation, the estimation of the vehicle volume is more accurate. Then, according to the vehicle position information and the vehicle key points, the target image is determined from the multiple candidate images, and the volume of the car body is determined according to the multiple vehicle key points in the target image. The technical solution of the embodiment of the present invention solves the technical problems of the inefficiency and unstable measurement accuracy of the car body volume calculation relying on manual measurement in the related technology through accurate vehicle detection, key point positioning and volume calculation, and effectively improves the measurement accuracy and efficiency of the car body volume.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a method for determining a vehicle compartment volume provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a method for determining the volume of a vehicle compartment provided according to Embodiment 2 of the present invention;

[0024] Figure 3 is a schematic diagram of key points of a vehicle according to a method for determining a vehicle compartment volume applicable to the implementation of the present invention;

[0025] Figure 4 is a structural schematic diagram of a vehicle compartment volume determination device provided according to Embodiment 3 of the present invention;

[0026] Figure 5 It is a schematic diagram of the structure of an electronic device for implementing the method for determining the vehicle compartment volume according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0031] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0032] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0033] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0035] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0036] Embodiment 1

[0037] Figure 1 A flowchart of a method for determining the volume of a vehicle compartment is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the volume of the vehicle compartment is calculated through precise vehicle detection and key point positioning. The method can be executed by a vehicle compartment volume determination device, which can be implemented in the form of hardware and / or software, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0038] like Figure 1 As shown, the method may specifically include:

[0039] S110, capturing a target video of a target lane by means of a shooting device, and determining a plurality of candidate images including a target vehicle from a plurality of video frames of the target video.

[0040] The shooting device may be a hardware device for capturing videos or images, such as a camera, a video camera, or a dedicated video acquisition device. The shooting device usually has a high-definition camera function and can record video images under different lighting conditions. It is understandable that in traffic scenes, the shooting device is used to record the movement of vehicles and provide raw data for subsequent video analysis and processing.

[0041] The target vehicle may be a vehicle whose compartment volume is to be determined. The identification of the target vehicle is usually based on its features, such as at least one or more of its shape, size and color. The target lane may be understood as the lane through which the vehicle whose compartment volume is to be determined passes. In a logistics scenario, the target lane may be an entry and exit lane of an express sorting center or other sections of the target vehicle's route. In a traffic inspection scenario, the target lane may also be a set inspection section, such as part of a highway, etc.

[0042] The target video may be continuous image data recorded for the target lane obtained from a shooting device. Videos are usually composed of a large number of continuous image frames, including multiple frames per second, which are used to record real-time dynamic conditions on the lane. The video frame may be a video image in the target video, and for each video frame, multiple candidate images containing the target vehicle are determined. Video frames are the basic unit of video analysis, and analysis of frames can help the system identify information such as changes and moving objects. The candidate image may be an image that may contain the target vehicle in the video frame. Candidate images containing the target vehicle can be screened out from multiple video frames through a specific algorithm for further processing and analysis.

[0043] In practical applications, it is necessary to accurately determine the images to be analyzed from multiple video frames. Optionally, determining multiple candidate images containing a target vehicle from multiple video frames of the target video includes: determining a video frame containing a vehicle object from multiple video frames of the target video as an image to be processed, and determining the vehicle type of the vehicle object contained in the image to be processed; when the vehicle type of the vehicle object is a preset type, determining the vehicle object as a target vehicle, and determining the image to be processed containing the target vehicle as a candidate image.

[0044] The image to be processed can be understood as a video frame containing a vehicle object selected from multiple video frames, which is used to determine the target vehicle. The candidate image can be understood as an image containing the target vehicle determined in the image to be processed, which is used to select an image that can be used to determine the volume of the vehicle compartment.

[0045] It is understandable that a pre-trained target detection model can be used to detect multiple video frames of the target video to determine the video frame containing the vehicle object, and the determined video frame containing the vehicle object is used as the image to be processed, and the image classification model is used to further detect the vehicle type of the vehicle object contained in the image to be processed, so as to determine the target vehicle according to the vehicle type of the vehicle object. Exemplarily, the target detection model may include a fully convolutional network (FCN) and / or a U-Net model, etc.

[0046] Specifically, using a pre-trained target detection model to determine a video frame containing a vehicle object from multiple video frames of the target video as an image to be processed may include: using the pre-trained target detection model to perform vehicle recognition on each video frame in the target video to determine the video frame containing the vehicle object; or extracting some video frames from the target video according to a preset extraction method, and performing vehicle recognition on the extracted video frames using the pre-trained target detection model to determine the video frame containing the vehicle object. The preset extraction method may be at least one of extraction according to a preset frame rate, extraction according to a preset time interval, and extraction according to a preset number.

[0047] In order to improve the recognition accuracy of the model, the video frames to be detected using the pre-trained target detection model can be preprocessed, wherein the preprocessing can include normalization processing and / or size transformation processing. Then, the preprocessed video frames are sent to the target detection model, and a type recognition image is output. In the type recognition image, a detection frame corresponding to the vehicle object can be marked, and the vehicle type corresponding to the vehicle object and the confidence corresponding to the vehicle type are given. The vehicle type corresponding to the vehicle object is determined according to the confidence corresponding to the vehicle type and the preset confidence threshold, so as to screen out high-quality vehicle detection results and remove low-confidence false detections.

[0048] The training process of the target detection model includes: obtaining a sample image containing a target vehicle, determining an expected image corresponding to the sample image, and marking the target vehicle therein, and then using the sample image to train a pre-built recognition model, and adjusting the target detection model based on the model output image and the expected image to obtain a trained target detection model. Furthermore, the training parameters of the target detection model can be configured according to the structure of the adopted target detection model. The training parameters can include learning rate and loss function, etc.

[0049] Optionally, the use of an image classification model to determine the vehicle type of the vehicle object contained in the image to be processed may include: cropping out the image area where the vehicle is located from the image to be processed, sending the cropped image area to a pre-trained image classification model, and obtaining the model output vehicle type (sedan, truck or van, etc.) and its corresponding confidence level.

[0050] An optional solution is to use an image classification model to determine the vehicle type of the vehicle object contained in the image to be processed, and may also include: visually presenting the detected vehicle frame, type information, and confidence on the original video frame, or generating a report summarizing all detected vehicle types and their occurrence frequencies. Regularly evaluate the performance of the model on actual video data, and adjust the model parameters as needed to improve detection and recognition accuracy.

[0051] On the basis of the above solution, the target vehicle needs to be further screened. Optionally, determining the vehicle object as the target vehicle includes: determining the driving direction of the vehicle object, and determining the vehicle object as the target vehicle when the driving direction is a preset direction.

[0052] The preset direction refers to a predefined vehicle driving direction, which is used to determine whether it is a target vehicle that needs to be identified, and to avoid repeated measurements of the same vehicle when the vehicle is traveling back and forth. For example, when the detection target is the flow of vehicles entering and leaving a certain express delivery center, the preset direction can be set to the direction of entering or exiting the express delivery center entrance through the target lane. The advantage of this setting is that by accurately defining the driving direction, it is possible to effectively screen and identify vehicles that are entering the express delivery center or leaving after completing the task, thereby enhancing the pertinence and accuracy of target vehicle detection.

[0053] Optionally, determining the traveling direction of the vehicle object includes: determining the traveling direction of the target vehicle based on information about changes in the distance between the target vehicle and an environmental reference object in at least two of the candidate images; and / or identifying the front and / or rear of the target vehicle, and determining the traveling direction of the target vehicle based on the relative positions of the front and rear of the vehicle.

[0054] Among them, the environmental reference object can be an element that is stationary relative to the target lane, such as a road sign, a building edge or a ground marking line. When the shooting field of view of the shooting device is fixed, the position of the environmental reference object is relatively fixed in the continuous frames, and it can be used as a reference for measuring the movement and driving direction of the vehicle. The distance change information can be the change in the relative position between the vehicle and the same environmental reference object in two or more consecutive frames of images. The moving distance of the vehicle in the horizontal or vertical direction can be calculated, and the changing trend of the moving distance reveals the moving direction of the vehicle. The relative position can be the position distribution of the front and rear of the vehicle in the image, which can further determine the driving direction of the vehicle.

[0055] By analyzing the changes in the relative distance between the vehicle and environmental reference objects, and directly identifying and utilizing the relative position information of the front and rear of the vehicle, the driving direction of the vehicle in the video can be effectively determined, thereby quickly and accurately identifying the target vehicle.

[0056] On the basis of the above scheme, the vehicle type screening is based on the further consideration of the vehicle's driving direction, which helps to accurately identify the target vehicle in complex traffic scenarios and reduce false detections and missed detections; in the process of determining the target image, the vehicle position information and the distance analysis of the vehicle's key points are combined to screen out the image with the best perspective and the richest information from multiple candidate images; by setting the distance threshold to quickly filter out images that do not meet the conditions, the consumption of computing resources is effectively reduced and the overall processing speed is improved.

[0057] S120. For each of the candidate images, determine the vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of two adjacent surfaces.

[0058] Among them, the vehicle position information can be the position of the target vehicle in the image, which is usually represented by a coordinate point or a bounding box in a coordinate system to define the approximate area of ​​the target vehicle in the image. The vehicle key points can be feature points used to indicate the components of the vehicle (such as the front of the vehicle, tires or car body, etc.), shape and direction. Specifically, in the case where the car body is a cube, "at least four vertices" are distributed on "two adjacent faces" of the vehicle's car body, and the vertices can be located at the most prominent part of the vehicle's outline. By identifying these key points, the outline of the vehicle can be more accurately portrayed. The two adjacent faces can be two adjacent faces on the surface of the car body, which can help determine the side lengths of the vehicle's car body in different directions.

[0059] The method of determining the vehicle key points of the target vehicle in the candidate image may include but is not limited to at least one of the following methods: through models such as YOLO (You Only Look Once), Faster R-CNN or Mask R-CNN, the bounding box of the vehicle can be output, and further refined to identify key points, especially by modifying or customizing these networks to predict specific key point locations, such as the four vertices of the roof; using a network specially designed for key point detection, such as HRNet (High-ResolutionNetwork), CornerNet or CenterNet, etc. The key point positions on the vehicle can be predicted; using the geometric characteristics of the vehicle, such as using edge detection (Canny edge detection) or Hough transform to find straight lines to preliminarily extract the vehicle outline, and then applying geometric models (such as rectangle or polygon fitting, etc.) to accurately locate vertices, etc.

[0060] Based on the above method, an optional method is to use optimized key point prediction, such as non-maximum suppression (NMS) to reduce repeated detection or use geometric constraints (such as the top surface of the vehicle should be approximately a parallelogram) to correct the key point position.

[0061] For example, Figure 3 The figure shows a schematic diagram of key points of a vehicle in a method for determining the volume of a vehicle compartment provided by an embodiment of the present disclosure. Figure 3 In the simplified van model, four key points of the vehicle are marked: a, b, c and d. The key points of the vehicle play a core role in the structure of the vehicle body, where the side formed by the three points a, b and c is adjacent to the other side formed by the three points b, c and d, and the key points b and c serve as common vertices to connect the two adjacent faces.

[0062] This method can effectively outline the outer contour of the car by selecting four key points of the vehicle, and then accurately measure the three-dimensional dimensions of the car, namely the length, width and height. Specifically, the total volume of the car can be directly calculated by using the length of one side defined by points b and d, combined with the width of the other side defined by points a and b and the height between b and c. This process not only simplifies the technical difficulty of traditional volume measurement, but also improves the measurement efficiency and accuracy, providing a scientific quantitative basis for logistics transportation, cargo loading and other fields.

[0063] S130. Determine a target image from the plurality of candidate images according to the vehicle position information and the vehicle key points, and determine the volume of the vehicle compartment according to the plurality of vehicle key points in the target image.

[0064] Optionally, determining a target image from a plurality of candidate images based on the vehicle position information and the vehicle key points includes: when the number of the vehicle key points is not less than a preset number, determining an image reference point of the target image, and determining a first distance between the vehicle position information and the image reference point, wherein the image reference point includes an image center point and / or a lane reference point of the target lane; determining a vehicle center point of the target vehicle in the target image, and respectively determining a second distance between each of the vehicle key points and the vehicle center point; and determining the candidate image as the target image when the first distance is less than or equal to a first threshold and the second distance is less than or equal to a second threshold.

[0065] Among them, the preset number can be 4. It can be understood that the calculation of the volume of the car body requires the use of three sides of length, width and height, so the minimum number of points required is 4. The first distance can be the distance between the measured image reference point and the vehicle position information, which is used to help determine the approximate position of the vehicle in the image. The image reference point may include but is not limited to the center point of the image and / or the lane reference point of the target lane. The vehicle center point can be based on the identified vehicle key points, and some form of geometric averaging of the vehicle frame where the vehicle is cropped out of the processed image or inference based on the symmetry of the vehicle. The second distance can be the Euclidean distance from each vehicle key point to the vehicle center point, reflecting the key features of the vehicle shape, helping to confirm the validity of the key points and the precise outline of the vehicle.

[0066] It can be understood that by limiting the number of vehicle key points and setting a distance threshold, the target image that is most suitable for analysis can be selected from a large number of candidate images. The core of this is to ensure that the vehicle in the selected target image is both in a favorable position in the image and can reflect the key features of the vehicle, thereby improving the accuracy and efficiency of subsequent processing.

[0067] On the basis of the above technical solution, optionally, the method of determining the target image may also include but is not limited to at least one of the following methods: introducing multi-scale analysis, by scaling the image at different scales, the key point detection and distance calculation process may be repeated at each scale, so that the algorithm's ability to recognize vehicles of different sizes and distances may be improved; dynamically adjusting the first threshold and the second threshold according to different environmental conditions (such as weather or lighting changes) and image quality, for example, on rainy or foggy days, due to the decrease in visual clarity, the threshold may be appropriately relaxed to adapt to environmental changes; continuous video frames may be processed, and time series information may be used to enhance the determination of the target image, and by analyzing the changes in vehicle key points and positions between previous and subsequent frames, suddenly changing abnormal points may be excluded, thereby improving the stability of recognition, etc. The process of determining the target image from multiple candidate images may be made more accurate, stable and reliable, thereby meeting the needs of practical applications.

[0068] The technical solution of the embodiment of the present invention collects the target video of the target lane through the shooting device, determines multiple candidate images containing the target vehicle from multiple video frames of the target video, and can automatically identify and extract frames containing the target vehicle from the continuous video stream. Compared with manual review, the processing speed and accuracy are greatly improved, the labor cost and potential human errors are reduced, and by screening out the candidate images containing the vehicle, the redundant processing of irrelevant images is avoided, thereby saving computing resources and improving the processing speed, providing basic data for subsequent vehicle identification and analysis; then, for each of the candidate images, the vehicle position information and vehicle key points of the target vehicle in the candidate image are determined, and the vehicle position information in the candidate image is analyzed. The precise determination of key points can realize the refined identification and positioning of the target vehicle, and can effectively distinguish and lock the target even in complex environments and multi-vehicle scenes, thereby improving the accuracy and robustness of vehicle identification. The vehicle key points include at least four vertices distributed on two adjacent faces of the car body of the target vehicle, and the four vertices include common vertices of two adjacent faces. The determined vehicle key points, especially the four key points of the car body, provide an accurate geometric basis for subsequent volume calculation, making the estimation of the vehicle volume more accurate. Then, the target image is determined from the multiple candidate images according to the vehicle position information and the vehicle key points, and the volume of the car body is determined according to the multiple vehicle key points in the target image. The technical solution of the embodiment of the present invention effectively improves the accuracy and efficiency of car body volume measurement through accurate vehicle detection, key point positioning and volume calculation.

[0069] Embodiment 2

[0070] Figure 2 A flowchart of a method for determining the volume of a car compartment is provided for the second embodiment of the present invention. This embodiment is a supplementary explanation for determining the volume of the car compartment according to the multiple vehicle key points in the target image. Compared with the above scheme, this scheme is specifically optimized to determine the volume of the car compartment according to the multiple vehicle key points in the target image, including: according to the pixel positions corresponding to the multiple vehicle key points in the target image, respectively determining the first pixel distance corresponding to the length of the car compartment, the second pixel distance corresponding to the width, and the third pixel distance corresponding to the height; respectively converting the first pixel distance, the second pixel distance, and the third pixel distance into the first physical distance, the second physical distance, and the third physical distance, and determining the volume of the car compartment according to the first physical distance, the first physical distance, and the third physical distance. Among them, the technical features that are the same or similar to those in the above embodiments are not repeated here.

[0071] like Figure 2 As shown, the method may specifically include:

[0072] S210: Capture a target video of a target lane by using a shooting device, and determine a plurality of candidate images containing a target vehicle from a plurality of video frames of the target video.

[0073] S220. For each of the candidate images, determine the vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of two adjacent surfaces.

[0074] S230: Determine a target image from the plurality of candidate images according to the vehicle position information and the vehicle key points.

[0075] S240. According to the pixel positions corresponding to the multiple vehicle key points in the target image, determine the first pixel distance corresponding to the length, the second pixel distance corresponding to the width, and the third pixel distance corresponding to the height of the vehicle compartment respectively.

[0076] It can be understood that the first pixel distance can be the pixel distance corresponding to the length of the car on the target image. For example, two key points on the top surface or side profile of the car can be identified. These two key points should be located on the longest side of the car (usually from the front to the rear of the car). By calculating the horizontal pixel distance of these two key points on the image, the first pixel distance representing the length of the car can be obtained. The second pixel distance can be the pixel distance corresponding to the width of the car on the target image. For example, two key points on the widest side of the car can be selected, usually located on the roof or the side of the car body, and the pixel distance between these two points is calculated as the second pixel distance representing the width of the car. The third pixel distance can be the pixel distance corresponding to the height of the car on the target image. For example, it is determined by identifying the key points on the top and bottom of the car. In an ideal case, the side of the vehicle can clearly distinguish the top and bottom edges, select the corresponding key points in the vertical direction, and calculate the pixel distance between them, which is the third pixel distance representing the height of the car.

[0077] S250. Convert the first pixel distance, the second pixel distance and the third pixel distance into a first physical distance, a second physical distance and a third physical distance respectively, and determine the volume of the carriage according to the first physical distance, the first physical distance and the third physical distance.

[0078] Among them, the first physical distance can be the length of the car in the actual three-dimensional space, and correspondingly, the second physical distance can be the width of the car in the actual three-dimensional space, and the third physical distance can be the height of the car in the actual three-dimensional space.

[0079] Optionally, converting the first pixel distance, the second pixel distance and the third pixel distance into a first physical distance, a second physical distance and a third physical distance respectively includes: obtaining a first conversion ratio corresponding to the first pixel distance, and determining a first physical distance according to the first pixel distance and the first conversion ratio; obtaining a second conversion ratio corresponding to the second pixel distance, and determining a second physical distance according to the second pixel distance and the second conversion ratio; and obtaining a third conversion ratio corresponding to the third pixel distance, and determining a third physical distance according to the third pixel distance and the third conversion ratio.

[0080] Among them, the first conversion ratio can be a proportional coefficient for converting the first pixel distance into the actual physical length, and correspondingly, the second conversion ratio can be a proportional coefficient for converting the second pixel distance into the actual physical width, and the third conversion ratio can be a proportional coefficient for converting the third pixel distance into the actual physical height.

[0081] Specifically, the first conversion ratio, the second conversion ratio and the third conversion ratio may be determined by actual measurement, model training or other methods, without specific limitation.

[0082] Optionally, the actual measurement method may be: selecting a target vehicle, calculating the first physical distance, the second physical distance and the third physical distance of the target vehicle; selecting video frames of the target vehicle from different perspectives, measuring the first pixel distance, the second pixel distance and the third pixel distance under the video frames; establishing a proportional relationship between the first physical distance, the second physical distance and the third physical distance and the corresponding first pixel distance, the second pixel distance and the third pixel distance by taking the quotient; repeating the above steps, calculating the average value multiple times to reduce the error, at least 15 times.

[0083] Optionally, the model training method can be: obtaining image samples of the target vehicle under various viewing angles and different observation distances, and accurately measuring the actual physical dimensions (length, width and height) of the car body in each image, ensuring that the actual physical dimensions correspond to the pixel distances between corresponding key points in the image, as label data for model training; performing standardized preprocessing on the collected images, including but not limited to image resizing to ensure that all input images have a uniform size, performing image normalization, and scaling the pixel value range to [0, 1] or [-1, 1] to enhance the stability and efficiency of model training; selecting a suitable deep learning model architecture, such as a convolutional neural network (CNN), which needs to be able to process image input and output the predicted physical dimensions of the car body; using the mean squared error (MSE) The mean square error (MSE) is used as the loss function to measure the difference between the model prediction value and the actual physical size. Through the back propagation algorithm, the model continuously adjusts its internal parameters during the training process to minimize the loss function and thus optimize the prediction accuracy. The preprocessed image data and the corresponding physical size labels are input into the model for training, and the model weights are iteratively updated using optimization algorithms such as batch gradient descent until the training loss converges or the predetermined stopping condition is reached.

[0084] Accordingly, after the model training is completed, for a new image, the pixel distance of the vehicle's key points is input through the model, and the model output is the corresponding physical distance. According to the physical size value output by the model, the first physical distance, the second physical distance and the third physical distance are directly obtained without manually setting a fixed conversion ratio.

[0085] Through the above standardized process, a deep learning model that can accurately convert the pixel distance of the car in the image into the actual physical size can be effectively trained, providing an accurate basis for the subsequent car size estimation and volume calculation. The technical solution of the embodiment of the present invention can estimate the volume of the car without direct contact with the vehicle by accurately identifying the key points of the vehicle and combining it with a high-precision conversion ratio, thereby reducing interference with vehicle operations, being suitable for various dynamic or static monitoring scenarios, and improving the safety and convenience of measurement. Compared with traditional manual measurement or special equipment measurement, it relies on existing video surveillance system means to reduce hardware investment and labor costs, and is suitable for large-scale deployment and long-term monitoring.

[0086] Embodiment 3

[0087] Figure 4 This is a schematic diagram of the structure of a vehicle compartment volume determination device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a candidate image determination module 410 , a vehicle information determination module 420 and a vehicle compartment volume determination module 430 .

[0088] Among them, the candidate image determination module 410 is used to capture the target video of the target lane through a shooting device, and determine multiple candidate images containing the target vehicle from multiple video frames of the target video; the vehicle information determination module 420 is used to determine the vehicle position information and vehicle key points of the target vehicle in the candidate image for each of the candidate images, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the cabin of the target vehicle, and the four vertices include common vertices of two adjacent surfaces; the cabin volume determination module 430 is used to determine the target image from the multiple candidate images according to the vehicle position information and the vehicle key points, and determine the volume of the cabin according to the multiple vehicle key points in the target image.

[0089] According to the technical solution of the embodiment of the present invention, the candidate image determination module 410 collects the target video of the target lane through the shooting device, and determines multiple candidate images containing the target vehicle from multiple video frames of the target video. The target video frames containing the target vehicle can be automatically identified and extracted from the continuous video stream. Compared with manual review, the processing speed and accuracy are greatly improved, the labor cost and potential human errors are reduced, and by screening out the candidate images containing the vehicle, the redundant processing of irrelevant images is avoided, thereby saving computing resources and improving the processing speed, and providing basic data for subsequent vehicle identification and analysis; then, the vehicle information determination module 420 determines the vehicle position information and vehicle key points of the target vehicle in the candidate image for each of the candidate images, and obtains the target vehicle information by comparing the candidate images in the candidate image. The vehicle position information and key points are accurately determined, which can realize the refined identification and positioning of the target vehicle, and can effectively distinguish and lock the target even in complex environments and multi-vehicle scenes, thereby improving the accuracy and robustness of vehicle identification. The vehicle key points at least include at least four vertices distributed on two adjacent faces of the car body of the target vehicle, and the four vertices include the common vertices of the two adjacent faces. Since the determined vehicle key points, especially the four key points of the car body, provide an accurate geometric basis for the subsequent volume calculation, the estimation of the vehicle volume is more accurate; then the car body volume determination module 430 determines the target image from the multiple candidate images according to the vehicle position information and the vehicle key points, and determines the volume of the car body according to the multiple vehicle key points in the target image. The technical solution of the embodiment of the present invention solves the technical problems of the inefficiency and unstable measurement accuracy of the car body volume calculation relying on manual measurement in the related technology through accurate vehicle detection, key point positioning and volume calculation, and effectively improves the measurement accuracy and efficiency of the car body volume.

[0090] On the basis of the above scheme, optionally, the candidate image determination module includes: a vehicle type determination submodule and a candidate image determination submodule. The vehicle type determination module is used to determine a video frame containing a vehicle object from a plurality of video frames of the target video as an image to be processed, and determine the vehicle type of the vehicle object contained in the image to be processed; the candidate image determination submodule is used to determine the vehicle object as a target vehicle when the vehicle type of the vehicle object is a preset type, and determine the image to be processed containing the target vehicle as a candidate image.

[0091] On the basis of the above solution, optionally, the candidate image determination submodule is specifically used to determine the driving direction of the vehicle object, and when the driving direction is a preset direction, the vehicle object is determined as a target vehicle.

[0092] Based on the above scheme, optionally, the target vehicle screening unit is further used to determine the traveling direction of the target vehicle based on the change information of the distance between the target vehicle and the environmental reference object in at least two of the candidate images; and / or, identify the front and / or rear of the target vehicle, and determine the traveling direction of the target vehicle based on the relative positions of the front and the rear.

[0093] On the basis of the above scheme, optionally, the vehicle compartment volume determination module includes: a first distance determination submodule, a second distance determination submodule and a target image determination submodule. Wherein, the first distance determination submodule is used to determine the image reference point of the target image and determine the first distance between the vehicle position information and the image reference point when the number of the vehicle key points is not less than a preset number, wherein the image reference point includes the image center point and / or the lane reference point of the target lane; the second distance determination submodule is used to determine the vehicle center point of the target vehicle in the target image and respectively determine the second distance between each of the vehicle key points and the vehicle center point; the target image determination submodule is used to determine the candidate image as the target image when the first distance is less than or equal to the first threshold and the second distance is less than or equal to the second threshold.

[0094] On the basis of the above scheme, optionally, the compartment volume determination module further includes: a distance determination submodule and a compartment volume determination submodule. The distance determination submodule is used to determine the first pixel distance corresponding to the length, the second pixel distance corresponding to the width, and the third pixel distance corresponding to the height of the compartment according to the pixel positions corresponding to the multiple vehicle key points in the target image; the compartment volume determination submodule is used to convert the first pixel distance, the second pixel distance, and the third pixel distance into the first physical distance, the second physical distance, and the third physical distance, respectively, and determine the volume of the compartment according to the first physical distance, the first physical distance, and the third physical distance.

[0095] On the basis of the above scheme, optionally, the physical distance determination unit is specifically used to: obtain a first conversion ratio corresponding to the first pixel distance, and determine the first physical distance according to the first pixel distance and the first conversion ratio; obtain a second conversion ratio corresponding to the second pixel distance, and determine the second physical distance according to the second pixel distance and the second conversion ratio; and obtain a third conversion ratio corresponding to the third pixel distance, and determine the third physical distance according to the third pixel distance and the third conversion ratio.

[0096] The vehicle compartment volume determination device provided in the embodiment of the present invention can execute the vehicle compartment volume determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0097] Embodiment 4

[0098] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0099] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0100] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0101] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the vehicle compartment volume determination method.

[0102] In some embodiments, the vehicle compartment volume determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the vehicle compartment volume determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the vehicle compartment volume determination method in any other appropriate manner (e.g., by means of firmware).

[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0105] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0106] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0107] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0108] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0110] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for determining the volume of a vehicle compartment, characterized in that: include: Capturing a target video of a target lane by a camera, and determining a plurality of candidate images containing a target vehicle from a plurality of video frames of the target video; For each of the candidate images, determine the vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of the two adjacent surfaces; A target image is determined from the plurality of candidate images according to the vehicle position information and the vehicle key points, and the volume of the vehicle compartment is determined according to the plurality of vehicle key points in the target image.

2. The method according to claim 1, characterized in that The step of determining a plurality of candidate images containing the target vehicle from a plurality of video frames of the target video comprises: Determining a video frame containing a vehicle object from a plurality of video frames of the target video as an image to be processed, and determining a vehicle type of the vehicle object contained in the image to be processed; In a case where the vehicle type of the vehicle object is a preset type, the vehicle object is determined as a target vehicle, and the image to be processed containing the target vehicle is determined as a candidate image.

3. The method according to claim 2, characterized in that Determining the vehicle object as a target vehicle comprises: The driving direction of the vehicle object is determined, and when the driving direction is a preset direction, the vehicle object is determined as a target vehicle.

4. The method according to claim 3, characterized in that The determining the driving direction of the vehicle object includes: Determining the driving direction of the target vehicle according to the change information of the distance between the target vehicle and the environmental reference object in at least two of the candidate images; and / or, The front and / or rear of the target vehicle are identified, and the travel direction of the target vehicle is determined according to the relative position of the front and rear of the vehicle.

5. The method according to claim 1, characterized in that Determining a target image from a plurality of candidate images according to the vehicle position information and the vehicle key points includes: When the number of the vehicle key points is not less than a preset number, determining an image reference point of the target image, and determining a first distance between the vehicle position information and the image reference point, wherein the image reference point includes an image center point and / or a lane reference point of the target lane; Determine a vehicle center point of the target vehicle in the target image, and respectively determine a second distance between each of the vehicle key points and the vehicle center point; When the first distance is less than or equal to a first threshold and the second distance is less than or equal to a second threshold, the candidate image is determined as a target image.

6. The method according to claim 1, characterized in that The determining the volume of the compartment according to the plurality of vehicle key points in the target image comprises: According to the pixel positions corresponding to the plurality of vehicle key points in the target image, respectively determining a first pixel distance corresponding to the length, a second pixel distance corresponding to the width, and a third pixel distance corresponding to the height of the carriage; The first pixel distance, the second pixel distance and the third pixel distance are respectively converted into a first physical distance, a second physical distance and a third physical distance, and the volume of the carriage is determined according to the first physical distance, the first physical distance and the third physical distance.

7. The method according to claim 6, characterized in that The converting the first pixel distance, the second pixel distance and the third pixel distance into a first physical distance, a second physical distance and a third physical distance respectively comprises: Acquire a first conversion ratio corresponding to the first pixel distance, and determine a first physical distance according to the first pixel distance and the first conversion ratio; acquiring a second conversion ratio corresponding to the second pixel distance, and determining a second physical distance according to the second pixel distance and the second conversion ratio; and, A third conversion ratio corresponding to the third pixel distance is acquired, and a third physical distance is determined according to the third pixel distance and the third conversion ratio.

8. A vehicle compartment volume determination device, characterized in that: include: A candidate image determination module, configured to capture a target video of a target lane through a camera, and determine a plurality of candidate images containing a target vehicle from a plurality of video frames of the target video; A vehicle information determination module, for determining, for each of the candidate images, vehicle position information and vehicle key points of the target vehicle in the candidate image, wherein the vehicle key points include at least four vertices distributed on two adjacent surfaces of the compartment of the target vehicle, and the four vertices include common vertices of the two adjacent surfaces; A vehicle compartment volume determination module is used to determine a target image from a plurality of candidate images according to the vehicle position information and the vehicle key points, and determine the volume of the vehicle compartment according to the plurality of vehicle key points in the target image.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the vehicle compartment volume determination method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vehicle compartment volume determination method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Intelligent body measurement method and device based on deep learning mapping

    CN119810175A