Methods, apparatus, storage media, and electronic devices for determining analysis modes
By detecting multiple consecutive frames of images in a video surveillance system, the analysis mode is automatically determined, solving the problem of low efficiency in existing technologies and improving user experience and system intelligence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2026-03-06
AI Technical Summary
In existing technologies, video surveillance systems are inefficient in determining analysis modes, requiring human intervention and adjustments, resulting in a poor user experience.
By detecting multiple consecutive frames of images captured by the target camera within a predetermined time period, the detection results are obtained. Based on the detection results, the target analysis mode is automatically determined, including parameters such as motion ratio and target object ratio, and the analysis mode of the backend device is adjusted accordingly.
It enables automatic determination of analysis modes, improves user experience, avoids the inefficiency of manual adjustments, and enhances the intelligence level of the monitoring system.
Smart Images

Figure CN115995057B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of monitoring technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining an analysis pattern. Background Technology
[0002] Video surveillance technology has been widely applied in many fields. With the rapid development of video surveillance technology, current backend storage recorders generally support multiple intelligent functions and can enable the same or different intelligent functions on multiple channels. For example, supported general intelligent functions include Smart Motion Detection (SMD), perimeter detection, face detection and comparison, license plate detection, and structured analysis. That is, the backend device supports perimeter detection, structured analysis, license plate detection, and face detection. Since the images captured by the camera at different times may be suitable for enabling different intelligent types (or analysis modes), taking the monitoring of a scenic area as an example, during peak holiday periods, only people are allowed to enter, so face detection needs to be enabled; during non-holiday periods, people and vehicles are allowed to enter, so structured analysis needs to be enabled to identify people and vehicles; at night or when the scenic area is abnormally closed and people and vehicles are not allowed to enter, perimeter intrusion detection needs to be enabled. However, in related technologies, when to enable which intelligent type requires user intervention and frequent manual modification. That is, there is a problem of low efficiency in determining the analysis mode by the backend device in related technologies.
[0003] There is currently no effective solution to the technical problem of low efficiency in determining analysis patterns in related technologies. Summary of the Invention
[0004] The present invention provides a method, apparatus, storage medium, and electronic device for determining an analysis pattern, so as to at least solve the technical problem of low efficiency in determining the analysis pattern in the related art.
[0005] According to an embodiment of the present invention, a method for determining an analysis mode is provided, comprising: detecting target image frames included in a series of consecutive frames of images to obtain detection results, wherein the series of consecutive frames of images are images obtained by a target camera device capturing images of a target area within a predetermined time period and transmitted to a target backend, and the target image frames are image frames included in the series of consecutive frames of images excluding the first frame image; determining a target analysis mode based on the detection results, wherein the target analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing image frames after the series of consecutive frames of images.
[0006] In an exemplary embodiment, determining a target analysis mode based on the detection result includes: determining the target analysis mode based on a first proportion or a first proportion and a second proportion included in the detection result, wherein the first proportion is used to indicate the average motion proportion of each sub-image frame included in the target image frame relative to the previous frame image, the previous frame image is used to indicate the image of the frame preceding each of the sub-image frames, the motion proportion is used to indicate the proportion of the image region that has changed relative to the previous frame image in each of the sub-image frames, and the second proportion is used to indicate the average proportion of the target object contained in each of the sub-image frames included in the target image frame in each of the sub-image frames.
[0007] In one exemplary embodiment, determining the target analysis mode based on a first proportion included in the detection result includes: determining the first analysis mode as the target analysis mode when it is determined that the first proportion satisfies a first predetermined condition, wherein the first analysis mode is used to indicate a mode for analyzing whether an object of the same type as the target object enters the target region in the image; or, determining the target analysis mode based on the first proportion and a second proportion included in the detection result includes: determining the target analysis mode based on the first proportion, the second proportion, and the current analysis mode, wherein the current analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the target image frame.
[0008] In one exemplary embodiment, determining the target analysis mode based on the first proportion, the second proportion, and the current analysis mode includes at least one of the following: If the current analysis mode is determined to be the second analysis mode, and a second predetermined condition is satisfied between the first proportion and the second proportion, then a third analysis mode is determined as the target analysis mode, wherein the second analysis mode indicates a mode for analyzing the attributes of a first type of object included in the image, and the third analysis mode indicates a mode for analyzing the attributes of a second type of object included in the image, and the target object includes the first type of object and / or the second type of object; If the current analysis mode is determined to be the second analysis mode, and a third predetermined condition is satisfied between the first proportion and the second proportion, then the second analysis mode is determined as the target analysis mode, wherein the second analysis mode indicates a mode for analyzing the attributes of a first type of object included in the image, and the target object includes the first type of object.
[0009] In an exemplary embodiment, detecting target image frames included in a series of consecutive image frames to obtain detection results includes: using a motion detection algorithm to detect image regions in each sub-image frame that have changed relative to the previous image frame; determining the ratio of the changed image region to all regions included in the sub-image frame as the motion percentage corresponding to each sub-image frame; determining a first percentage based on the motion percentage corresponding to each sub-image frame; and / or detecting the target object included in each sub-image frame to obtain a target detection box; determining the ratio of the size of the target detection box to the size of the sub-image frame as the size percentage corresponding to each sub-image frame; and determining a second percentage based on the size percentage corresponding to each sub-image frame.
[0010] In one exemplary embodiment, determining a target analysis mode based on the detection results includes: determining the target analysis mode based on a first target quantity and / or a second target quantity included in the detection results, wherein the first target quantity is used to indicate the number of first type objects included in the consecutive multi-frame images, and the second target quantity is used to indicate the number of second type objects included in the consecutive multi-frame images.
[0011] In one exemplary embodiment, determining the target analysis mode based on the first target quantity included in the detection result includes: determining a third analysis mode as the target analysis mode when the first target quantity is determined to be equal to a first predetermined value, wherein the third analysis mode is used to indicate a mode for analyzing the attributes of the second type of object included in the image; or, determining the target analysis mode based on the second target quantity included in the detection result includes: determining a second analysis mode as the target analysis mode when the second target quantity is determined to be equal to a second predetermined value, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image; or, determining the target analysis mode based on the first target quantity and the second target quantity included in the detection result includes at least one of the following: determining a second analysis mode as the target analysis mode when a fourth predetermined condition is determined to be satisfied between the first target quantity and the second target quantity, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image. The analysis includes a pattern for analyzing the attributes of the first type of objects included in the image; when a fifth predetermined condition is met between the first target quantity and the second target quantity, a third analysis pattern is determined as the target analysis pattern, wherein the third analysis pattern is used to indicate a pattern for analyzing the attributes of the second type of objects included in the image; when both the first target quantity and the second target quantity are less than a first preset threshold, a first analysis pattern is determined as the target analysis pattern, wherein the first analysis pattern is used to indicate a pattern for analyzing whether there are objects of the same type as the target objects in the image entering the target area; when both the first target quantity and the second target quantity are greater than a second preset threshold, and a sixth predetermined condition is met between the first target quantity and the second target quantity, a fourth analysis pattern is determined as the target analysis pattern, wherein the fourth analysis pattern is used to indicate a pattern for analyzing the attributes of target objects included in the image, the target objects including the first type of objects and the second type of objects.
[0012] According to another embodiment of the present invention, an analysis mode determination apparatus is also provided, comprising: a detection module, configured to detect target image frames included in a series of consecutive frames of images to obtain detection results, wherein the series of consecutive frames of images are images obtained by a target camera device capturing images of a target area within a predetermined time period and transmitted to a target backend, and the target image frames are image frames included in the series of consecutive frames of images excluding the first frame image; and a determination module, configured to determine a target analysis mode based on the detection results, wherein the target analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing image frames after the series of consecutive frames of images.
[0013] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0014] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0015] This invention detects target image frames within a series of consecutive images captured and transmitted by a target camera within a predetermined time period to obtain detection results. The target image frames are all image frames except the first frame within the series of consecutive images. Based on the detection results, the target analysis mode adopted by the target backend for analyzing subsequent images is determined. In other words, by detecting current or previous images to obtain detection results and automatically determining the subsequent image analysis mode based on these results, this invention avoids the inefficiency and poor user experience caused by manually adjusting or switching analysis modes in related technologies. Therefore, it solves the technical problem of low efficiency in determining analysis modes in related technologies, thereby improving the user experience. Attached Figure Description
[0016] Figure 1 This is a block diagram of the mobile terminal hardware structure of the method for determining the analysis mode according to an embodiment of the present invention.
[0017] Figure 2 This is a flowchart of a method for determining an analysis mode according to an embodiment of the present invention;
[0018] Figure 3 This is a flowchart of a method for determining the type of intelligence according to a specific embodiment of the present invention;
[0019] Figure 4 This is a structural block diagram of an analysis mode determination device according to an embodiment of the present invention. Detailed Implementation
[0020] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0022] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a block diagram of the mobile terminal hardware structure of the method for determining the analysis mode according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0023] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the method for determining the analysis mode in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0025] Currently, backend devices generally support multiple intelligences and can enable multiple instances of the same or different intelligences. Supported common intelligences include Smd, perimeter, face detection and comparison, license plate detection, and structured data processing. The use cases for these intelligences are described below:
[0026] Smd: Consumes very few chip resources, generally supports full channel opening, and is relatively easy to identify the number of people and vehicles in the currently captured image;
[0027] Perimeter: Detects intrusion of adjacent lines and areas. For scenes with few people and vehicles in the image, it triggers an intelligent alarm when someone or a vehicle intrudes.
[0028] Face detection and comparison: Suitable for scenarios with a large number of faces, it detects and saves the facial attributes (mask, glasses, expression) and coordinates in the image, and compares them with the database to identify strangers detected.
[0029] License plate detection: Suitable for scenarios with a large number of vehicles, it detects and saves vehicle attributes (model, color, logo), coordinates, and license plates in the image;
[0030] Structured: Suitable for complex scenes with both people and vehicles in the image. It can simultaneously detect the attributes of people, vehicles, and non-motorized vehicles in the image and cut out and save the image.
[0031] In related technologies, since only one type of intelligence can be selected to be activated for each channel, once a user selects a particular intelligence to activate for the current channel, the intelligence cannot be turned off or switched back, regardless of whether the current camera's shooting scene is suitable for the activated intelligence, unless the intelligence is manually switched on or off via the user interface. For example, at certain times or in certain scenarios, the current camera may be capturing images of vehicles, but the activated intelligence is actually facial recognition, which leads to a waste of chip-related intelligence resources.
[0032] In view of the above-mentioned shortcomings in related technologies, this application provides a method that can automatically adjust which intelligent mode to activate based on the current scene captured by the camera.
[0033] This embodiment provides a method for determining the analysis mode. Figure 2 This is a flowchart of a method for determining an analysis mode according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0034] Step S202: Detect the target image frames included in the consecutive multi-frame images to obtain detection results. The consecutive multi-frame images are images obtained by the target camera device after capturing the target area within a predetermined time period and transmitted to the target backend. The target image frames are image frames included in the consecutive multi-frame images other than the first frame image.
[0035] Step S204: Determine the target analysis mode based on the detection results, wherein the target analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the image frames after the consecutive multi-frame images.
[0036] Through the above steps, target image frames are detected within a series of consecutive images captured and transmitted by the target camera within a predetermined time period to obtain detection results. The target image frames are all image frames except the first frame within the series of consecutive images. Based on the detection results, the target analysis mode adopted by the target backend for analyzing subsequent images is determined. In other words, by detecting current or previous images to obtain detection results and automatically determining the subsequent image analysis mode based on these results, the inefficiency and poor user experience caused by manually adjusting or switching analysis modes, as required in related technologies, are avoided. Therefore, the technical problem of low efficiency in determining the analysis mode in related technologies is solved, achieving the effect of improving the user experience.
[0037] The entity executing the above steps can be a device or terminal, such as an image analysis device or an image processing device, like the target backend device or a backend storage recorder, or a processor with human-computer interaction capabilities configured on a storage device, or a processing device or processing unit with similar processing capabilities, but is not limited to these. The following explanation uses a backend device performing the above operations as an example (this is merely an illustrative example; in actual operation, other devices or modules can also perform the above operations):
[0038] In the above embodiments, the backend device detects the target image frames included in the consecutive multi-frame images to obtain detection results. The consecutive multi-frame images are images obtained by the target camera device capturing images of the target area within a predetermined time period and transmitted to the target backend (i.e., the aforementioned backend device). For example, the consecutive multi-frame images are images obtained by the front-end camera (or webcam) capturing images of the target area within a predetermined time period (such as the past 2 seconds, 5 seconds, or other time periods) and transmitted to the backend device. For example, the consecutive multi-frame images may be 16 consecutive frames, 40 consecutive frames, or other frame numbers. The target image frames are consecutive multi-frame images. The frame image includes image frames other than the first frame image. Taking the above-mentioned consecutive multi-frame image as 16 consecutive frames as an example, the target image frame can be the 2nd to the 16th frame images. That is, the back-end device detects the target image frame to obtain the detection result. For example, the detection result can be the motion percentage of each frame image relative to the previous frame image, that is, the proportion of the image area that has changed in each frame image relative to its previous frame image in the current frame image. For example, the motion percentage of the 2nd frame image relative to the 1st frame image, the motion percentage of the 3rd frame image relative to the 2nd frame image, and so on. Furthermore, the motion percentage of the 16th frame relative to the 15th frame can be used to obtain multiple motion percentages. The detection result can also be the average of these multiple motion percentages. Alternatively, the detection result can be the proportion of the target object in each frame of the target image, or the size proportion, i.e., the proportion of the target object in the 2nd frame, the proportion of the target object in the 3rd frame, and so on, up to the proportion of the target object in the 16th frame. This can yield multiple size proportions, and the detection result can also be the average of these multiple size proportions. The object can be a person and / or vehicle, or other object included in the image; optionally, the above multiple size ratios may also include the proportion of the target object in the first frame of the above consecutive multi-frame images; then, the target analysis mode is determined based on the detection results, wherein the target analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the image frames after the consecutive multi-frame images, that is, the target analysis mode adopted by the backend device when analyzing subsequent images can be automatically determined according to the above detection results. For example, the target analysis mode may be one of perimeter, structured, face detection and comparison, or license plate detection.
[0039] Optionally, in the above embodiments, the target image frame can also be the current frame image, and the above detection result is the current detection result for the current frame image. The detection result can also be the motion ratio of the current frame image relative to the previous frame image, or the size ratio of the target object in the current frame image. Then, based on the above current detection result and the first detection result, the target analysis mode is determined. For example, the first detection result can be the result of detecting several frames of images before the current frame. Similarly, the first detection result can also be the motion ratio (or the average of multiple motion ratios) of each frame image (corresponding to each frame image in the several frames of images before the current frame) relative to the previous frame image, and / or the target object in each frame image (corresponding to each frame image in the several frames of images before the current frame). The size proportion (or the average of multiple size proportions); optionally, the target analysis mode can also be determined based on the current detection result and the second detection result. For example, the second detection result can be the result of detecting several frames of images after the current frame. Similarly, the second detection result can also be the motion proportion (or the average of multiple motion proportions) of each frame of images (corresponding to each frame of images after the current frame) relative to the previous frame of images, and / or the size proportion (or the average of multiple size proportions) of the target object in each frame of images (corresponding to each frame of images after the current frame); of course, in practical applications, the target analysis mode can also be determined based on the current detection result, the first detection result, and the second detection result, which will not be elaborated here.
[0040] In an optional embodiment, determining the target analysis mode based on the detection results includes: determining the target analysis mode based on a first proportion or a combination of the first and second proportions included in the detection results, wherein the first proportion is used to indicate the average motion proportion of each sub-image frame included in the target image frame relative to the previous frame image, the previous frame image is used to indicate the image preceding each of the sub-image frames, the motion proportion is used to indicate the proportion of the image region that has changed relative to the previous frame image in each sub-image frame, and the second proportion is used to indicate the average proportion of the target object contained in each sub-image frame included in the target image frame in each sub-image frame. In this embodiment, the target analysis mode can be determined based on the first proportion. For example, when the first proportion is less than a certain threshold (such as 10%, 15%, or other values), as in the aforementioned embodiment, the average of multiple motion proportions included in the detection results obtained by detecting the target image frames included in multiple consecutive image frames (such as 9%, or other values), or, as in the aforementioned embodiment, the motion proportion of the current image frame relative to the previous image frame is 8%, indicating that the motion proportion of the current image frame relative to the previous image frame is very small, then the target analysis mode can be determined as the first analysis mode (such as perimeter intelligence). That is, in practical applications, the perimeter intelligence type can be used to analyze subsequent images. Optionally, the target analysis mode can also be determined based on the first proportion and the second proportion, that is, combining the motion proportion of each image frame relative to the previous image frame. The target analysis mode is determined by combining the motion ratio of the previous frame and the size ratio of the target object in each frame. However, in practical applications, the target analysis mode can also be determined solely based on the second ratio. For example, if the size ratio of the target object (e.g., a human body) in multiple consecutive frames exceeds a certain size ratio threshold (e.g., 50%, 60%, or other values), the target analysis mode can be determined as a face detection analysis mode (or intelligent face detection type). Alternatively, if the size ratio of the target object (e.g., a vehicle) in multiple consecutive frames exceeds a certain size ratio threshold (60%, 70%, or other values), the target analysis mode can be determined as a license plate detection analysis mode (or intelligent license plate detection type). This embodiment achieves the goal of determining the target analysis mode based on the first and / or second ratios included in the detection results.
[0041] In an optional embodiment, determining the target analysis mode based on a first proportion included in the detection result includes: determining the first analysis mode as the target analysis mode when the first proportion satisfies a first predetermined condition, wherein the first analysis mode is used to indicate a mode for analyzing whether an object of the same type as the target object enters the target region in the image; or, determining the target analysis mode based on a first proportion and a second proportion included in the detection result includes: determining the target analysis mode based on the first proportion, the second proportion, and the current analysis mode, wherein the current analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the target image frame. In this embodiment, for example, the first predetermined condition is that the first proportion is less than a first predetermined threshold (such as 10%, 15%, or other values). That is, when it is determined that the first proportion is less than the first predetermined threshold, the first analysis mode can be determined as the target analysis mode. In practical applications, the perimeter analysis mode (or perimeter intelligence type) can be determined as the target analysis mode. Alternatively, the target analysis mode can be determined based on the first proportion, the second proportion, and the current analysis mode. For example, the current analysis mode is face detection, and the average motion proportion of each frame in the target image frame relative to the previous frame is greater than the first proportion. If a second predetermined threshold (e.g., 40%, or other values) is set, and the average size ratio of the target object (e.g., human body) in each frame of the aforementioned target image frame is determined to be 40% (or 45%, or other values) based on the second ratio, then the target analysis mode for subsequent images can be determined to still be face detection. However, if the average size ratio of the target object (e.g., human body) in each frame of the aforementioned target image frame is determined to be 10% (or 15%, or other values) based on the second ratio, which is much smaller than the first ratio, then the current analysis mode (e.g., face detection) can be switched to license plate detection analysis mode. This embodiment achieves the purpose of determining the target analysis mode by judging whether the first ratio meets the first predetermined condition; it also achieves the purpose of determining the target analysis mode based on the first ratio, the second ratio, and the current analysis mode.
[0042] In an optional embodiment, determining the target analysis mode based on the first proportion, the second proportion, and the current analysis mode includes at least one of the following: if the current analysis mode is determined to be the second analysis mode, and a second predetermined condition is satisfied between the first proportion and the second proportion, then a third analysis mode is determined as the target analysis mode, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of a first type of object included in the image, and the third analysis mode is used to indicate a mode for analyzing the attributes of a second type of object included in the image, and the target object includes the first type of object and / or the second type of object; if the current analysis mode is determined to be the second analysis mode, and a third predetermined condition is satisfied between the first proportion and the second proportion, then the second analysis mode is determined as the target analysis mode, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of a first type of object included in the image, and the target object includes the first type of object.In this embodiment, when the current analysis mode is determined to be the second analysis mode, and the first proportion and the second proportion satisfy the second predetermined condition, the third analysis mode can be determined as the target analysis mode, that is, the backend device switches from the current analysis mode of the second analysis mode to the third analysis mode; and when the current analysis mode is determined to be the second analysis mode, and the first proportion and the second proportion satisfy the third predetermined condition, the second analysis mode can be determined as the target analysis mode, that is, the backend device can continue to use the current analysis mode (i.e., the second analysis mode). For example, if the second analysis mode is a face detection analysis mode, then the above-mentioned third analysis mode can be a license plate detection analysis mode; or, if the second analysis mode is a license plate detection analysis mode, then the above-mentioned third analysis mode can be a face detection analysis mode; for example, if the current analysis mode is a face detection analysis mode, the above-mentioned second predetermined condition can be that the proportion of human body (corresponding to the second proportion when the target object is a human body) is much smaller than the first proportion, such as the first proportion / second proportion > 3 (or other values). In this case, it indicates that most of the moving areas are not human bodies, but vehicles. Therefore, the license plate detection proportion can be... The analysis mode is determined as the target analysis mode. Similarly, the second analysis mode (corresponding to the current analysis mode) can also be the license plate detection analysis mode. The second predetermined condition can be that the proportion of vehicles (corresponding to the second proportion when the target object is a vehicle) is much smaller than the first proportion, such as the first proportion / second proportion > 3 (or other values). In this case, it indicates that most of the moving areas are not vehicles, but possibly human bodies. Therefore, the face detection analysis mode can be determined as the target analysis mode. Optionally, the third predetermined condition can be that the second proportion is close to the first proportion, such as 0.8 < (first proportion / second proportion) < 1.2 (the boundary value of this range is adjustable). For example, if the current analysis mode is the face detection analysis mode, the first proportion is 40%, and the proportion of human bodies is determined to be 42% (or 38%, or other) based on the second proportion, then the second analysis mode can be determined as the target analysis mode, that is, the face detection analysis mode is still used, that is, the analysis mode of the backend device remains unchanged. Similarly, if the current analysis mode is the license plate detection analysis mode, and the first proportion and the second proportion meet the third predetermined condition, the current analysis mode can be determined as the target analysis mode. This embodiment achieves the goal of determining the target analysis mode based on the current analysis mode and the different conditions satisfied by the first and second proportions.
[0043] In an optional embodiment, detecting target image frames included in a series of consecutive image frames to obtain detection results includes: using a motion detection algorithm to detect image regions in each sub-image frame that have changed relative to the previous image frame; determining the ratio of the changed image region to all regions included in the sub-image frame as the motion percentage corresponding to each sub-image frame; determining a first percentage based on the motion percentage corresponding to each sub-image frame; and / or detecting the target object included in each sub-image frame to obtain a target detection box; determining the ratio of the size of the target detection box to the size of the sub-image frame as the size percentage corresponding to each sub-image frame; and determining a second percentage based on the size percentage corresponding to each sub-image frame. In this embodiment, the first proportion can be determined in the following way: A motion detection algorithm is used to detect the image region that changes relative to the previous image in each sub-image frame. The ratio of the changed image region to the total region of the sub-image frame is then determined as the motion proportion. For example, the motion proportion can be 10% (or 50%, or 80%, or other values). That is, a corresponding motion proportion can be determined for each frame in the target image frame, resulting in multiple motion proportions. Then, the multiple motion proportions are averaged to obtain the first proportion. Alternatively, the second proportion can be determined in the following way: A target object is detected in each sub-image frame. The target object can be a human body (or a vehicle, or other object) to obtain a target detection box. The ratio of the size of the target detection box to the size of the sub-image frame is then calculated to obtain the size proportion. That is, a corresponding size proportion can be determined for each frame in the target image frame, resulting in multiple size proportions. Then, the multiple size proportions are averaged to obtain the second proportion. This yields the detection result. Optionally, the detection result can include only the first proportion or the second proportion, or it can include both the first and second proportions simultaneously. This embodiment achieves the purpose of determining the first proportion and the second proportion based on the target image frame, and also achieves the purpose of determining the detection result.
[0044] In an optional embodiment, determining the target analysis mode based on the detection results includes: determining the target analysis mode based on the first target quantity and / or the second target quantity included in the detection results, wherein the first target quantity is used to indicate the number of first type objects included in the consecutive multi-frame images, and the second target quantity is used to indicate the number of second type objects included in the consecutive multi-frame images. In this embodiment, the target analysis mode can also be determined based on the first target quantity and / or the second target quantity included in the detection results, where the first target quantity is the number of first type objects and the second target quantity is the number of second type objects. For example, the first type object is a human body (or a vehicle, or other object), and the second type object is a vehicle (or a human body, or other object). In practical applications, the first target quantity can be the average number of first type objects included in each frame of the aforementioned target image frame (which can be rounded to the nearest integer), the first target quantity can also be the value with the largest number of first type objects in the aforementioned target image frame, or the number of first type objects determined in the current frame image in the aforementioned embodiment; similarly, the second target quantity can also be determined using the same method as the first target quantity. This embodiment achieves the goal of determining the target analysis mode based on the first target quantity and / or the second target quantity.
[0045] In an optional embodiment, determining the target analysis mode based on the first target quantity included in the detection result includes: determining a third analysis mode as the target analysis mode when the first target quantity is determined to be equal to a first predetermined value, wherein the third analysis mode is used to indicate a mode for analyzing the attributes of the second type of objects included in the image; or, determining the target analysis mode based on the second target quantity included in the detection result includes: determining a second analysis mode as the target analysis mode when the second target quantity is determined to be equal to a second predetermined value, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of objects included in the image; or, determining the target analysis mode based on the first target quantity and the second target quantity included in the detection result includes at least one of the following: determining a second analysis mode as the target analysis mode when a fourth predetermined condition is determined between the first target quantity and the second target quantity, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of objects included in the image. The analysis includes a pattern for analyzing the attributes of the first type of objects included in the image; when a fifth predetermined condition is met between the first target quantity and the second target quantity, a third analysis pattern is determined as the target analysis pattern, wherein the third analysis pattern is used to indicate a pattern for analyzing the attributes of the second type of objects included in the image; when both the first target quantity and the second target quantity are less than a first preset threshold, a first analysis pattern is determined as the target analysis pattern, wherein the first analysis pattern is used to indicate a pattern for analyzing whether there are objects of the same type as the target objects in the image entering the target area; when both the first target quantity and the second target quantity are greater than a second preset threshold, and a sixth predetermined condition is met between the first target quantity and the second target quantity, a fourth analysis pattern is determined as the target analysis pattern, wherein the fourth analysis pattern is used to indicate a pattern for analyzing the attributes of target objects included in the image, the target objects including the first type of objects and the second type of objects. In this embodiment, when the first target quantity equals the first predetermined value, the third analysis mode can be determined as the target analysis mode. For example, if the first target quantity represents the number of human bodies (or the number of vehicles), and the first predetermined value can be 0 (or 1, or 2, or other values), when the number of human bodies is determined to be 0, the third analysis mode (such as the license plate detection analysis mode) can be determined as the target analysis mode. Similarly, if the first target quantity represents the number of vehicles, when the number of vehicles is 0, the second analysis mode (such as the face detection analysis mode) can be determined as the target analysis mode.Similarly, the second target quantity can represent the number of vehicles. When the second target quantity equals a second predetermined value (e.g., 0 or 1), the second analysis mode is determined as the target analysis mode. The second analysis mode can be a face detection analysis mode. In this embodiment, the second analysis mode and the third analysis mode represent different analysis modes. For example, one of them is a face detection analysis mode, and the other is a license plate detection analysis mode. Optionally, the corresponding target analysis mode can also be determined according to different conditions satisfied by the first target quantity and the second target quantity. For example, when the first target quantity and the second target quantity satisfy a fourth predetermined condition, the fourth predetermined condition can be: first target quantity / second target quantity ≥ 3 (or 4, or other values). For example, when the number of human bodies / number of vehicles ≥ 3, the face detection analysis mode can be determined as the target analysis mode, or when the number of vehicles / number of human bodies ≥ 3, the license plate detection analysis mode can be determined as the target analysis mode. Optionally, when the first target quantity and the second target quantity When the fifth predetermined condition is met, the fifth predetermined condition can be: the number of second targets / the number of first targets ≥ 3 (or 4, or other values). The target analysis mode can be determined using a method similar to that used to meet the fourth predetermined condition, which will not be elaborated here. Optionally, when both the number of first targets and the number of second targets are less than the first preset threshold, the first analysis mode can be determined as the target analysis mode. For example, the first preset threshold is 3 (or 2, or other values). When both the number of human beings and the number of vehicles are less than 3, that is, when the number of people and vehicles is very small, the perimeter intelligent analysis mode (corresponding to the first analysis mode mentioned above) can be used. That is, it is suitable to enable the perimeter intelligent type to determine whether there is an intrusion. In practical applications, when a person or vehicle intrudes, an intelligent alarm is triggered. Optionally, in this embodiment, different first preset thresholds can be set for the number of first targets and the number of second targets. For example, the number of human beings is less than 3 (the first preset threshold corresponding to the number of first targets), and the number of vehicles is less than 1 (the first preset threshold corresponding to the number of second targets).Optionally, when both the first target quantity and the second target quantity are greater than the second preset threshold, for example, the second preset threshold is 3 (or 4, or other values). Of course, different second preset thresholds can also be set for the first target quantity and the second target quantity. For example, the number of human bodies is greater than 4 (the second preset threshold corresponding to the first target quantity), the number of vehicles is greater than 2 (the second preset threshold corresponding to the second target quantity), and the first target quantity and the second target quantity meet the sixth predetermined condition. For example, the sixth predetermined condition is: 0.5 < (first target quantity / second target quantity) < 1.5 (the boundary value of this range is adjustable), that is, the first target quantity and the second target quantity are similar or not very different. For example, when the ratio between the two is 3 times or 4 times or more, then the difference between the two is very large. At this time, the fourth analysis mode can be determined as the target analysis mode. For example, in practical applications, when the number of people and vehicles is large and the ratio between the two is within a certain range, the backend device can switch to the structured analysis mode (or structured intelligent type). This embodiment achieves the goal of determining the corresponding target analysis mode based on the different conditions satisfied by the first target quantity and the second target quantity.
[0046] It should be noted that the predetermined values (such as the first predetermined value and the second predetermined value) and preset thresholds (such as the first preset threshold and the second preset threshold) in the above embodiments are all adjustable. The different predetermined conditions (such as the first predetermined condition and the second predetermined condition) can also be adjusted according to actual needs. Moreover, the target analysis mode is determined based on the detection results in the above embodiments. That is, the backend device can automatically determine the target analysis mode. If the current analysis mode of the backend device is different from the target analysis mode, it will automatically switch to the target analysis mode. If the current analysis mode is the same as the target analysis mode, it will maintain the current analysis mode. That is, the backend device can determine whether to maintain the current analysis mode or automatically switch to the target analysis mode based on the detection results. This avoids the problem of low efficiency and poor user experience caused by relying on manual adjustment or switching of analysis modes in related technologies, and achieves the effect of improving the user experience.
[0047] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments. The present invention will be specifically described below with reference to the embodiments.
[0048] like Figure 3As shown, the basic idea of this solution is to use Smd to perform intelligent analysis in the initial state (before the device has enabled any intelligence), detect the number of people and vehicles in the current acquisition channel, analyze which intelligence is suitable for the current scene based on the number of people and vehicles, and switch to the corresponding intelligence; use the current intelligence to detect for a period of time, and then analyze whether the current intelligence is suitable for the current scene based on the object area returned by the intelligent analysis and the motion detection ratio of the entire acquisition screen. If the scene changes, switch the intelligence type. Figure 3 This is a flowchart of a method for determining the intelligence type according to a specific embodiment of the present invention, which specifically includes:
[0049] Step 1: Smd Intelligent Analysis
[0050] Enable Smd intelligence to perform intelligent analysis of the current channel, count the number of people and vehicles appearing within a certain period of time (corresponding to the aforementioned first target number and second target number) and record it. After completing the statistics, turn off Smd.
[0051] In this step, Smd consumes very few device resources, which can be basically ignored;
[0052] Statistics for a period of time: This time can be set by the user or a default value can be set (default 60s).
[0053] Step 2: Scenario Analysis
[0054] Based on the number of people and vehicles counted in Step 1, analyze the current video scene.
[0055] Number of vehicles == 0 (corresponding to the aforementioned first predetermined value or second predetermined value) or number of people >> number of vehicles (corresponding to the aforementioned first target number and second target number satisfying the fourth predetermined condition): Suitable for enabling face detection (corresponding to the aforementioned second analysis mode or third analysis mode);
[0056] The number of vehicles is roughly equal to the number of people and exceeds a certain threshold (corresponding to the aforementioned second preset threshold): it is suitable to enable structured analysis (corresponding to the aforementioned fourth analysis mode);
[0057] Number of people == 0 (corresponding to the aforementioned first predetermined value or second predetermined value) or number of vehicles >> number of people (corresponding to the aforementioned first target number and second target number satisfying the fifth predetermined condition): suitable for starting license plate detection (corresponding to the aforementioned third analysis mode or second analysis mode);
[0058] If the number of people and vehicles is very small and below a certain threshold (corresponding to the aforementioned first preset threshold): it is appropriate to enable the perimeter (corresponding to the aforementioned first analysis mode) to determine if there is an intrusion;
[0059] The threshold can be set by the user, who can provide appropriate assistance in the analysis, such as whether to focus more on structured information or on perimeter intelligence results. If set by the user, we can use a default threshold (let's assume it's 3 for now; if the number of people and vehicles is less than 3 after 60 seconds of statistics, it means there are basically no active people or vehicles in the frame. If they do appear, we can use perimeter triggering to alarm).
[0060] Step 3: Smart Start
[0061] Based on the video scene selected in Step 2, analyze the smart services that are suitable to be enabled and switch the current channel to the smart type analyzed in Step 2.
[0062] Step 4: Analysis of the proportion of intelligent / animal detection scenarios
[0063] Regardless of whether it's face, perimeter, structured, or license plate detection, the coordinates of the object and the type of the detected object will be returned. Based on the coordinates of all intelligently analyzed object regions returned in each frame, the proportion of the currently detected person or vehicle in the entire captured image (corresponding to the aforementioned size proportion) can be determined and recorded as the intelligent proportion (corresponding to the aforementioned second proportion). The intelligent proportion of each frame is compared with the motion detection proportion (corresponding to the aforementioned first proportion) for a period of time.
[0064] By analyzing the ratio of intelligent detection to animal detection, we can determine whether to maintain the current intelligent type or switch to a new intelligent type, including the following different scenarios:
[0065] (1) The proportion of motion detection is very small after a period of time, and the system switches to perimeter intelligence regardless of the current type of intelligence.
[0066] (2) The current intelligence is face detection: the intelligence returns all people, and the proportion of all people in the current frame to the entire captured screen is calculated based on the human body coordinates returned by the intelligence.
[0067] ① If the proportion of human body is less than the proportion of animal detection, it means that the vast majority of the moving areas are not human, so switch to license plate detection;
[0068] ② Human body proportion == motion detection proportion. Most of the moving objects are people, so continue to enable face detection.
[0069] (3) The current intelligence is license plate detection: the intelligence returns all vehicles, and the proportion of all vehicles in the current frame to the entire captured screen is calculated based on the vehicle coordinates returned by the intelligence.
[0070] ① If the proportion of vehicles is less than the proportion of motion detection, it means that the vast majority of the moving areas are not occupied by vehicles, so switch to face detection;
[0071] ② Vehicle percentage = Dynamic inspection percentage. Most of the moving vehicles are cars, so continue with license plate detection.
[0072] (4) The current intelligence is structured: because it can directly count the number of people and vehicles within a period of time, there is no need to combine the proportion. It can be turned on (or switched) according to the rules in Step 2.
[0073] (5) The current intelligence is perimeter: Perimeter is suitable for scenarios where there are relatively few moving objects in the captured image. Therefore, if the motion detection rate is very low for a period of time, the perimeter intelligence will continue to run. If the motion detection rate is very high, and because perimeter intelligence can directly count the number of people and vehicles within a period of time, the corresponding intelligence can be directly activated according to the Step 2 rule.
[0074] It should be noted that Step 4 above includes Figure 3 In the analysis of the ratio of intelligence to motion detection, the result can be either unchanged or changed. Specifically, if the intelligence type determined by the analysis is the same as the current intelligence type, it remains unchanged; if the intelligence type determined by the analysis is different from the current intelligence type, it changes, and in this case, the intelligence type needs to be switched (e.g., ...). Figure 3 (Intelligent switching in the middle).
[0075] Step 5: Intelligent Analysis
[0076] After switching the intelligence type, run for a period of time T according to the current intelligence type, and then re-execute Step 4 to analyze which intelligence is suitable to be enabled in the current scenario, and determine whether it is the same as the currently enabled intelligence type. If they are different, switch the intelligence type.
[0077] The selection of time T may be determined based on the results of Step 4. If multiple judgments indicate that it is not necessary to switch the smart type, then time T will be gradually extended until a certain time upper limit is reached. If the smart type changes frequently, time T will be gradually shortened until a certain lower limit is reached.
[0078] Through the embodiments of the present invention, a service that consumes very few chip resources is used to analyze the current video scene, thereby enabling the device to autonomously switch the intelligence type and achieve scene adaptation of the intelligence type; the proportion of the currently detected object area and the proportion of motion detection are compared to determine whether the current scene conforms to the intelligence.
[0079] Compared to existing technologies, the main advantage of this invention is that it uses a single chip with minimal resource consumption to analyze the current video scene, thereby switching the intelligent type and achieving scene adaptation of the intelligent type. This makes the intelligent type of the channel more suitable for the current video shooting scene, rather than simply setting the intelligent type of a single channel.
[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0081] This embodiment also provides a device for determining the analysis mode. Figure 4 This is a structural block diagram of an analysis mode determination device according to an embodiment of the present invention, such as... Figure 4 As shown, the device includes:
[0082] The detection module 402 is used to detect target image frames included in a series of consecutive frames of images to obtain detection results. The series of consecutive frames of images are images obtained by the target camera device after capturing the target area within a predetermined time period and transmitted to the target backend. The target image frames are image frames included in the series of consecutive frames of images other than the first frame image.
[0083] The determination module 404 is used to determine the target analysis mode based on the detection result, wherein the target analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the image frames after the consecutive multi-frame images.
[0084] In an optional embodiment, the determining module 404 includes: a first determining submodule, configured to determine the target analysis mode based on a first proportion or a combination of the first and second proportions included in the detection result, wherein the first proportion is used to indicate the average motion proportion of each sub-image frame included in the target image frame relative to the previous frame image, the previous frame image is used to indicate the image preceding each of the sub-image frames, the motion proportion is used to indicate the proportion of the image region that has changed relative to the previous frame image in each sub-image frame, and the second proportion is used to indicate the average proportion of the target object contained in each sub-image frame included in the target image frame in each sub-image frame.
[0085] In an optional embodiment, the first determining submodule includes: a first determining unit, configured to determine the first analysis mode as the target analysis mode when the first proportion satisfies a first predetermined condition, wherein the first analysis mode is used to indicate a mode for analyzing whether there is an object of the same type as the target object in the image entering the target region; or, the first determining submodule includes: a second determining unit, configured to determine the target analysis mode based on the first proportion, the second proportion, and the current analysis mode, wherein the current analysis mode is used to indicate the image analysis mode adopted by the target backend when analyzing the target image frame.
[0086] In an optional embodiment, the second determining unit includes at least one of the following: a first determining subunit, configured to determine a third analysis mode as the target analysis mode when the current analysis mode is determined to be a second analysis mode and a second predetermined condition is met between the first proportion and the second proportion, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of a first type of object included in the image, the third analysis mode is used to indicate a mode for analyzing the attributes of a second type of object included in the image, and the target object includes the first type of object and / or the second type of object; and a second determining subunit, configured to determine the second analysis mode as the target analysis mode when the current analysis mode is determined to be a second analysis mode and a third predetermined condition is met between the first proportion and the second proportion, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of a first type of object included in the image, and the target object includes the first type of object.
[0087] In an optional embodiment, the detection module 402 includes: a first detection submodule, configured to detect image regions that have changed relative to the previous image frame using a motion detection algorithm; a second determination submodule, configured to determine the motion percentage corresponding to each sub-image frame by the ratio of the changed image region to all regions included in the sub-image frame; a third determination submodule, configured to determine the first percentage based on the motion percentage corresponding to each sub-image frame; and / or, the second detection submodule, configured to detect the target object included in each sub-image frame to obtain a target detection box; a fourth determination submodule, configured to determine the size percentage corresponding to each sub-image frame by the ratio of the size of the target detection box to the size of the sub-image frame; and a fifth determination submodule, configured to determine the second percentage based on the size percentage corresponding to each sub-image frame.
[0088] In an optional embodiment, the determining module 404 includes: a sixth determining submodule, configured to determine the target analysis mode based on the first target quantity and / or the second target quantity included in the detection result, wherein the first target quantity is used to indicate the number of first type objects included in the consecutive multi-frame images, and the second target quantity is used to indicate the number of second type objects included in the consecutive multi-frame images.
[0089] In an optional embodiment, the sixth determining submodule includes: a third determining unit, configured to determine a third analysis mode as the target analysis mode when the first target quantity is determined to be equal to a first predetermined value, wherein the third analysis mode is used to indicate a mode for analyzing the attributes of the second type of object included in the image; or, the sixth determining submodule includes: a fourth determining unit, configured to determine a second analysis mode as the target analysis mode when the second target quantity is determined to be equal to a second predetermined value, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image; or, the sixth determining submodule includes at least one of the following: a fifth determining unit, configured to determine a second analysis mode as the target analysis mode when the first target quantity and the second target quantity satisfy a fourth predetermined condition, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image; a sixth determining unit, configured to determine a third analysis mode as the target analysis mode when the first target quantity and the second target quantity satisfy a fourth predetermined condition, wherein the second analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image; a sixth determining unit, configured to determine a third analysis mode as the target analysis mode when the first target quantity is determined to be equal to a first predetermined value, wherein the third analysis mode is used to indicate a mode for analyzing the attributes of the first type of object included in the image; a sixth determining unit, configured to determine a third analysis mode as the target analysis mode when the first target quantity is determined to be equal to a second ... A seventh determining unit is configured to determine a third analysis mode as the target analysis mode when the first target quantity and the second target quantity satisfy a fifth predetermined condition, wherein the third analysis mode is used to indicate a mode for analyzing the attributes of a second type of object included in the image; a seventh determining unit is configured to determine a first analysis mode as the target analysis mode when both the first target quantity and the second target quantity are less than a first preset threshold, wherein the first analysis mode is used to indicate a mode for analyzing whether there are objects of the same type as the target objects in the image entering the target area; an eighth determining unit is configured to determine a fourth analysis mode as the target analysis mode when both the first target quantity and the second target quantity are greater than a second preset threshold, and the first target quantity and the second target quantity satisfy a sixth predetermined condition, wherein the fourth analysis mode is used to indicate a mode for analyzing the attributes of target objects included in the image, wherein the target objects include the first type of object and the second type of object.
[0090] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0091] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0092] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0093] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0094] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0095] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0096] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of determining an analysis mode, characterized by, The method comprises: detecting target image frames included in continuous multiple image frames to obtain a detection result, wherein the continuous multiple image frames are images obtained by a target camera device capturing a target region within a predetermined period of time and transmitted to a target backend, and the target image frames are image frames included in the continuous multiple image frames except for a first frame image; determining a target analysis mode based on the detection result, wherein the target analysis mode is used to indicate an image analysis mode adopted by the target backend when analyzing image frames after the continuous multiple image frames; wherein determining the target analysis mode based on the detection result comprises determining the target analysis mode based on a first proportion included in the detection result or the first proportion and a second proportion, wherein the first proportion is used to indicate an average value of a motion proportion of each sub-image frame included in the target image frame relative to a previous frame image, the previous frame image is used to indicate an image of a previous frame of each sub-image frame, the motion proportion is used to indicate a proportion of an image region changed relative to the previous frame image in each sub-image frame, and the second proportion is used to indicate an average value of a proportion of a target object contained in each sub-image frame included in the target image frame in each sub-image frame.
2. The method of claim 1, wherein: determining the target analysis mode based on the first proportion included in the detection result comprises, in a case where it is determined that the first proportion satisfies a first predetermined condition, determining a first analysis mode as the target analysis mode, wherein the first analysis mode is used to indicate a mode of analyzing whether an object of a same type as a target object enters the target region in an image; or, determining the target analysis mode based on the first proportion and the second proportion included in the detection result comprises determining the target analysis mode based on the first proportion, the second proportion, and a current analysis mode, wherein the current analysis mode is used to indicate an image analysis mode adopted by the target backend when analyzing the target image frame.
3. The method of claim 2, wherein, determining the target analysis mode based on the first proportion, the second proportion, and the current analysis mode comprises at least one of: in a case where it is determined that the current analysis mode is a second analysis mode and a second predetermined condition is satisfied between the first proportion and the second proportion, determining a third analysis mode as the target analysis mode, wherein the second analysis mode is used to indicate a mode of analyzing a property of a first type object included in an image, and the third analysis mode is used to indicate a mode of analyzing a property of a second type object included in an image, and the target object includes the first type object and / or the second type object; In a case where it is determined that the current analysis mode is a second analysis mode, and a third predetermined condition is met between the first proportion and the second proportion, the second analysis mode is determined as the target analysis mode, wherein the second analysis mode is used to indicate a mode of analyzing a property of a first type of object included in an image, and the target object includes the first type of object.
4. The method of claim 1, wherein, detecting a target image frame included in the continuous multiple image frames to obtain a detection result, comprising: detecting, by using a motion detection algorithm, an image region of each of the sub-image frames that changes relative to the previous image frame; determining a motion proportion corresponding to each of the sub-image frames as a ratio of the changed image region to a total region included in the sub-image frame; and determining the first proportion based on the motion proportion corresponding to each of the sub-image frames. and / or, detecting the target object included in each of the sub-image frames to obtain a target detection frame; determining a size proportion corresponding to each of the sub-image frames as a ratio of a size of the target detection frame to a size of the sub-image frame; and determining the second proportion based on the size proportion corresponding to each of the sub-image frames.
5. The method according to any one of claims 1-4, characterized in that, determining a target analysis mode based on the detection result, comprising: determining the target analysis mode based on a first target quantity and / or a second target quantity included in the detection result, wherein the first target quantity is used to indicate a quantity of a first type of object included in the continuous multiple image frames, and the second target quantity is used to indicate a quantity of a second type of object included in the continuous multiple image frames.
6. The method of claim 5, wherein: determining the target analysis mode based on the first target quantity included in the detection result, comprising: in a case where it is determined that the first target quantity is equal to a first predetermined value, determining a third analysis mode as the target analysis mode, wherein the third analysis mode is used to indicate a mode of analyzing a property of the second type of object included in an image; or, determining the target analysis mode based on the second target quantity included in the detection result, comprising: in a case where it is determined that the second target quantity is equal to a second predetermined value, determining a second analysis mode as the target analysis mode, wherein the second analysis mode is used to indicate a mode of analyzing a property of a first type of object included in an image; or, determining the target analysis mode based on the first target quantity and the second target quantity included in the detection result, comprising at least one of the following: in a case where it is determined that a fourth predetermined condition is met between the first target quantity and the second target quantity, determining a second analysis mode as the target analysis mode, wherein the second analysis mode is used to indicate a mode of analyzing a property of the first type of object included in an image; determine a third analysis mode as the target analysis mode in a case where it is determined that a fifth predetermined condition is met between the first target quantity and the second target quantity, wherein the third analysis mode is used to indicate a mode of analyzing a property of a second type of object included in the image; determine a first analysis mode as the target analysis mode in a case where it is determined that both the first target quantity and the second target quantity are less than a first preset threshold, wherein the first analysis mode is used to indicate a mode of analyzing whether an object of a same type as the target object enters the target region; determine a fourth analysis mode as the target analysis mode in a case where it is determined that both the first target quantity and the second target quantity are greater than a second preset threshold and a sixth predetermined condition is met between the first target quantity and the second target quantity, wherein the fourth analysis mode is used to indicate a mode of analyzing a property of a target object included in the image, the target object including the first type of object and the second type of object.
7. An analysis mode determining apparatus characterized by comprising: comprise: a detection module, configured to detect a target image frame included in a plurality of continuous images to obtain a detection result, wherein the plurality of continuous images are images obtained by a target camera device capturing a target region within a predetermined period of time and transmitted to a target backend, and the target image frame is an image frame included in the plurality of continuous images other than a first image frame; a determination module, configured to determine a target analysis mode based on the detection result, wherein the target analysis mode is used to indicate an image analysis mode adopted by the target backend when analyzing image frames after the plurality of continuous images; wherein the determination module is further configured to determine the target analysis mode based on a first proportion included in the detection result or the first proportion and a second proportion, wherein the first proportion is used to indicate an average value of a motion proportion of each sub-image frame included in the target image frame with respect to a previous image, the previous image is used to indicate an image of a previous frame of each sub-image frame, the motion proportion is used to indicate a proportion of an image region of each sub-image frame that changes with respect to the previous image in each sub-image frame, and the second proportion is used to indicate an average value of a proportion of a target object included in each sub-image frame in each sub-image frame included in the target image frame.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Video vehicle detection mode selecting method and device
CN101383096A