WO2023115977A1 - 一种事件检测方法、装置、***、电子设备及存储介质 - Google Patents
一种事件检测方法、装置、***、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2023115977A1 WO2023115977A1 PCT/CN2022/111376 CN2022111376W WO2023115977A1 WO 2023115977 A1 WO2023115977 A1 WO 2023115977A1 CN 2022111376 W CN2022111376 W CN 2022111376W WO 2023115977 A1 WO2023115977 A1 WO 2023115977A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- event
- image
- event detection
- calibration
- target
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
Definitions
- the present application relates to the field of event detection, in particular to an event detection method, device, system, electronic equipment and storage medium.
- Event detection can determine the occurrence of events and deal with them in a timely manner. For example, event detection can detect traffic incidents, crowd incidents, etc.
- the current event detection method usually uses an event detection algorithm to perform event detection on the event video collected by the camera, so as to judge Whether an event occurred.
- the captured video will be affected by various environmental factors, such as weather factors, road condition factors, etc., which will lead to low accuracy of event detection.
- the purpose of the embodiments of the present application is to provide an event detection method, device, system, electronic equipment, and storage medium, so as to improve the accuracy of event detection.
- the specific technical scheme is as follows:
- the embodiment of the present application provides an event detection method, the method comprising:
- event detection is performed on the image to be detected to obtain an event detection result.
- the target environment information includes at least one of the following:
- the target event detection method includes one or more target event detection algorithms, and each target event detection algorithm corresponds to an event type;
- the step of performing event detection on the image to be detected based on the target event detection method includes:
- a target calibration rule corresponding to the target event detection algorithm Based on each of the target event detection algorithms, determine a target calibration rule corresponding to the target event detection algorithm from a pre-established calibration rule package, wherein the calibration rule package includes a predetermined calibration corresponding to each event detection algorithm rule;
- the target calibration rule is used to indicate the auxiliary information required for event detection in the image to be detected by using the target event detection algorithm the calibration method;
- each target event detection algorithm and its corresponding calibration information to perform event detection on the image to be detected.
- the establishment of the corresponding relationship between the environmental information and the traffic event detection method includes:
- the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types are correspondingly recorded to obtain the corresponding relationship between the environmental information and the event detection mode.
- training to obtain the multiple event detection algorithms corresponding to each environmental information sample steps including:
- each image sample corresponding to the event type is input into the initial detection model corresponding to the event type to obtain a prediction result;
- training to obtain the multiple event detection algorithms corresponding to each environmental information sample steps also include:
- the auxiliary information is calibrated according to the initial calibration rule to obtain the auxiliary information
- the initial detection model corresponding to the event type detects each image sample corresponding to the event type based on the auxiliary information to obtain a prediction result
- adjust the Describe the initial calibration rules until the initial detection model converges, and obtain the calibration rules corresponding to the event type;
- For each environmental information sample record the corresponding relationship between event detection algorithms and calibration rules of various event types corresponding to the environmental information sample, and generate a calibration rule package with the calibration rules corresponding to the environmental information sample.
- an event detection device comprising:
- An acquisition module configured to acquire the image to be detected and the target environment information when acquiring the image to be detected
- a determining module configured to determine the target event detection method based on the target environment information and the pre-established correspondence between the environment information and the event detection method
- the detection module is configured to perform event detection on the image to be detected based on the target event detection manner, and obtain an event detection result.
- the target environment information includes at least one of the following:
- the target event detection method includes one or more target event detection algorithms, and each target event detection algorithm corresponds to an event type;
- the detection module includes:
- a determining unit configured to determine, based on each of the target event detection algorithms, a target calibration rule corresponding to the target event detection algorithm from a pre-established calibration rule package, wherein the calibration rule package includes each predetermined event Calibration rules corresponding to the detection algorithm;
- a calibration unit configured to perform calibration on the image to be detected according to the target calibration rule to obtain calibration information, wherein the target calibration rule is used to indicate that the target event detection algorithm is used to detect the event in the image to be detected
- a detection unit configured to use each of the target event detection algorithms and its corresponding calibration information to perform event detection on the image to be detected;
- the corresponding relationship between the environmental information and the traffic incident detection mode is pre-established by the establishment module, and the establishment module includes:
- an acquisition unit configured to acquire image samples of multiple event types corresponding to each environmental information sample in the multiple environmental information samples
- the training unit is configured to use the image samples of multiple event types corresponding to each environmental information sample and the initial detection model of each event type to train multiple event detection algorithms corresponding to each environmental information sample, wherein , each of the event detection algorithms corresponds to an event type;
- a recording unit configured to record the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types, so as to obtain the corresponding relationship between environmental information and event detection methods;
- the training unit includes:
- the first calibration subunit is configured to calibrate each image sample of each event type corresponding to each environmental information sample to obtain a calibration label
- the prediction subunit is used to input each image sample corresponding to the event type into the initial detection model corresponding to the event type for the same event type corresponding to the same environmental information sample, and obtain a prediction result;
- the first adjustment subunit is configured to adjust the model parameters of the initial detection model corresponding to the event type corresponding to each image sample based on the calibration label corresponding to each image sample and the difference of the prediction result until the initial detection model converges, and the Environmental information samples corresponding to image samples and event detection algorithms corresponding to event types;
- the training unit also includes:
- the second calibration unit is configured to perform auxiliary information calibration according to the initial calibration rules for each image sample of each event type corresponding to each environmental information sample to obtain auxiliary information;
- the second adjustment subunit is used to detect the same event type corresponding to the same environmental information sample, and the initial detection model corresponding to the event type detects each image sample corresponding to the event type based on the auxiliary information to obtain a prediction result Afterwards, adjusting the initial calibration rule based on the prediction result until the initial detection model converges to obtain the calibration rule corresponding to the event type;
- the recording subunit is used to record the corresponding relationship between event detection algorithms and calibration rules of various event types corresponding to the environmental information sample for each environmental information sample, and generate the calibration rules corresponding to the environmental information sample Calibration rule package.
- an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
- the processor is configured to implement the method steps described in any one of the above-mentioned first aspects when executing the program stored in the memory.
- an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned first aspects can be implemented. Method steps.
- the embodiment of the present application provides an event detection system, the system includes the electronic device, the image acquisition device, and the environment detection device as described in the third aspect above, wherein:
- the environment detection device is used to detect the target environment information when collecting the image to be detected, and send the target environment information to the electronic device;
- the image acquisition device is configured to acquire the image to be detected and send it to the electronic device.
- an embodiment of the present application provides a computer program product including instructions, and when the computer program product is executed by a computer, the method steps described in any one of the above first aspects are implemented.
- the electronic device can obtain the image to be detected and the target environment information when collecting the image to be detected, and determine the target event detection method based on the target environment information and the pre-established correspondence between the environment information and the event detection method , based on the target event detection method, the event detection is performed on the image to be detected, and the event detection result is obtained.
- the electronic device can select a target event detection method suitable for the target environment information to process the image to be detected based on the pre-established correspondence between the environment information and the event detection method for different target environment information when collecting the image to be detected , which reduces the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- any product or method of the present application does not necessarily need to achieve all the above-mentioned advantages at the same time.
- FIG. 1 is a flowchart of an event detection method provided in an embodiment of the present application
- Fig. 2 is a kind of specific flowchart of step S103 in the embodiment shown in Fig. 1;
- Fig. 3 is a kind of flowchart of the establishment method of the corresponding relationship between the environmental information and the event detection method based on the embodiment shown in Fig. 1;
- Fig. 4 is a kind of specific flowchart of step S302 in the embodiment shown in Fig. 3;
- FIG. 5 is another specific flowchart of step S302 in the embodiment shown in FIG. 3;
- FIG. 6 is a schematic structural diagram of an event detection device provided in an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a detection module 630 in the embodiment shown in FIG. 6;
- FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an event detection system provided by an embodiment of the present application.
- embodiments of the present application provide an event detection method, device, system, electronic equipment, computer-readable storage medium, and computer program product. The following firstly introduces an event detection method provided by the embodiment of the present application.
- the event detection method provided by the embodiment of the present application can be applied to any electronic device that needs to perform event detection, for example, it can be a server or a terminal, which is not specifically limited here, and for clarity of description, it will be referred to as an electronic device hereinafter.
- an event detection method the method may include:
- the electronic device can obtain the image to be detected and the target environment information when collecting the image to be detected, and determine the target event based on the target environment information and the pre-established correspondence between the environment information and the event detection method
- the detection method is based on the target event detection method, and the event detection is performed on the image to be detected to obtain the event detection result.
- the electronic device can select a target event detection method suitable for the target environment information to process the image to be detected based on the pre-established correspondence between the environment information and the event detection method for different target environment information when collecting the image to be detected , which reduces the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- the electronic device can obtain the image to be detected and the target environment information when collecting the image to be detected, wherein the image to be detected can be an image captured by the image acquisition device, or a video collected by the image acquisition device Included in the video frame image etc.
- the image to be detected may be a real-time video image, or an image stored in an electronic device or other device, which is reasonable.
- the above event may be a traffic event
- the electronic device may obtain the image to be detected required for traffic event detection and the target environment information when the image to be detected is collected.
- the image acquisition device can send the traffic video collected by it to the electronic device in real time, and the electronic device can use each frame image in the traffic video as an image to be detected for real-time traffic event detection, or, the image acquisition device collects the traffic video, and can send Each frame image in the traffic video is used as an image to be detected, and then real-time traffic event detection is performed.
- the user when the user wants to check whether a traffic accident has occurred at a certain time and place, he can select the traffic video at the corresponding time and place.
- the frame image is used as the image to be detected.
- the above-mentioned target environment information is the environmental information of the actual scene corresponding to the image to be detected when the image to be detected is collected, wherein the environmental information may include road-related information, weather-related information, image acquisition equipment-related information, etc. All kinds of information related to the real scene in the image are reasonable. For example, if image A to be detected is a traffic image collected at intersection a at time 1, then the target environment information corresponding to image A to be detected is the environment information at intersection a at time 1.
- the electronic device After acquiring the image to be detected and the target environment information when the image to be detected is collected, the electronic device can perform the above step S102, that is, determine the target event detection method based on the target environment information and the pre-established correspondence between the environment information and the event detection method .
- the corresponding relationship between environmental information and event detection methods can be established in advance, and the event detection method corresponding to each environmental information is the event detection method with better detection effect corresponding to the environmental information. That is to say, the event detection mode corresponding to each type of environmental information is: an event detection mode with a better detection effect on images collected under the environment represented by the environmental information.
- the electronic device can determine the environment information that matches the target environment information from the pre-established correspondence between the environment information and the event detection method, and then determine the event detection method corresponding to the environment information as the target Event detection method.
- the target event detection manner may correspond to one target event detection algorithm or multiple target event detection algorithms, and each target event detection algorithm corresponds to one event type.
- the above-mentioned event is a traffic event
- the corresponding relationship between the pre-established environmental information and the traffic event detection method is shown in the following table:
- environmental information pavement material road condition light intensity visibility Traffic incident detection method Environmental information 1 concrete pavement wet normal light 500 meters Traffic incident detection method 1
- the electronic device can determine that the environment information matching the target environment information is environment information 2, and then the traffic incident detection method corresponding to environment information 2 can be 2 is determined as the target traffic event detection method.
- the target event detection method determined based on the target environment information is suitable for the target event when the image to be detected is collected.
- Environmental information, using the target event detection method for event detection on the image to be detected can reduce the impact of environmental factors on the event detection results.
- the electronic device may execute the above step S103, that is, perform event detection on the image to be detected based on the detection method of the target event, and obtain an event detection result.
- the detection results can be obstacles, traffic accidents, spilled objects, reverse traffic, vehicle congestion, speeding, event areas occupying emergency roads, etc. in the image to be detected, which are not specifically limited here.
- further detection may be performed to determine more detailed event information. For example, for traffic incidents, after determining the area of the emergency road event in the image to be detected, the license plate number detection of the vehicles in the area can be performed to determine the license plate number of the vehicle occupying the emergency road, which is convenient for the staff to handle .
- the electronic device acquires the image to be detected and the target environment information when collecting the image to be detected, for example, asphalt pavement-dry-normal light -1000 meters, the correspondence between the pre-established environmental information and the obstacle detection algorithm is as follows:
- the electronic device can determine that the obstacle detection algorithm to be adopted is specifically the obstacle detection algorithm C corresponding to the environment information n, and then, the electronic device can use the obstacle detection algorithm C to perform obstacle detection on the image to be detected, and obtain the to-be-detected The area of the obstacle in the image, which is the event detection result.
- the electronic device acquires the image to be detected and the target environment information when collecting the image to be detected, such as asphalt pavement - dry - normal light - 1000 meters, the correspondence between the pre-established environmental information and the obstacle detection algorithm is as follows:
- the electronic device can determine the detection algorithm to be adopted according to the correspondence between the pre-established environmental information and the obstacle detection algorithm, specifically the obstacle detection algorithm C corresponding to the environmental information n, the spilled object detection algorithm C and the pressure line The detection algorithm C, and then, the electronic device can respectively use the obstacle detection algorithm C, the spilled object detection algorithm C and the pressure line detection algorithm C to detect the image to be detected, and obtain the obstacle area, the spilled object area, and the pressure line detection algorithm in the image to be detected.
- One or several types in the line area that is, the event detection result.
- the electronic device can adopt the target event detection mode, that is, the event detection mode adapted to the target environment information when collecting the image to be detected, and perform event detection on the image to be collected, and then obtain the event detection result,
- the electronic device can select a target event detection method suitable for the target environment information to process the image to be detected based on the pre-established correspondence between the environment information and the event detection method for different target environment information when collecting the image to be detected. , which reduces the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- the target environment information may include at least one of the following: installation angle information, road surface information, and weather information of an image acquisition device that acquires the image to be detected.
- the road surface information may include road surface material information, road surface condition information, etc.; the weather information may include visibility information, illumination information, and the like.
- the above-mentioned target environment information may include at least one of installation angle information of the image acquisition device that collects the image to be detected, road surface material information, road surface condition information, visibility information, and illumination information.
- the target environment information may include the installation angle information of the image acquisition device that collects the image to be detected, road material information, road condition information, visibility information and illumination information.
- the installation angle information of the image acquisition device can include image acquisition The angle of the installation position of the equipment relative to the road. For example, if the image acquisition equipment is installed on the left side of the road, it is the left side installation; if the image acquisition equipment is installed on the right side of the road, it is the right installation; That is formal attire.
- the pavement material information may be the material type of the pavement, for example, it may be earth pavement, cement pavement, asphalt pavement, and the like.
- the road surface condition information may be the condition of the road surface due to weather or human factors, for example, it may be ice, water, snow, dry or wet, and the like.
- Visibility information is the maximum distance that a person with normal vision can recognize the target from the background. Weather such as fog, haze, dust, rain and snow will affect the visibility.
- the visibility information can be, for example, 50 meters, 100 meters meters, 200 meters, 500 meters, 1000 meters, 3000 meters, etc.
- the light information can be information that can identify the light intensity, where the light intensity is the energy of visible light received per unit area, and can be classified according to the light intensity, and the classification can be obtained
- the lighting category of is used as lighting information.
- the ambient light intensity can be divided into strong light, normal light, weak light, etc., then the light information can include strong light, normal light, weak light, and so on. No specific limitation is made here.
- the target environment information may include at least one of installation angle information of the image acquisition device that acquires the image to be detected, road surface information, and weather information. Because these information can accurately represent the environment when the image to be detected is collected, the target traffic event detection method determined based on the target environment information is more suitable for the traffic event detection of the image to be detected, thereby improving the accuracy of traffic event detection.
- the above-mentioned target event detection method may include one or more target event detection algorithms, and each target event detection algorithm corresponds to a type of event, as shown in FIG. 2 , based on the above
- the target event detection mode the step of performing event detection on the image to be detected may include:
- the electronic device can calibrate the auxiliary information required for event detection on the image to be detected, and then perform event detection on the image to be detected based on the auxiliary information. detection, therefore, the electronic device can pre-establish a calibration rule package, wherein the calibration rule package can include a predetermined calibration rule corresponding to each event detection algorithm, that is, the calibration rule of the auxiliary information required by each event detection algorithm, the calibration rule The rule is used to indicate the calibration method of the auxiliary information required for detecting the event in the image to be detected.
- the electronic device can determine the target calibration rule corresponding to the target event detection algorithm from the pre-established calibration rule package based on the target event detection algorithm, that is, the target event detection algorithm using the target event detection algorithm can be obtained.
- the calibration rules corresponding to different event detection algorithms may be the same or different, which are not specifically limited here.
- the event detection is traffic event detection
- both the retrograde event detection algorithm and the line-crossing event detection algorithm need to calibrate the lane lines in the image to be detected, so the retrograde event detection algorithm and the line-crossing event detection algorithm correspond to
- the calibration rules of can include the calibration rules for demarcating the lane lines in the image.
- the electronic device can follow the target calibration rule to be detected
- the image is calibrated to obtain the calibration information, and then the image to be detected with calibrated auxiliary information can be obtained.
- the auxiliary information can include the region of interest, railings, and auxiliary lines in the image to be detected. and lane lines, etc., are not specifically limited here.
- the target traffic event detection algorithm is the emergency road occupancy detection algorithm
- the corresponding target calibration rule is calibration rule 1
- the electronic device can convert the image A to be detected based on calibration rule 1
- the emergency road area in is calibrated out, and the calibration information 1 of the image A to be detected is obtained.
- the electronic device can use the above-mentioned target event detection algorithm and its corresponding calibration information to perform event detection on the image to be detected, and then determine whether an event occurs, and then determine the area where the event occurred.
- step S202 after the electronic device obtains the above-mentioned calibration information 1, it can use the occupied emergency road detection algorithm and the calibration information 1 to detect vehicles in the emergency road area in the image A to be detected, and determine whether there is an emergency road area in the emergency road area. Vehicles, and then judge whether the event of occupying the emergency road occurs, and determine the area where the event of occupying the emergency road occurs, as the traffic event detection result.
- the electronic device can determine the target calibration rule corresponding to the target event detection algorithm from the pre-established calibration rule package, and calibrate the image to be detected according to the target calibration rule, and obtain The calibration information, and then, use each target event detection algorithm and its corresponding calibration information to perform event detection on the image to be detected.
- the target calibration rule can indicate the calibration method of the auxiliary information required for event detection in the image to be detected
- the electronic device can obtain accurate calibration information by using the target calibration rule to calibrate the image to be detected, and then based on the calibration information to perform event detection on the image to be detected. During detection, the accuracy of event detection results can be further improved.
- the establishment method of the above-mentioned corresponding relationship between the environmental information and the event detection method may include:
- image samples of multiple event types corresponding to each environmental information sample in the multiple environmental information samples may be acquired in advance. For example, for 7 different environmental scenarios, 7 environmental information samples can be obtained. If the event types to be detected are 5 types, then for each environmental information sample, the environmental conditions corresponding to the environmental information sample can be obtained. Image samples corresponding to the five event types collected.
- the environmental information samples are parameter values that can represent different environmental information, which may include at least one of the following: installation angle information of the image acquisition device that collects each image sample, road surface information corresponding to each image sample, and weather information.
- the image samples are image samples including various types of events collected under the environmental conditions corresponding to each environmental information sample.
- each initial detection model corresponds to an event type and is used to detect events of the event type.
- the types of the traffic event may include traffic accidents, spilled objects, reverse traffic, vehicle congestion, speeding, emergency road occupation, etc., which are not specifically limited here.
- each initial detection model may correspond to a type of traffic event, and is used for traffic event detection of this type of traffic event.
- the types of traffic events to be detected include four types: throwing objects, retrograde traffic, vehicle congestion, and speeding.
- the electronic device can obtain four initial detection models.
- the electronic device can obtain multiple environmental information samples. Traffic image samples of this type of traffic event collected under the corresponding environment information. For example, for the type of traffic event of spilled objects, 100 traffic image samples including the event of spilled objects collected under the environmental information corresponding to each environmental information sample may be obtained.
- each environmental information sample corresponds to image samples of multiple event types, and for different event types, the event detection algorithm is different , so each environmental information sample can correspond to multiple event detection algorithms, and each event detection algorithm corresponds to an event type.
- the electronic device can use the image samples of various event types corresponding to each environmental information sample and the initial detection model of each event type to train multiple event detection models corresponding to each environmental information sample, as each environmental information sample corresponds to multiple event detection algorithms.
- the electronic device can use 100 traffic image samples of the spill event corresponding to the environmental information sample 1 and the initial detection model corresponding to the throw event type to obtain the environmental information sample through training
- the spill detection model corresponding to 1 is used as the spill detection algorithm corresponding to environmental information sample 1.
- the retrograde detection algorithm, vehicle congestion detection algorithm, and speeding detection algorithm corresponding to the environmental information sample 1 can be trained. It can also be trained to obtain the retrograde detection algorithm, vehicle congestion detection algorithm, and speeding detection algorithm corresponding to environmental information sample 2, environmental information sample 3...environment information sample n.
- the electronic device can record the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types, and then obtain the environmental information The corresponding relationship with the traffic incident detection method.
- the electronic device determines that the event detection algorithms corresponding to various event types corresponding to environmental information sample 1 are spill detection algorithm 1, retrograde detection algorithm 1, vehicle congestion detection algorithm 1, and speeding detection algorithm 1; environmental information sample 2 corresponds to The event detection algorithms corresponding to various event types are spill detection algorithm 2, retrograde detection algorithm 2, vehicle congestion detection algorithm 2, and speeding detection algorithm 2; the event detection algorithms corresponding to various event types corresponding to environmental information sample 3 are Spill detection algorithm 3, retrograde detection algorithm 3, vehicle congestion detection algorithm 3 and overspeed detection algorithm 3. Then, the electronic device can record the corresponding environmental information 1, environmental information 2, and environmental information 3 corresponding to the environmental information sample and the corresponding event detection algorithm respectively, and obtain the corresponding relationship as shown in the following table:
- the electronic device can generate an event detection algorithm package from multiple event detection algorithms, which is convenient for loading and using by devices such as servers or front-end cameras.
- the electronic device can record the corresponding relationship between the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types in a table, and obtain the relationship between the environmental information and the event detection mode. control set.
- the electronic device can obtain image samples of various event types corresponding to each environmental information sample among the multiple environmental information samples, and use image samples of various event types corresponding to each environmental information sample and each
- the initial detection model of each event type is trained to obtain multiple event detection algorithms corresponding to each environmental information sample, and the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types are correspondingly recorded.
- the electronic device can establish the corresponding relationship between the environmental information and the event detection method, so that the target event detection method suitable for the target environment information can be selected based on the target environment information.
- the detection image is processed to reduce the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- the image samples of various event types corresponding to each environmental information sample and the initial detection model of each event type are used to train each event type.
- the steps of multiple event detection algorithms corresponding to environmental information samples may include:
- the electronic device After acquiring image samples of multiple event types corresponding to each environmental information sample, the electronic device calibrates each image sample of each event type corresponding to each environmental information sample to obtain a calibration label.
- the event area may be marked for each image sample, that is, the event-occurring area included in the image sample is marked as a marked label.
- each image sample corresponding to the event type can be input into the initial detection model corresponding to the event type to obtain a prediction result.
- the initial detection model may perform event region prediction based on image features of image samples, and output the predicted event region as a prediction result.
- the electronic device can adjust the model parameters of the initial detection model corresponding to the event type corresponding to the image sample based on the calibration label corresponding to each image sample and the difference in the prediction result, until the initial model converges, and obtain the corresponding event type Event detection model.
- gradient descent algorithm stochastic gradient descent algorithm, etc. may be used to adjust the parameters of the initial detection model, which are not specifically limited here.
- each image sample collected under the environmental conditions corresponding to the environmental information sample a can be input into the initial detection model, and then, according to the initial detection
- the difference between the vehicle congestion prediction area output by the model and the calibrated vehicle congestion area adjusts the parameters of the initial detection model until the initial detection model converges, that is, it can be used to detect vehicle congestion under the environmental conditions corresponding to the environmental information sample a Event detection model.
- the electronic device can calibrate each image sample of each event type corresponding to each environmental information sample to obtain a calibration label, and then for the same event type corresponding to the same environmental information sample, set Each image sample corresponding to the event type is input to the initial detection model corresponding to the event type to obtain the prediction result, and then based on the calibration label corresponding to each image sample and the difference in the prediction result, adjust the corresponding The model parameters of the initial detection model until the initial detection model converges to obtain the environmental information sample corresponding to the image sample and the event detection algorithm corresponding to the event type.
- the electronic device can be trained to obtain multiple event detection algorithms corresponding to each environmental information sample, so that the target event detection method suitable for the target environmental information can be selected based on the target environmental information to process the image to be detected, and the impact of environmental factors on the event can be reduced. detection, thereby improving the accuracy of event detection.
- the image samples of various event types corresponding to each environmental information sample and the initial detection model of each event type are used to train each event type.
- the steps of multiple event detection algorithms corresponding to environmental information samples may also include:
- the electronic device can be based on the current
- the calibration rule calibrates the auxiliary information in the image sample, and based on the auxiliary information, performs traffic incident detection on the image sample to obtain a detection result. Furthermore, the calibration rule corresponding to the environmental information sample is adjusted according to the accuracy of the detection result, so as to obtain a calibration rule more suitable for the environmental scene corresponding to the environmental information sample.
- environmental information sample 1 is asphalt road-icing-weak light-500 meters-formal installation
- traffic image sample 1 corresponding to environmental information sample 1 is a rear-end collision event at an intersection
- the current calibration rule is calibration rule 1
- electronic equipment can Based on the calibration rule 1, the auxiliary information 1 in the traffic image sample 1 is calibrated, based on the auxiliary information 1, the traffic incident detection is performed on the traffic image sample 1, and the detection result 1 is obtained, and the detection result 1 is compared with the rear-end collision event to obtain the detection result 1, and then adjust the calibration rule corresponding to the environmental information sample 1 according to the accuracy of the test result 1, and obtain the calibration rule 2.
- the calibration rules are constantly adjusted to obtain more accurate calibration rules.
- the electronic device can perform each image sample of each event type corresponding to each environmental information sample according to the initial Calibration rules perform auxiliary information calibration to obtain auxiliary information.
- the initial calibration rule may be an artificially preset calibration rule according to the auxiliary information required by the actual event type.
- the initial detection model corresponding to the event type can detect each image sample corresponding to the event type based on auxiliary information, and obtain forecast result. Since the prediction result is detected based on the auxiliary information, it also reflects the accuracy of the auxiliary information, which also reflects the accuracy of the initial calibration rule. Furthermore, the electronic device can adjust the initial calibration rules based on the prediction results until the initial detection model converges to obtain the calibration rules corresponding to the event type, and also obtain the environmental scene corresponding to the environmental information sample corresponding to the image sample calibration rules.
- the environmental information sample 2 is asphalt road surface-icing-strong light-800 meters-formal installation
- the traffic image sample 2 corresponding to the environmental information sample 2 includes the event that the vehicle presses the line
- the initial calibration rule is to calibrate the lane line
- the electronic device The traffic image sample 2 can be calibrated according to the initial calibration rule to obtain auxiliary information.
- the initial detection model corresponding to the event type can detect the traffic image sample 2 based on the auxiliary information to obtain a prediction result.
- the initial calibration rule can be adjusted based on the accuracy of the prediction result of the traffic image sample 2, for example, the length and width of the calibrated lane line can be adjusted.
- the initial calibration rules can be continuously adjusted until the environment information can be accurately calibrated as asphalt pavement, icing, strong light, visibility of 800 meters, and the calibration of the lane line under the condition that the image acquisition equipment is installed rule.
- the electronic device can record the corresponding relationship between the event detection algorithm and the calibration rule of various event types corresponding to the environmental information sample, so that the target corresponding to the target event detection algorithm can be selected based on the target event detection algorithm.
- Calibration rules so as to realize event detection on the image to be detected, and the electronic device generates a calibration rule package corresponding to the calibration rule of the environmental information sample, and the calibration rule package includes multiple calibration rules, so that the server or the front-end camera and other equipment can load and use.
- the electronic device After the electronic device obtains the calibration rule 1 and the traffic event detection algorithm 1 corresponding to the traffic type 1 in the environmental information sample 3, it can record the corresponding relationship as the environmental information sample 3-traffic type 1-traffic event detection algorithm 1-calibration rule 1. Assuming that the environmental information sample 3 also corresponds to the calibration rule 2 and the calibration rule 3, the electronic device can generate a calibration rule package from the calibration rule 1-calibration rule 3 corresponding to the environmental information sample 3, so that the environmental information detected in the target event is the environmental information sample 3, devices such as servers or front-end cameras can load and use the calibration rule package.
- the electronic device can also establish an event detection algorithm package-calibration rule package-environmental information comparison set, which can be used for the electronic device to obtain the target environment information from the event detection algorithm according to the target environment information.
- the package selects one or more target event detection algorithms adapted to the target environment information, and then selects the target calibration rules corresponding to the target event detection algorithms from the calibration rule package.
- the electronic device records the correspondence between the environmental information corresponding to each environmental information sample, its corresponding event detection method, and its corresponding calibration rule in a table, and then the environmental information-event detection
- the method-calibration rule mapping table is convenient for subsequent use in event detection.
- the corresponding relationship mapping table of environmental information-multiple traffic event detection algorithms-calibration rules can be shown in the following table:
- the electronic device can perform auxiliary information calibration on each image sample of each event type corresponding to each environmental information sample according to the initial calibration rule to obtain auxiliary information, and for each image sample corresponding to the same environmental information sample
- the initial detection model corresponding to the event type detects each image sample corresponding to the event type based on the auxiliary information to obtain the prediction result
- adjust the initial calibration rule based on the prediction result until the initial detection model converges
- Obtain the calibration rule corresponding to the event type record the corresponding relationship between the event detection algorithm and the calibration rule of each event type corresponding to the environmental information sample for each environmental information sample, and record the corresponding relationship between the environmental information sample
- the calibration rule generates a calibration rule package. In this way, after the electronic device obtains the calibration rule package, it is convenient for use in subsequent event detection, ensuring the efficiency of event detection.
- Step 1 Obtain traffic image samples of various event types and multiple initial detection models corresponding to each environmental information sample in the multiple environmental information samples;
- the environmental information samples may be parameter values representing different environmental information, specifically may include: parameter values representing road surface material information: for example, parameter values representing road surface material information such as land, cement and asphalt, and parameter values representing road surface condition information, For example, parameter values representing road condition information such as icing, water accumulation, dryness, snow cover and wetness, parameter values representing illumination information, for example, parameter values representing illumination information such as strong light, normal light and weak light, representing visibility
- the parameter value of the information for example: the parameter value representing the visibility information such as 50m, 100m, 200m, 500m, 1000m and 3000m
- the parameter value representing the installation angle information of the image acquisition equipment that collects the traffic image samples for example: representing the formal installation, the left side
- the parameter values of the angle information of the equipment and the right equipment are accumulated to the number that meets the training requirements of the traffic incident detection method.
- Step 2 Using the image samples of various event types corresponding to each environmental information sample and the initial detection model of each event type, respectively carry out the training of multiple event detection algorithms corresponding to each environmental information sample, and obtain different environmental Traffic incident detection algorithm package and calibration rule package under the conditions;
- a traffic incident detection algorithm may correspond to a calibration rule, or may not have a calibration rule.
- Each traffic event detection algorithm can be realized by a traffic event detection model, the traffic event detection algorithm package includes multiple traffic event detection algorithms, and each traffic event detection algorithm corresponds to a traffic event detection model.
- Step 3 Establish traffic incident detection algorithm-environmental information comparison relationship
- the traffic event detection method includes a traffic event detection algorithm 1, and a comparison relationship can be established: cement pavement-dry-glare-3000 meters-formal installation-traffic event detection algorithm 1.
- Step 4 Load the traffic incident detection algorithm-calibration rule package-environmental information comparison relationship and the traffic incident detection algorithm package into the electronic device;
- the electronic device can be a front-end camera or an edge server, therefore, the traffic event detection algorithm-calibration rule package-environmental information comparison relationship, and the traffic event detection algorithm package can be loaded into the front-end camera or the edge server.
- Step 5 Connect environmental detection equipment, such as road condition detectors, visibility detectors, and light intensity detectors, to electronic devices, and transmit environmental information to electronic devices in real time;
- environmental detection equipment such as road condition detectors, visibility detectors, and light intensity detectors
- Step 6 Connect the traffic video collected by the image acquisition device to the electronic device, and the electronic device obtains the installation angle information in the configuration item of the image acquisition device;
- the installation angle information of the image acquisition device that collects the image to be detected. Since the above image acquisition device is pre-installed, the installation information of the image acquisition device is stored in its configuration item, so the electronic device can be configured from the image acquisition device. item to obtain the installation angle information.
- Step 7 According to the acquired environmental information and installation angle information, the electronic device selects the target traffic event detection algorithm that is adapted to the current environmental information and installation angle information from the traffic event detection algorithm-calibration rule package-environmental information comparison relationship , and select the target calibration rule corresponding to the target event detection algorithm, based on the target traffic event detection algorithm and its corresponding target calibration rules to detect each frame image in the traffic video, and realize the traffic event detection under different meteorological environments .
- the traffic event detection algorithm-calibration rule package-environmental information comparison relationship is obtained, and then based on the environmental information and installation angle information, from the traffic event detection algorithm-calibration rule package- In the comparison relationship of environmental information, select the target traffic event detection algorithm that is adapted to the current environmental information and installation angle information, and select the target calibration rule corresponding to the target event detection algorithm, based on the target traffic event detection algorithm and its corresponding target
- the calibration rule detects each frame image in the traffic video.
- the target traffic event detection algorithm suitable for the target environment information can be selected to process the image to be detected, reducing the The influence of environmental factors on traffic event detection improves the accuracy of traffic event detection, and realizes the optimization of traffic event detection under different meteorological environments compared with the target traffic event detection method.
- the embodiment of the present application further provides an event detection device, and the following will introduce the event detection device provided in the embodiment of the present application.
- an event detection device the device may include:
- An acquisition module 610 configured to acquire an image to be detected and target environment information when acquiring the image to be detected
- a determining module 620 configured to determine the target event detection method based on the target environment information and the pre-established correspondence between the environment information and the event detection method;
- the detection module 630 is configured to perform event detection on the image to be detected based on the target event detection manner, and obtain an event detection result.
- the electronic device can obtain the image to be detected and the target environment information when collecting the image to be detected, and determine the target event based on the target environment information and the pre-established correspondence between the environment information and the event detection method
- the detection method is based on the target event detection method, and the event detection is performed on the image to be detected to obtain the event detection result.
- the electronic device can select a target event detection method suitable for the target environment information to process the image to be detected based on the pre-established correspondence between the environment information and the event detection method for different target environment information when collecting the image to be detected , which reduces the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- the above-mentioned target environment information may include at least one of the following:
- the above target event detection method may include one or more target event detection algorithms, each of which corresponds to a type of event;
- the detection module 630 may include:
- a determining unit 710 configured to determine, based on each of the target event detection algorithms, a target calibration rule corresponding to the target event detection algorithm from a pre-established calibration rule package;
- the calibration rule package includes a predetermined calibration rule corresponding to each event detection algorithm.
- a marking unit 720 configured to perform marking on the image to be detected according to the target marking rule to obtain marking information
- the target labeling rule is used to indicate a labeling method of auxiliary information required for event detection in the image to be detected by using the target event detection algorithm.
- the detection unit 730 is configured to use each target event detection algorithm and its corresponding calibration information to perform event detection on the image to be detected.
- the establishment module may include:
- an acquisition unit configured to acquire image samples of multiple event types corresponding to each environmental information sample in the multiple environmental information samples
- a training unit configured to use image samples of various event types corresponding to each environmental information sample and an initial detection model for each event type to train multiple event detection algorithms corresponding to each environmental information sample;
- each of the event detection algorithms corresponds to an event type.
- a recording unit configured to record the environmental information corresponding to each environmental information sample and the corresponding event detection algorithms corresponding to various event types, so as to obtain the corresponding relationship between environmental information and event detection methods;
- the above-mentioned training unit may include:
- the first calibration subunit is configured to calibrate each image sample of each event type corresponding to each environmental information sample to obtain a calibration label
- the prediction subunit is used to input each image sample corresponding to the event type into the initial detection model corresponding to the event type for the same event type corresponding to the same environmental information sample, and obtain a prediction result;
- the first adjustment subunit is configured to adjust the model parameters of the initial detection model corresponding to the event type corresponding to each image sample based on the calibration label corresponding to each image sample and the difference of the prediction result until the initial detection model converges, and the Environmental information samples corresponding to image samples and event detection algorithms corresponding to event types.
- the above-mentioned training unit may also include:
- the second calibration unit is configured to perform auxiliary information calibration according to the initial calibration rules for each image sample of each event type corresponding to each environmental information sample to obtain auxiliary information;
- the second adjustment subunit is used to detect the same event type corresponding to the same environmental information sample, and the initial detection model corresponding to the event type detects each image sample corresponding to the event type based on the auxiliary information to obtain a prediction result Afterwards, adjusting the initial calibration rule based on the prediction result until the initial detection model converges to obtain the calibration rule corresponding to the event type;
- the recording subunit is used to record the corresponding relationship between event detection algorithms and calibration rules of various event types corresponding to the environmental information sample for each environmental information sample, and generate the calibration rules corresponding to the environmental information sample Calibration rule package.
- the embodiment of the present application also provides an electronic device, as shown in FIG. 8 , including a processor 801, a communication interface 802, a memory 803, and a communication bus 804. complete the mutual communication,
- the processor 801 is configured to implement the steps of the event detection method described in any of the foregoing embodiments when executing the program stored in the memory 803 .
- the electronic device can obtain the image to be detected and the target environment information when collecting the image to be detected, and determine the target event based on the target environment information and the pre-established correspondence between the environment information and the event detection method
- the detection method is based on the target event detection method, and the event detection is performed on the image to be detected to obtain the event detection result.
- the electronic device can select a target event detection method suitable for the target environment information to process the image to be detected based on the pre-established correspondence between the environment information and the event detection method for different target environment information when collecting the image to be detected , which reduces the impact of environmental factors on event detection, thereby improving the accuracy of event detection.
- the communication bus mentioned in the above-mentioned electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the electronic device and other devices.
- the memory may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
- RAM Random Access Memory
- NVM non-Volatile Memory
- the memory may also be at least one storage device located far away from the aforementioned processor.
- the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- CPU Central Processing Unit
- NP Network Processor
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned event detection methods is implemented. A step of.
- the embodiment of the present application further provides an event detection system, and the event detection system provided in the embodiment of the present application will be introduced below.
- an event detection system may include an electronic device 901, an image acquisition device 903, and an environment detection device 902, wherein:
- the environment detection device 902 is configured to detect target environment information when collecting images to be detected, and send the target environment information to the electronic device 901;
- the image acquisition device 903 is configured to acquire the image to be detected and send it to the electronic device 901, so that the electronic device 901 executes the event detection method described in any one of the above embodiments.
- the image acquisition device can collect the image to be detected and send it to the electronic device
- the environment detection device can detect the target environment information when collecting the image to be detected, and send the target environment information to the electronic device
- the electronic device can acquire the image to be detected and the target environment information when collecting the image to be detected, and determine the target event detection method based on the target environment information and the pre-established correspondence between the environment information and the event detection method. Based on the target event detection method, Event detection is performed on the image to be detected, and the event detection result is obtained.
- the image acquisition device can collect the image to be detected, the environment detection device can provide the environment information in real time, and the electronic device can aim at different target environment information when collecting the image to be detected, based on the correspondence between the pre-established environment information and the event detection method relationship, select the target event detection method suitable for the target environment information to process the image to be detected, and reduce the impact of environmental factors on event detection.
- the accuracy, universality and stability of the event detection system are improved.
- the above-mentioned environment detection device may include at least one of the following:
- a road condition detector configured to detect road condition information when collecting an image to be detected, and send the road condition information to an electronic device;
- the road surface condition detector adopts laser remote sensing technology, which can be installed on the column on the side of the road, and the thickness of water, ice and snow on the road surface can be realized through the principle of retroreflection intensity and spectral measurement. Accurate measurement, so that the road surface condition detector can accurately collect road surface condition information, and then send the road surface condition information to the electronic device.
- a visibility detector configured to detect the visibility information of the environment when the image to be detected is collected, and send the visibility information to the electronic device;
- Visibility detectors include two types: see-through and diffuse.
- the see-through visibility detector can determine the visibility distance through the atmospheric transmittance or extinction coefficient.
- Scattering visibility detector can determine the visibility distance by measuring the intensity of scattered light caused by gas molecules, aerosol particles, fog droplets, etc. in a certain volume of air, and then the visibility detector can send the visibility information to electronic equipment.
- the light intensity detector is used to detect the light intensity of the environment when the image to be detected is collected as light information, and send the light information to the electronic device.
- the light intensity detector is provided with a sensor inside, and its sensor is based on the principle of hot spot effect.
- the photosensitive diode When the visible light passing through the filter irradiates the photosensitive diode, the photosensitive diode is converted into an electrical signal according to the illuminance of the visible light, and then the electrical signal will enter the sensor's processor system to output the binary signal that needs to be obtained, that is, the light intensity is obtained, and then the light
- the intensity detector can then send the light information to the electronic device.
- the correspondence between the pre-established environmental information and the event detection method and the calibration rule package can be stored in the electronic device, and then the electronic device can be detected after receiving the image to be detected.
- the images are processed to enable event detection. That is, the electronic device can invoke an event detection method and a calibration rule corresponding to the environment information to process the image to be detected, thereby realizing event detection.
- a computer program product including instructions is also provided, and when it is run on a computer, it causes the computer to execute any traffic incident detection method in the above embodiments.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Traffic Control Systems (AREA)
Abstract
一种事件检测方法、装置、***、电子设备及存储介质,所述方法包括:获取待检测图像以及采集所述待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。这样,电子设备针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。
Description
本申请要求于2021年12月22日提交中国专利局、申请号为202111580157.2、发明名称为“一种事件检测方法、装置、***、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及事件检测领域,特别是涉及一种事件检测方法、装置、***、电子设备及存储介质。
事件检测能够确定发生的事件,以及时地处理事件,例如,事件检测可以检测交通事件、人群事件等,目前事件的检测方式通常采用事件检测算法,对摄像机采集的事件视频进行事件检测,从而判断是否发生了事件。
但是,所采集的视频会受到各种环境因素,例如天气因素、道路条件因素等因素的影响,会导致事件检测的准确度较低。
发明内容
本申请实施例的目的在于提供一种事件检测方法、装置、***、电子设备及存储介质,以提高事件检测的准确度。具体技术方案如下:
第一方面,本申请实施例提供了一种事件检测方法,所述方法包括:
获取待检测图像以及采集所述待检测图像时的目标环境信息;
基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;
基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
可选的,所述目标环境信息包括以下至少一种:
采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息。
可选的,所述目标事件检测方式包括一个或多个目标事件检测算法,每个所述目标事件检测算法分别对应一种事件类型;
所述基于所述目标事件检测方式,对所述待检测图像进行事件检测的步骤,包括:
基于每个所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则,其中,所述标定规则包中包括预先确定的每个事件检测算法对应的标定规则;
按照所述目标标定规则对所述待检测图像进行标定,得到标定信息,其中,所述目标标定规则用于指示利用该目标事件检测算法,对所述待检测图像中事件检测所需的辅助信息的标定方式;
利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测。
可选的,所述环境信息与交通事件检测方式的对应关系的建立方式,包括:
获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;
利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法,其中,每个所述事件检测算法分别对应一种事件类型;
将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系。
可选的,所述利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,包括:
对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;
针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;
基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。
可选的,所述利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,还包括:
对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;
针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;
针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
第二方面,本申请实施例提供了一种事件检测装置,所述装置包括:
获取模块,用于获取待检测图像以及采集所述待检测图像时的目标环境信息;
确定模块,用于基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;
检测模块,用于基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
可选的,所述目标环境信息包括以下至少一种:
采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息;
所述目标事件检测方式包括一个或多个目标事件检测算法,每个所述目标事件检测算法分别对应一种事件类型;
所述检测模块包括:
确定单元,用于基于每个所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则,其中,所述标定规则包中包括预先确定的每个事件检测算法对应的标定规则;
标定单元,用于按照所述目标标定规则对所述待检测图像进行标定,得到标定信息,其中,所述目标标定规则用于指示利用该目标事件检测算法,对所述待检测图像中事件检测所需的辅助信息的标定方式;
检测单元,用于利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测;
所述环境信息与交通事件检测方式的对应关系是通过建立模块预先建立的,所述建立模块包括:
获取单元,用于获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;
训练单元,用于利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法,其中,每个所述事件检测算法分别对应一种事件类型;
记录单元,用于将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系;
所述训练单元包括:
第一标定子单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;
预测子单元,用于针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;
第一调整子单元,用于基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法;
所述训练单元还包括:
第二标定单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;
第二调整子单元,用于针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;
记录子单元,用于针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
第三方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述第一方面任一所述的方法步骤。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面任一所述的方法步骤。
第五方面,本申请实施例提供了一种事件检测***,所述***包括如上述第三方面所述的电子设备、图像采集设备以及环境检测设备,其中:
所述环境检测设备,用于检测采集待检测图像时的目标环境信息,并将所述目标环境信息发送至所述电子设备;
所述图像采集设备,用于采集所述待检测图像,并发送至所述电子设备。
第六方面,本申请实施例提供了一种包含指令的计算机程序产品,所述计算机程序产品被计算机执行时实现上述第一方面任一所述的方法步骤。
本申请实施例有益效果:
本申请实施例提供的方案中,电子设备可以获取待检测图像以及采集待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。通过上述方案,电子设备针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种事件检测方法的流程图;
图2为图1所示实施例中步骤S103的一种具体流程图;
图3为基于图1所示实施例的环境信息与事件检测方式的对应关系的建立方式的一种流程图;
图4为图3所示实施例中步骤S302的一种具体流程图;
图5为图3所示实施例中步骤S302的另一种具体流程图;
图6为本申请实施例所提供的一种事件检测装置的结构示意图;
图7为图6所示实施例中检测模块630的一种具体结构示意图;
图8为本申请实施例所提供的一种电子设备的结构示意图;
图9为本申请实施例所提供的事件检测***的一种结构示意图。
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了提高事件检测的准确度,本申请实施例提供了一种事件检测方法、装置、***、电子设备、计算机可读存储介质以及计算机程序产品。下面首先对本申请实施例所提供的一种事件检测方法进行介绍。
本申请实施例所提供的一种事件检测方法可以应用于任一需要进行事件检测的电子设备,例如,可以为服务器或终端,在此不做具体限定,为了描述清楚,后续称为电子设备。
如图1所示,一种事件检测方法,所述方法可以包括:
S101,获取待检测图像以及采集所述待检测图像时的目标环境信息;
S102,基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;
S103,基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
可见,本申请实施例提供的方案中,电子设备可以获取待检测图像以及采集待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。通过上述方案,电子设备针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。
在需要进行事件检测时,电子设备可以获取待检测图像以及采集上述待检测图像时的目标环境信息,其中,待检测图像可以是图像采集设备抓拍的图像,还可以是图像采集设备所采集的视频中所包括的视频帧图像等。待检测图像可以为实时视频图像,也可以为存储于电子设备或者其他设备中的图像,这都是合理的。
在一种实施方式中,上述事件可以为交通事件,那么在上述步骤S101中,电子设备可以获取交通事件检测所需的待检测图像以及采集待检测图像时的目标环境信息。例如,图像采集设备可以将其采集的交通视频实时发送至电子设备,电子设备将该交通视频中的各帧图像作为待检测图像进行实时交通事件检测,或者,图像采集设备采集交通视频,可以将该交通视频中的各帧图像作为待检测图像,进而进行实时交通事件检测。
又例如,当用户想要查看某个时间某个地点是否发生交通事故时,可以选择对应的时间、地点的交通视频,电子设备获取到用户选择的该交通视频,可以将该交通视频中的各 帧图像作为待检测图像。
上述目标环境信息为采集该待检测图像时,该待检测图像所对应的现实场景的环境信息,其中,环境信息可以包括道路相关信息、天气相关信息、图像采集设备相关信息等与采集该待检测图像时的现实场景相关的各种信息,这都是合理的。例如,待检测图像A为时间1于a十字路口采集的交通图像,那么待检测图像A对应的目标环境信息即为在时间1,a十字路口处的环境信息。
在获取到待检测图像以及采集待检测图像时的目标环境信息后,电子设备可以执行上述步骤S102,即基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式。
为了方便确定目标事件检测方式,可以预先建立环境信息与事件检测方式的对应关系,每种环境信息所对应的事件检测方式即为该环境信息所对应的检测效果较好的事件检测方式。也就是说,每种环境信息所对应的事件检测方式为:对于在该环境信息所表征的环境下采集的图像的检测效果较好的事件检测方式。
这样,电子设备可以基于上述目标环境信息,从预先建立的环境信息与事件检测方式的对应关系中,确定与目标环境信息相匹配的环境信息,进而将该环境信息对应的事件检测方式确定为目标事件检测方式。其中,目标事件检测方式可以对应一个目标事件检测算法或者多个目标事件检测算法,并且,每个目标事件检测算法对应一种事件类型。
例如,上述事件为交通事件,预先建立的环境信息与交通事件检测方式的对应关系如下表所示:
环境信息 | 路面材质 | 路面状况 | 光照强度 | 能见度 | 交通事件检测方式 |
环境信息1 | 水泥路面 | 湿润 | 正常光 | 500米 | 交通事件检测方式1 |
环境信息2 | 水泥路面 | 干燥 | 强光 | 3000米 | 交通事件检测方式2 |
… | … | ||||
环境信息n | 沥青路面 | 结冰 | 正常光 | 800米 | 交通事件检测方式n |
那么,如果目标环境信息为水泥路面-干燥-强光-3000米,电子设备便可以确定出与目标环境信息相匹配的环境信息为环境信息2,进而可以将环境信息2对应的交通事件检测方式2确定为目标交通事件检测方式。
由于目标事件检测方式所对应的环境信息为与采集待检测图像时的目标环境信息相匹配的环境信息,因此,基于该目标环境信息所确定的目标事件检测方式适应于采集待检测图像时的目标环境信息,采用目标事件检测方式对待检测图像进行事件检测可以降低环境因素对事件检测结果造成的影响。
因此,在得到目标事件检测方式后,电子设备可以执行上述步骤S103,即基于该目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。其中,针对交通事件,检测结果可以为待检测图像中出现障碍物、交通事故、抛洒物、逆行、车辆拥堵、超速、占用应急道路的事件区域等,在此不做具体限定。
在一种实施方式中,确定了待检测图像中的事件区域后,还可以进行进一步检测以确定更加详细的事件信息。例如,针对交通事件,确定了待检测图像中的占用应急道路事件的区域后,还可以对该区域中的车辆进行车牌号检测,以确定占用应急道路的车辆的车牌号,方便工作人员进行处理。
下面结合实例对本申请实施例所提供的事件检测方法进行介绍。针对只需检测一种事件类型的事件的情况来说,例如,事件类型为障碍物,那么电子设备获取待检测图像以及采集待检测图像时的目标环境信息,例如为沥青路面-干燥-正常光-1000米,预先建立的环 境信息与障碍物检测算法之间的对应关系如下:
环境信息 | 路面材质 | 路面状况 | 光照强度 | 能见度 | 障碍物检测算法 |
环境信息1 | 水泥路面 | 湿润 | 正常光 | 500米 | 障碍物检测算法A |
环境信息2 | 水泥路面 | 干燥 | 强光 | 3000米 | 障碍物检测算法B |
… | … | ||||
环境信息n | 沥青路面 | 干燥 | 正常光 | 1000米 | 障碍物检测算法C |
那么,电子设备可以确定所要采用的障碍物检测算法具体为环境信息n所对应的障碍物检测算法C,进而,电子设备便可以采用障碍物检测算法C对待检测图像进行障碍物检测,得到待检测图像中障碍物的区域,即事件检测结果。
针对需要检测多种事件类型的事件的情况来说,例如,事件类型包括障碍物、抛洒物、压线,那么电子设备获取待检测图像以及采集待检测图像时的目标环境信息,例如为沥青路面-干燥-正常光-1000米,预先建立的环境信息与障碍物检测算法之间的对应关系如下:
那么,电子设备可以根据预先建立的环境信息与障碍物检测算法之间的对应关系,确定所要采用的检测算法具体为环境信息n所对应的障碍物检测算法C、抛洒物检测算法C以及压线检测算法C,进而,电子设备便可以分别采用障碍物检测算法C、抛洒物检测算法C以及压线检测算法C对待检测图像进行检测,得到待检测图像中障碍物的区域、抛洒物区域、压线区域中的一种或几种,即事件检测结果。
可见,本实施例中,电子设备可以采用目标事件检测方式,即适应于采集待检测图像时的目标环境信息的事件检测方式,对该待采集图像进行事件检测,进而便可以得到事件检测结果,这样,电子设备便可以针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。
作为本申请实施例的一种实施方式,上述目标环境信息可以包括以下至少一种:采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息。其中,路面信息可以包括路面材质信息、路面状况信息等;天气信息可以包括能见度信息、光照信息等。
由于图像采集设备的安装角度、路面材质、路面是否有雨水、结冰等状况、能见度以及光照强度等因素均有可能对交通事件的检测带来影响,所以为了提高交通事件检测结果的准确度,上述目标环境信息可以包括采集待检测图像的图像采集设备的安装角度信息、路面材质信息、路面状况信息、能见度信息、光照信息中的至少一种。作为一种实施方式,为了尽可能提高交通事件检测结果的准确度,目标环境信息可以包括采集待检测图像的图 像采集设备的安装角度信息、路面材质信息、路面状况信息、能见度信息以及光照信息。
由于图像采集设备的安装位置相对于道路的角度不同,会导致采集的待检测图像中的画面内容的不同,会对交通事件的检测带来影响,所以图像采集设备的安装角度信息可以包括图像采集设备的安装位置相对于道路的角度,例如,图像采集设备安装于道路左侧,即为左侧装;图像采集设备安装于道路右侧,即为右侧装;图像采集设备安装于道路中央,即为正装。
路面材质信息可以为路面的材质类型,例如,可能为土地路面、水泥路面和沥青路面等。路面状况信息可以为由于天气或人为原因导致的路面呈现的状况,例如,可以为结冰、积水、积雪、干燥或湿润等。能见度信息即为视力正常的人能将目标物从背景中识别出来的最大距离,雾天、雾霾、沙尘、雨雪等天气将会影响能见度,其中,能见度信息例如可以为50米、100米、200米、500米、1000米、3000米等。
由于光照强度对应待检测图像的清晰度的影响较大,所以光照信息可以为能够标识光照强度的信息,其中,光照强度是单位面积所接受可见光的能量,可以按照光照强度进行分类,将分类得到的光照类别作为光照信息。例如,可以将环境光照强度分为强光照、正常光照以及弱光照等,那么光照信息即可以包括强光照、正常光照、弱光照等。在此不做具体限定。
可见,在本实施例中,目标环境信息可以包括采集待检测图像的图像采集设备的安装角度信息、路面信息、天气信息中的至少一种。由于这些信息能够准确表征采集待检测图像时的环境情况,因此,基于这些目标环境信息确定的目标交通事件检测方式更为适合于对待检测图像的交通事件检测,进而提高交通事件检测的准确度。
作为本申请实施例的一种实施方式,上述目标事件检测方式可以包括一个或多个目标事件检测算法,每个目标事件检测算法分别对应一种事件类型,如图2所示,上述基于所述目标事件检测方式,对所述待检测图像进行事件检测的步骤,可以包括:
S201,基于所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则;
采用目标事件检测方式对待检测图像进行检测时,为了能够准确的检测出是否发生了事件,电子设备可以将对待检测图像进行事件检测所需的辅助信息标定出来,进而基于辅助信息对待检测图像进行事件检测,因此,电子设备可以预先建立标定规则包,其中,标定规则包中可以包括预先确定的每个事件检测算法对应的标定规则,即每个事件检测算法所需的辅助信息的标定规则,标定规则即用于指示对待检测图像中事件进行检测所需的辅助信息的标定方式。
这样,在确定出目标事件检测算法后,电子设备便可以基于目标事件检测算法,从预先建立的标定规则包中确定出与该目标事件检测算法对应的目标标定规则,即得到采用该目标事件检测算法对待检测图像进行事件检测时所需的辅助信息的标定方式。
不同的事件检测算法对应的标定规则可能相同,也可能不同,在此不做具体限定。例如,事件检测为交通事件检测时,逆行事件检测算法以及压线行驶事件检测算法中,均需要将待检测图像中的车道线标定出来,因此逆行事件检测算法以及压线行驶事件检测算法所对应的标定规则中即可以包括将图像中车道线标定出来的标定规则。
S202,按照所述目标标定规则对所述待检测图像进行标定,得到标定信息;
在确定出目标标定规则之后,由于目标标定规则可以用于指示利用目标事件检测算法,对待检测图像中事件进行检测所需的辅助信息的标定方式,因此,电子设备便可以按照目标标定规则对待检测图像进行标定,得到标定信息,进而,便可以得到已标定出辅助信息的待检测图像,其中,事件检测为交通事件检测时,辅助信息可以包括待检测图像中的感兴趣区域、栏杆、辅助线以及车道线等,在此不做具体限定。
例如,针对占用应急道路的交通事件的检测,目标交通事件检测算法即为占用应急道 路检测算法,其所对应的目标标定规则为标定规则1,那么电子设备可以基于标定规则1将待检测图像A中的应急道路区域标定出来,得到待检测图像A的标定信息1。
S203,利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测。
在得到标定信息后,电子设备可以利用上述目标事件检测算法以及其对应的标定信息对待检测图像进行事件检测,进而便可以确定是否发生事件,进而确定出发生事件的区域。
例如,承接步骤S202的例子,电子设备在获得上述标定信息1后,可以利用占用应急道路检测算法以及标定信息1,对待检测图像A中的应急道路区域进行车辆检测,确定应急道路区域内是否存在车辆,进而判断占用应急道路事件是否发生,并确定出发生占用应急道路事件的区域,作为交通事件检测结果。
可见,在本实施例中,电子设备可以基于每个目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则,按照目标标定规则对待检测图像进行标定,得到标定信息,进而,利用每个目标事件检测算法以及其对应的标定信息对待检测图像进行事件检测。由于目标标定规则能够指示待检测图像中事件检测所需的辅助信息的标定方式,因此电子设备采用目标标定规则对待检测图像进行标定可以得到准确的标定信息,进而基于该标定信息对待检测图像进行事件检测时,能够进一步提高事件检测结果的准确度。
作为本申请实施例的一种实施方式,如图3所示,上述环境信息与事件检测方式的对应关系的建立方式,可以包括:
S301,获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;
为了能够确定各种不同环境场景下所适合的事件检测方式,可以预先获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本。例如,针对7个不同环境场景,可以获取7个环境信息样本,如果所需检测的事件的事件类型为5种,那么针对每个环境信息样本,可以获取该环境信息样本所对应的环境状况下采集的5种事件类型对应的图像样本。
其中,环境信息样本为可以表征不同环境信息的参数值,其可以包括以下至少一种:采集每个图像样本的图像采集设备的安装角度信息、每个图像样本对应的路面信息、天气信息。图像样本即为在每个环境信息样本对应的环境状况下采集的包括各种类型事件的图像样本。
针对不同类型的事件,可以获取多个初始检测模型,其中,每个初始检测模型对应一种事件类型,用于对该事件类型的事件进行检测。当事件为交通事件时,交通事件类型可以包括交通事故、抛洒物、逆行、车辆拥堵、超速、占用应急道路等,在此不做具体限定。那么,每个初始检测模型可以对应一种交通事件类型,用于对该类型的交通事件进行交通事件检测。
例如,所要检测的交通事件类型包括抛洒物、逆行、车辆拥堵以及超速4个类型,那么,电子设备可以获取4个初始检测模型,针对每种交通事件类型,电子设备可以获取多个环境信息样本对应的环境信息下采集的该种交通事件类型的交通图像样本。例如,针对抛洒物交通事件类型,可以获取每个环境信息样本对应的环境信息下采集的100个包括抛洒物事件的交通图像样本。
S302,利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法;
在得到多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本之后,由于每个环境信息样本对应多种事件类型的图像样本,而针对不同的事件类型,事件检测算法不同,所以每个环境信息样本可以对应多个事件检测算法,每个事件检测算法对应一种事件类型。
电子设备可以利用每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到每个环境信息样本对应的多个事件检测模型,作为每个环境信息样本对应的多个事件检测算法。
例如,承接步骤S301的例子,针对天气环境信息样本1,电子设备可以利用环境信息样本1对应的抛洒物事件的100个交通图像样本以及抛洒物事件类型对应的初始检测模型,训练得到环境信息样本1对应的抛洒物检测模型,作为环境信息样本1对应的抛洒物检测算法。采用同样的方式,可以训练得到环境信息样本1对应的逆行检测算法、车辆拥堵检测算法以及超速检测算法等。还可以训练得到环境信息样本2、环境信息样本3…环境信息样本n所对应的逆行检测算法、车辆拥堵检测算法以及超速检测算法等。
S303,将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系。
确定了每个环境信息样本对应的多个事件检测算法后,电子设备可以将每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,进而得到环境信息与交通事件检测方式的对应关系。
例如,电子设备确定环境信息样本1对应的各种事件类型所对应的事件检测算法为抛洒物检测算法1、逆行检测算法1、车辆拥堵检测算法1以及超速检测算法1;环境信息样本2对应的各种事件类型所对应的事件检测算法为抛洒物检测算法2、逆行检测算法2、车辆拥堵检测算法2以及超速检测算法2;环境信息样本3对应的各种事件类型所对应的事件检测算法为抛洒物检测算法3、逆行检测算法3、车辆拥堵检测算法3以及超速检测算法3。那么,电子设备可以将环境信息样本对应的环境信息1、环境信息2以及环境信息3分别与其对应的事件检测算法进行对应记录,得到如下表所示的对应关系:
在一种实施方式中,电子设备可以将多个事件检测算法生成事件检测算法包,方便服务器或者前端摄像机等设备加载并使用。在一种实施方式中,电子设备可以将每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法的对应关系记录于表格中,得到环境信息与事件检测方式的对照集。
可见,在本实施例中,电子设备可以获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本,利用每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到每个环境信息样本对应的多个事件检测算法,将每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系,通过上述方式,电子设备便可以建立得到环境信息与事件检测方式的对应关系,以便后续基于目标环境信息选择合适于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低环境因素对事件检测的影响,进而提高事件检测的准确度。
作为本申请实施例的一种实施方式,如图4所示,上述利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,可以包括:
S401,对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;
在获取到每个环境信息样本对应的多种事件类型的图像样本后,电子设备对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签。在一种实施方式中,可以对每个图像样本进行事件区域的标定,即标定出图像样本中包括的发生事件的区域,作为标定标签。
S402,针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;
进而,针对同一个环境信息样本对应的同种事件类型,可以将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果。在一种实施方式中,该初始检测模型可以基于图像样本的图像特征,进行事件区域预测,输出的预测的事件区域,作为预测结果。
S403,基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。
进而,电子设备便可以基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到初始模型收敛,得到该事件类型对应的事件检测模型。其中,可以采用梯度下降算法、随机梯度下降算法等调整初始检测模型的参数,在此不做具体限定。
例如,针对环境信息样本a对应的车辆拥堵事件类型所对应的初始检测模型,可以将在环境信息样本a对应的环境状况下采集的每个图像样本输入该初始检测模型,进而,根据该初始检测模型输出的车辆拥堵预测区域与标定的车辆拥堵区域之间的差异调整该初始检测模型的参数,直到该初始检测模型收敛,即可以得到用于在环境信息样本a对应的环境状况下检测车辆拥堵事件的检测模型。
可见,在本实施例中,电子设备可以对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签,进而针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果,进而基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。这样,电子设备便可以训练得到每个环境信息样本对应的多个事件检测算法,以便后续基于目标环境信息选择合适于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低环境因素对事件检测的影响,进而提高事件检测的准确度。
作为本申请实施例的一种实施方式,如图5所示,上述利用所述每个环境信息样本对 应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,还可以包括:
S501,对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;
由于在进行事件检测时,可以基于待检测图像中的相关辅助信息进行事件检测,因此,在训练每个环境信息样本对应的事件检测算法的过程中,针对每个图像样本,电子设备可以基于当前标定规则,标定出该图像样本中的辅助信息,基于该辅助信息,对该图像样本进行交通事件检测,得到检测结果。进而,根据检测结果的准确度调整该环境信息样本对应的标定规则,以得到更加适应于该环境信息样本对应的环境场景的标定规则。
例如,环境信息样本1为沥青路面-结冰-弱光照-500米-正装,环境信息样本1对应的交通图像样本1为十字路口发生了追尾事件,当前标定规则为标定规则1,电子设备可以基于标定规则1标定出交通图像样本1中的辅助信息1,基于该辅助信息1,对交通图像样本1进行交通事件检测,得到检测结果1,将检测结果1与追尾事件进行对比,得到检测结果1的准确度,进而根据检测结果1的准确度调整环境信息样本1对应的标定规则,得到标定规则2。依此类推,不断调整标定规则以得到更加准确的标定规则。
具体来说,在训练每个环境信息样本对应的多个事件检测算法的过程中,针对每个图像样本,电子设备可以对每个环境信息样本对应的每种事件类型的每个图像样本按照初始标定规则进行辅助信息标定,得到辅助信息。其中,初始标定规则可以为根据实际事件类型所需的辅助信息,人为预设的标定规则。
S502,针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;
在上述事件检测模型的训练过程中,针对同一个环境信息样本对应的同种事件类型,该事件类型对应的初始检测模型可以基于辅助信息,对该事件类型对应的每个图像样本进行检测,得到预测结果。由于该预测结果是基于辅助信息进行检测得到的,所以也反映了辅助信息的准确性,也就反映了初始标定规则的准确性。进而,电子设备便可以基于预测结果调整初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则,也就可以得到更加适应于该图像样本对应的环境信息样本所对应的环境场景的标定规则。
例如,环境信息样本2为沥青路面-结冰-强光照-800米-正装,环境信息样本2对应的交通图像样本2包括的事件为车辆压线,初始标定规则为标定车道线,那么电子设备可以按照该初始标定规则对交通图像样本2进行标定,得到辅助信息。进而,事件检测模型的训练过程中,在该事件类型对应的初始检测模型可以基于辅助信息对交通图像样本2进行检测,得到预测结果。进而,可以基于交通图像样本2的预测结果的准确度调整初始标定规则,例如,可以调整标定车道线的长度、宽度等。这样,随着交通图像样本的迭代,可以不断调整初始标定规则,直到得到能够准确标定出环境信息为沥青路面、结冰、强光照、能见度800米以及图像采集设备正装情况下的车道线的标定规则。
S503,针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
电子设备可以针对每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,以便后续基于目标事件检测算法选取该目标事件检测算法对应的目标标定规则,从而实现对待检测图像进行事件检测,并且,电子设备将该环境信息样本对应的标定规则生成标定规则包,该标定规则包中包括多个标定规则,以便服务器或者前端摄像机等设备加载并使用。
例如,电子设备在获取得到环境信息样本3中交通类型1对应的标定规则1以及交通事件检测算法1之后,可以记录对应关系为环境信息样本3-交通类型1-交通事件检测算法1-标定规则1。假设环境信息样本3还对应有标定规则2以及标定规则3,电子设备可以将环境信息样本3对应的标定规则1-标定规则3生成标定规则包,以便在目标事件检测的环境信息为环境信息样本3所表征的环境状况时,服务器或者前端摄像机等设备可以加载并使用该标定规则包。
作为一种实施方式,电子设备还可以建立事件检测算法包-标定规则包-环境信息对照集,该对照集可以用于电子设备在获取得到目标环境信息后,可以根据目标环境信息从事件检测算法包选取适应于目标环境信息的一个或多个目标事件检测算法,进而从标定规则包中选取目标事件检测算法对应的目标标定规则。
在一种实施方式中,电子设备将每个环境信息样本对应的环境信息、其对应的事件检测方式以及其对应的标定规则的对应关系对应记录于表格中,进而便可以得到环境信息-事件检测方式-标定规则的对应关系映射表,方便后续进行事件检测时使用。
例如,事件检测为交通事件检测,环境信息-多种交通事件检测算法-标定规则的对应关系映射表可以如下表所示:
可见,在本实施例中,电子设备可以对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息,针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则,针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包,通过这样的方式,电子设备得到标定规则包后,方便后续进行事件检测时使用,保证事件检测的效率。
下面以交通事件检测为例,对本申请实施例所提供的事件检测方法的一种整体流程进 行举例介绍。
步骤1:获取多个环境信息样本中每个环境信息样本对应的多种事件类型的交通图像样本以及多个初始检测模型;
其中,环境信息样本可以为表征不同环境信息的参数值,具体可以包括:表征路面材质信息的参数值:例如,表征土地、水泥和沥青等路面材质信息参数值,表征路面状况信息的参数值,例如,表征结冰、积水、干燥、积雪和湿润等路面状况信息的参数值,表征光照信息的参数值,例如,表征强光照、正常光照和弱光照等光照信息的参数值,表征能见度信息的参数值,例如:表征50m、100m、200m、500m、1000m以及3000m等能见度信息的参数值,表征采集交通图像样本的图像采集设备的安装角度信息的参数值,例如:表征正装、左侧装和右侧装等角度信息的参数值,积累至满***通事件检测方式训练要求的数量。
步骤2:利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,分别进行每个环境信息样本对应的多个事件检测算法的训练,获取不同环境条件下的交通事件检测算法包与标定规则包;
其中,一个交通事件检测算法可以对应一个标定规则,也可以没有标定规则。每个交通事件检测算法可以通过一个交通事件检测模型来实现,交通事件检测算法包中包括多个交通事件检测算法,并且每个交通事件检测算法对应于一个交通事件检测模型。
步骤3:建立交通事件检测算法-环境信息对照关系;
例如,交通事件检测方式包括一个交通事件检测算法1,可以建立对照关系:水泥路面-干燥-强光-3000米-正装-交通事件检测算法1。
步骤4:将交通事件检测算法-标定规则包-环境信息对照关系、交通事件检测算法包加载进入电子设备;
其中,电子设备可以为前端相机或者边缘服务器,因此,可以将交通事件检测算法-标定规则包-环境信息对照关系、交通事件检测算法包加载进入前端相机或者边缘服务器。
步骤5:将环境检测设备,如路面状况检测器、能见度检测器、光照强度检测器接入电子设备,向电子设备实时传输环境信息;
步骤6:将图像采集设备所采集的交通视频接入电子设备,电子设备获取图像采集设备配置项内的安装角度信息;
也就是获取采集待检测图像的图像采集设备的安装角度信息,由于上述图像采集设备是预先安装完成的,图像采集设备的安装信息存储于其配置项内,因此电子设备可以从图像采集设备的配置项内获取安装角度信息。
步骤7:电子设备根据所获取的环境信息以及安装角度信息,从交通事件检测算法-标定规则包-环境信息对照关系中,选取与当前环境信息以及安装角度信息所适配的目标交通事件检测算法,并选择该目标事件检测算法对应的目标标定规则,基于该目标交通事件检测算法以及其对应的目标标定规则对交通视频中的各帧图像进行检测,实现在不同气象环境情况下的交通事件检测。
可见,在本实施例中,通过训练交通事件检测方式,进而得到交通事件检测算法-标定规则包-环境信息对照关系,进而基于环境信息以及安装角度信息,从交通事件检测算法-标定规则包-环境信息对照关系中,选取与当前环境信息以及安装角度信息所适配的目标交通事件检测算法,并选择该目标事件检测算法对应的目标标定规则,基于该目标交通事件检测算法以及其对应的目标标定规则对交通视频中的各帧图像进行检测。由于针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与交通事件检测算法的对应关系,选择适合于该目标环境信息的目标交通事件检测算法对待检测图像进行处理,降低了环境因素对交通事件检测的影响,提高了交通事件检测的准确度,相比对目标的交通事件检测方式,实现了在不同气象环境情况下的交通事件检测的优化。
相应与上述一种事件检测方法,本申请实施例还提供了一种事件检测装置,下面对本申请实施例所提供的一种事件检测装置进行介绍。
如图6所示,一种事件检测装置,所述装置可以包括:
获取模块610,用于获取待检测图像以及采集所述待检测图像时的目标环境信息;
确定模块620,用于基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;
检测模块630,用于基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
可见,本申请实施例提供的方案中,电子设备可以获取待检测图像以及采集待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。通过上述方案,电子设备针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。
作为本申请实施例的一种实施方式,上述目标环境信息可以包括以下至少一种:
采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息;
作为本申请实施例的一种实施方式,上述目标事件检测方式可以包括一个或多个目标事件检测算法,每个所述目标事件检测算法分别对应一种事件类型;
如图7所示,上述检测模块630可以包括:
确定单元710,用于基于每个所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则;
其中,所述标定规则包中包括预先确定的每个事件检测算法对应的标定规则。
标定单元720,用于按照所述目标标定规则对所述待检测图像进行标定,得到标定信息;
其中,所述目标标定规则用于指示利用该目标事件检测算法,对所述待检测图像中事件检测所需的辅助信息的标定方式。
检测单元730,用于利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测。
作为本申请实施例的一种实施方式,上述环境信息与交通事件检测方式的对应关系是通过建立模块预先建立的,所述建立模块可以包括:
获取单元,用于获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;
训练单元,用于利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法;
其中,每个所述事件检测算法分别对应一种事件类型。
记录单元,用于将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系;
作为本申请实施例的一种实施方式,上述训练单元可以包括:
第一标定子单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;
预测子单元,用于针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;
第一调整子单元,用于基于每个图像样本对应的标定标签以及预测结果的差异,调整 该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。
作为本申请实施例的一种实施方式,上述所述训练单元还可以包括:
第二标定单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;
第二调整子单元,用于针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;
记录子单元,用于针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
本申请实施例还提供了一种电子设备,如图8所示,包括处理器801、通信接口802、存储器803和通信总线804,其中,处理器801,通信接口802,存储器803通过通信总线804完成相互间的通信,
存储器803,用于存放计算机程序;
处理器801,用于执行存储器803上所存放的程序时,实现上述任一实施例所述的事件检测方法步骤。
可见,本申请实施例提供的方案中,电子设备可以获取待检测图像以及采集待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。通过上述方案,电子设备针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响,进而提高了事件检测的准确度。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一事件检测方法的步骤。
相应与上述一种事件检测方法,本申请实施例还提供了一种事件检测***,下面对本申请实施例所提供的一种事件检测***进行介绍。
如图9所示,一种事件检测***,上述***可以包括电子设备901、图像采集设备903以及环境检测设备902,其中:
所述环境检测设备902,用于检测采集待检测图像时的目标环境信息,并将所述目标环境信息发送至所述电子设备901;
所述图像采集设备903,用于采集所述待检测图像,并发送至所述电子设备901,以使电子设备901执行上述任一实施例所述的事件检测方法。
可见,本申请实施例提供的方案中,图像采集设备可以采集待检测图像,并发送至电子设备,环境检测设备可以检测采集待检测图像时的目标环境信息,并将目标环境信息发送至电子设备,电子设备便可以获取待检测图像以及采集待检测图像时的目标环境信息,基于目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式,基于目标事件检测方式,对待检测图像进行事件检测,得到事件检测结果。通过上述方案,图像采集设备能够采集待检测图像,环境检测设备能够实时提供环境信息,电子设备可以针对采集待检测图像时不同的目标环境信息,可以基于预先建立的环境信息与事件检测方式的对应关系,选择适合于该目标环境信息的目标事件检测方式对待检测图像进行处理,降低了环境因素对事件检测的影响。进而提高了事件检测***的准确度、普适性以及稳定性。
作为本申请实施例的一种实施方式,上述环境检测设备可以包括以下至少一种:
路面状况检测器,用于检测采集待检测图像时的路面状况信息,并将所述路面状况信息发送至电子设备;
其中,路面状况检测器所采用的是激光遥感技术,可以将该路面状况检测器安装于到路边的立柱上,通过回射强度以及光谱测量原理可实现对路面上水、冰和雪厚度的准确测量,从而使得路面状况检测器能够准确采集到路面状况信息,进而将路面状况信息发送至电子设备。
能见度检测器,用于检测采集待检测图像时的环境的能见度信息,并将所述能见度信息发送至电子设备;
能见度检测器包括透视式和散射式两种。透视式能见度检测器可以通过大气透射率或者消光系数来确定能见距离。散射式能见度检测器可以通过测量一定体积空气中由气体分子,气溶胶粒子、雾滴等引起的散射光的强度来确定能见距离,进而能见度检测器便可以将能见度信息发送至电子设备。
光照强度检测器,用于检测采集待检测图像时的环境光照强度,作为光照信息,并将所述光照信息发送至电子设备。
光照强度检测器内部设有传感器,其传感器基于热点效应原理。当透过滤光片的可见光照射到光敏二极管,光敏二极管根据可见光照度大小转换成电信号,然后电信号会进入传感器的处理器***,从而输出需要得到的二进制信号,即得到光照强度,进而光照强度检测器便可以将光照信息发送至电子设备。
作为本申请实施例的一种实施方式,可以将预先建立的环境信息与事件检测方式的对应关系以及标定规则包均存储于电子设备,进而电子设备在接收到待检测图像后,便可以对待检测图像进行处理,从而实现事件检测。也就是电子设备可以调用与环境信息相对应的事件检测方式以及标定规则对待检测图像进行处理,从而实现事件检测。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一交通事件检测方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部 分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。多个指两个或两个以上。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、***、电子设备、计算机可读存储介质以及计算机程序产品而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。
Claims (16)
- 一种事件检测方法,其中,所述方法包括:获取待检测图像以及采集所述待检测图像时的目标环境信息;基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
- 根据权利要求1所述的方法,其中,所述目标环境信息包括以下至少一种:采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息。
- 根据权利要求1所述的方法,其中,所述目标事件检测方式包括一个或多个目标事件检测算法,每个所述目标事件检测算法分别对应一种事件类型;所述基于所述目标事件检测方式,对所述待检测图像进行事件检测的步骤,包括:基于每个所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则,其中,所述标定规则包中包括预先确定的每个事件检测算法对应的标定规则;按照所述目标标定规则对所述待检测图像进行标定,得到标定信息,其中,所述目标标定规则用于指示利用该目标事件检测算法,对所述待检测图像中事件检测所需的辅助信息的标定方式;利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测。
- 根据权利要求1-3任一项所述的方法,其中,所述环境信息与事件检测方式的对应关系的建立方式,包括:获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法,其中,每个所述事件检测算法分别对应一种事件类型;将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系。
- 根据权利要求4所述的方法,其中,所述利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,包括:对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。
- 根据权利要求5所述的方法,其中,所述利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法的步骤,还包括:对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;针对所述每个环境信息样本,记录该环境信息样本对应的各种事件类型的事件检测算 法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
- 一种事件检测装置,其中,所述装置包括:获取模块,用于获取待检测图像以及采集所述待检测图像时的目标环境信息;确定模块,用于基于所述目标环境信息以及预先建立的环境信息与事件检测方式的对应关系,确定目标事件检测方式;检测模块,用于基于所述目标事件检测方式,对所述待检测图像进行事件检测,得到事件检测结果。
- 根据权利要求7所述的装置,其中,所述目标环境信息包括以下至少一种:采集所述待检测图像的图像采集设备的安装角度信息、路面信息、天气信息。
- 根据权利要求7所述的装置,其中,所述目标事件检测方式包括一个或多个目标事件检测算法,每个所述目标事件检测算法分别对应一种事件类型;所述检测模块包括:确定单元,用于基于每个所述目标事件检测算法,从预先建立的标定规则包中确定该目标事件检测算法对应的目标标定规则,其中,所述标定规则包中包括预先确定的每个事件检测算法对应的标定规则;标定单元,用于按照所述目标标定规则对所述待检测图像进行标定,得到标定信息,其中,所述目标标定规则用于指示利用该目标事件检测算法,对所述待检测图像中事件检测所需的辅助信息的标定方式;检测单元,用于利用每个所述目标事件检测算法以及其对应的标定信息对所述待检测图像进行事件检测。
- 根据权利要求7-9任一项所述的装置,其中,所述环境信息与交通事件检测方式的对应关系是通过建立模块预先建立的,所述建立模块包括:获取单元,用于获取多个环境信息样本中每个环境信息样本对应的多种事件类型的图像样本;训练单元,用于利用所述每个环境信息样本对应的多种事件类型的图像样本以及每种事件类型的初始检测模型,训练得到所述每个环境信息样本对应的多个事件检测算法,其中,每个所述事件检测算法分别对应一种事件类型;记录单元,用于将所述每个环境信息样本对应的环境信息及其对应的各种事件类型所对应的事件检测算法对应记录,得到环境信息与事件检测方式的对应关系。
- 根据权利要求10所述的装置,其中,所述训练单元包括:第一标定子单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本进行标定,得到标定标签;预测子单元,用于针对同一个环境信息样本对应的同种事件类型,将该事件类型对应的每个图像样本输入至该事件类型对应的初始检测模型,得到预测结果;第一调整子单元,用于基于每个图像样本对应的标定标签以及预测结果的差异,调整该图像样本对应的事件类型所对应的初始检测模型的模型参数,直到该初始检测模型收敛,得到该图像样本对应的环境信息样本及事件类型对应的事件检测算法。
- 根据权利要求11所述的装置,其中,所述训练单元还包括:第二标定单元,用于对每个环境信息样本对应的每种事件类型的每个图像样本,按照初始标定规则进行辅助信息标定,得到辅助信息;第二调整子单元,用于针对同一个环境信息样本对应的同种事件类型,在该事件类型对应的初始检测模型基于所述辅助信息对该事件类型对应的每个图像样本进行检测得到预测结果后,基于该预测结果调整所述初始标定规则,直到该初始检测模型收敛,得到该事件类型对应的标定规则;记录子单元,用于针对所述每个环境信息样本,记录该环境信息样本对应的各种事件 类型的事件检测算法与标定规则之间的对应关系,并将该环境信息样本对应的标定规则生成标定规则包。
- 一种电子设备,其中,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;存储器,用于存放计算机程序;处理器,用于执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。
- 一种事件检测***,其中,所述***包括如权利要求13所述的电子设备、图像采集设备以及环境检测设备,其中:所述环境检测设备,用于检测采集待检测图像时的目标环境信息,并将所述目标环境信息发送至所述电子设备;所述图像采集设备,用于采集所述待检测图像,并发送至所述电子设备。
- 一种包含指令的计算机程序产品,其中,所述计算机程序产品被计算机执行时实现权利要求1-6任一所述的方法步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111580157.2A CN114241430A (zh) | 2021-12-22 | 2021-12-22 | 一种事件检测方法、装置、***、电子设备及存储介质 |
CN202111580157.2 | 2021-12-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023115977A1 true WO2023115977A1 (zh) | 2023-06-29 |
Family
ID=80761195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/111376 WO2023115977A1 (zh) | 2021-12-22 | 2022-08-10 | 一种事件检测方法、装置、***、电子设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114241430A (zh) |
WO (1) | WO2023115977A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114241430A (zh) * | 2021-12-22 | 2022-03-25 | 杭州海康威视***技术有限公司 | 一种事件检测方法、装置、***、电子设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111753634A (zh) * | 2020-03-30 | 2020-10-09 | 上海高德威智能交通***有限公司 | 交通事件检测方法和设备 |
CN112149476A (zh) * | 2019-06-28 | 2020-12-29 | 北京海益同展信息科技有限公司 | 目标检测方法、装置、设备和存储介质 |
US20210224553A1 (en) * | 2020-09-16 | 2021-07-22 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Event detection method and apparatus for cloud control platform, device, and storage medium |
CN114241430A (zh) * | 2021-12-22 | 2022-03-25 | 杭州海康威视***技术有限公司 | 一种事件检测方法、装置、***、电子设备及存储介质 |
-
2021
- 2021-12-22 CN CN202111580157.2A patent/CN114241430A/zh active Pending
-
2022
- 2022-08-10 WO PCT/CN2022/111376 patent/WO2023115977A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112149476A (zh) * | 2019-06-28 | 2020-12-29 | 北京海益同展信息科技有限公司 | 目标检测方法、装置、设备和存储介质 |
CN111753634A (zh) * | 2020-03-30 | 2020-10-09 | 上海高德威智能交通***有限公司 | 交通事件检测方法和设备 |
US20210224553A1 (en) * | 2020-09-16 | 2021-07-22 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Event detection method and apparatus for cloud control platform, device, and storage medium |
CN114241430A (zh) * | 2021-12-22 | 2022-03-25 | 杭州海康威视***技术有限公司 | 一种事件检测方法、装置、***、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN114241430A (zh) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Peng et al. | Assessing the impact of reduced visibility on traffic crash risk using microscopic data and surrogate safety measures | |
CN101281142B (zh) | 一种测量大气能见度的方法 | |
Avery et al. | Length-based vehicle classification using images from uncalibrated video cameras | |
US20190339209A1 (en) | A system for detecting crack growth of asphalt pavement based on binocular image analysis | |
Chaabani et al. | A neural network approach to visibility range estimation under foggy weather conditions | |
WO2022134624A1 (zh) | 一种行人目标的检测方法、电子设备及存储介质 | |
US10712445B2 (en) | Method for detecting at least one parking space for a vehicle | |
CN111898491B (zh) | 一种车辆逆向行驶的识别方法、装置及电子设备 | |
WO2022033288A1 (zh) | 超载车辆识别方法、***及设备 | |
US20240167962A1 (en) | System and method for automatic monitoring of pavement condition | |
CN102162788A (zh) | 基于高清视频的能见度检测方法 | |
WO2023115977A1 (zh) | 一种事件检测方法、装置、***、电子设备及存储介质 | |
CN102262092A (zh) | 能见度测量***及方法 | |
CN104183133A (zh) | 一种采集和传输道路交通流动态信息的方法 | |
CN112462368B (zh) | 一种障碍物检测方法、装置、车辆及存储介质 | |
KR20170039465A (ko) | 실시간 목표 탐지에 의한 교통 정보 수집 시스템 및 방법 | |
CN113971653A (zh) | 面向遥感图像的目标检测方法、装置、设备及存储介质 | |
US20180139415A1 (en) | Using Vehicle Sensor Data to Monitor Environmental and Geologic Conditions | |
CN116522270B (zh) | 用于智慧海绵城市的数据处理*** | |
Fu et al. | Using microscopic video data measures for driver behavior analysis during adverse winter weather: opportunities and challenges | |
US20230177724A1 (en) | Vehicle to infrastructure extrinsic calibration system and method | |
CN115834838A (zh) | 一种隧道内的监控方法、设备和介质 | |
CN107784261B (zh) | 一种路面状态检测方法及装置 | |
CN116935631A (zh) | 基于雷视融合的异常交通态势检测方法、装置及*** | |
Laureshyn et al. | Automated video analysis as a tool for analysing road user behaviour |