Image processing method, terminal equipment and computer readable storage medium

By generating sample images containing vehicles and labeled lane lines, the problem of lane lines being blocked in the sample images actually collected is solved, and the training accuracy of the detection model is improved.

CN120047766APending Publication Date: 2025-05-27UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411991693.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-27

Smart Images

  • Figure CN120047766A_ABST
    Figure CN120047766A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of image processing, and particularly relates to an image processing method, terminal equipment and a computer readable storage medium, and the method comprises the steps: obtaining a first image; wherein the first image comprises a vehicle and does not comprise a lane line; acquiring a second image including a lane line; wherein the lane line in the second image is marked; generating a first sample image according to the first image and the second image; wherein the first sample image comprises a vehicle and a lane line, and the marking information of the lane line in the first sample image is consistent with the marking information of the lane line in the second image; the first sample image is used for training a lane line detection model. In the embodiment of the invention, according to the combination of the first image comprising the vehicle and the second image marked with the lane line, the generated sample image comprises the vehicle and the marked lane line, so that the sample quality is effectively improved, and the training precision of the detection model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of image processing, and particularly relates to an image processing method, a terminal device, and a computer-readable storage medium. Background Art

[0002] With the development of AI, autonomous driving has also reached a new level. In autonomous driving technology, lane line detection plays an important role. After detecting the lane lines, it is convenient for subsequent path planning and can also be used for lane keeping, etc.

[0003] Currently, lane lines in the captured image of the road in front of the vehicle can be detected through a detection model. During the training process of the detection model, a large number of sample images are required to simulate the driving scenarios that actually exist. However, the lane lines in the actually collected sample images are often blocked, and the sample quality is poor, thus affecting the training accuracy of the detection model. Summary of the Invention

[0004] Embodiments of this application provide an image processing method, a terminal device, and a computer-readable storage medium, which can generate sample images with higher quality and help improve the training accuracy of the detection model.

[0005] In a first aspect, embodiments of this application provide an image processing method, including:

[0006] Obtain a first image; wherein, the first image includes a vehicle and does not include lane lines;

[0007] Obtain a second image including lane lines; wherein, the lane lines in the second image are already annotated;

[0008] Generate a first sample image according to the first image and the second image; wherein, the first sample image includes a vehicle and lane lines, and the annotation information of the lane lines in the first sample image is consistent with the annotation information of the lane lines in the second image; the first sample image is used to train the detection model of the lane lines.

[0009] In the embodiments of this application, the sample image generated according to the combination of the first image including a vehicle and the second image annotated with lane lines includes both the vehicle and the annotated lane lines, effectively improving the sample quality, and thus helping to improve the training accuracy of the detection model.

[0010] In a possible implementation manner of the first aspect, the obtaining the first image includes:

[0011] Obtain a third image of the vehicle driving on the road;

[0012] Input the third image into the trained segmentation model to output the first image; wherein, the segmentation model is used to segment a vehicle from the input image.

[0013] In the embodiments of the present application, the first image is segmented from the third image through the trained segmentation model, which greatly reduces the difficulty of obtaining samples. In addition, since the trained segmentation model reaches the preset accuracy, the trained segmentation model can improve the segmentation accuracy and provide a reliable data basis for subsequent image processing.

[0014] In a possible implementation manner of the first aspect, the method further includes:

[0015] Obtain a second sample image of a vehicle driving on a road; wherein, the vehicle in the second sample image is labeled.

[0016] Train the segmentation model according to the second sample image to obtain the trained segmentation model.

[0017] In a possible implementation manner of the first aspect, the training the segmentation model according to the second sample image to obtain the trained segmentation model includes:

[0018] Input the second sample image into the segmentation model to output a fourth image;

[0019] Calculate the loss value of the segmentation model according to the fourth image and the local image of the labeled vehicle in the second sample image;

[0020] If the loss value is less than a preset threshold, adjust the model parameters of the segmentation model according to the loss value to obtain the updated segmentation model;

[0021] Continue to train the updated segmentation model until the trained segmentation model is obtained.

[0022] In a possible implementation manner of the first aspect, the generating the first sample image according to the first image and the second image includes:

[0023] Copy the first image into the second image to obtain the first sample image;

[0024] Record the annotation information of the lane lines in the second image as the annotation information of the lane lines in the first sample image.

[0025] In the embodiments of the present application, making the annotation information of the lane lines in the first sample image consistent with the annotation information of the lane lines in the second image is equivalent to annotating the lane lines in the first sample image. In the above manner, not only can a large number of sample images be obtained by combination, but also the sample images can be accurately annotated, improving the sample quality, which thus helps to improve the training accuracy of the detection model.

[0026] In a possible implementation manner of the first aspect, the step of copying the first image into the second image to obtain the first sample image includes:

[0027] Covering part of the lane lines in the second image with the first image to obtain the first sample image.

[0028] In the first sample image obtained in this way, the vehicle occludes part of the lane lines, but the first sample image includes accurate annotation information of the lane lines. Using such a sample image to train the detection model helps to improve the detection accuracy of the detection model for the occluded lane lines.

[0029] In a possible implementation manner of the first aspect, the method further includes:

[0030] Training the detection model according to the first sample image and the annotation information of the lane lines in the first sample image to obtain the trained detection model.

[0031] In a second aspect, an image processing device provided by an embodiment of the present application includes:

[0032] A first acquisition unit, configured to acquire a first image; wherein, the first image includes a vehicle and does not include lane lines;

[0033] A second acquisition unit, configured to acquire a second image including lane lines; wherein, the lane lines in the second image are already annotated;

[0034] An image generation unit, configured to generate a first sample image according to the first image and the second image; wherein, the first sample image includes a vehicle and lane lines, and the annotation information of the lane lines in the first sample image is consistent with the annotation information of the lane lines in the second image; the first sample image is used to train a detection model of lane lines.

[0035] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the image processing method described in any one of the above first aspects is implemented.

[0036] Fourthly, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the image processing method as described in any one of the first aspects above.

[0037] Fifthly, an embodiment of the present application provides a computer program product, which when running on a terminal device, causes the terminal device to execute the image processing method as described in any one of the first aspects above.

[0038] It can be understood that the beneficial effects of the second to fifth aspects above can be referred to the relevant descriptions in the first aspect above, and will not be elaborated here. Description of the Drawings

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 is a schematic flowchart of the image processing method provided by an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of the effect of a sample image provided by an embodiment of the present application;

[0042] Figure 3 is a structural block diagram of the image processing device provided by an embodiment of the present application;

[0043] Figure 4 is a schematic diagram of the structure of the terminal device provided by an embodiment of the present application. Detailed Embodiments

[0044] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0045] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0046] It should also be understood that the term "and / or" used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0047] As used in the specification and appended claims of the present application, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.

[0048] In addition, in the description of the specification and appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0049] Reference to "one embodiment" or "some embodiments" or the like described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

[0050] With the development of AI, autonomous driving has also reached a new level. In autonomous driving technology, lane line detection plays an important role. After detecting the lane lines, it is convenient for subsequent path planning and can also be used for lane keeping and the like.

[0051] Currently, lane lines in a captured image of the road in front of a vehicle can be detected by a detection model. During the training process of the detection model, a large number of sample images are required to simulate the driving scenarios that actually exist. However, in the actually collected sample images, the lane lines are often blocked, and the sample quality is poor, thus increasing the training difficulty of the detection model.

[0052] Based on this, the embodiments of the present application provide an image processing method. In the embodiments of the present application, according to a combination of a first image including a vehicle and a second image annotated with lane lines, the generated sample image includes both the vehicle and the annotated lane lines, effectively improving the sample quality, and thus contributing to improving the training accuracy of the detection model.

[0053] See Figure 1, which is a schematic flowchart of the image processing method provided by an embodiment of this application. As an example rather than a limitation, the method may include the following steps:

[0054] S101, obtain a first image.

[0055] Among them, the first image includes a vehicle and does not include lane lines.

[0056] In one embodiment, S101 may include:

[0057] The image including the vehicle can be collected from the network in a crawler manner; then the searched images are screened to screen out the first image.

[0058] For example, perform image detection processing on the searched images to obtain a detection result; if the detection result indicates that the image includes a vehicle but does not include lane lines, then determine the image as the first image.

[0059] For another example, perform image segmentation processing on the searched images to segment out the local image of the vehicle from the searched images to obtain the first image.

[0060] In another embodiment, S101 may include:

[0061] Obtain a third image of the vehicle driving on the road;

[0062] Input the third image into the trained segmentation model, and output the first image; among them, the segmentation model is used to segment out the vehicle from the input image.

[0063] Specifically, the vehicle can be driven on the road, and the third image on the road in front of the vehicle is collected through the camera in front of the vehicle.

[0064] In one implementation manner, the way to train the segmentation model may include:

[0065] Obtain a second sample image of the vehicle driving on the road; among them, the vehicle in the second sample image has been labeled;

[0066] Train the segmentation model according to the second sample image to obtain the trained segmentation model.

[0067] It can be understood that the second sample image can also be obtained from the network in the above-mentioned crawler manner, and then the vehicle in the second sample image is manually labeled.

[0068] Among them, the annotation information of the second sample image can be obtained through annotation. The annotation information may include the position information of the pixel points corresponding to the vehicle in the second sample image, or the annotation information may include the label of each pixel point in the second sample image, and the label is used to indicate whether the pixel point belongs to the vehicle.

[0069] Optionally, the training process includes:

[0070] Input the second sample image into the segmentation model to output a fourth image;

[0071] Calculate the loss value of the segmentation model according to the fourth image and the local image of the vehicle already annotated in the second sample image;

[0072] If the loss value is less than a preset threshold, adjust the model parameters of the segmentation model according to the loss value to obtain the updated segmentation model;

[0073] Continue to train the updated segmentation model until the trained segmentation model is obtained.

[0074] In the embodiments of the present application, the first image is segmented from the third image through the trained segmentation model, and this method greatly reduces the difficulty of obtaining samples. In addition, since the trained segmentation model reaches the preset accuracy, the trained segmentation model can improve the segmentation accuracy and provide a reliable data basis for subsequent image processing.

[0075] S102, obtain a second image including lane lines.

[0076] Among them, the lane lines in the second image have been annotated.

[0077] In one implementation, a vehicle can be driven on the road, and the lane lines on the road ahead without vehicles are collected through a camera in front of the vehicle to obtain a second image, and then the second image is manually annotated.

[0078] In another implementation, images including lane lines can be collected from the network through a crawler; then the collected images are subjected to image segmentation processing to obtain local images of the lane lines, denoted as the second image; then the second image is manually annotated.

[0079] It can be understood that the annotation information of the lane lines may include the position information of the pixel points corresponding to the lane lines in the second image, or may include the label of each pixel point in the second image, and the label is used to indicate whether the pixel point belongs to the lane lines.

[0080] S103, generate a first sample image according to the first image and the second image.

[0081] Among them, the first sample image includes a vehicle and lane lines.

[0082] In one embodiment, S103 may include:

[0083] Copy the first image into the second image to obtain the first sample image;

[0084] Record the annotation information of the lane lines in the second image as the annotation information of the lane lines in the first sample image.

[0085] In the embodiments of the present application, making the annotation information of the lane lines in the first sample image consistent with the annotation information of the lane lines in the second image is equivalent to annotating the lane lines in the first sample image. In the above manner, not only can a large number of sample images be obtained by combination, but also the sample images can be accurately annotated, improving the sample quality, which thus helps to improve the training accuracy of the detection model.

[0086] In one implementation, the first image can be copied to any position in the second image to obtain the first sample image.

[0087] In another implementation, the first image covers some of the lane lines in the second image to obtain the first sample image.

[0088] Compared with the previous method, in the first sample image obtained in this way, the vehicle occludes some of the lane lines, but the first sample image includes accurate annotation information of the lane lines. Using such sample images to train the detection model helps to improve the detection accuracy of the detection model for the occluded lane lines.

[0089] In one embodiment, the method further includes:

[0090] Train the detection model according to the first sample image and the annotation information of the lane lines in the first sample image to obtain the trained detection model.

[0091] Optionally, the training process may include:

[0092] Input the first sample image into the detection model to output a detection result; calculate the loss value of the detection model according to the detection result and the annotation information of the lane lines in the first sample image; if the loss value is less than a preset threshold, determine the current detection model as the trained detection model; if the loss value is greater than or equal to the preset threshold, update the model parameters of the detection model according to the loss value to obtain an updated detection model, and continue to train the updated detection model until the loss value of the detection model is less than the preset threshold.

[0093] Exemplarily, see Figure 2, which is a schematic diagram of the effect of the sample image provided by the embodiment of the present application. As an example rather than a limitation, as Figure 2 shown in (a) therein, it is the second image, that is, an image including only lane lines. Figure 2 shown in (b) therein is the mask image corresponding to the annotation information of the second image, where the white part represents the lane lines. Figure 2 shown in (c) therein is the first sample image generated according to the first image and the second image, where it includes lane lines and vehicles, and the vehicles block some lane lines. Figure 2 shown in (d) therein is the mask image corresponding to the annotation information of the first sample image, where the white part represents the lane lines. As Figure 2 shown in (b) and (d) therein, the annotation information of both the second image and the first sample image is consistent.

[0094] In the embodiment of the present application, the sample image generated according to the combination of the first image including vehicles and the second image annotated with lane lines includes both vehicles and the annotated lane lines, effectively improving the sample quality, thereby helping to improve the training accuracy of the detection model.

[0095] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0096] Corresponding to the image processing method described in the above embodiment, Figure 3 is a structural block diagram of the image processing device provided by the embodiment of the present application. For the convenience of description, only the parts related to the embodiment of the present application are shown.

[0097] Referring to Figure 3 , the device 3 includes:

[0098] The first acquisition unit 31 is used to acquire the first image; wherein, the first image includes vehicles and does not include lane lines.

[0099] The second acquisition unit 32 is used to acquire the second image including lane lines; wherein, the lane lines in the second image are annotated.

[0100] The image generation unit 33 is used to generate the first sample image according to the first image and the second image; wherein, the first sample image includes vehicles and lane lines, and the annotation information of the lane lines in the first sample image is consistent with the annotation information of the lane lines in the second image; the first sample image is used to train the detection model of the lane lines.

[0101] Optionally, the first acquisition unit 31 is further used for:

[0102] Obtain a third image of the vehicle driving on the road;

[0103] Input the third image into the trained segmentation model to output the first image; wherein, the segmentation model is used to segment the vehicle from the input image.

[0104] Optionally, the first acquisition unit 31 is further configured to:

[0105] Obtain a second sample image of the vehicle driving on the road; wherein, the vehicle in the second sample image is labeled;

[0106] Train the segmentation model according to the second sample image to obtain the trained segmentation model.

[0107] Optionally, the first acquisition unit 31 is further configured to:

[0108] Input the second sample image into the segmentation model to output a fourth image;

[0109] Calculate the loss value of the segmentation model according to the fourth image and the local image of the labeled vehicle in the second sample image;

[0110] If the loss value is less than a preset threshold, adjust the model parameters of the segmentation model according to the loss value to obtain the updated segmentation model;

[0111] Continue to train the updated segmentation model until the trained segmentation model is obtained.

[0112] Optionally, the image generation unit 33 is further configured to:

[0113] Copy the first image into the second image to obtain the first sample image;

[0114] Record the annotation information of the lane lines in the second image as the annotation information of the lane lines in the first sample image.

[0115] Optionally, the image generation unit 33 is further configured to:

[0116] Cover part of the lane lines in the second image with the first image to obtain the first sample image.

[0117] Optionally, the image generation unit 33 is further configured to:

[0118] Train the detection model according to the first sample image and the annotation information of the lane lines in the first sample image to obtain the trained detection model.

[0119] It should be noted that, for the information interaction, execution process, etc. between the above-mentioned devices / units, since they are based on the same concept as the method embodiments of this application, for their specific functions and the technical effects brought, please refer to the method embodiment part for details, and will not be elaborated here.

[0120] In addition, Figure 3 The illustrated image processing device may be a software unit, a hardware unit, or a unit combining software and hardware built into an existing terminal device, may also be integrated into the terminal device as an independent attachment, or may exist as an independent terminal device.

[0121] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above-mentioned functions may be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in a processing unit, may also exist physically as individual units, or two or more units may be integrated in one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system may refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0122] Figure 4 is a schematic structural diagram of a terminal device provided by an embodiment of this application. As Figure 4 shown, the terminal device 4 in this embodiment includes: at least one processor 40 ( Figure 4 only one is shown in the figure), a processor, a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40. When the processor 40 executes the computer program 42, the steps in any of the above-mentioned image processing method embodiments are implemented.

[0123] The terminal device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 4 merely an example of the terminal device 4, does not constitute a limitation on the terminal device 4, and may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0124] The processor 40 may be a Central Processing Unit (CPU), and the processor 40 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0125] In some embodiments, the memory 41 may be an internal storage unit of the terminal device 4, such as the hard disk or memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the terminal device 4. Further, the memory 41 may also include both the internal storage unit and the external storage device of the terminal device 4. The memory 41 is used to store an operating system, application programs, a Boot Loader, data, and other programs, such as the program code of the computer program. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0126] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.

[0127] The embodiment of the present application provides a computer program product, and when the computer program product runs on a terminal device, the terminal device can implement the steps in the above method embodiments when executed.

[0128] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0129] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0130] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0131] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.

[0132] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. An image processing method, characterized in that: include: Acquire a first image; wherein the first image includes the vehicle but does not include lane lines; Acquire a second image including lane lines; wherein the lane lines in the second image are marked; A first sample image is generated based on the first image and the second image; wherein the first sample image includes a vehicle and a lane line, and the labeling information of the lane line in the first sample image is consistent with the labeling information of the lane line in the second image; and the first sample image is used to train a lane line detection model.

2. The image processing method according to claim 1, characterized in that: The acquiring of the first image comprises: Acquiring a third image of the vehicle traveling on the road; The third image is input into a trained segmentation model, and the first image is output; wherein the segmentation model is used to segment the vehicle from the input image.

3. The image processing method according to claim 2, characterized in that: The method further comprises: Acquire a second sample image of a vehicle traveling on a road; wherein the vehicle in the second sample image has been labeled; The segmentation model is trained according to the second sample image to obtain the trained segmentation model.

4. The image processing method according to claim 3, characterized in that: The step of training the segmentation model according to the second sample image to obtain the trained segmentation model includes: Inputting the second sample image into the segmentation model, and outputting a fourth image; Calculating a loss value of the segmentation model according to the fourth image and the partial image of the vehicle marked in the second sample image; If the loss value is less than a preset threshold, adjusting the model parameters of the segmentation model according to the loss value to obtain an updated segmentation model; Continue to train the updated segmentation model until the trained segmentation model is obtained.

5. The image processing method according to claim 1, wherein: The step of generating a first sample image according to the first image and the second image includes: Copying the first image into the second image to obtain the first sample image; The labeling information of the lane line in the second image is recorded as the labeling information of the lane line in the first sample image.

6. The image processing method according to claim 5, characterized in that: The step of copying the first image into the second image to obtain the first sample image includes: The first image is used to cover part of the lane lines in the second image to obtain the first sample image.

7. The image processing method according to claim 1, characterized in that: The method further comprises: The detection model is trained according to the first sample image and the annotation information of the lane line in the first sample image to obtain the trained detection model.

8. An image processing device, characterized in that: include: A first acquisition unit, configured to acquire a first image; wherein the first image includes the vehicle but does not include lane lines; A second acquisition unit, configured to acquire a second image including lane lines; wherein the lane lines in the second image are marked; An image generation unit is used to generate a first sample image based on the first image and the second image; wherein the first sample image includes a vehicle and a lane line, and the labeling information of the lane line in the first sample image is consistent with the labeling information of the lane line in the second image; and the first sample image is used to train a lane line detection model.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Model training method, medium, program product and electronic equipment

    CN122090212A