Region boundary determination method and device, equipment and storage medium
By acquiring real-time images of adjacent areas for vehicle tracking and lane line detection, the platform boundaries are automatically determined, solving the problems of low efficiency and low accuracy in manual platform boundary demarcation, improving the efficiency and accuracy of boundary determination and reducing costs.
Patent Information
- Application Number
- CN202410353928.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing technology, manual demarcation of platform boundaries is labor-intensive, costly, and inaccurate.
By acquiring real-time images of adjacent areas, the vehicle is tracked until it comes to a stop, and the area boundaries are determined based on the lane line detection results of the real-time images.
It realizes the automatic determination of regional boundaries, improves efficiency and accuracy, and reduces labor costs.
Smart Images

Figure CN120707807A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for determining a region boundary. Background Art
[0002] The platform serves as the handover area between the warehouse interior and exterior, and is a crucial operational area within the logistics park. For property transfer purposes, the platform is generally divided into the interior area, and the area outside the platform is designated as the exterior area. By determining whether personnel or items cross the platform boundary, entry and exit detection can be implemented. Therefore, the demarcation of platform boundaries has become a pressing issue.
[0003] In the prior art, after obtaining images of the adjacent areas inside and outside the warehouse, the platform boundary is manually delineated based on the images.
[0004] In the process of realizing the present invention, the inventors discovered that the prior art has at least the following technical problems:
[0005] Manually demarcating platform boundaries requires a lot of work, has high labor costs, and is not very accurate. Summary of the Invention
[0006] The present invention provides a method, device, equipment and storage medium for determining a region boundary, so as to realize real-time automatic determination of a region boundary.
[0007] In a first aspect, an embodiment of the present invention provides a method for determining a region boundary, comprising:
[0008] Acquire real-time images of adjacent areas;
[0009] When it is determined that the real-time image contains a vehicle, tracking the vehicle based on the real-time image until the vehicle stops;
[0010] An area boundary is determined based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0011] In a second aspect, an embodiment of the present invention further provides a region boundary determination device, comprising:
[0012] An acquisition module is used to acquire real-time images of adjacent areas;
[0013] a tracking module, configured to, if it is determined that the real-time image contains a vehicle, track the vehicle based on the real-time image until the vehicle comes to a stop;
[0014] The determination module is used to determine the area boundary according to the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0015] In a third aspect, an embodiment of the present invention further provides a computer device, comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the area boundary determination method as described in any one of the first aspects.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform the area boundary determination method as described in any one of the first aspects.
[0020] The embodiments of the above invention have the following advantages or beneficial effects:
[0021] An embodiment of the present invention provides a method for determining area boundaries, comprising: acquiring real-time images of areas adjacent to an area; when it is determined that the real-time images contain a vehicle, tracking the vehicle based on the real-time images until the vehicle comes to a standstill; and determining area boundaries based on lane line detection results of the real-time images and the vehicle boundaries determined when the vehicle comes to a standstill. The above technical solution, when it is determined that the acquired real-time images of areas adjacent to an area contain a vehicle, can track the vehicle on the real-time images to determine the vehicle boundaries when the vehicle comes to a standstill. Lane line detection results can also be performed on the stationary real-time images, and area boundaries can be determined based on the lane line detection results and the vehicle boundaries determined when the vehicle comes to a standstill, thereby achieving automated determination of area boundaries, improving the efficiency and accuracy of area boundary determination, and reducing the labor cost of area boundary determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a method for determining a region boundary provided by an embodiment of the present invention;
[0023] Figure 2 A flowchart of another method for determining area boundaries provided by an embodiment of the present invention;
[0024] Figure 3 A schematic structural diagram of a device for determining a region boundary provided by an embodiment of the present invention;
[0025] Figure 4 A schematic structural diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0027] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. When its operation is completed, the process can be terminated, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the features in the embodiments of the present invention and the embodiments can be combined with each other without conflict.
[0028] To determine whether staff or items have moved across regions, image acquisition devices can be set up at adjacent regions, and real-time images of adjacent regions can be captured based on the image acquisition devices. By determining whether staff or items have passed through region boundaries in real-time images, it can be determined whether staff or items have moved across regions. Therefore, the demarcation of region boundaries is particularly important. This application proposes a region boundary determination method that achieves real-time automatic demarcation of region boundaries.
[0029] The region boundary determination method proposed in this application will be described in detail below with reference to diagrams and embodiments.
[0030] Figure 1 This is a flow chart of a method for determining a region boundary provided by an embodiment of the present invention. The embodiment of the present invention is applicable to situations where it is necessary to automatically determine the region boundary. The method can be executed by a boundary determination device, which can be implemented in software and / or hardware. Figure 1 Said method specifically comprises the following steps:
[0031] Step 110: Acquire real-time images of adjacent areas.
[0032] Specifically, a real-time image of the area adjacent to the region may be acquired based on an image acquisition device disposed at the area adjacent to the region.
[0033] Since the real-time image is used to determine the region boundary, the real-time image can be understood as an image of the region where the first region and the second region are adjacent to each other.
[0034] In the embodiment of the present invention, real-time images of areas adjacent to the area to be determined are acquired, which provides a data basis for real-time determination of the area boundary and facilitates real-time determination of the area boundary.
[0035] Step 120: If it is determined that the real-time image contains a vehicle, track the vehicle based on the real-time image until the vehicle stops.
[0036] The first area is the area inside the warehouse, and the second area is the area outside the warehouse. The platform is generally included in the area inside the warehouse. Therefore, the boundary between the platform and the area outside the warehouse is the boundary between the area inside the warehouse and the area outside the warehouse.
[0037] Specifically, vehicles are often parked adjacent to the dock and the area outside the warehouse for loading and unloading. If the real-time image confirms that the vehicle is stationary, the area boundary can be determined based on the vehicle boundary. Therefore, the vehicle can be tracked based on the real-time image to determine its location. The vehicle's location information can be determined to be stationary after confirming that the vehicle's location information remains unchanged in adjacent frames of real-time imagery.
[0038] In an embodiment of the present invention, when it is determined that a real-time image contains a vehicle, the region boundary can be determined based on the boundary of a stationary vehicle. Therefore, vehicle tracking can be performed on the real-time image containing the vehicle, and whether the vehicle is stationary can be determined through vehicle tracking, thereby achieving real-time monitoring of the vehicle status.
[0039] Step 130: Determine a region boundary based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0040] Specifically, to more accurately determine the region boundary, after acquiring a real-time image, lane line detection can also be performed based on the real-time image to determine a lane line detection result. The lane line detection result can indicate that the real-time image contains two parallel lane lines, or that the real-time image does not contain two parallel lane lines. When the lane line detection result indicates that the real-time image contains two parallel lane lines, the region boundary can be determined based on the lane connecting line or vehicle boundary determined by the two parallel lane lines. When the lane line detection result indicates that the real-time image does not contain two parallel lane lines, the vehicle boundary can be determined as the region boundary.
[0041] Generally speaking, the real-time image is an image of the area adjacent to the area inside the warehouse and the area outside the warehouse, acquired by an image acquisition device set at the side of the area adjacent to the area inside the warehouse and the area outside the warehouse, facing the area inside the warehouse, or facing the area outside the warehouse. Vehicles generally stay in the area outside the warehouse when loading and unloading the items they carry, and lane lines only exist in the area outside the warehouse. If the real-time image is acquired by an image acquisition device set toward the area inside the warehouse, the acquired real-time image cannot be used for lane line detection. Therefore, in this application, the real-time image is acquired by an image acquisition device set at the side of the area adjacent to the area inside the warehouse and the area outside the warehouse, or by an image acquisition device set toward the area inside the warehouse.
[0042] When determining the area boundary based on the lane connecting line or vehicle boundary determined by two parallel lane lines, if the real-time image is acquired by an image acquisition device set on the side where the area inside the warehouse and the area outside the warehouse are adjacent, the lane connecting line and the vehicle boundary that are farther away from the edge of the real-time image can be determined as the area boundary; if the real-time image is acquired by an image acquisition device set toward the area inside the warehouse, the lane connecting line and the vehicle boundary that are closer to the bottom of the real-time image can be determined as the area boundary.
[0043] In practical applications, when it is determined that the real-time image does not contain a vehicle, the region boundary can be determined based on the lane line detection result of the real-time image, that is, the region boundary can be determined based on the lane connecting line determined by two parallel lane lines contained in the real-time image. Specifically, the lane connecting line determined by the two parallel lane lines contained in the real-time image that is far away from the edge of the real-time image can be determined as the region boundary.
[0044] In an embodiment of the present invention, after lane line detection is performed on a real-time image containing a vehicle, the region boundary is determined based on the lane line detection results of the real-time image and the vehicle boundary determined when the vehicle is stationary, thereby achieving automated determination of the region boundary, improving the efficiency and accuracy of region boundary determination, and reducing the labor cost of region boundary determination.
[0045] The method for determining area boundaries provided by an embodiment of the present invention includes: acquiring a real-time image of an area adjacent to the area; when it is determined that the real-time image contains a vehicle, tracking the vehicle based on the real-time image until the vehicle stops; and determining the area boundary based on the lane line detection results of the real-time image and the vehicle boundary determined when the vehicle stops. The above technical solution, when it is determined that the acquired real-time image of the area adjacent to the area contains a vehicle, can determine the vehicle boundary when the vehicle stops by tracking the real-time image, and can also perform lane line detection results on the stationary real-time image, and then determine the area boundary based on the lane line detection results and the vehicle boundary determined when the vehicle stops, thereby achieving automatic determination of the area boundary, improving the efficiency and accuracy of area boundary determination, and reducing the labor cost of area boundary determination.
[0046] Figure 2 This is a flowchart of another method for determining area boundaries provided by an embodiment of the present invention. The embodiment of the present invention is applicable to situations where it is necessary to automatically determine area boundaries. Based on the above embodiment, after acquiring real-time images of adjacent areas, the embodiment of the present invention adds "inputting the real-time image into a pre-trained target detection model so that the target detection model outputs a detection result; when the detection result is empty, determining that the real-time image does not contain a vehicle; when the detection result is a vehicle rectangular frame, determining that the real-time image contains a vehicle." It also adds "when it is determined that the real-time image does not contain a vehicle, determining the area boundary based on the lane line detection result of the real-time image." The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. See Figure 2 , the region boundary determination method provided by the embodiment of the present invention includes:
[0047] Step 210: Acquire real-time images of adjacent areas.
[0048] Step 220: Input the real-time image into a pre-trained target detection model so that the target detection model outputs a detection result.
[0049] Among them, the target detection model is used to perform target detection on the real-time image to determine whether the real-time image contains a vehicle. The detection result output by the target detection model is a vehicle rectangular box or empty.
[0050] Specifically, a real-time image is input as input information into a pre-trained object detection model. The object detection model can perform object detection on the real-time image to determine whether the real-time image contains a vehicle. If the object detection model determines that the real-time image contains a vehicle, the detection result output by the object detection model can be determined to be a vehicle rectangular box. If the object detection model determines that the real-time image does not contain a vehicle, the detection result output by the object detection model can be determined to be empty.
[0051] In one embodiment, the training process of the target detection model includes:
[0052] A first vehicle image marked with a vehicle rectangular frame is selected from a public data set; a vehicle image containing the left side, right side or rear side of the vehicle is marked based on the vehicle rectangular frame to obtain a second vehicle image; the first vehicle image and the second vehicle image are determined as the pre-marked vehicle images; the vehicle images pre-marked based on the vehicle rectangular frame are input as training data into an initial detection model, the initial detection model is trained, and a loss function is calculated; the model is optimized based on a back propagation algorithm until the loss function converges, thereby obtaining the target detection model.
[0053] Specifically, the training of the model requires a large amount of annotated data. On the one hand, an image annotated with a vehicle rectangular frame can be selected from a public data set as the first vehicle image. The vehicle rectangular frame annotated in the public data set is generally determined by a complete vehicle image, that is, most of the vehicle rectangular frames contained in the first vehicle image are composed of a complete vehicle image, while the vehicle in the real-time image in this application is generally the left side, right side or rear side of the vehicle. Therefore, the image obtained by annotating the vehicle image containing the left side, right side or rear side of the vehicle based on the vehicle rectangular frame can be used as the second vehicle image. Furthermore, the first vehicle image and the second vehicle image can be used as training images to train the target detection model and improve the generalization performance of the model.
[0054] Specifically, the first vehicle image and the second vehicle image can be determined as pre-marked vehicle images, and the vehicle images pre-marked based on the vehicle rectangular box can be input into the initial detection model as training data. The initial detection model is trained, and the loss function is calculated. The model is optimized based on the back propagation algorithm until the loss function converges to obtain the target detection model.
[0055] In practical applications, data annotation can be performed on vehicle images that include the left, right, or rear side of the vehicle using a semi-supervised training approach. Specifically, a model trained on a first vehicle image can be used to determine a vehicle rectangular box that includes the left, right, or rear side of the vehicle. The vehicle rectangular box determined by the model can then be manually corrected, and the corrected image used as the second vehicle image. During the process of optimizing the model using the backpropagation algorithm, the accuracy of the vehicle rectangular box determined by the model that includes the left, right, or rear side of the vehicle can be continuously tested. If the accuracy of the vehicle rectangular box determined by the model that includes the left, right, or rear side of the vehicle is greater than a preset threshold, the model can be determined to be a target detection model.
[0056] In the embodiment of the present invention, by inputting the real-time image into a pre-trained target detection model, it is possible to determine based on the target detection model whether the detection result of the real-time image is a vehicle rectangular frame or empty.
[0057] Step 230: When the detection result is empty, determine that the real-time image does not contain a vehicle, and determine the region boundary according to the lane line detection result of the real-time image.
[0058] Specifically, when it is determined that the detection result of the real-time image is empty, it can be determined that the real-time image does not contain a vehicle. In this case, lane line detection can be performed on the real-time image to determine the lane line detection result. The lane line detection result is that the real-time image contains two parallel lane lines or does not contain two parallel lane lines. When the lane line detection result is determined to be that the real-time image contains two parallel lane lines, the region boundary can be determined based on the lane connecting line determined by the two parallel lane lines. That is, the lane connecting line determined by the two parallel lane lines that is farthest from the edge of the real-time image can be determined as the region boundary. When the lane line detection result is determined to be that the real-time image does not contain two parallel lane lines, the region boundary cannot be determined.
[0059] In an embodiment of the present invention, when it is determined that the detection result of the real-time image is empty, that is, when it is determined that the real-time image does not contain a vehicle, the region boundary is determined based on the lane line detection result of the real-time image, and the region boundary is automatically determined, thereby improving the efficiency and accuracy of the region boundary determination and reducing the labor cost of the region boundary determination.
[0060] Step 240: If the detection result is a vehicle rectangular frame, determine that the real-time image contains a vehicle, and track the vehicle based on the real-time image until the vehicle stops.
[0061] In one embodiment, tracking the vehicle based on the real-time image until the vehicle stops includes:
[0062] The real-time image containing the vehicle is input into a pre-trained target tracking model so that the target tracking model determines the position information of the vehicle in the real-time image; and the vehicle is determined to be stationary when the offset distance of the position information of the vehicle in two frames of real-time images separated by a preset time is not greater than a preset distance.
[0063] Among them, the target tracking model is used to determine the location information of the vehicle in the real-time image.
[0064] Specifically, after a real-time image containing a vehicle is input into a pre-trained target tracking model, the target tracking model can track the vehicle contained in the real-time image to determine the vehicle's position information in the real-time image. That is, the output information of the target tracking model is the vehicle's position information in the real-time image. In the process of inputting the real-time image acquired in real time into the target tracking model so that the target tracking model determines the vehicle's position information in the real-time image, an offset distance between the vehicle's position information in the real-time image of the current frame and the position information in the real-time image of the previous frame before a preset time interval can be determined. The offset distance is compared with the preset distance. If it is determined that the offset distance is less than or equal to the preset distance, it can be determined that the vehicle is stationary.
[0065] In the embodiment of the present invention, when it is determined that the real-time image contains a vehicle, whether the vehicle is stationary is determined by vehicle tracking, thereby achieving real-time monitoring of the vehicle status.
[0066] Step 250: Determine the area boundary based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0067] In one implementation, step 250 may specifically include:
[0068] Perform lane line detection on the real-time image to determine a lane line detection result; when the lane line detection result shows that the real-time image contains two parallel lane lines, determine the area boundary based on a lane connecting line determined by the two parallel lane lines and the vehicle boundary; when the lane line detection result shows that the real-time image does not contain two parallel lane lines, determine the area boundary based on the vehicle boundary.
[0069] Specifically, to facilitate loading and unloading of items carried by the vehicle, the vehicle boundary may coincide with the area boundary or may be some distance away from the area boundary. Therefore, after determining that the vehicle is stationary, the vehicle boundary can be determined, and the vehicle boundary at this time may include the vehicle rear boundary and side boundaries.
[0070] To more accurately determine the region boundary, after acquiring a real-time image, lane line detection can be performed based on the real-time image to determine the lane line detection result. The lane line detection result can indicate that the real-time image contains two parallel lane lines, or that the real-time image does not contain two parallel lane lines. When the lane line detection result indicates that the real-time image contains two parallel lane lines, the region boundary can be determined based on the lane connecting line or vehicle boundary determined by the two parallel lane lines. When the lane line detection result indicates that the real-time image does not contain two parallel lane lines, the vehicle boundary can be determined as the region boundary.
[0071] As described in the first embodiment, the real-time image is acquired by an image acquisition device disposed on the side adjacent to the area inside the warehouse and the area outside the warehouse, or by an image acquisition device disposed toward the area inside the warehouse.
[0072] When determining the area boundary based on the lane connecting line or vehicle boundary determined by two parallel lane lines, if the real-time image is acquired by an image acquisition device set on the side where the area inside the warehouse and the area outside the warehouse are adjacent, the lane connecting line and the vehicle boundary that are farther away from the edge of the real-time image can be determined as the area boundary; if the real-time image is acquired by an image acquisition device set toward the area inside the warehouse, the lane connecting line and the vehicle boundary that are closer to the bottom of the real-time image can be determined as the area boundary.
[0073] In practical applications, when a real-time image contains at least three parallel lane lines, at least two lane connectors can be determined based on the at least three parallel lane lines. Furthermore, the at least two lane connectors can be fused to obtain a target lane connector corresponding to the at least two lane connectors. Furthermore, the region boundary can be determined based on the lane connectors or vehicle boundaries.
[0074] Furthermore, if the real-time image contains multiple vehicles and the lane detection result indicates that the real-time image does not contain two parallel lane lines, the region boundary can be determined based on the vehicle boundaries corresponding to the multiple vehicles. Specifically, the region boundary can be determined by performing boundary fusion on the vehicle boundaries corresponding to each vehicle. Specifically, after determining the distance between the vehicle boundary corresponding to each vehicle and the image edge of the real-time image, the region boundary is constructed based on the mean of the distances to achieve the region boundary determination.
[0075] In an embodiment of the present invention, the area boundary is determined based on the lane line detection results of the real-time image and the vehicle boundary determined when the vehicle is stationary, and the area boundary is automatically determined, which improves the efficiency and accuracy of the area boundary determination and reduces the labor cost of the area boundary determination.
[0076] The method for determining area boundaries provided by an embodiment of the present invention includes: acquiring real-time images of adjacent areas; inputting the real-time images into a pre-trained target detection model so that the target detection model outputs a detection result; when the detection result is empty, determining that the real-time image does not contain a vehicle, and determining the area boundary based on the lane line detection result of the real-time image; when the detection result is a vehicle rectangular frame, determining that the real-time image contains a vehicle, and tracking the vehicle based on the real-time image until the vehicle stops; determining the area boundary based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle stops. In the above technical solution, after acquiring a real-time image of an adjacent region, the real-time image can be input as input information into a pre-trained object detection model. The object detection model can determine whether the real-time image contains a vehicle. If the real-time image is determined to contain a vehicle, the detection result of the real-time image is determined to be a vehicle rectangular frame. If the real-time image is determined not to contain a vehicle, the detection result of the real-time image is determined to be empty. If the detection result of the real-time image is determined to be empty, i.e., if the real-time image is determined not to contain a vehicle, the region boundary is determined based on the lane line detection result of the real-time image. If the detection result of the real-time image is determined to be a vehicle rectangular frame, i.e., if the real-time image is determined to contain a vehicle, the vehicle boundary can be determined when the vehicle is stationary by tracking the real-time image. Lane line detection results can also be performed on the stationary real-time image. The region boundary can then be determined based on the lane line detection results and the vehicle boundary determined when the vehicle is stationary, thereby achieving automated region boundary determination, improving the efficiency and accuracy of region boundary determination and reducing the labor cost of region boundary determination. In addition, after the region boundary is determined, the region boundary can be adaptively updated according to the actual scenario.
[0077] Figure 3 This is a schematic diagram of the structure of a region boundary determination device provided in an embodiment of the present invention. This device and the region boundary determination methods described in the aforementioned embodiments share the same inventive concept. For details not fully described in the embodiments of the region boundary determination device, reference can be made to the embodiments of the aforementioned region boundary determination methods.
[0078] The specific structure of the area boundary determination device is as follows: Figure 3 Shown, including:
[0079] An acquisition module 310 is used to acquire real-time images of adjacent areas;
[0080] A tracking module 320 is configured to, when determining that the real-time image contains a vehicle, track the vehicle based on the real-time image until the vehicle stops;
[0081] The determination module 330 is configured to determine a region boundary based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0082] Based on the above embodiment, the device further includes:
[0083] The detection module is used to input the real-time image of the adjacent area into a pre-trained target detection model after acquiring the real-time image, so that the target detection model outputs a detection result; if the detection result is empty, it is determined that the real-time image does not contain a vehicle; if the detection result is a vehicle rectangular frame, it is determined that the real-time image contains a vehicle.
[0084] Based on the above embodiment, the device further includes:
[0085] An execution module is used to determine the area boundary according to the lane line detection result of the real-time image when it is determined that the real-time image does not contain a vehicle.
[0086] Based on the above embodiment, the detection module is further configured to:
[0087] A first vehicle image marked with a vehicle rectangular frame is selected from a public data set; a vehicle image containing the left side, right side or rear side of the vehicle is marked based on the vehicle rectangular frame to obtain a second vehicle image; the first vehicle image and the second vehicle image are determined as the pre-marked vehicle images; the vehicle images pre-marked based on the vehicle rectangular frame are input as training data into an initial detection model, the initial detection model is trained, and a loss function is calculated; the model is optimized based on a back propagation algorithm until the loss function converges, thereby obtaining the target detection model.
[0088] Based on the above embodiment, the tracking module 320 is specifically configured to:
[0089] When it is determined that the real-time image contains a vehicle, the real-time image containing the vehicle is input into a pre-trained target tracking model so that the target tracking model determines the position information of the vehicle in the real-time image; when it is determined that the offset distance of the position information of the vehicle in two frames of real-time images separated by a preset time is not greater than a preset distance, the vehicle is determined to be stationary.
[0090] Based on the above embodiment, the determination module 330 is specifically configured to:
[0091] Perform lane line detection on the real-time image to determine a lane line detection result; when the lane line detection result shows that the real-time image contains two parallel lane lines, determine the area boundary based on a lane connecting line determined by the two parallel lane lines and the vehicle boundary; when the lane line detection result shows that the real-time image does not contain two parallel lane lines, determine the area boundary based on the vehicle boundary.
[0092] The region boundary determination device provided in the embodiment of the present invention can execute the region boundary determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the region boundary determination method.
[0093] It is worth noting that in the embodiment of the above-mentioned area boundary determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0094] Figure 4 A schematic structural diagram of a computer device provided in an embodiment of the present invention. Figure 4 A block diagram of an exemplary computer device 4 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The computer device 4 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0095] like Figure 4 As shown, computer device 4 is implemented as a general-purpose computing electronic device. Components of computer device 4 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and bus 18 connecting various system components (including system memory 28 and processing unit 16).
[0096] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0097] Computer device 4 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 4, including volatile and non-volatile media, removable and non-removable media.
[0098] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 4 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 4 Not shown, often called a "hard drive"). Although Figure 4 Not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
[0099] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0100] The computer device 4 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the computer device 4, and / or any device that enables the computer device 4 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the computer device 4 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. Figure 4 As shown, the network adapter 20 communicates with other modules of the computer device 4 via the bus 18. Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with computer device 4, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0101] The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, for example, implementing the region boundary determination method provided in an embodiment of the present invention, which includes:
[0102] Acquire real-time images of adjacent areas;
[0103] When it is determined that the real-time image contains a vehicle, tracking the vehicle based on the real-time image until the vehicle stops;
[0104] An area boundary is determined based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0105] Of course, those skilled in the art will appreciate that the processor may also implement the technical solution of the region boundary determination method provided in any embodiment of the present invention.
[0106] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for determining a region boundary provided in an embodiment of the present invention is implemented, for example, and the method includes:
[0107] Acquire real-time images of adjacent areas;
[0108] When it is determined that the real-time image contains a vehicle, tracking the vehicle based on the real-time image until the vehicle stops;
[0109] An area boundary is determined based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
[0110] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, 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 above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0111] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0112] Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0113] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0114] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computer device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
[0115] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will appreciate that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions are possible for those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining a region boundary, characterized in that: include: Acquire real-time images of adjacent areas; When it is determined that the real-time image contains a vehicle, tracking the vehicle based on the real-time image until the vehicle stops; An area boundary is determined based on the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
2. The method for determining the region boundary according to claim 1, wherein: After acquiring the real-time image of the adjacent area, it also includes: Inputting the real-time image into a pre-trained target detection model so that the target detection model outputs a detection result; When the detection result is empty, it is determined that the real-time image does not contain a vehicle; when the detection result is a vehicle rectangular frame, it is determined that the real-time image contains a vehicle.
3. The method for determining the region boundary according to claim 1, wherein: Also includes: When it is determined that the real-time image does not include a vehicle, the region boundary is determined according to a lane line detection result of the real-time image.
4. The method for determining the region boundary according to claim 2, wherein: The training process of the target detection model includes: Inputting vehicle images pre-marked based on vehicle rectangular frames as training data into an initial detection model, performing model training on the initial detection model, and calculating a loss function; The model is optimized based on the back propagation algorithm until the loss function converges to obtain the target detection model.
5. The method for determining the region boundary according to claim 4, wherein: Before the vehicle images pre-labeled based on the vehicle rectangle are fed into the initial detection model as training data, the following steps are also included: Select a first vehicle image marked with a vehicle rectangular frame from a public dataset; Annotating the vehicle image including the left side, right side, or rear side of the vehicle based on the vehicle rectangular frame to obtain a second vehicle image; The first vehicle image and the second vehicle image are determined as the pre-marked vehicle images.
6. The method for determining the region boundary according to claim 2, wherein: Tracking the vehicle based on the real-time image until the vehicle stops, including: Inputting the real-time image containing the vehicle into a pre-trained target tracking model so that the target tracking model determines the position information of the vehicle in the real-time image; When it is determined that an offset distance between position information of the vehicle in two frames of real-time images separated by a preset time is not greater than a preset distance, it is determined that the vehicle is stationary.
7. The method for determining area boundaries according to claim 1, wherein: Determining a region boundary based on a lane line detection result of the real-time image and a vehicle boundary determined when the vehicle is stationary includes: Performing lane line detection on the real-time image to determine a lane line detection result; When the lane line detection result indicates that the real-time image includes two parallel lane lines, determining the region boundary based on a lane connecting line determined by the two parallel lane lines and the vehicle boundary; When the lane line detection result indicates that the real-time image does not include two lane lines parallel to each other, the region boundary is determined according to the vehicle boundary.
8. A device for determining a region boundary, characterized in that: include: An acquisition module is used to acquire real-time images of adjacent areas; a tracking module, configured to, if it is determined that the real-time image contains a vehicle, track the vehicle based on the real-time image until the vehicle comes to a stop; The determination module is used to determine the area boundary according to the lane line detection result of the real-time image and the vehicle boundary determined when the vehicle is stationary.
9. A computer device, characterized in that: The computer device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the area boundary determination method according to any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, the computer executable instructions are used to perform the area boundary determination method according to any one of claims 1 to 7.