Vehicle orientation identification method and system, computer equipment and storage medium
Through the multi-model fusion of object detection model, component segmentation model and headlight detection model, the problems of low efficiency and poor accuracy of vehicle orientation recognition in traditional vehicle inspection methods are solved, and the rapid and accurate identification of vehicle orientation is achieved, and the inspection is improved. Efficiency and accuracy of vehicle processes.
Patent Information
- Application Number
- CN202411129478.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-19
AI Technical Summary
Traditional vehicle inspection methods rely on manual inspection, which have problems such as low efficiency, strong subjectivity and error-prone, especially in the angular deviation of the vehicle orientation, background interference or vehicle model identification difficulties, which lead to the difficulty of accurately judging the vehicle orientation.
The preset object detection model, component segmentation model and headlight detection model are used to process vehicle photos, identify and mark objects, filter out the detection frame with the largest area as the ROI area, and get the target vehicle picture, and generate the vehicle through multi-model fusion. final orientation identification result.
It realizes fast and accurate identification of vehicle orientation, improves the efficiency and accuracy of vehicle inspection processes, and reduces the impact of manual errors and background interference.
Smart Images

Figure CN118982574A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a vehicle position recognition method, system, computer equipment and non-volatile computer-readable storage medium. Background Art
[0002] At present, with the rapid development of the automobile industry, vehicle transactions and insurance services are increasing, and vehicle inspection has become the key to ensuring transaction security and insurance fairness. In scenarios such as new and used car transactions and vehicle insurance, vehicle inspection not only requires a comprehensive assessment of the vehicle's appearance and performance, but also requires ensuring the accuracy and authenticity of vehicle information. Traditional vehicle inspection methods rely on manual inspections, which have problems such as low efficiency, strong subjectivity, and easy errors.
[0003] In order to improve the efficiency and accuracy of vehicle inspection, modern vehicle inspection processes have gradually introduced automation technology. In the process of car insurance, the insured usually needs to take photos of the vehicle at specific angles according to the standard process, such as 45 degrees from the left front, 45 degrees from the right front, 45 degrees from the left rear and 45 degrees from the right rear, as well as photos of the frame number. These photos will serve as the basis for vehicle evaluation and insurance pricing. However, due to shooting conditions, technical limitations or irregular operations of the insured, the uploaded photos may have problems such as angle deviation, background interference or difficulty in identifying the vehicle model, which affects the accurate judgment of the vehicle's position.
[0004] Based on this, how to provide a vehicle position recognition method, system, computer device and non-volatile computer-readable storage medium that can realize fast and accurate recognition of the vehicle position is a problem that urgently needs to be solved by technical personnel in this field. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a vehicle position identification method, system, computer device and non-volatile computer-readable storage medium that can be used in financial technology or other related fields, aiming to solve the problem of how to achieve rapid and accurate identification of the vehicle position.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A vehicle position recognition method, comprising:
[0008] The original image is processed using a preset object detection model to identify and mark all objects in the original image through detection frames;
[0009] Obtain all target detection frames whose object category is vehicle in the original image, and select the target detection frame with the largest area as the ROI area;
[0010] The original image is cropped according to the determined ROI area to obtain a target image corresponding to the ROI area and including the target vehicle;
[0011] Using a preset component segmentation model and a vehicle light detection model, respectively, the target vehicle in the target image is identified in terms of position, and a corresponding first position identification result and a second position identification result are generated;
[0012] A final position recognition result of the target vehicle is generated based on the first position recognition result and the second position recognition result.
[0013] In a further technical solution, the vehicle position recognition method, wherein the process of processing the original image using a preset object detection model, identifying and marking all objects in the original image by a detection frame, comprises:
[0014] Get the original image uploaded by the target person;
[0015] The original image is input into a preset object detection model for processing. The object detection model identifies the categories of all objects in the original image and marks the position of each object through a detection frame.
[0016] In a further technical solution, the vehicle position recognition method, wherein the step of obtaining all target detection frames whose object category is a vehicle in the original image and selecting the target detection frame with the largest area as the ROI region, comprises:
[0017] Obtain all target detection frames whose object category is vehicle in the original image, and sort them according to the area size of each target detection frame;
[0018] The target detection frame with the largest area is selected from the sorted target detection frame list as the ROI region.
[0019] In a further technical solution, the vehicle position recognition method, wherein the original image is cropped according to the determined ROI area to obtain a target image corresponding to the ROI area and containing the target vehicle, comprises:
[0020] Obtaining coordinate information of the ROI area in the original image;
[0021] The original image is cropped according to the coordinate information to generate a target image containing the target vehicle corresponding to the ROI area.
[0022] In a further technical solution, the vehicle position recognition method, wherein the use of a preset component segmentation model and a vehicle light detection model to respectively recognize the position of the target vehicle in the target image, and generating corresponding first position recognition results and second position recognition results, comprises:
[0023] Processing the target image using a preset component segmentation model to identify various components of the target vehicle, and generating a first orientation recognition result corresponding to the target vehicle according to the position and distribution of each component;
[0024] The target image is processed using a preset headlight detection model to identify the position of the headlights of the target vehicle, and a second orientation recognition result corresponding to the target vehicle is generated based on the position and distribution of the headlights.
[0025] In a further technical solution, the vehicle position recognition method, wherein the generating of the final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result, comprises:
[0026] Integrating information of the first position recognition result and the second position recognition result;
[0027] According to the information integration result, the final position recognition result of the target vehicle is determined, and the final position recognition result is sent to a designated person.
[0028] In a further technical solution, in the vehicle orientation recognition method, the object detection model and the headlight detection model are both YOLOv7 models, and the component segmentation model is a DeeplabV3 model.
[0029] A vehicle position recognition system, comprising:
[0030] A processing module, used to process the original image using a preset object detection model, identify and mark all objects in the original image through a detection frame;
[0031] A screening module is used to obtain all target detection frames whose object category is vehicle in the original image, and screen out the target detection frame with the largest area as the ROI area;
[0032] A cropping module, used for cropping the original image according to the determined ROI area to obtain a target image containing a target vehicle corresponding to the ROI area;
[0033] A recognition module, used to use a preset component segmentation model and a vehicle light detection model to respectively perform position recognition on the target vehicle in the target image, and generate a corresponding first position recognition result and a second position recognition result;
[0034] A generation module is used to generate a final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result.
[0035] A computer device, wherein the computer device comprises at least one processor; and
[0036] a memory communicatively connected to the at least one processor; wherein,
[0037] The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the vehicle position recognition method as described in any one of the above items can be implemented.
[0038] A non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by at least one processor, can implement any of the vehicle position recognition methods described above.
[0039] Compared with the prior art, the present invention provides a vehicle orientation recognition method, system, computer device and non-volatile computer-readable storage medium, wherein the method comprises: using a preset object detection model to process the original image, identifying and marking all objects in the original image through detection frames; obtaining all target detection frames whose object category is vehicle in the original image, and screening out the target detection frame with the largest area as the ROI area; cropping the original image according to the determined ROI area to obtain a target image containing the target vehicle corresponding to the ROI area; using a preset component segmentation model and a headlight detection model to respectively identify the orientation of the target vehicle in the target image, and generating corresponding first orientation recognition results and second orientation recognition results; based on the first orientation recognition result and the second orientation recognition result, generating the final orientation recognition result of the target vehicle. In this way, the method of the present invention can realize rapid and accurate identification of the vehicle orientation. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic flow chart of a vehicle position recognition method provided in an embodiment of the present invention.
[0042] Figure 2 A schematic diagram of functional modules of a vehicle position recognition system provided in an embodiment of the present invention.
[0043] Figure 3 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0045] In the description of the present invention, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps therein is not limited and can be appropriately adjusted as needed.
[0046] Various non-limiting embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0047] At present, with the rapid development of the automobile industry, vehicle transactions and insurance services are increasing, and vehicle inspection has become the key to ensuring transaction security and insurance fairness. In scenarios such as new and used car transactions and vehicle insurance, vehicle inspection not only requires a comprehensive assessment of the vehicle's appearance and performance, but also requires ensuring the accuracy and authenticity of vehicle information. Traditional vehicle inspection methods rely on manual inspections, which have problems such as low efficiency, strong subjectivity, and easy errors.
[0048] In order to improve the efficiency and accuracy of vehicle inspection, modern vehicle inspection processes have gradually introduced automation technology. In the process of car insurance, the insured usually needs to take photos of the vehicle at specific angles according to the standard process, such as 45 degrees from the left front, 45 degrees from the right front, 45 degrees from the left rear and 45 degrees from the right rear, as well as photos of the frame number. These photos will serve as the basis for vehicle evaluation and insurance pricing. However, due to shooting conditions, technical limitations or irregular operations of the insured, the uploaded photos may have problems such as angle deviation, background interference or difficulty in identifying the vehicle model, which affects the accurate judgment of the vehicle's position.
[0049] Based on this, how to provide a vehicle position recognition method, system, computer device and non-volatile computer-readable storage medium that can realize fast and accurate recognition of the vehicle position is a problem that urgently needs to be solved by technical personnel in this field.
[0050] Therefore, to solve the above problem, please refer to Figure 1 The embodiment of the present invention provides a vehicle position recognition method, wherein the method comprises the steps of:
[0051] S100, processing the original image using a preset object detection model, identifying and marking all objects in the original image through detection frames;
[0052] S200, obtaining all target detection frames whose object category is vehicle in the original image, and selecting the target detection frame with the largest area as the ROI region;
[0053] S300, cropping the original image according to the determined ROI area to obtain a target image corresponding to the ROI area and including a target vehicle;
[0054] S400, using a preset component segmentation model and a vehicle light detection model to respectively perform orientation recognition on the target vehicle in the target image, and generate a corresponding first orientation recognition result and a second orientation recognition result;
[0055] S500: Generate a final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result.
[0056] Furthermore, in the vehicle position recognition method, the step S100 of processing the original image using a preset object detection model, identifying and marking all objects in the original image with a detection frame includes:
[0057] Get the original image uploaded by the target person;
[0058] The original image is input into a preset object detection model for processing. The object detection model identifies the categories of all objects in the original image and marks the position of each object through a detection frame.
[0059] In the specific implementation, in this embodiment, the original image uploaded by the target person is obtained, and the original image is input into a preset object detection model for processing. The object detection model identifies the categories of all objects in the original image and marks the position of each object through a detection frame. The specific implementation process is as follows:
[0060] 1) Image acquisition
[0061] First, the original image (i.e., original picture) of the target vehicle needs to be obtained from the target person (e.g., the vehicle owner), which can usually be achieved through a user interface through which the user can upload the original picture of the vehicle;
[0062] 2) Image preprocessing
[0063] Perform necessary preprocessing on the uploaded original image to adapt it to the requirements of the object detection model; preprocessing may include adjusting the image size to match the input size of the model, normalizing pixel values, enhancing image quality, etc.
[0064] 3) Load the object detection model
[0065] Select and load a preset object detection model; for example, you can select popular object detection models such as YOLO, SSD, FasterRCNN, etc. The object detection model in this embodiment is the YOLOv7 model; ensure that the model has been properly trained and can recognize vehicles and other objects that may appear in the image;
[0066] 4) Model configuration
[0067] Configure the object detection model as needed, including setting input and output parameters, selecting computing devices (such as CPU or GPU), etc.
[0068] 5) Image Input
[0069] Input the preprocessed original image into the object detection model, which can usually be done through the model's API or directly at the model's input layer;
[0070] 6) Perform detection
[0071] The object detection model performs forward propagation on the input original image, identifies all objects in the image, and predicts their categories and locations;
[0072] 7) Result analysis
[0073] Parse the detection results output by the object detection model, which usually includes the category label of each object and the corresponding bounding box, where the bounding box (i.e., detection box) is usually represented by coordinate values;
[0074] 8) Bounding box drawing
[0075] Draw the detected bounding box on the original image, and mark the category of the object inside or next to the box to intuitively display the detection results;
[0076] 9) Result verification and output
[0077] Verify the detection results to ensure that the detection box correctly marks the vehicle and other objects and the category recognition is accurate. Then, output the image marked with the detection box.
[0078] Through the above process, automation from image acquisition to object detection can be achieved, providing basic data and visual reference for subsequent vehicle analysis and orientation recognition.
[0079] Furthermore, in the vehicle position recognition method, the step S200 of obtaining all target detection frames of the object category of the vehicle in the original image and selecting the target detection frame with the largest area as the ROI region includes:
[0080] Obtain all target detection frames whose object category is vehicle in the original image, and sort them according to the area size of each target detection frame;
[0081] The target detection frame with the largest area is selected from the sorted target detection frame list as the ROI region.
[0082] In the specific implementation, in this embodiment, all target detection frames whose object category is a vehicle in the original image are obtained, and the target detection frames are sorted according to the area size, and the target detection frame with the largest area is selected from the sorted target detection frame list as the ROI area, wherein the specific implementation process is as follows:
[0083] 1) Object detection execution
[0084] Input the original image into the preset object detection model, which can identify all objects in the image and output a bounding box and the corresponding object category for each detected object;
[0085] 2) Target detection box extraction
[0086] Traverse all the detection frames output by the model and filter out the detection frames with the category label "vehicle", that is, the target detection frames; this step requires checking the category information of each detection frame and only retaining those target detection frames that are identified as vehicles;
[0087] 3) Area calculation and sorting of target detection boxes
[0088] For the selected target detection frames, calculate the area of each target detection frame and sort all the target detection frames in descending order by area to ensure that the target detection frame with the largest area is at the front.
[0089] 4) Filter the target detection box with the largest area
[0090] Select the target detection box with the largest area from the sorted list. This target detection box will be used as the ROI area of the target vehicle, indicating that the target detection box is the area most likely to contain the main body of the target vehicle.
[0091] ROI (Region of Interest), that is, the region of interest. In the present invention, the scene refers to the area of the subject vehicle (target vehicle) photographed during vehicle inspection (excluding the surrounding information interference);
[0092] Through the above process, the target vehicle can be effectively identified from the original image, and an ROI area that is most likely to contain the main body of the target vehicle can be determined, providing accurate regional positioning for subsequent vehicle analysis and orientation recognition.
[0093] Furthermore, in the vehicle position recognition method, the step S300 of cropping the original image according to the determined ROI area to obtain a target image corresponding to the ROI area and containing the target vehicle includes:
[0094] Obtaining coordinate information of the ROI area in the original image;
[0095] The original image is cropped according to the coordinate information to generate a target image containing the target vehicle corresponding to the ROI area.
[0096] In the specific implementation, in this embodiment, the coordinate information of the ROI area in the original image is obtained, the original image is cropped according to the coordinate information, and a target image corresponding to the ROI area and including the target vehicle is generated, wherein the specific implementation process is as follows:
[0097] 1) Determine the coordinates of the ROI area
[0098] Based on the coordinates of the target detection box with the largest area in the original image, the coordinate information of the ROI area in the original image is determined and the coordinate information is extracted. These coordinates define the position of the ROI area in the original image.
[0099] 2) Verify the validity of coordinates
[0100] Make sure the extracted coordinate information is within the size range of the original image to avoid coordinates exceeding the image boundary, which may cause cropping errors;
[0101] 3) Preparation for cutting operation
[0102] Set the cropping parameters according to the coordinate information of the ROI area;
[0103] 4) Perform cropping
[0104] Use image processing libraries (such as OpenCV, PIL, etc.) to crop the original image according to the set cropping parameters. This step will cut out a partial image (i.e., the target image) containing only the target vehicle from the original image.
[0105] 5) Generate target image
[0106] The local image obtained after cropping is the target image corresponding to the ROI area containing the target vehicle;
[0107] Perform necessary post-processing, such as resizing and rotating, to meet the needs of subsequent processing or display;
[0108] Through the above process, the area containing the target vehicle can be accurately cropped from the original image to generate a clear target image, which facilitates subsequent vehicle analysis and orientation recognition.
[0109] Further, the vehicle position recognition method, wherein the step S400, using a preset component segmentation model and a vehicle light detection model to respectively perform position recognition on the target vehicle in the target image, and generating corresponding first position recognition results and second position recognition results, comprises:
[0110] Processing the target image using a preset component segmentation model to identify various components of the target vehicle, and generating a first orientation recognition result corresponding to the target vehicle according to the position and distribution of each component;
[0111] The target image is processed using a preset headlight detection model to identify the position of the headlights of the target vehicle, and a second orientation recognition result corresponding to the target vehicle is generated based on the position and distribution of the headlights.
[0112] In the specific implementation, in this embodiment, the target image is processed using a preset component segmentation model to identify the various components of the target vehicle, and a first position recognition result corresponding to the target vehicle is generated according to the position and distribution of each component; the target image is processed using a preset headlight detection model to identify the position of the headlight of the target vehicle, and a second position recognition result corresponding to the target vehicle is generated according to the position and distribution of the headlight; wherein the specific implementation process is as follows:
[0113] 1) Load the component segmentation model
[0114] Select and load a preset component segmentation model that can identify and segment the various components of the vehicle in the image; ensure that the model has been properly trained to handle the resolution and content of the target image; the component segmentation model in this embodiment is the DeeplabV3 model;
[0115] That is, the component segmentation model in this embodiment is based on the semantic segmentation model of DeeplabV3, which supports the segmentation of the exterior parts of the car, including 42 categories of exterior parts such as the windshield, front bumper, hood, left front leaf, left front door, left rear door, left rear leaf, rear bumper, trunk lid, rear windshield, right rear leaf, right rear door, right front door, right front leaf, and left front window;
[0116] 2) Target image processing
[0117] The cropped target image is fed into the component segmentation model; the model analyzes the image and attempts to identify the various components of the vehicle, such as the hood, doors, front and rear bumpers, etc.
[0118] 3) Component identification and segmentation
[0119] The component segmentation model outputs a mask for each identified component, which indicates the specific location of each component in the image.
[0120] 4) Generate the first position recognition result
[0121] Based on the identified part masks, analyze the location and distribution of the parts; for example, if the front bumper is on the left side of the image, it may indicate that the target vehicle is facing right;
[0122] The position and distribution information of the components are integrated to generate a first position identification result of the target vehicle, which can be an azimuth angle or a position description;
[0123] For example:
[0124] To ensure the accuracy and efficiency of the target vehicle detection process, in this embodiment, the target image may be first processed using a component segmentation model to identify and segment the various components of the vehicle;
[0125] The segmentation mask output by the model enables the area of each component to be calculated and these areas are accumulated in the front, rear, left and right directions of the vehicle according to the component name;
[0126] Then, the area proportions of these four directions are calculated respectively to evaluate the possible orientation of the vehicle;
[0127] During the evaluation process, this implementation first determines the area ratio of the segmentation mask. If this ratio is less than 0.2, the segmentation quality is considered unsatisfactory. Therefore, this implementation does not rely on the segmentation results of the model.
[0128] Only when the area ratio of the segmentation mask is qualified, this implementation will further analyze; among them, the area ratios of the front, rear, left and right directions will be calculated. If the front ratio is significantly greater than the rear ratio, the left ratio is significantly greater than the right ratio, and the front and left area ratios are both greater than the threshold of 0.1, it can be preliminarily determined that the vehicle is 45 degrees to the left front (i.e., the first orientation recognition result); the setting of the 0.1 threshold is intended to avoid misjudgment caused by deviation in shooting angle or deliberate avoidance of vehicle damage parts;
[0129] 5) Load the headlight detection model
[0130] Select and load a preset headlight detection model, which is specifically used to identify the position of vehicle headlights; the component segmentation model in this embodiment is a YOLOv7 model;
[0131] That is, the vehicle light detection model in this embodiment is a detection model of vehicle lights in different directions obtained by training based on YOLOv7, including categories such as left front headlight, left rear headlight, and left front fog light;
[0132] 6) Car light detection and processing
[0133] Input the target image into the headlight detection model, which will analyze the image and identify the headlight position of the target vehicle.
[0134] 7) Vehicle light position recognition
[0135] The headlight detection model outputs the location information of the target vehicle headlight, including the center coordinates of the headlight or the mask of the entire headlight area;
[0136] 8) Generate the second position recognition result
[0137] Based on the identified headlight positions, analyze the headlight distribution and position relative to the center of the image; for example, if the left headlight is closer to the center of the image, it may indicate that the vehicle is biased to the left front;
[0138] Combined with the position and distribution of the vehicle lights, a second position recognition result of the target vehicle is generated;
[0139] For example:
[0140] First, this embodiment uses the headlight detection model to process the target image to identify the position of the headlights. It is known to those skilled in the art that in a vehicle image taken at 45 degrees, the headlights at the center of the image usually indicate the actual position of the vehicle. Therefore, this embodiment will pay special attention to the headlights located in the center of the image, that is, the x-coordinates of the center points of the headlights fall within the range of 1 / 3 to 2 / 3 of the width of the ROI area.
[0141] Next, this implementation will count and calculate the proportion of the number of headlights in each direction of the left front, right front, left rear, and right rear in the center area of the target image; if only one direction of headlights appears in the detection result, then this direction is likely to be the actual direction of the target vehicle (i.e., the second direction recognition result), and this headlight detection result is matched with the previous component segmentation result (i.e., the first direction recognition result). If the two are consistent, the direction of the target vehicle can be confirmed;
[0142] However, the applicant also realizes that there may be risks in relying solely on the headlight detection model, for example, the headlight of the target vehicle may be a disassembled part, or the shooting angle is not truly 45 degrees; in order to reduce this risk, this implementation will combine the component segmentation result with the headlight detection result (i.e., the first orientation recognition result and the second orientation recognition result), as well as the information uploaded by the target person, to make a comprehensive judgment to ensure that the final vehicle orientation recognition result is both accurate and reliable;
[0143] This embodiment can greatly improve the accuracy of vehicle position recognition through this detailed multi-model fusion verification logic, providing a solid foundation for applications such as vehicle inspection and insurance assessment;
[0144] Through the above process, the parts and light positions of the target vehicle can be automatically identified from the target image, and the orientation recognition result of the target vehicle can be generated accordingly, thereby improving the accuracy and efficiency of the vehicle inspection process.
[0145] Furthermore, the vehicle position recognition method, wherein the generating of the final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result, comprises:
[0146] Integrating information of the first position recognition result and the second position recognition result;
[0147] According to the information integration result, the final position recognition result of the target vehicle is determined, and the final position recognition result is sent to a designated person.
[0148] In the specific implementation, in this embodiment, the first position recognition result and the second position recognition result are integrated, and the final position recognition result of the target vehicle is determined according to the information integration result, and the final position recognition result is sent to a designated person, wherein the specific implementation process is as follows:
[0149] 1) Result Collection
[0150] Prepare two orientation recognition results: the first orientation recognition result comes from the component segmentation model, and the second orientation recognition result comes from the headlight detection model;
[0151] 2) Information Integration
[0152] Compare the orientation information in the two results to check whether there is consistency; if the orientations given by the two models are consistent or support each other, the confidence of orientation recognition can be improved;
[0153] 3) Conflict Resolution
[0154] If there is a conflict between the two results, such as the component segmentation model indicates 45 degrees to the left front, while the headlight detection model indicates 45 degrees to the right front, further analysis is required to consider possible reasons, such as missed detection of component recognition, misjudgment of the headlight position, etc.
[0155] 4) Comprehensive judgment
[0156] Combine the advantages of the two models to make a comprehensive judgment; for example, if the headlight detection result shows a clear left-front or right-front distribution in the center of the image, and the component segmentation result also supports this judgment, the two results can be combined to determine the final orientation of the vehicle;
[0157] 5) Manual review
[0158] When there are uncertainties in the automatic analysis, manual review may be required to resolve the conflict; professionals can make the final judgment based on the model results and the original images;
[0159] 6) Final result is determined
[0160] According to the results of information integration and comprehensive judgment, the final position recognition result of the target vehicle is determined;
[0161] 7) Record the results
[0162] Record the final position identification result of the target vehicle in a designated location for subsequent review and recording;
[0163] 8) Result communication
[0164] Send the final position identification result of the target vehicle to the designated person through appropriate communication channels, such as email, system notification or SMS;
[0165] 9) Follow-up action guidance
[0166] Based on the final position identification result of the target vehicle, provide guidance to relevant personnel on follow-up actions, such as the next step of the vehicle inspection process or relevant information for insurance assessment;
[0167] Through the above process, the vehicle's position can be quickly and accurately identified, and key information can be communicated to relevant personnel in a timely manner, thereby improving the efficiency and accuracy of the entire vehicle inspection and evaluation process.
[0168] As can be seen from the above method embodiments, the vehicle orientation recognition method provided by the present invention at least includes: processing the original image using a preset object detection model, identifying and marking all objects in the original image through detection frames; obtaining all target detection frames whose object category is a vehicle in the original image, and screening out the target detection frame with the largest area as the ROI area; cropping the original image according to the determined ROI area to obtain a target image containing a target vehicle corresponding to the ROI area; using a preset component segmentation model and a headlight detection model to respectively identify the orientation of the target vehicle in the target image, and generating corresponding first orientation recognition results and second orientation recognition results; generating a final orientation recognition result of the target vehicle based on the first orientation recognition result and the second orientation recognition result; and so on. In this way, the method of the present invention can realize rapid and accurate recognition of the vehicle orientation.
[0169] Specifically, the vehicle position recognition method provided in the embodiment of the present invention fully utilizes the advantages of the YOLOv7 object detection model, the DeeplabV3 semantic segmentation model, and the YOLOv7 headlight detection model, and improves the generalization performance of the end-to-end system as a whole through the fusion strategy logic that takes the strengths of each model and makes up for its weaknesses, thereby achieving fast, accurate and effective recognition of the vehicle position;
[0170] At the same time, the object detection model is used to filter background interference, the component segmentation model is used to realize appearance part recognition, and the headlight detection model is used to assist the recognition results of the component segmentation model, which can effectively reduce the misrecognition of component orientation;
[0171] Moreover, through the method of this embodiment, it is possible to quickly confirm whether the photos (original photos) uploaded by customers meet the specifications, guide customers to take complete and correct vehicle inspection photos, and to prevent malicious behavior to a certain extent. It also provides effective data support for processes such as vehicle appearance inspection in subsequent vehicle inspection links.
[0172] It should be understood that, although the present application provides method operation steps as described in the embodiments or flowcharts, more or less operation steps may be included based on conventional or non-creative labor, and these operation steps are not necessarily performed in sequence according to the embodiment or flowchart. The order of steps listed in the embodiment or flowchart is only one way of executing the order of many steps, and does not represent the only execution order. It should be noted that there is not necessarily a certain order between the above steps. A person of ordinary skill in the art can understand from the description of the embodiment of the present invention that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, or they may be executed in exchange, etc. Moreover, at least a part of the steps in the embodiment or flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but may be executed in turn, alternately or synchronously with other steps or at least a part of the sub-steps or stages of other steps.
[0173] Based on the above method embodiment, please refer to Figure 2 Another embodiment of the present invention further provides a vehicle position recognition system, wherein the system comprises:
[0174] A processing module 11 is used to process the original image using a preset object detection model, identify and mark all objects in the original image through a detection frame;
[0175] A screening module 12 is used to obtain all target detection frames whose object category is vehicle in the original image, and screen out the target detection frame with the largest area as the ROI area;
[0176] A cropping module 13 is used to crop the original image according to the determined ROI area to obtain a target image containing a target vehicle corresponding to the ROI area;
[0177] The recognition module 14 is used to respectively identify the position of the target vehicle in the target image by using a preset component segmentation model and a vehicle light detection model, and generate a corresponding first position recognition result and a second position recognition result;
[0178] The generating module 15 is used to generate a final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result.
[0179] The specific implementation method is shown in the above method embodiment, which will not be described again here.
[0180] As can be seen from the above system embodiments, the vehicle orientation recognition system provided by the present invention at least includes: using a preset object detection model to process the original image, identifying and marking all objects in the original image through detection frames; obtaining all target detection frames whose object category is a vehicle in the original image, and screening out the target detection frame with the largest area as the ROI area; cropping the original image according to the determined ROI area to obtain a target image containing a target vehicle corresponding to the ROI area; using a preset component segmentation model and a headlight detection model to respectively identify the orientation of the target vehicle in the target image, and generating corresponding first orientation recognition results and second orientation recognition results; based on the first orientation recognition result and the second orientation recognition result, generating a final orientation recognition result of the target vehicle; and so on. In this way, the system of the present invention can realize rapid and accurate identification of the vehicle orientation.
[0181] Specifically, in the vehicle position recognition system provided by the embodiment of the present invention, the advantages of the YOLOv7 object detection model, the DeeplabV3 semantic segmentation model, and the YOLOv7 headlight detection model are fully utilized, and the fusion strategy logic that takes advantage of the strengths of each model and makes up for its weaknesses is used to improve the generalization performance of the end-to-end system as a whole, thereby achieving fast, accurate and effective recognition of the vehicle position;
[0182] At the same time, the object detection model is used to filter background interference, the component segmentation model is used to realize appearance part recognition, and the headlight detection model is used to assist the recognition results of the component segmentation model, which can effectively reduce the misrecognition of component orientation;
[0183] Moreover, through the system of this embodiment, it is possible to quickly confirm whether the photos (original photos) uploaded by customers meet the specifications, guide customers to take complete and correct vehicle inspection photos, and to prevent malicious behavior to a certain extent. It also provides effective data support for subsequent vehicle appearance inspection processes in the vehicle inspection link.
[0184] Based on the above method embodiment, please refer to Figure 3 Another embodiment of the present invention further provides a computer device, wherein the computer device 10 includes:
[0185] memory 120 and one or more processors 110, Figure 3 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a communication bus or other means. Figure 3 The example of connecting via a communication bus is taken as an example.
[0186] The processor 110 is used to complete various control logics of the computer device 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP, or any other such configuration.
[0187] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the computer program corresponding to the vehicle position recognition method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the computer device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the vehicle position recognition method in the above method embodiment.
[0188] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device or at least one function; the data storage area may store data created according to the use of the computer device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the computer device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0189] One or more units are stored in the memory 120, and when executed by one or more processors 110, the vehicle position recognition method in any of the above method embodiments can be implemented, for example, the vehicle position recognition method described above can be implemented. Figure 1 The method comprises steps S100 to S500.
[0190] Those skilled in the art will understand that Figure 3 The hardware structure diagram shown in the figure is only a schematic diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0191] Based on the above method embodiments, another embodiment of the present invention further provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the vehicle position recognition method in any of the above method embodiments can be implemented, for example, the vehicle position recognition method described above can be implemented. Figure 1 The method comprises steps S100 to S500.
[0192] As an example, the non-volatile storage medium can include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable ROM (EEPROM), or a flash memory. Volatile memory can include a random access memory (RAM) as an external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synch link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0193] Based on the above method embodiments, another embodiment of the present invention further provides a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a processor, the vehicle position recognition method in any of the above method embodiments can be implemented, for example, the vehicle position recognition method described above can be implemented. Figure 1 The method comprises steps S100 to S500.
[0194] The embodiments described above are merely illustrative, in which the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can exist in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0196] Conditional language such as "can," "can," "might," or "may," unless specifically stated otherwise or otherwise understood within the context as used, is generally intended to convey, among other things, that a particular embodiment can include (while other embodiments do not) a particular feature, element, and / or operation. Thus, such conditional language is also generally intended to imply that a feature, element, and / or operation is required for one or more embodiments anyway or that one or more embodiments must include logic for determining, with or without input or prompting, whether such features, elements, and / or operations are included or will be performed in any particular embodiment.
[0197] What has been described herein, in this specification and in the accompanying drawings includes examples that can provide a vehicle position identification method, system, computer device, and non-volatile computer-readable storage medium. Of course, it is not possible to describe every conceivable combination of elements and / or methods for the purpose of describing the various features of the present disclosure, but it can be recognized that many other combinations and permutations of the disclosed features are possible. Therefore, it is obvious that various modifications can be made to the present disclosure without departing from the scope or spirit of the present disclosure, but all these various modifications should belong to the scope of protection of the claims attached to the present invention. In addition, or in an alternative, other embodiments of the present disclosure may be obvious from consideration of this specification and the accompanying drawings and from the practice of the present disclosure as presented herein. It is intended that the examples proposed in this specification and the accompanying drawings are considered to be illustrative and not restrictive in all respects. Although specific terms are used in this article, they are used in a general and descriptive sense and are not used for limiting purposes.
Claims
1. A vehicle position recognition method, characterized in that: include: The original image is processed using a preset object detection model to identify and mark all objects in the original image through detection frames; Obtain all target detection frames whose object category is vehicle in the original image, and select the target detection frame with the largest area as the ROI area; The original image is cropped according to the determined ROI area to obtain a target image corresponding to the ROI area and including the target vehicle; Using a preset component segmentation model and a vehicle light detection model, respectively, the target vehicle in the target image is identified in terms of position, and a corresponding first position identification result and a second position identification result are generated; A final position recognition result of the target vehicle is generated based on the first position recognition result and the second position recognition result.
2. The vehicle position recognition method according to claim 1, characterized in that: The method of processing the original image using a preset object detection model, identifying and marking all objects in the original image through a detection frame, includes: Get the original image uploaded by the target person; The original image is input into a preset object detection model for processing. The object detection model identifies the categories of all objects in the original image and marks the position of each object through a detection frame.
3. The vehicle position recognition method according to claim 2, characterized in that: The step of obtaining all target detection frames of vehicle object category in the original image and selecting the target detection frame with the largest area as the ROI region includes: Obtain all target detection frames whose object category is vehicle in the original image, and sort them according to the area size of each target detection frame; The target detection frame with the largest area is selected from the sorted target detection frame list as the ROI region.
4. The vehicle position recognition method according to claim 3, characterized in that: The step of cropping the original image according to the determined ROI region to obtain a target image corresponding to the ROI region and including the target vehicle includes: Obtaining coordinate information of the ROI area in the original image; The original image is cropped according to the coordinate information to generate a target image containing the target vehicle corresponding to the ROI area.
5. The vehicle position recognition method according to claim 4, characterized in that: The method of using the preset component segmentation model and the vehicle light detection model to respectively identify the position of the target vehicle in the target image and generate a corresponding first position identification result and a second position identification result includes: Processing the target image using a preset component segmentation model to identify various components of the target vehicle, and generating a first orientation recognition result corresponding to the target vehicle according to the position and distribution of each component; The target image is processed using a preset headlight detection model to identify the position of the headlights of the target vehicle, and a second orientation recognition result corresponding to the target vehicle is generated based on the position and distribution of the headlights.
6. The vehicle position recognition method according to claim 5, characterized in that: The generating a final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result includes: Integrating information of the first position recognition result and the second position recognition result; According to the information integration result, the final position recognition result of the target vehicle is determined, and the final position recognition result is sent to a designated person.
7. The vehicle position recognition method according to any one of claims 1 to 6, characterized in that: The object detection model and the headlight detection model are both YOLOv7 models, and the component segmentation model is DeeplabV3 model.
8. A vehicle position recognition system, characterized in that: include: A processing module, used to process the original image using a preset object detection model, identify and mark all objects in the original image through a detection frame; A screening module is used to obtain all target detection frames whose object category is vehicle in the original image, and screen out the target detection frame with the largest area as the ROI area; A cropping module, used for cropping the original image according to the determined ROI area to obtain a target image containing a target vehicle corresponding to the ROI area; A recognition module, used to use a preset component segmentation model and a vehicle light detection model to respectively perform position recognition on the target vehicle in the target image, and generate a corresponding first position recognition result and a second position recognition result; A generation module is used to generate a final position recognition result of the target vehicle based on the first position recognition result and the second position recognition result.
9. A computer device, characterized in that: The computer device comprises at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor. When the computer program is executed by the at least one processor, the vehicle position recognition method as described in any one of claims 1 to 7 can be implemented.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the vehicle position recognition method as described in any one of claims 1 to 7 can be implemented.
