Vehicle falling into water identification method and device
The dual image recognition model distinguishes occluded and blurred images, and combines the front and rear image categories to determine the vehicle's fall-in status, solving the problem of identifying errors in the existing technology, and achieving more accurate vehicle water detection and timely rescue measures.
Patent Information
- Application Number
- CN202210729674.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-06-24
AI Technical Summary
Existing vehicle water drop detection technology cannot effectively distinguish between occluded images and blurred images, resulting in computer vision recognition that vehicles are prone to identification errors when falling into the water.
Using a dual image recognition model, firstly, whether the image is an occluded or blurred image is determined by the first image recognition model. If it is not an occluded or blurred image, the image category is identified through the second image recognition model, and the vehicle falls into the water state is determined by combining the front and rear end image categories.
It effectively avoids identification errors, improves the accuracy of vehicle water recognition, and reduces the risk of passengers by issuing unlocking and alarm signals.
Smart Images

Figure CN115063757B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle safety technology, and in particular to a method and device for identifying a vehicle falling into water. Background Art
[0002] Accidents involving vehicles falling into water and resulting in drowning deaths are common and are one of the most fatal traffic accidents. Existing vehicle-overwater detection technologies include: 1) a conscious person inside the vehicle discovers the vehicle; 2) a person outside the vehicle discovers the vehicle; 3) a liquid pressure sensor around the vehicle or an onboard water ECU detects the vehicle's overwater signal; and 4) computer vision is used to identify the vehicle. Existing computer vision methods for identifying vehicles falling into water use an image recognition model that fails to distinguish between occluded and blurred images, making them prone to recognition errors. Summary of the Invention
[0003] The present invention provides a method and device for identifying vehicles falling into water, which are used to solve the defect that the computer vision method for identifying vehicles falling into water in the prior art adopts an image recognition model, does not distinguish between occluded images and blurred images, and is prone to recognition errors.
[0004] The present invention provides a method for identifying a vehicle falling into water, comprising:
[0005] Acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0006] Inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0007] If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, inputting the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0008] Vehicle-fall-into-water identification information is obtained according to the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0009] According to a vehicle-overwater recognition method provided by the present invention, the second image recognition information is used to indicate the category of the vehicle front end target image and the category of the vehicle rear end target image, including:
[0010] The second image recognition information is used to indicate that the category of the target image at the front end of the vehicle is a road category, a water surface category, or a non-road water surface category, and is also used to indicate that the target image at the rear end of the vehicle is a road category, a water surface category, or a non-road water surface category.
[0011] According to a vehicle-falling-into-water recognition method provided by the present invention, the second image recognition model is trained based on road category images, water surface category images, or non-road water surface category images, wherein the water surface category images are acquired based on a drone.
[0012] According to a vehicle-falling-into-water recognition method provided by the present invention, the road category images, the water surface category images, and the non-road water surface category images all include images of different scenes. If the number of images is lower than a target value, data enhancement is performed on the images based on an image enhancement library to obtain a training data set.
[0013] A vehicle falling into water recognition method provided by the present invention further includes:
[0014] According to the vehicle falling into water identification information, a vehicle unlocking signal and a linkage alarm signal are sent.
[0015] A vehicle falling into water recognition method provided by the present invention further includes:
[0016] The vehicle falling into water identification information at different times is obtained to obtain the current vehicle falling into water status, and the current vehicle falling into water status is added to the historical vehicle falling into water status queue to track the vehicle falling into water status in real time.
[0017] The present invention also provides a vehicle falling into water identification device, comprising:
[0018] an acquisition module, configured to acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0019] a first recognition module, configured to input the vehicle front target image and the vehicle rear target image into a first image recognition model, and obtain first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0020] a second recognition module configured to input the vehicle front target image and the vehicle rear target image into a second image recognition model if both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, and obtain second image recognition information output by the second image recognition model, wherein the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0021] The determination module is used to obtain vehicle-falling-into-water identification information based on the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0022] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the vehicle-fall-into-water recognition methods when executing the program.
[0023] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any one of the vehicle-fall-into-water recognition methods.
[0024] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, any one of the vehicle-falling-into-water recognition methods is implemented.
[0025] The vehicle-overwater recognition method and device provided by the present invention recognize occluded images and blurred images through a first image recognition model, then recognize the category to which the image belongs through a second image recognition model, and obtain vehicle-overwater recognition information based on the category, which can effectively avoid recognition errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 It is a flow chart of the vehicle falling into water identification method provided by the present invention;
[0028] Figure 2 It is a principle block diagram of the network structure provided by the present invention;
[0029] Figure 3 The present invention provides Figure 2 Schematic diagram of the network architecture for feature extraction;
[0030] Figure 4 The present invention provides Figure 2 Schematic diagram of the network architecture of the PAN module and the fully connected layer;
[0031] Figure 5 It is a structural schematic diagram of the vehicle falling into water identification device provided by the present invention;
[0032] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0033] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0034] In the description of the embodiments of the present application, it should be noted that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the embodiments of the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0035] In the description of the embodiments of this application, it should be noted that, unless otherwise specified or limited, the terms "connected" and "connection" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium. Those skilled in the art will understand the specific meanings of the above terms in the embodiments of this application based on the specific circumstances.
[0036] In the embodiments of the present application, unless otherwise expressly specified or limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediate medium. Furthermore, a first feature being "above," "above," and "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below," "below," and "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0037] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments 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, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0038] Figure 1 This is a flow chart of the vehicle falling into water identification method provided by the present invention, referring to Figure 1 The present invention provides a method for identifying a vehicle falling into water, comprising:
[0039] S1, acquiring a vehicle front end image and a vehicle rear end image, and preprocessing the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0040] S2, inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0041] S3: If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, input the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0042] S4, obtaining vehicle-overwater identification information according to the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0043] In step S1, a camera is installed at the front and rear of the vehicle. The camera mounting positions and angles must meet the following requirements: 1) The front and rear cameras are mounted in the center of the front windshield and rear of the vehicle, respectively. This installation method minimizes the problem of unusable captured images due to camera contamination; 2) When the vehicle is driving normally on the road, the image captured by the camera at half the height represents the end of the road. The camera mounting position and angle error must be less than 10 pixels.
[0044] Preprocessing the vehicle front end image and the vehicle rear end image includes: processing the vehicle front end image and the vehicle rear end image into a target format and target size for recognition by the first image recognition model and the second image recognition model. For example, the captured image may be cropped to obtain a portion below 1 / 2 of the image height and between 1 / 4 and 3 / 4 of the image width, and the cropped image may be scaled to the target size.
[0045] Optionally, you can set night fill light for the camera to improve night recognition accuracy.
[0046] In step S2, the preprocessed vehicle front target image and vehicle rear target image are input into the first image recognition model to determine whether the front and rear cameras are blocked or blurred. If both the front and rear cameras are not blurred and are not blocked, the vehicle falling into water status recognition is performed.
[0047] In steps S3 and S4, the second image recognition model is used to classify the vehicle front target image and the vehicle rear target image, and then it is determined whether the vehicle is currently in the water based on the category information.
[0048] It can be understood that the vehicle-falling-into-water recognition method and device provided by the present invention recognizes occluded images and blurred images through a first image recognition model, and then recognizes the category to which the image belongs through a second image recognition model, and obtains vehicle-falling-into-water recognition information based on the category, which can effectively avoid recognition errors.
[0049] Based on the above embodiment, as an optional embodiment, the second image recognition information is used to indicate the category of the vehicle front end target image and the category of the vehicle rear end target image, including:
[0050] The second image recognition information is used to indicate whether the vehicle front target image is classified as a road, a water surface, or a non-road water surface, and is also used to indicate whether the vehicle rear target image is classified as a road, a water surface, or a non-road water surface. Non-road water surface categories include sky, trees, houses, etc.
[0051] If the category of the target image at the front of the vehicle is a road category and the target image at the rear of the vehicle is a road category, it means that the vehicle has not fallen into the water. If the category of the target image at the front of the vehicle is a water surface category and the target image at the rear of the vehicle is a water surface category, it means that the vehicle has fallen into the water. If the category of the target image at the front of the vehicle is a water surface category and the target image at the rear of the vehicle is a non-road water surface category, or if the category of the target image at the front of the vehicle is a non-road water surface category and the target image at the rear of the vehicle is a water surface category, it means that the vehicle is about to fall into the water.
[0052] It can be understood that by further refining the categories of the vehicle front end target image and the vehicle rear end target image, the accuracy of determining whether the vehicle falls into water is improved.
[0053] Based on the above embodiment, as an optional embodiment, the second image recognition model is trained based on road category images, water surface category images or non-road water surface category images, wherein the water surface category images are acquired based on drones.
[0054] Optionally, the water surface category image is obtained based on a driving record video related to a vehicle falling into water on the Internet, or is obtained based on manual shooting, or is obtained using a water surface image on the Internet.
[0055] It is understandable that multi-angle shooting through drones can reproduce the process of the vehicle falling into the water to a certain extent, thereby improving the recognition accuracy of the second image recognition model.
[0056] Based on the above embodiment, as an optional embodiment, the road category images, the water surface category images and the non-road water surface category images all include images in different scenes. If the number of images is lower than the target value, the images are data enhanced based on the image enhancement library to obtain a training data set.
[0057] It is understandable that in order to improve the recognition accuracy of the second image recognition model, it is necessary to train the second image recognition model with images from a variety of scenarios, such as superimposing scene materials such as daytime, nighttime, sunny days, rainy days, and snowy days on the image, so that the trained model is more robust and generalizable. If the collected images have scenes that cannot be covered, such as snowy days, in this case, the RandomSnow method in the image enhancement library albumentations can be used on the collected materials. In addition, when the data set is insufficient, you can also use image enhancement libraries such as torchvision.transforms or albumentations to perform data enhancement on the collected images, such as horizontal mirroring, color transformation, brightness transformation, etc., so as to obtain more scenes and a sufficient number of data sets.
[0058] It is understandable that the collected and expanded training dataset also needs to be cropped and scaled to the target size. Specifically, the aspect ratio of the real image needs to be kept unchanged to reduce model prediction errors caused by image deformation.
[0059] Furthermore, for training datasets, it's necessary to define classification criteria for each category. For example, in camera blur occlusion recognition, images that are more than half obscured are considered occluded, images where the image content is unclear are considered blurry, and ambiguous images can be directly eliminated. For vehicle-in-water recognition, the features between water, road, and non-road categories are distinct, making classification relatively easy. At this point, it's important to ensure that the sample size across all categories within the same classification model is balanced to reduce model prediction failures caused by imbalanced sample sizes, thereby improving recognition accuracy.
[0060] Based on the above embodiment, as an optional embodiment, the present invention further includes:
[0061] According to the vehicle falling into water identification information, a vehicle unlocking signal and a linkage alarm signal are sent.
[0062] Vehicle unlocking signals include opening windows, unlocking doors and the trunk, giving passengers a greater chance of escaping when the vehicle sinks into water.
[0063] The coordinated alarm signal includes an audible and visual alarm signal and a rescue signal. The audible and visual alarm signal is used to remind the driver to save themselves or seek help from nearby residents. The rescue signal is used to obtain the vehicle's current location and upload the vehicle's current location, images of the vehicle's front and rear targets, and a video from the current time to the previous 15 seconds to the rescue platform, requesting assistance. After receiving the rescue signal, the rescue platform staff will promptly determine whether rescue is necessary.
[0064] Understandably, existing methods for detecting vehicles inundated are primarily: 1) a conscious person inside the vehicle discovers the vehicle; 2) a person outside the vehicle discovers the vehicle; 3) a liquid pressure sensor around the vehicle or an onboard water ECU detects the vehicle inundation signal; or 4) computer vision recognizes the vehicle inundation, but there are no specific implementation methods. The first two methods are only effective to a limited extent in detecting a vehicle inundation, such as when: 1) no one is inside the vehicle; 2) a person inside the vehicle is unconscious due to the impact of the vehicle inundation, or when their phone or other communication equipment is inoperable; or 3) no one outside the vehicle discovers the vehicle inundation. In these cases, the vehicle inundation is not detected in time, leading to a delay in calling for help. Furthermore, even if passengers do notice the vehicle inundation, the impact can easily damage the vehicle's electrical circuits, locking the doors, windows, and trunk, preventing occupants from saving themselves and endangering their lives. The third method can only detect the vehicle after it has already been submerged, making it impossible to call for help or unlock the doors, trunk, or windows before the vehicle has plunged, thereby increasing the risk of distress for both passengers and the vehicle. The embodiment of the present application reduces the risk of passengers getting into danger by sending a vehicle unlocking signal and a linkage alarm signal.
[0065] Based on the above embodiment, as an optional embodiment, the present invention further includes:
[0066] The vehicle falling into water identification information at different times is obtained to obtain the current vehicle falling into water status, and the current vehicle falling into water status is added to the historical vehicle falling into water status queue to track the vehicle falling into water status in real time.
[0067] Based on the classification results of the previous and next images, it is determined whether the vehicle in the current frame has fallen into the water. Then, the current vehicle's falling-in-water status is comprehensively judged in combination with the historical vehicle falling-in-water status. The current vehicle falling-in-water status is added to the historical vehicle falling-in-water status queue for real-time tracking.
[0068] To reduce misjudgments, the vehicle-in-water determination criterion can be set to ensure that the vehicle falls into water in a total of 10 frames, including the current frame and historical vehicle-in-water conditions, accounts for more than 1 / 2 of the total. If a vehicle falls into water, an alarm is immediately triggered and the rescue platform is reported.
[0069] It can be understood that the embodiment of the present application reduces the probability of misjudgment by further setting the criteria for determining whether the vehicle has fallen into the water. In addition, the vehicle's falling into the water can be tracked in real time, providing more information for rescue work and increasing the probability of successful rescue.
[0070] Based on the above embodiment, as an optional embodiment, the design rules of the first image recognition model and the second image recognition model are as follows: a. The width and height of the model input image cannot be too large, and can be selected to be less than 320, such as 320x320, 300x300, 224x224, 128x128, 112x112, 64x64, etc. b. The model size should be as small as possible while meeting the accuracy requirements. Classic classification models such as the smallest model in the Inception series, MobileNet series, and EfficientNet series can be used, or a customized network structure can be used. c. The model needs to be built using layers supported by the device to reduce the use of infrequently used layers. d. When building the network, use small convolution kernels as much as possible, such as 1x1, 3x3, and 5x5. e. There should not be too many fully connected layers (<3).
[0071] Furthermore, following the above-mentioned network design rules, the custom network structure can be used Figure 2 The architecture shown in Figure 1 shows that the model input size is 224x224x3. Figure 3 As shown in , the first five layers use standard convolution layers to obtain important image information, and normalization and activation are performed after each convolution layer, as shown in Figure 4 As shown in the figure, the upper and lower features are fused through the PAN module, and finally the classification result of the model is obtained through a layer of full connection.
[0072] Furthermore, during the conversion and quantization of the trained model, for op operators in the network model that cannot be converted, it is necessary to replace such operators or write op operators yourself. Therefore, special attention should be paid to avoiding such operators during network design. For example, when using PyTorch to build a network, try to use onnx and layers supported by in-vehicle smart terminals.
[0073] Furthermore, the converted and quantized model and weight files are placed in the in-vehicle intelligent terminal, and then CPU inference or GPU and NPU hardware accelerated inference are used.
[0074] It can be understood that the two models provided in the embodiments of the present application have the following advantages: saving device storage space, faster model training speed, high test accuracy of the model in the vehicle terminal (>0.8), and faster model running speed.
[0075] The vehicle-water-recognition device provided by the present invention is described below. The vehicle-water-recognition device described below and the vehicle-water-recognition method described above can be referenced to each other.
[0076] Figure 5 This is a schematic diagram of the structure of the vehicle falling into water identification device provided by the present invention, referring to Figure 5 The present invention also provides a vehicle falling into water identification device, comprising:
[0077] An acquisition module 510 is configured to acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0078] A first recognition module 520 is configured to input the vehicle front target image and the vehicle rear target image into a first image recognition model, and obtain first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0079] a second recognition module 530 configured to input the vehicle front target image and the vehicle rear target image into a second image recognition model if both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, and obtain second image recognition information output by the second image recognition model, wherein the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0080] The determination module 540 is configured to obtain vehicle-overwater identification information based on the category of the vehicle front target image and the category of the vehicle rear target image.
[0081] In one embodiment, the second identification module 530 is configured to:
[0082] The second image recognition information is used to indicate that the category of the target image at the front end of the vehicle is a road category, a water surface category, or a non-road water surface category, and is also used to indicate that the target image at the rear end of the vehicle is a road category, a water surface category, or a non-road water surface category.
[0083] In one embodiment, the second identification module 530 is configured to:
[0084] The second image recognition model is trained based on road category images, water surface category images or non-road water surface category images, wherein the water surface category images are acquired based on a drone.
[0085] In one embodiment, the second identification module 530 is configured to:
[0086] The road category images, the water surface category images, and the non-road water surface category images all include images in different scenes. If the number of images is lower than a target value, data enhancement is performed on the images based on an image enhancement library to obtain a training data set.
[0087] In one embodiment, it further includes:
[0088] The alarm module is used to send a vehicle unlocking signal and a linkage alarm signal according to the vehicle falling into water identification information.
[0089] In one embodiment, it further includes:
[0090] The tracking module obtains the vehicle falling into water identification information at different times, obtains the current vehicle falling into water status, and adds the current vehicle falling into water status to the historical vehicle falling into water status queue to track the vehicle falling into water status in real time.
[0091] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the vehicle-fall-into-water recognition method, which includes:
[0092] Acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0093] Inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0094] If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, inputting the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0095] Vehicle-fall-into-water identification information is obtained according to the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0096] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0097] On the other hand, the present invention further provides a computer program product, comprising a computer program, which may be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the vehicle-overwater identification method provided by the above methods, which includes:
[0098] Acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0099] Inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0100] If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, inputting the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0101] Vehicle-fall-into-water identification information is obtained according to the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0102] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the vehicle-overwater identification method provided by the above methods is implemented, the method comprising:
[0103] Acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image;
[0104] Inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images;
[0105] If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, inputting the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image;
[0106] Vehicle-fall-into-water identification information is obtained according to the category of the vehicle front end target image and the category of the vehicle rear end target image.
[0107] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0108] 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 necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for identifying a vehicle falling into water, characterized in that: A camera is set up at the front and rear of the vehicle, including: Acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image; Inputting the vehicle front target image and the vehicle rear target image into a first image recognition model, obtaining first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images; If both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, inputting the vehicle front target image and the vehicle rear target image into a second image recognition model to obtain second image recognition information output by the second image recognition model, where the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image; Obtaining vehicle-overwater identification information according to the category of the vehicle front end target image and the category of the vehicle rear end target image; The second image recognition information is used to indicate the category of the vehicle front end target image and the category of the vehicle rear end target image, including: The second image recognition information is used to indicate whether the category of the target image at the front end of the vehicle is a road category, a water surface category, or a non-road water surface category, and is also used to indicate whether the target image at the rear end of the vehicle is a road category, a water surface category, or a non-road water surface category; if the category of the target image at the front end of the vehicle is a road category and the target image at the rear end of the vehicle is a road category, it means that the vehicle has not fallen into the water; if the category of the target image at the front end of the vehicle is a water surface category and the target image at the rear end of the vehicle is a water surface category, it means that the vehicle has fallen into the water; if the category of the target image at the front end of the vehicle is a water surface category and the target image at the rear end of the vehicle is a non-road water surface category, or if the category of the target image at the front end of the vehicle is a non-road water surface category and the target image at the rear end of the vehicle is a water surface category, it means that the vehicle is about to fall into the water.
2. The vehicle falling into water recognition method according to claim 1, characterized in that: The second image recognition model is trained based on road category images, water surface category images or non-road water surface category images, wherein the water surface category images are acquired based on a drone.
3. The vehicle falling into water recognition method according to claim 2, characterized in that: The road category images, the water surface category images, and the non-road water surface category images all include images in different scenes. If the number of images is lower than a target value, data enhancement is performed on the images based on an image enhancement library to obtain a training data set.
4. The vehicle falling into water recognition method according to claim 1, characterized in that: Also includes: According to the vehicle falling into water identification information, a vehicle unlocking signal and a linkage alarm signal are sent.
5. The vehicle falling into water recognition method according to claim 1, characterized in that: Also includes: The vehicle falling into water identification information at different times is obtained to obtain the current vehicle falling into water status, and the current vehicle falling into water status is added to the historical vehicle falling into water status queue to track the vehicle falling into water status in real time.
6. A vehicle falling into water recognition device, characterized in that: A camera is set up at the front and rear of the vehicle, including: an acquisition module, configured to acquire a vehicle front end image and a vehicle rear end image, and pre-process the vehicle front end image and the vehicle rear end image to obtain a vehicle front end target image and a vehicle rear end target image; a first recognition module, configured to input the vehicle front target image and the vehicle rear target image into a first image recognition model, and obtain first image recognition information output by the first image recognition model, wherein the first image recognition information is used to indicate whether the vehicle front target image and the vehicle rear target image are occluded images or blurred images; a second recognition module configured to input the vehicle front target image and the vehicle rear target image into a second image recognition model if both the vehicle front target image and the vehicle rear target image are not occluded images or blurred images, and obtain second image recognition information output by the second image recognition model, wherein the second image recognition information is used to indicate the category of the vehicle front target image and the category of the vehicle rear target image; a determination module, configured to obtain vehicle-overwater identification information based on the category of the vehicle front end target image and the category of the vehicle rear end target image; The second image recognition information is used to indicate the category of the vehicle front end target image and the category of the vehicle rear end target image, including: The second image recognition information is used to indicate whether the category of the target image at the front end of the vehicle is a road category, a water surface category, or a non-road water surface category, and is also used to indicate whether the target image at the rear end of the vehicle is a road category, a water surface category, or a non-road water surface category; if the category of the target image at the front end of the vehicle is a road category and the target image at the rear end of the vehicle is a road category, it means that the vehicle has not fallen into the water; if the category of the target image at the front end of the vehicle is a water surface category and the target image at the rear end of the vehicle is a water surface category, it means that the vehicle has fallen into the water; if the category of the target image at the front end of the vehicle is a water surface category and the target image at the rear end of the vehicle is a non-road water surface category, or if the category of the target image at the front end of the vehicle is a non-road water surface category and the target image at the rear end of the vehicle is a water surface category, it means that the vehicle is about to fall into the water.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the vehicle falling into water recognition method as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the vehicle falling into water recognition method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle falling into water recognition method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Vehicle water-falling detection system and detection method based on multi-source information
CN108437921A
Automatic navigation method for rescuing automobile falling into water based on deep learning
CN112232299A
License plate recognition method and device, electronic equipment and storage medium
CN113869317A