Object detection method, device and electronic device for vehicle blind spot
Through the deep learning model and SSD detection algorithm, it automatically detects target objects in the vehicle's blind spot and issues an alarm, solving the problem of traffic accidents caused by driver distraction and improving driving safety.
Patent Information
- Application Number
- CN201910446922.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-05-27
AI Technical Summary
In the existing technology, drivers are easily distracted when viewing videos of vehicle blind spots, leading to traffic accidents.
Using a deep learning model, combined with Mobilenet convolutional neural network and SSD detection algorithm, it obtains images of vehicle blind spots, automatically detects target objects and issues alarm messages, reducing the risk of driver visual distraction.
It realizes automatic monitoring and alarming of target objects in the vehicle's blind spot, assists the driver in detecting potential dangers in a timely manner, and reduces traffic accidents caused by driver distraction.
Smart Images

Figure CN112001208B
Abstract
Description
Technical Field
[0001] The present invention relates to computer vision processing technology, and in particular to a method, device and electronic equipment for detecting a target in a vehicle blind spot. Background Art
[0002] With the development of urban construction, large vehicles such as buses, tank trucks, and muck trucks have contributed to urban construction, but also caused many unnecessary traffic accidents. Large vehicles have a large visual blind spot for drivers due to their high bodies, and pedestrians are relatively small targets. When they enter the blind spot, the driver can hardly see them, especially when the vehicle turns, there are great safety hazards.
[0003] In response to this situation, many large vehicles will install cameras in blind spots to monitor the road conditions in real time, and install display screens in the cab for drivers to view the blind spot conditions in real time. However, it is impossible for drivers to view the video at all times, and viewing the video road conditions will bring other safety hazards. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and electronic device for detecting an object in a blind spot of a vehicle, so as to at least solve the problem in the prior art of traffic accidents caused by the driver being distracted while viewing a video.
[0005] According to one aspect of an embodiment of the present invention, a target detection method for a vehicle blind spot is provided, the method comprising the following steps: acquiring a target image; calibrating a corresponding detection area in the target image according to a preset vehicle blind spot; detecting a target object in the target image using a deep learning model to obtain position information of the target object; judging whether the target object exists in the detection area based on the position information of the target object; and issuing an alarm message if the target object exists in the detection area.
[0006] Furthermore, the vehicle blind spot is preset according to the vehicle type or by calibrating the image acquisition module.
[0007] Furthermore, the target image is acquired by an image acquisition module, and the installation position of the image acquisition module is located at at least one of the following positions of the vehicle: right rear side, left rear side, right front side, left front side, and rear side.
[0008] Further, presetting the vehicle blind spot according to the vehicle type includes defining at least one area on the ground at a preset distance from one side of the vehicle as the vehicle blind spot according to the vehicle type.
[0009] Furthermore, the deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network and the SSD model as the detection algorithm.
[0010] Furthermore, the method also includes: after detecting the target object in the target image using a deep learning model and obtaining the position information of the target object, a non-maximum suppression method is used to filter the position information of the target object.
[0011] Furthermore, the target object includes at least one of the following: an electric vehicle, a motorcycle, a pedestrian, a bicycle, a motor vehicle, a pet, and an obstacle.
[0012] Furthermore, after acquiring the target image, it is determined whether it is an infrared image according to the channel information of the target image, and the infrared image model or the RGB image model is switched according to the determination result.
[0013] Furthermore, the method also includes training the deep learning model, and the training method includes: obtaining a large number of sample images, and marking and labeling boxes for target objects in the sample images; inputting the sample images with marked labeling boxes into the deep learning model and selecting feature maps; selecting a pre-selected box on the feature map; matching the marked box with the pre-selected box to obtain the positioning loss and classification confidence loss of the pre-selected box; adjusting the loss function of the deep learning model according to the positioning loss and classification confidence loss of the pre-selected box to complete the training of the deep learning model.
[0014] Furthermore, matching the marked box with the pre-selected box includes: matching the marked box with the pre-selected box according to an intersection-and-union ratio.
[0015] Furthermore, when the intersection-over-union ratio is greater than or equal to a first threshold, the pre-selected box is marked as a positive sample; and the number of negative samples is determined according to the number of positive samples and a preset positive-negative sample ratio.
[0016] According to another aspect of an embodiment of the present invention, a target detection device for a vehicle blind spot is provided, the device comprising: an image acquisition module, used to acquire a target image; a detection area calibration module, used to calibrate a corresponding detection area in the target image according to a preset vehicle blind spot; a position detection module, used to detect a target object in the target image by using a deep learning model to obtain position information of the target object; a judgment module, used to judge whether the target object exists in the detection area based on the position information of the target object; and an alarm module, used to issue an alarm message when the target object exists in the detection area.
[0017] Furthermore, the deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network and the SSD model as the detection algorithm.
[0018] Furthermore, the target detection device further includes a mode switching module, which is used to determine whether the target image is an infrared image according to the channel information of the target image after the image acquisition module acquires the target image, and switch to the infrared image model or the RGB image model according to the determination result.
[0019] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above-mentioned target detection methods by executing the executable instructions.
[0020] Furthermore, the weights and eigenvalues of the deep learning model used in the target detection method are optimized according to the computing power of the processor.
[0021] According to another aspect of an embodiment of the present invention, a storage medium is provided, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above-mentioned target detection methods.
[0022] In an embodiment of the present invention, by acquiring a target image; calibrating a corresponding detection area in the target image according to a preset vehicle blind spot; using a deep learning model to detect a target object in the target image, obtaining the position information of the target object; judging whether the target object exists in the detection area based on the position information of the target object; and issuing an alarm message when the target object exists in the detection area. Automatic monitoring of target objects in the vehicle blind spot can be achieved, and an alarm prompt can be issued when a target object exists in the detection area corresponding to the vehicle blind spot, thereby assisting the driver to promptly discover potential dangers during driving, thereby solving the problem of traffic accidents caused by the driver's distraction in watching videos in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0024] Figure 1 A flowchart of an optional target detection method according to an embodiment of the present invention;
[0025] Figure 2 is a flowchart of an optional deep learning model training method according to an embodiment of the present invention;
[0026] Figure 3 is a structural block diagram of an optional target detection device according to an embodiment of the present invention;
[0027] Figure 4 is a structural block diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiments of the present invention may be applied to computer systems / servers that may operate with numerous other general or special computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with computer systems / servers include, but are not limited to, personal computer systems, handheld or laptop devices, microprocessor-based systems, programmable consumer electronics, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, and the like.
[0031] Computer systems / servers may be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. In general, program modules may include routines, programs, components, logic and data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers may be implemented in a distributed cloud computing environment, with tasks performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules may be located on local or remote computing system storage media including storage devices.
[0032] The present invention is described below by means of detailed examples.
[0033] According to one aspect of the present invention, a method for detecting an object in a vehicle blind spot is provided. Figure 1 , is a flow chart of an optional method for detecting a target in a vehicle blind spot according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0034] S10: Acquire target image;
[0035] S12: calibrating a corresponding detection area in the target image according to a preset vehicle blind spot;
[0036] S14: Detect the target object in the target image using the deep learning model to obtain location information of the target object;
[0037] S16: Based on the position information of the target object, determining whether there is a target object in the detection area;
[0038] S18: When there is a target object in the detection area, an alarm message is issued.
[0039] In an embodiment of the present invention, through the above steps, automatic monitoring of target objects in the blind spot of the vehicle can be achieved, and when there is a target object in the detection area corresponding to the blind spot of the vehicle, an alarm prompt is issued to assist the driver to promptly discover potential dangers during driving and reduce the occurrence of traffic accidents caused by the driver's distraction while watching videos.
[0040] The above steps are described in detail below.
[0041] Step S10: Acquire the target image.
[0042] Optionally, in an embodiment of the present invention, the target image can be acquired through an image acquisition module. The image acquisition module can be an independent camera or an electronic device such as a camera, a mobile phone, a driving recorder, an assisted driving system, etc., which is integrated with a camera. The types of cameras include infrared structured light cameras, time-of-flight cameras (Time-of-flight, ToF), RGB cameras, Mono cameras, fisheye cameras, etc. The number of image acquisition modules is one or more, and the installation position thereof on the vehicle can include at least one of the following positions of the vehicle: right rear side, left rear side, right front side, left front side, rear side, for acquiring at least one image of at least one area.
[0043] Optionally, in an embodiment of the present invention, a video can be captured by an image acquisition module, and target images can be captured at predetermined intervals to reduce the amount of calculation. In order to achieve real-time monitoring of the target, the predetermined time interval between two adjacent frames of target images is generally short.
[0044] Step S12: calibrate the corresponding detection area in the target image according to the preset vehicle blind spot.
[0045] Optionally, in an embodiment of the present invention, a vehicle blind spot refers to a visual blind spot that the driver cannot see through the rearview mirror during driving and is prone to accidents. The vehicle blind spot can be preset according to the vehicle type or by calibrating the image acquisition module. Among them, presetting the vehicle blind spot according to the vehicle type includes demarcating at least one area on the ground at a preset distance from one side of the vehicle as a vehicle blind spot according to the vehicle type, and then calibrating the detection area that coincides with the demarcated vehicle blind spot in the target image. For example, for a large truck, when only the right rear blind spot is monitored, the blind spot of the large truck can be preset by demarcating 1 meter, 2 meters and 3 meters lines on the ground at a distance from the right rear door, and then constructing calibration lines in the target image that coincide with the photographed 1 meter, 2 meters and 3 meters lines to calibrate the corresponding detection area. Presetting the vehicle blind spot by calibrating the image acquisition module includes calibrating the image acquisition module to obtain parameters of the image acquisition module; presetting the vehicle blind spot according to the parameters of the image acquisition module; the parameters of the image acquisition module include internal parameters and external parameters, the internal parameters include field of view angle, focal length, etc., and the external parameters include position, angle, etc. of the image acquisition module.
[0046] Step S14: Use the deep learning model to detect the target object in the target image and obtain the position information of the target object.
[0047] Optionally, in an embodiment of the present invention, the deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network, decomposes the standard convolution calculation into 1*1 point-by-point convolution and 3*3 deep convolution, uses the SSD (Single Shot Multi Box Detector) model as the detection algorithm, and combines the features extracted by the Mobilenet convolutional neural network to regress and classify the target object. By replacing the basic network of the standard SSD model with the Mobilenet convolutional neural network, the amount of calculation can be reduced while ensuring the detection effect, so that the detection method based on deep learning can be implemented on mobile hardware with weaker computing power. Target objects include but are not limited to: electric vehicles, motorcycles, pedestrians, bicycles, motor vehicles, pets, obstacles, etc.
[0048] Optionally, in an embodiment of the present invention, after using a deep learning model to detect the target object in the target image and obtaining the location information of the target object, the target detection method may further include using a non-maximum suppression (Non-Maximum Suppression) method to filter the location information of the target object.
[0049] S16: Based on the position information of the target object, determine whether there is a target object in the detection area.
[0050] Optionally, in an embodiment of the present invention, a coordinate system can be constructed in the target image to determine whether a target object exists in the detection area based on the coordinates of the central pixel point of the target object and the boundary line in the detection area (such as a 1-meter, 2-meter or 3-meter line).
[0051] S18: When there is a target object in the detection area, an alarm message is issued.
[0052] Optionally, in an embodiment of the present invention, the warning information includes one or any combination of visual, auditory, and tactile information. For example, the target object can be framed in the image of the display screen, and when the target object appears at different positions (for example, 1 meter, 2 meters, and 3 meters away from the right rear door of the vehicle), different voice prompts are issued to assist the driver in making more accurate judgments.
[0053] Optionally, in an embodiment of the present invention, when there are multiple image acquisition modules, multiple images can be switched and displayed, or images of one or more image acquisition modules can be displayed according to the driver's selection, or images of several image acquisition modules can be synthesized and displayed.
[0054] Due to the low visibility weather such as rainy days, nights, and smog days, or roads with fewer street lights, the light is dim, and the image acquisition module can use an infrared camera that is less affected by light changes to obtain an infrared IR video stream with better quality than an ordinary camera, thereby improving the accuracy of the detection result. In this case, the image acquisition module can be a combination of an infrared camera and an RGB camera, and accordingly, the deep learning model includes an infrared image model and an RGB image model, that is, a large number of infrared images and RGB images can be used as sample images to train the infrared image model and the RGB image model respectively, wherein the infrared image model and the RGB image model can have the same structure to reduce the complexity of the deep learning model. After acquiring the target image, it can be determined whether the target image is an infrared image based on the channel information of the target image, and switched to the infrared image model or the RGB image model based on the judgment result to achieve seamless connection between the infrared image and the RGB image, whether in a bright light environment or in a dim light environment, the detection of target objects in the blind spot of the vehicle can achieve good results. In one embodiment of the present invention, since the RGB image has three channels, the value of each channel is different, and the infrared image has only one channel, in order to determine whether it is an infrared image, the infrared image can be processed into three channels, the value of each channel is the same, and the infrared image or the RGB image is determined by comparing whether the pixel values on the three channels of each pixel are consistent. If they are consistent, it is determined to be an infrared image; if there are more than one pixel point whose values of the three channels are inconsistent, it is determined to be an RGB image. In order to reduce the amount of calculation, it is also possible to compare whether the pixel values on the three channels are consistent every predetermined number of pixels (for example, every 50 pixels) to determine whether it is an infrared image or an RGB image. Afterwards, switch to the infrared image model or the RGB image model according to the judgment result to achieve seamless connection between the infrared image and the RGB image.
[0055] When the target detection method provided in the above embodiment is used to detect the blind spot of the vehicle, the target detection method further includes training the deep learning model. Figure 2 , is a flowchart of an optional deep learning model training method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0056] S20: Obtain a large number of sample images, and mark the target objects in the sample images with annotation boxes.
[0057] Optionally, in an embodiment of the present invention, a large number of sample images can be acquired in various scenarios, including various scenes consisting of various levels of roads such as rural roads and urban roads, and various weather conditions such as sunny days, cloudy days, rainy days, daytime, and night.
[0058] Optionally, in the embodiment of the present invention, the annotation box may be a minimum circumscribed rectangular box of the target object.
[0059] S22: Input the sample image with the marked annotation box into the deep learning model and select the feature map.
[0060] Optionally, in an embodiment of the present invention, a plurality of feature maps of different sizes may be selected on the sample image.
[0061] S24: Select a pre-selected box on the feature map.
[0062] Optionally, in an embodiment of the present invention, a certain number of pre-selected boxes are selected on each feature map to accommodate target objects of different sizes and proportions.
[0063] S26: Match the marked box with the pre-selected box to obtain the positioning loss and classification confidence loss of the pre-selected box;
[0064] Optionally, in an embodiment of the present invention, matching the marking box with the pre-selected box includes: matching the marking box with the pre-selected box according to the intersection over union (IOU), when the intersection over union is greater than or equal to a first threshold, marking the pre-selected box as a positive sample; when the intersection over union is less than the first threshold, marking the pre-selected box as a negative sample. Since a large number of pre-selected boxes will be selected on each feature map, except for a few positive samples, the rest are negative samples, which will cause excessive attention to negative samples during optimization, resulting in poor detection effect. Therefore, a suitable positive-negative sample ratio can be determined through experiments, and then the number of negative samples can be determined based on the number of positive samples and the positive-negative sample ratio to optimize the training effect. Of course, the positive-negative sample ratio can be appropriately adjusted in different situations. For example, when the false positive rate is too high, the number of negative samples can be appropriately increased to reduce the false positive rate.
[0065] S28: Adjust the loss function of the deep learning model according to the positioning loss and classification confidence loss of the pre-selected box to complete the training of the deep learning model.
[0066] In an embodiment of the present invention, through the above steps, the training of the deep learning model can be achieved, and the training effect can be optimized by setting the ratio of positive and negative samples.
[0067] According to another aspect of an embodiment of the present invention, a target detection device for a vehicle blind spot is also provided. Figure 3 , is a structural block diagram of an optional target detection device for a vehicle blind spot according to an embodiment of the present invention. Figure 3 As shown, the target detection device 3 includes:
[0068] An image acquisition module 30, used to acquire a target image;
[0069] Optionally, in the embodiment of the present invention, the image acquisition module 30 may be an independent camera or an electronic device such as a camera integrated with a camera, a mobile phone, a driving recorder, an auxiliary driving system, etc. The types of cameras include infrared structured light cameras, time-of-flight cameras (ToF), RGB cameras, Mono cameras, fisheye cameras, etc. The number of image acquisition modules 30 is one or more, and the installation position thereof on the vehicle may include at least one of the following positions of the vehicle: right rear side, left rear side, right front side, left front side, rear side, for acquiring at least one image of at least one area.
[0070] Optionally, in the embodiment of the present invention, the video can be shot by the image acquisition module 30, and the target image can be intercepted at a predetermined interval to reduce the amount of calculation. In order to achieve real-time monitoring of the target, the predetermined time interval between two adjacent frames of the target image is generally short.
[0071] The detection area calibration module 32 is used to calibrate the corresponding detection area in the target image according to the preset vehicle blind area.
[0072] Optionally, in an embodiment of the present invention, a vehicle blind spot refers to a visual blind spot that the driver cannot see through the rearview mirror during driving and is prone to accidents. The vehicle blind spot can be preset according to the vehicle type or by calibrating the image acquisition module. Among them, presetting the vehicle blind spot according to the vehicle type includes demarcating at least one area on the ground at a preset distance from one side of the vehicle as a vehicle blind spot according to the vehicle type, and then calibrating the detection area that coincides with the demarcated vehicle blind spot in the target image. For example, for a large truck, when only the right rear blind spot is monitored, the blind spot of the large truck can be preset by demarcating 1 meter, 2 meters and 3 meters lines on the ground at a distance from the right rear door, and then constructing calibration lines in the target image that coincide with the photographed 1 meter, 2 meters and 3 meters lines to calibrate the corresponding detection area. Presetting the vehicle blind spot by calibrating the image acquisition module includes calibrating the image acquisition module to obtain parameters of the image acquisition module; presetting the vehicle blind spot according to the parameters of the image acquisition module; the parameters of the image acquisition module include internal parameters and external parameters, the internal parameters include field of view angle, focal length, etc., and the external parameters include position, angle, etc. of the image acquisition module.
[0073] The position detection module 34 detects the target object in the target image by using the deep learning model to obtain the position information of the target object.
[0074] Optionally, in an embodiment of the present invention, the deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network, decomposes the standard convolution calculation into 1*1 point-by-point convolution and 3*3 deep convolution, and uses the SSD (Single Shot Multi Box Detector) model as the detection algorithm, which is used to regress and classify the target object based on the features extracted by the Mobilenet convolutional neural network. By replacing the basic network of the standard SSD model with the Mobilenet convolutional neural network, the amount of calculation can be reduced while ensuring the detection effect, so that the detection method based on deep learning can be implemented on mobile hardware with weaker computing power. Target objects include but are not limited to: electric vehicles, motorcycles, pedestrians, bicycles, motor vehicles, pets, obstacles, etc.
[0075] Optionally, in an embodiment of the present invention, after using a deep learning model to detect the target object in the target image and obtaining the location information of the target object, the target detection method may further include using a non-maximum suppression (Non-Maximum Suppression) method to filter the location information of the target object.
[0076] The determination module 36 is used to determine whether there is a target object in the detection area based on the position information of the target object.
[0077] Optionally, in an embodiment of the present invention, the judgment module 36 can construct a coordinate system in the target image to determine whether there is a target object in the detection area based on the coordinates of the central pixel point of the target object and the boundary line in the detection area (such as a 1-meter, 2-meter or 3-meter line).
[0078] The alarm module 38 is used to issue an alarm message when there is a target object in the detection area.
[0079] Optionally, in an embodiment of the present invention, the alarm information includes one or any combination of visual, auditory, and tactile information. The alarm module includes but is not limited to a display screen, a speaker, a vibration motor, etc. For example, the target object can be framed in the screen of the display screen, and when the target object appears in different positions (for example, 1 meter, 2 meters, and 3 meters away from the right rear door of the vehicle), different voice prompts are issued to assist the driver in making more accurate judgments.
[0080] Optionally, in an embodiment of the present invention, when there are multiple image acquisition modules, multiple images can be switched and displayed, or images of one or more image acquisition modules can be displayed according to the driver's selection, or images of several image acquisition modules can be synthesized and displayed.
[0081] Due to the low visibility weather such as rainy days, nights, and haze days, or roads with fewer street lights, the light is dim, and the image acquisition module 30 can use an infrared camera that is less affected by light changes to obtain an infrared IR video stream with better quality than an ordinary camera, thereby improving the accuracy of the detection result. In this case, the image acquisition module can be a combination of an infrared camera and an RGB camera, and accordingly, the deep learning model includes an infrared image model and an RGB image model, that is, a large number of infrared images and RGB images can be used as sample images to train the infrared image model and the RGB image model respectively, wherein the infrared image model and the RGB image model can have the same structure to reduce the complexity of the deep learning model. In one embodiment, the target detection device 3 can also include a mode switching module 31, which is used to determine whether the target image is an infrared image according to the channel information of the target image after the image acquisition module 30 acquires the target image, and switch to the infrared image model or the RGB image model according to the judgment result, so as to achieve seamless connection between the infrared image and the RGB image, and achieve better results for the detection of target objects in the blind spot of the vehicle in both bright and dim environments.
[0082] In an embodiment of the present invention, through the above-mentioned module, automatic monitoring of target objects in the blind spot of the vehicle can be achieved, and when there is a target object in the detection area corresponding to the blind spot of the vehicle, an alarm prompt is issued to assist the driver to promptly discover potential dangers during driving and reduce the occurrence of traffic accidents caused by the driver's distraction while watching videos.
[0083] According to another aspect of the embodiments of the present invention, an electronic device is provided. Figure 4 , is a structural block diagram of an optional electronic device according to an embodiment of the present invention. Figure 4 As shown, the electronic device 4 includes: a processor 40; and a memory 42 for storing executable instructions of the processor 40; wherein the processor 40 is configured to perform the above-mentioned target detection method by executing the executable instructions.
[0084] Optionally, in an embodiment of the present invention, the weights and feature values of the deep learning model used in the target detection method can be optimized according to the computing power of the processor. For example, when the processor used is a DSP, its computing power for floating-point multiplication is relatively weak, which is specifically manifested in the longer time required for calculation, but it is relatively strong in the eight-bit operation after quantization, and the time can be shortened by 2-3 times. Therefore, when training the deep learning model, the quantized calculation can be simulated, the weights and feature values of the convolution can be optimized, and the impact of quantization on the detection effect can be reduced, so as to shorten the alarm delay time without affecting the effect as much as possible.
[0085] According to another aspect of an embodiment of the present invention, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned target detection method.
[0086] The target detection method and target detection device provided by the embodiments of the present invention can not only be used to detect target objects in the blind spots of vehicles to reduce traffic accidents, but can also be used to detect target objects in other preset areas during vehicle driving to achieve intelligent vehicle assisted driving. In addition, without creative work by those skilled in the art, the above target detection method and target detection device can also be used for detection and counting of target objects in other monitoring scenarios.
[0087] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0088] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for 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: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0093] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting a target in a vehicle blind spot, characterized in that: The method comprises the following steps: Get the target image; Calibrate a corresponding detection area in the target image according to a preset vehicle blind spot; Detect the target object in the target image using a deep learning model to obtain position information of the target object; Based on the location information of the target object, determining whether the target object exists in the detection area; When the target object exists in the detection area, an alarm message is issued; Wherein, the deep learning model includes an infrared image model and an RGB image model; Detecting the target object in the target image using a deep learning model includes: Judging whether the target image is an infrared image according to the channel information of the target image, if the target image is an infrared image, using the infrared image model to detect the target object in the target image; if the target image is an RGB image, using the RGB image model to detect the target object in the target image; judging whether the target image is an infrared image according to the channel information of the target image comprises: processing the target image into three channels, comparing whether the pixel values of the three channels of each pixel point of the target image are consistent, if the pixel values of the three channels of each pixel point of the target image are consistent, judging that the target image is an infrared image; if there are more than one pixel points in the target image whose values of the three channels are inconsistent, judging that the target image is an RGB image; The method further comprises: training the deep learning model; Training methods include: Acquire a large number of sample images, and mark target objects in the sample images with annotation boxes; Input the sample image with the marked annotation box into the deep learning model and select the feature map; Selecting a pre-selected box on the feature map; Matching the marked annotation box with the pre-selected box to obtain the positioning loss and classification confidence loss of the pre-selected box; The loss function of the deep learning model is adjusted according to the positioning loss and the classification confidence loss of the pre-selected box to complete the training of the deep learning model.
2. The method according to claim 1, characterized in that The vehicle blind spot is preset according to the vehicle type or by calibrating an image acquisition module, and the image acquisition module is used to acquire a target image.
3. The method according to claim 1, characterized in that The target image is acquired by an image acquisition module, and the installation position of the image acquisition module is located at at least one of the following positions of the vehicle: right rear side, left rear side, right front side, left front side, and rear side.
4. The method according to claim 2, characterized in that: Presetting the vehicle blind spot according to the vehicle type includes defining at least one area at a preset distance from one side of the vehicle on the ground as the vehicle blind spot according to the vehicle type.
5. The method according to claim 1, characterized in that The deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network and the SSD model as the detection algorithm.
6. The method according to claim 1, further comprising: After using a deep learning model to detect the target object in the target image and obtaining the position information of the target object, a non-maximum suppression method is used to filter the position information of the target object.
7. The method according to claim 1, characterized in that The target object includes at least one of the following: an electric vehicle, a motorcycle, a pedestrian, a bicycle, a motor vehicle, a pet, and an obstacle.
8. The method according to claim 1, characterized in that Matching the marked annotation box with the pre-selected box includes: matching the marked annotation box with the pre-selected box according to an intersection-and-union ratio.
9. The method according to claim 8, characterized in that When the intersection-over-union ratio is greater than or equal to the first threshold, the pre-selected box is marked as a positive sample; and the number of negative samples is determined according to the number of positive samples and a preset positive-negative sample ratio.
10. A target detection device for a vehicle blind spot, characterized in that: The device comprises: An image acquisition module, used for acquiring a target image; A detection area calibration module, used to calibrate the corresponding detection area in the target image according to a preset vehicle blind spot; A position detection module, used to detect the target object in the target image by using a deep learning model to obtain the position information of the target object; and also used to train the deep learning model; A judging module, configured to judge whether the target object exists in the detection area based on the position information of the target object; An alarm module is used to issue an alarm message when the target object exists in the detection area; Wherein, the deep learning model includes an infrared image model and an RGB image model; The position detection module may detect the target object in the target image by using a deep learning model, comprising: Determining whether the target image is an infrared image according to the channel information of the target image, and if the target image is an infrared image, using the infrared image model to detect the target object in the target image; if the target image is an RGB image, using the RGB image model to detect the target object in the target image; The step of judging whether the target image is an infrared image according to the channel information of the target image comprises: processing the target image into three channels, comparing whether the pixel values of the three channels of each pixel point of the target image are consistent, and judging that the target image is an infrared image if the pixel values of the three channels of each pixel point of the target image are consistent; judging that the target image is an RGB image if the values of the three channels of more than one pixel point of the target image are inconsistent; The training method of the deep learning model includes: Acquire a large number of sample images, and mark target objects in the sample images with annotation boxes; Input the sample image with the marked annotation box into the deep learning model and select the feature map; Selecting a pre-selected box on the feature map; Matching the marked annotation box with the pre-selected box to obtain the positioning loss and classification confidence loss of the pre-selected box; The loss function of the deep learning model is adjusted according to the positioning loss and the classification confidence loss of the pre-selected box to complete the training of the deep learning model.
11. The device according to claim 10, characterized in that The deep learning model uses the Mobilenet convolutional neural network as the basic feature extraction network and the SSD model as the detection algorithm.
12. An electronic device comprising: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the target detection method according to any one of claims 1 to 9 by executing the executable instructions.
13. The electronic device according to claim 12, characterized in that: The weights and feature values of the deep learning model used in the target detection method are optimized according to the computing power of the processor.
14. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the target detection method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Object recognition in low-lux and high-lux conditions
CN105122784A
Method for fire identification through infrared and visible-light video image fusion
CN105512667A
Vehicle door opening early-warning method
CN105930787A
Face identification method and system based on in-vivo detection
CN107832677A
Switch cabinet image on / off state automatic recognition method based on deep learning
CN108710913A
