Object recognition method, object recognition device and electronic equipment
By installing cameras on vehicles and using obstacle recognition algorithms, real-time monitoring of road images solves the threat of obstacles caused by objects thrown and bumps in road safety, enables timely recognition and reminders of obstacles on the road, and improves road safety. sex.
Patent Information
- Application Number
- CN202080002303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-14
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-10-14
AI Technical Summary
Road safety is threatened by obstacles caused by objects thrown by vehicles and bumpy roads. It is difficult to identify and warn in time with existing technology.
Install a preset camera on the vehicle to collect road images, and use a semantic segmentation model or target detection model to identify obstacles, extract images of obstacles on the road, and monitor and remind vehicles of obstacle throwing behavior in real time.
It achieves timely identification and reminder of obstacles on the road, improves road safety and reduces traffic risks caused by thrown objects.
Smart Images

Figure CN112424793B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular, relates to an object recognition method, an object recognition device, an electronic device, and a computer-readable storage medium. Background Art
[0002] As the number of cars increases, people are paying more and more attention to issues related to road safety. Considering the uneven quality of drivers, some may throw garbage at will; and some vehicles may also spill the objects they are transporting due to bumpy roads during transportation. These will cause obstacles on the road and bring risks to road safety. Summary of the invention
[0003] The present application provides an object recognition method, an object recognition device, an electronic device and a computer-readable storage medium, which can timely recognize obstacles appearing on the road.
[0004] In a first aspect, the present application provides an object recognition method, comprising:
[0005] Acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle;
[0006] Obstacle recognition is performed on the road image based on a preset algorithm to obtain an obstacle image in the road image.
[0007] In a second aspect, the present application provides an object recognition device, comprising:
[0008] An acquisition unit, used to acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle;
[0009] The recognition unit is used to perform obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image.
[0010] In a third aspect, the present application 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 the steps of the method of the first aspect when executing the computer program.
[0011] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.
[0012] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect.
[0013] Compared with the prior art, the present application has the following beneficial effects: by shooting the road with a camera mounted on a vehicle and identifying the road image, an obstacle image is extracted from the road image, so as to timely find possible obstacles on the road. It is understandable that the beneficial effects of the second to fifth aspects can be referred to the relevant description of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0015] Figure 1 is a flowchart of an implementation method of an object recognition method provided in an embodiment of the present application;
[0016] Figure 2 It is a schematic diagram of the training process of the semantic segmentation model in the object recognition method provided in the embodiment of the present application;
[0017] Figure 3 It is a schematic diagram of the training process of the target detection model in the object recognition method provided in the embodiment of the present application;
[0018] Figure 4 is a structural block diagram of an object recognition device provided in an embodiment of the present application;
[0019] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0021] In order to illustrate the technical solution proposed in this application, a specific embodiment is provided below for illustration.
[0022] See also Figure 1 , Figure 1 An object recognition method provided by an embodiment of the present application is shown, and is described in detail as follows:
[0023] Step 101, obtaining a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle;
[0024] In an embodiment of the present application, a camera, that is, a preset camera, may be pre-set on the monitored vehicle to collect road images through the preset camera. Exemplarily, a camera may be set at the front and rear of the monitored vehicle, that is, the preset camera may include a first camera set at the front of the monitored vehicle and a second camera set at the rear of the monitored vehicle, the first camera facing the front of the monitored vehicle to collect images of the road in front of the monitored vehicle; the second camera facing the rear of the monitored vehicle to collect images of the road behind the monitored camera. For ease of explanation, the image of the road collected by the first camera may be recorded as the first road image. It is generally believed that the obstacles appearing in the first road image are usually obstacles thrown by other vehicles. Therefore, the first road image can be used to monitor the obstacle throwing situation of other vehicles; the image of the road collected by the second camera is recorded as the second road image, which can be used to monitor the obstacle throwing situation of the monitored vehicle itself.
[0025] It should be noted that the installation position of the above-mentioned preset camera is specifically determined by the situation of the monitored vehicle itself. For example, for the first camera, the first camera can be set at the front windshield of the monitored vehicle, the first camera is not blocked by other objects, and the first camera is adjusted to shoot the target within the first preset distance (for example, 20 meters) in front of the monitored vehicle by adjusting the angle; for the second camera, the second camera can be set at the rear windshield of the monitored vehicle, the second camera is not blocked by other objects, and the second camera is adjusted to shoot the target within the second preset distance (for example, 10 meters) behind the monitored vehicle by adjusting the angle. In addition to installing the above-mentioned preset camera, it is also necessary to use a calibration tool to calibrate the internal parameters of the preset camera. The specific process can be: first set the calibration mode, display the shooting preview interface in the shooting mode of the camera, and draw at least one calibration line in the shooting preview interface; after the camera is installed, enter the current distance of the camera from the ground, that is, the height of the camera, in the calibration mode, and set the calibration point in front of the camera (that is, the actual scene currently shot by the camera), and adjust the camera to make the calibration line in the shooting preview interface coincide with the calibration point in the actual scene to complete the calibration.
[0026] The preset camera can report the road image it has collected to an electronic device, such as a host, with low latency, and the host executes the various steps proposed in the embodiment of the present application to detect obstacles on the road. The host is also installed on the monitored vehicle, and the host uses the power supply of the monitored vehicle.
[0027] In some embodiments, the electronic device and the preset camera may start operating immediately after the monitored vehicle is ignited; or, the electronic device and the preset camera may start operating only when the monitored vehicle is in a driving state, that is, when the monitored vehicle is in a driving state, the electronic device obtains the road image captured by the preset camera. The electronic device may have a built-in positioning module, and when the positioning module detects that the position of the electronic device has been changing, that is, when the electronic device is in a moving state, it is considered that the monitored vehicle is currently in a driving state.
[0028] Step 102: performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image.
[0029] In the embodiment of the present application, the electronic device may first perform a preliminary analysis on the road image captured by the preset camera based on a preset algorithm locally to determine whether the road image captures an obstacle. Exemplarily, the above algorithm may be a semantic segmentation model; or the above algorithm may also be a target detection model, and the type of the preset algorithm is not limited here.
[0030] In one application scenario, the electronic device may implement step 102 based on the semantic segmentation model, and the above step 102 may be specifically performed as follows:
[0031] A1. Segment the road image using the trained semantic segmentation model to obtain an image mask result;
[0032] In the embodiment of the present application, the road image reported by the preset camera can be semantically segmented by the trained semantic segmentation model to obtain the image mask result. It should be noted that in the embodiment of the present application, it is possible to determine whether the current pixel belongs to an obstacle pixel by pixel, and the above step 102 can be specifically performed as follows: first, the above road image is segmented by the semantic segmentation model to obtain the category to which each pixel in the above road image belongs, and then a connected domain analysis is performed based on the category to which each pixel belongs to obtain at least one connected domain, and finally the image mask result is obtained according to the above at least one connected domain, specifically, the connected domain belonging to the specified category is determined as the image mask result, and the above specified category is at least one category to which the obstacle belongs. The above connected domain can be obtained by using the marking method, or other methods can be used, which are not limited here. It should be noted that if there is no connected domain belonging to the specified category, it can be considered that there is no obstacle in the current road image, and no subsequent operations are required.
[0033] In some embodiments, the road image may be first input into a trained feature extraction network to obtain image features of the road image, and then the extracted image features may be segmented through a trained semantic segmentation model, which may reduce the computational complexity of the semantic segmentation model to a certain extent and improve the working efficiency of the semantic segmentation model.
[0034] In some embodiments, based on the above semantic segmentation model, an attention mechanism can be added so that the semantic segmentation model can focus on the training of the area with obstacles during training and ignore other areas. Figure 2 , Figure 2 The training process of the semantic segmentation model is shown, which is specifically as follows: obtaining the original image for training, and inputting the original image into the encoding network of the semantic segmentation model; after the encoding network encodes the original image, the encoding result is input into the decoding network of the semantic segmentation model; after the decoding network decodes the encoding result, the decoding result is fused with the annotated image based on the attention mechanism to obtain the training result; the loss of the training result and the annotated image is calculated, and the gradient is returned according to the loss to improve the encoding network. The above process is repeated until the loss of the training result and the annotated image converges, and the above process is terminated to obtain the trained semantic segmentation model. Among them, the annotated image is an image obtained after mask annotation of the obstacle area in the corresponding original image.
[0035] A2, mapping the image mask result to the road image to obtain an obstacle image in the road image.
[0036] In an embodiment of the present application, the image mask result can be mapped back to the corresponding road image according to the coordinates of each pixel in the image mask result, and the obstacle image in the road image can be obtained. In some embodiments, in order to ensure the authenticity of the detection result, the electronic device can upload the obstacle image to a preset platform after obtaining the obstacle image; of course, the electronic device can also choose to upload the road image where the obstacle image is located to the preset platform. The platform can use a larger-scale network model to perform a more accurate analysis of the image (obstacle image or road image) uploaded by the electronic device to determine whether the image contained in the road image is a real obstacle image; that is, to determine whether the identified obstacle image expresses a real obstacle.
[0037] In another application scenario, the electronic device may implement step 102 based on the target detection model, and the above step 102 may be specifically performed as follows:
[0038] The road image is subjected to target detection by using a trained target detection model to obtain an obstacle image in the road image.
[0039] In the embodiment of the present application, for the sake of computing power, the semantic segmentation model can be replaced by the target detection model. However, considering that the general target detection model has a poor detection effect on objects with a large scale range and irregular shapes, a multi-scale fusion module for objects of different scales is added during the training of the target detection model. Figure 3 , Figure 3 The training process of the target detection model is shown, which is specifically: obtaining the original image for training, inputting the original image into the target detection model to be trained, and obtaining the detection frame output by the multi-scale fusion module in the target detection model (that is, the training result obtained based on the original image), wherein the multi-scale fusion operation performed by the multi-scale fusion module is specifically: using the Convolutional Neural Networks (CNN) technology to establish a feature pyramid, predict the targets contained in each layer (that is, the detection results of each layer), and finally fuse all the detection results together to obtain the final detection frame and output it; calculate the loss of the training result and the annotated image, and perform gradient backpropagation based on the loss to improve the above target detection model. The above process is repeated until the loss of the training result and the annotated image converges, and the above process is terminated to obtain the trained target detection model. Among them, the annotated image is an image obtained after the obstacle area has been annotated in the corresponding original image.
[0040] It should be noted that the detection box output by the above target detection model (the range selected by the detection box is the obstacle image) has lower accuracy than the obstacle image identified by the semantic segmentation model, but the running speed is improved. That is, when the application scheme is implemented based on the semantic segmentation model, its accuracy is higher and the effect is better; when the application scheme is implemented based on the target detection model, the processing speed is faster; users can select the algorithm to be used according to their own needs.
[0041] In some embodiments, the electronic device can calculate the area of the obstacle image locally, obtain the current location of the monitored vehicle (that is, the location of the monitored vehicle at the time when the road image where the obstacle image is located is taken), and upload the area and location to a preset platform for evidence storage. Specifically, the platform can save the area and location only when it confirms that the road image contains an image of a real obstacle, so as to form a chain of evidence for subsequent evaluation of whether the vehicle has thrown away obstacles.
[0042] In some embodiments, in the application scenario given above where the monitored vehicle is equipped with a first camera and a second camera, the object recognition method may further include:
[0043] If there is no obstacle image in the first road image and there is an obstacle image in the second road image, a reminder message is output to the monitored vehicle to remind the monitored vehicle that there is obstacle throwing behavior.
[0044] Since the first road image is an image in front of the monitored vehicle, considering that vehicles generally travel forward, the obstacles detected in the first road image can be considered not to be obstacles thrown by the monitored vehicle; on the contrary, if a certain area is originally clean, and the monitored vehicle has not yet traveled to the area, the area is in front of the monitored vehicle, and thus the first road image including the area will be captured by the first camera first, and at this time, there is no obstacle image in the first road image; when the monitored vehicle travels to the area, that is, when the monitored vehicle overlaps with the area, if the monitored vehicle has a spillage phenomenon, for example, the driver throws garbage out or the objects transported by the monitored vehicle leak, it will cause obstacles to appear in the area; then the monitored vehicle continues to travel forward, and the area will be behind the monitored vehicle, and then the second road image including the area will be captured by the second camera, and at this time, there is an obstacle in the second road image. Based on the above process, it can be known that when there is no obstacle image in the first road image and there is an obstacle image in the second road image, it is considered that the monitored vehicle has thrown obstacles, and a reminder message can be output to the monitored vehicle.
[0045] It should be noted that it is obviously impossible for the first camera and the second camera to capture the same area at the same time; the first camera often captures the first road image containing a certain area first, and then waits for a preset time. After the monitored vehicle has traveled a certain distance, the second camera will capture the second road image containing the same area. It can be considered that there is a time delay between the matching first road image and the second road image, that is, the first road image and the second road image containing the same area (the shooting object is the same area), and the time delay is determined by the speed of the monitored vehicle: the faster the speed, the smaller the time delay; the slower the speed, the larger the time delay. Then the above-mentioned step of detecting whether the vehicle has obstacle throwing behavior can be specifically as follows: if there is no obstacle image in the first road image, and there is an obstacle image in the second road image matching the first camera, then a reminder message is output to the monitored vehicle to remind the monitored vehicle that there is obstacle throwing behavior.
[0046] As can be seen from the above, through the embodiment of the present application, during the driving process of the vehicle, the road is photographed by a camera mounted on the vehicle, and the photographed road image is identified, so as to extract the obstacle image from the road image and timely discover the obstacles that may appear on the road. In addition, cameras can also be mounted at different positions of the vehicle to capture the road image in front and the road image behind, so as to monitor whether the vehicle has any obstacle throwing behavior.
[0047] Corresponding to the object recognition method proposed above, the present application embodiment provides an object recognition device, which is integrated into an electronic device. Figure 4 , the object recognition device 400 in the embodiment of the present application includes:
[0048] The acquisition unit 401 is used to acquire a road image collected by a preset camera, wherein the preset camera is installed on the monitored vehicle;
[0049] The recognition unit 402 is used to perform obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image.
[0050] Optionally, the identification unit 402 includes:
[0051] A segmentation subunit, used to segment the road image using a trained semantic segmentation model to obtain an image mask result;
[0052] The mapping subunit is used to map the image mask result to the road image to obtain the obstacle image in the road image.
[0053] Optionally, the object recognition device 400 further includes:
[0054] An extraction unit, used for inputting the road image into a trained feature extraction network to obtain image features of the road image;
[0055] Correspondingly, the above-mentioned segmentation subunit is specifically used to segment the above-mentioned image features through a trained semantic segmentation model to obtain an image mask result.
[0056] Optionally, the above-mentioned segmentation subunit includes:
[0057] The category determination subunit is used to segment the road image using the trained semantic segmentation model to obtain the category to which each pixel in the road image belongs:
[0058] A connected domain analysis subunit, configured to perform a connected domain analysis based on the category to which each pixel point belongs, to obtain at least one connected domain;
[0059] The image mask result acquisition subunit is used to obtain the image mask result according to the at least one connected domain.
[0060] Optionally, the identification unit 402 includes:
[0061] The target detection subunit is used to perform target detection on the road image through a trained target detection model to obtain an obstacle image in the road image.
[0062] Optionally, the object recognition device 400 further includes:
[0063] The first uploading unit is used to upload the obstacle image to a preset platform to instruct the platform to verify whether the obstacle image represents a real obstacle.
[0064] Optionally, the object recognition device 400 further includes:
[0065] A calculation unit, used to calculate the area of the obstacle image;
[0066] A positioning unit, used to obtain the positioning position of the monitored vehicle;
[0067] The second uploading unit is used to upload the above area and the above positioning position to a preset platform for evidence storage.
[0068] Optionally, the preset camera includes a first camera and a second camera, the first camera faces the front of the monitored vehicle, the second camera faces the rear of the monitored vehicle, the road image includes a first road image captured by the first camera and a second road image captured by the second camera; the object recognition device 400 further includes:
[0069] The reminder unit is used to output a reminder message to the monitored vehicle if there is no obstacle image in the first road image and there is an obstacle image in the second road image, so as to remind the monitored vehicle that there is obstacle throwing behavior.
[0070] Optionally, the acquisition unit 401 is specifically configured to acquire the road image captured by the preset camera when the monitored vehicle is in a driving state.
[0071] As can be seen from the above, through the embodiment of the present application, during the driving process of the vehicle, the road is photographed by the camera installed on the vehicle, and the object recognition device can then recognize the photographed road image, thereby extracting the obstacle image from the road image and timely discovering the obstacles that may appear on the road. In addition, cameras can also be installed at different positions of the vehicle to capture the road image in front and the road image behind, so as to monitor whether the vehicle has any obstacle throwing behavior.
[0072] The present application also provides an electronic device. Figure 5 The electronic device 5 in the embodiment of the present application includes: a memory 501, one or more processors 502 ( Figure 5 Only one is shown) and a computer program stored in the memory 501 and executable on the processor. The memory 501 is used to store software programs and units, and the processor 502 executes various functional applications and data processing by running the software programs and units stored in the memory 501 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 502 implements the following steps when running the above-mentioned computer program stored in the memory 501:
[0073] Acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle;
[0074] Obstacle recognition is performed on the road image based on a preset algorithm to obtain an obstacle image in the road image.
[0075] Assuming that the above is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the obstacle recognition is performed on the road image based on a preset algorithm to obtain an obstacle image in the road image, including:
[0076] The road image is segmented by the trained semantic segmentation model to obtain an image mask result;
[0077] The image mask result is mapped to the road image to obtain an obstacle image in the road image.
[0078] In a third possible implementation provided as a basis of the second possible implementation, before segmenting the road image by the trained semantic segmentation model to obtain an image mask result, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0079] Inputting the road image into a trained feature extraction network to obtain image features of the road image;
[0080] Accordingly, the road image is segmented by the trained semantic segmentation model to obtain an image mask result, including:
[0081] The above image features are segmented through the trained semantic segmentation model to obtain the image mask result.
[0082] In a fourth possible implementation provided on the basis of the second possible implementation, segmenting the road image using the trained semantic segmentation model to obtain an image mask result includes:
[0083] The road image is segmented using the trained semantic segmentation model to obtain the category to which each pixel in the road image belongs:
[0084] Performing a connected domain analysis based on the category to which each pixel point belongs to obtain at least one connected domain;
[0085] An image mask result is obtained according to the at least one connected domain.
[0086] In a fifth possible implementation provided on the basis of the first possible implementation, the obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image includes:
[0087] The road image is subjected to target detection by using a trained target detection model to obtain an obstacle image in the road image.
[0088] In a sixth possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, or the fifth possible implementation, after performing obstacle recognition on the road image based on the preset algorithm to obtain an obstacle image in the road image, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0089] The obstacle image is uploaded to a preset platform to instruct the platform to verify whether the obstacle image represents a real obstacle.
[0090] In a seventh possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, or the fifth possible implementation, after performing obstacle recognition on the road image based on the preset algorithm to obtain an obstacle image in the road image, the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0091] Calculate the area of the above obstacle image;
[0092] Obtaining the location of the monitored vehicle;
[0093] The above area and the above positioning position are uploaded to a preset platform for evidence storage.
[0094] In an eighth possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, or the fifth possible implementation, the preset camera includes a first camera and a second camera, the first camera faces the front of the monitored vehicle, the second camera faces the rear of the monitored vehicle, and the road image includes a first road image captured by the first camera and a second road image captured by the second camera; the processor 502 further implements the following steps when running the computer program stored in the memory 501:
[0095] If there is no obstacle image in the first road image and there is an obstacle image in the second road image, a reminder message is output to the monitored vehicle to remind the monitored vehicle that there is obstacle throwing behavior.
[0096] In a ninth possible implementation provided on the basis of the first possible implementation, or on the basis of the second possible implementation, or on the basis of the third possible implementation, or on the basis of the fourth possible implementation, or on the basis of the fifth possible implementation, the step of acquiring the road image collected by the preset camera includes:
[0097] When the monitored vehicle is in a driving state, a road image captured by the preset camera is obtained.
[0098] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0099] The memory 501 may include a read-only memory and a random access memory, and provide instructions and data to the processor 502. A part or all of the memory 501 may also include a non-volatile random access memory. For example, the memory 501 may also store information of a device category.
[0100] As can be seen from the above, through the embodiments of the present application, during the driving process of the vehicle, the road is photographed by a camera mounted on the vehicle, and the electronic device can then recognize the photographed road image, thereby extracting the obstacle image from the road image and timely discovering the obstacles that may appear on the road. In addition, cameras can also be mounted at different positions of the vehicle to capture the road image in front and the road image behind, so as to monitor whether the vehicle has any obstacle throwing behavior.
[0101] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0104] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0105] The units described above 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media does not include electrical carrier signals and telecommunication signals.
[0107] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the 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. 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 embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An object recognition method, characterized in that: The object recognition method is applied to an electronic device installed on a monitored vehicle, comprising: Acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle; Performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image; Uploading the obstacle image to a preset platform to instruct the platform to verify whether the obstacle image represents a real obstacle; When the platform determines that the obstacle image represents a real obstacle, calculating the area of the obstacle image; Obtaining the location of the monitored vehicle; Uploading the area and the positioning position to a preset platform for evidence storage; The preset camera includes a first camera and a second camera, the first camera faces the front of the monitored vehicle, the second camera faces the rear of the monitored vehicle, the road image includes a first road image captured by the first camera and a second road image captured by the second camera; the object recognition method also includes: If there is no obstacle image in the first road image, and there is an obstacle image in the second road image matching the first road image, a reminder message is output to the monitored vehicle to remind the monitored vehicle that there is obstacle throwing behavior.
2. The object recognition method according to claim 1, characterized in that: The performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image includes: Segmenting the road image using a trained semantic segmentation model to obtain an image mask result; The image mask result is mapped to the road image to obtain an obstacle image in the road image.
3. The object recognition method according to claim 2, characterized in that: Before segmenting the road image using the trained semantic segmentation model to obtain an image mask result, the object recognition method further includes: Inputting the road image into a trained feature extraction network to obtain image features of the road image; Accordingly, the road image is segmented by using the trained semantic segmentation model to obtain an image mask result, including: The image features are segmented using a trained semantic segmentation model to obtain an image mask result.
4. The object recognition method according to claim 2, characterized in that: The step of segmenting the road image using the trained semantic segmentation model to obtain an image mask result includes: The road image is segmented by a trained semantic segmentation model to obtain the category to which each pixel in the road image belongs: Performing a connected domain analysis based on the category to which each pixel point belongs to obtain at least one connected domain; An image mask result is obtained according to the at least one connected region.
5. The object recognition method according to claim 1, characterized in that: The performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image includes: The road image is subjected to target detection by using a trained target detection model to obtain an obstacle image in the road image.
6. The object recognition method according to any one of claims 1 to 5, characterized in that: The step of obtaining a road image collected by a preset camera includes: When the monitored vehicle is in a driving state, a road image captured by the preset camera is obtained.
7. An object recognition device, characterized in that: include: An acquisition unit, used to acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle; an identification unit, configured to perform obstacle identification on the road image based on a preset algorithm to obtain an obstacle image in the road image; The preset camera includes a first camera and a second camera, the first camera faces the front of the monitored vehicle, the second camera faces the rear of the monitored vehicle, the road image includes a first road image captured by the first camera and a second road image captured by the second camera; the object recognition device also includes: A reminder unit is used to output a reminder message to the monitored vehicle to remind the monitored vehicle of the obstacle throwing behavior if there is no obstacle image in the first road image and there is an obstacle image in the second road image matching the first road image.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The electronic device is installed on the monitored vehicle, and the processor implements the following steps when executing the computer program: Acquire a road image captured by a preset camera, wherein the preset camera is installed on a monitored vehicle; Performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image; Uploading the obstacle image to a preset platform to instruct the platform to verify whether the obstacle image represents a real obstacle; When the platform determines that the obstacle image represents a real obstacle, calculating the area of the obstacle image; Obtaining the location of the monitored vehicle; Uploading the area and the positioning position to a preset platform for evidence storage; The preset camera includes a first camera and a second camera, the first camera faces the front of the monitored vehicle, the second camera faces the rear of the monitored vehicle, the road image includes a first road image captured by the first camera and a second road image captured by the second camera; when the processor executes the computer program, the following steps are further implemented: If there is no obstacle image in the first road image, and there is an obstacle image in the second road image matching the first road image, a reminder message is output to the monitored vehicle to remind the monitored vehicle that there is obstacle throwing behavior.
9. The electronic device according to claim 8, characterized in that: When the processor executes the computer program, the step of performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image includes: Segmenting the road image using a trained semantic segmentation model to obtain an image mask result; The image mask result is mapped to the road image to obtain an obstacle image in the road image.
10. The electronic device according to claim 9, characterized in that: Before segmenting the road image by the trained semantic segmentation model to obtain an image mask result, the processor further implements the following steps when executing the computer program: Inputting the road image into a trained feature extraction network to obtain image features of the road image; Accordingly, the road image is segmented by using the trained semantic segmentation model to obtain an image mask result, including: The image features are segmented using a trained semantic segmentation model to obtain an image mask result.
11. The electronic device according to claim 9, characterized in that: When the processor executes the computer program, segmenting the road image by using the trained semantic segmentation model to obtain an image mask result includes: The road image is segmented by a trained semantic segmentation model to obtain the category to which each pixel in the road image belongs: Performing a connected domain analysis based on the category to which each pixel point belongs to obtain at least one connected domain; An image mask result is obtained according to the at least one connected region.
12. The electronic device according to claim 8, characterized in that: When the processor executes the computer program, the step of performing obstacle recognition on the road image based on a preset algorithm to obtain an obstacle image in the road image includes: The road image is subjected to target detection by using a trained target detection model to obtain an obstacle image in the road image.
13. The electronic device according to any one of claims 8 to 12, characterized in that: When the processor executes the computer program, the step of obtaining the road image captured by the preset camera includes: When the monitored vehicle is in a driving state, a road image captured by the preset camera is obtained.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
