Camera distribution planning method and device, electronic device and storage medium
By inputting video data into a pre-trained target detection model, extracting target feature data and planning camera distribution, it solves the problem in the existing technology of being unable to efficiently and automatically plan camera distribution, and achieves efficient and accurate monitoring effects.
Patent Information
- Application Number
- CN202411015000.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology cannot efficiently and automatically plan camera distribution and lacks data support, resulting in low monitoring efficiency and accuracy.
By inputting the video data of the preset area into the pre-trained target detection model, extracting target feature data, determining the camera distribution planning strategy based on these data, and planning the camera installation location, monitoring range and angle according to the strategy, using the improved YOLOv4 model Perform image preprocessing and feature extraction to achieve automated planning.
It achieves efficient automatic planning of camera distribution, improves monitoring efficiency and accuracy, adapts to dynamic changes in targets within the real-time monitoring area, and enhances security management capabilities.
Smart Images

Figure CN118537810A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a camera distribution planning method, device, electronic device and storage medium. Background Art
[0002] In today's society, security issues are increasingly attracting people's attention. In order to protect people's lives and property, video surveillance technology has come into being. By installing cameras and monitoring specific areas in real time, video surveillance systems can provide all-weather monitoring and recording functions, and can promptly detect and respond to potential security threats. Whether in public places, enterprises, residential areas or transportation, video surveillance has become an indispensable means of security.
[0003] Video surveillance technology has been widely used in various fields, including public safety, traffic management, and enterprise monitoring. Video surveillance systems can not only provide real-time monitoring and video playback functions, but also realize advanced functions such as face recognition and vehicle recognition through intelligent analysis algorithms. According to factors such as monitoring targets and monitoring ranges, reasonable planning of cameras can achieve effective monitoring and security management of target areas. When planning cameras, it is necessary to consider the monitored areas and targets, such as personnel, vehicles, and equipment. At present, customers often rely on experience to plan camera distribution, lacking data support.
[0004] There is currently no effective solution to the problem that related technologies cannot efficiently and automatically plan camera distribution. Summary of the invention
[0005] In this embodiment, a camera distribution planning method, device, electronic device and storage medium are provided to solve the problem in the related art that camera distribution cannot be planned efficiently and automatically.
[0006] In a first aspect, a camera distribution planning method is provided in this embodiment, including: Inputting the video data to be detected for the preset area into the pre-trained target detection model to obtain target feature data; Determine the distribution planning strategy of the cameras based on the target feature data; Plan the distribution of cameras in the preset area according to the camera distribution planning strategy.
[0007] In some embodiments, before inputting the video data to be detected for the preset area into the pre-trained target detection model to obtain the target feature data, the method further includes: Obtaining original video data within a preset area; The original video data is frame sampled according to a preset time period to obtain sampled video data.
[0008] In some of the embodiments, frame sampling is performed on the original video data according to a preset time period to obtain the video data to be detected, including: Performing color, contrast and color distribution standardization processing on the sampled video data to obtain standardized sampled video data; Performing image preprocessing on each video frame in the standardized sampled video data to obtain preprocessed video data; The preprocessed video data is enhanced to obtain the video data to be detected.
[0009] In some of the embodiments, the target detection model is constructed based on the YOLOv4 model; wherein the spatial pyramid pooling structure in the YOLOv4 model is composed of three sizes of hole convolutions, and the network width in the YOLOv4 model is a widened width.
[0010] In some of the embodiments, the YOLOv4 model uses an attention mechanism combined with a model compression module to replace ordinary convolutions in the YOLOv4 model.
[0011] In some of the embodiments, the distribution planning strategy of the cameras includes the installation location, monitoring range and monitoring angle of the cameras.
[0012] In some of the embodiments, the planned camera distribution information is visualized.
[0013] In a second aspect, a camera distribution planning device is provided in this embodiment, including: a feature extraction module, a strategy module and a distribution module, wherein: A feature extraction module is used to input the video data to be detected for a preset area into a pre-trained target detection model to obtain target feature data; A strategy module is used to determine the distribution planning strategy of the camera according to the target feature data; The distribution module is used to plan the distribution of cameras in a preset area according to the distribution planning strategy of the cameras.
[0014] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the camera distribution planning method described in the first aspect when executing the computer program.
[0015] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the camera distribution planning method described in the first aspect is implemented.
[0016] Compared with the related art, the camera distribution planning method provided in this embodiment obtains target feature data by inputting the video data to be detected for a preset area into a pre-trained target detection model; determines the camera distribution planning strategy according to the target feature data; and plans the camera distribution for the preset area according to the camera distribution planning strategy, thereby solving the problem of being unable to efficiently and automatically plan the camera distribution and realizing efficient and automatic planning of the camera distribution.
[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 This is a hardware structure block diagram of the terminal of the camera distribution planning method of this embodiment.
[0019] Figure 2 4 is a flow chart of the camera distribution planning method of this embodiment.
[0020] Figure 3 It is a flowchart of another camera distribution planning method of this embodiment.
[0021] Figure 4 It is a structural block diagram of the camera distribution planning device of this embodiment. DETAILED DESCRIPTION
[0022] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0023] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0024] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the camera distribution planning method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the camera distribution planning method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0026] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a camera distribution planning method is provided. Figure 2 is a flow chart of the camera distribution planning method of this embodiment. Figure 2 As shown, the process includes the following steps: Step S201: input the video data to be detected for a preset area into a pre-trained target detection model to obtain target feature data.
[0028] Specifically, in the field of video surveillance and security, real-time and accurate detection of abnormal behavior or specific targets in a preset area is a crucial task. Traditional video surveillance methods often rely on manual monitoring, which is inefficient and prone to missed detections. In order to solve this problem, this application adopts a target detection model based on deep learning. By pre-training the model, it can automatically extract target feature data from the video data to be detected, thereby realizing fast and accurate detection of targets in a preset area.
[0029] First, the video data to be detected is obtained from a preset area, where the preset area is the area where camera distribution planning is required. The video data to be detected contains the target object to be detected. The video data to be detected is input into a pre-trained target detection model to obtain the target feature data of the target object. The target feature data can be information such as the distribution location, flow, speed, and regularity of occurrence of pedestrians or vehicles.
[0030] Step S202, determining the distribution planning strategy of the cameras according to the target feature data.
[0031] Specifically, in a video surveillance system, the rationality of camera distribution is directly related to the efficiency and accuracy of monitoring. Traditional camera layouts are often based on fixed rules and manual experience, and are difficult to adapt to the dynamic changes of targets (such as pedestrians and vehicles) in the real-time monitoring area. Based on the obtained target feature data, including but not limited to the distribution, movement trajectory, and frequency of appearance of pedestrians or vehicles, combined with the location and parameter settings of existing cameras, the distribution of cameras is dynamically planned.
[0032] Specifically, the system first analyzes the distribution of pedestrians or vehicles in the monitoring area, including their density, movement patterns, etc. Based on this information, the system can determine which areas are the main activity areas of pedestrians or vehicles and which areas are potential risk areas. For the main activity areas of pedestrians, the system can plan to increase the number and distribution of face recognition cameras. Face recognition cameras have the characteristics of high definition and high recognition rate, which can accurately identify the facial features of pedestrians and provide strong support for subsequent pedestrian tracking and behavior analysis. By reasonably arranging face recognition cameras in areas with large pedestrian flow, the monitoring efficiency and accuracy of the system can be greatly improved. For the main activity areas of vehicles, the system can plan to increase the number and distribution of vehicle monitoring cameras. Vehicle monitoring cameras usually have a large field of view and high image resolution, which can clearly capture key information such as the vehicle's driving trajectory and license plate number. By reasonably arranging vehicle monitoring cameras in areas such as traffic arteries and parking lots, the driving status of vehicles can be monitored in real time, abnormal situations can be discovered in time, and strong guarantees can be provided for traffic management and vehicle safety. In addition to determining the type and number of cameras that need to be added, the system can also adjust the parameter settings of the cameras according to the target feature data. For example, according to the target's movement trajectory and speed, the camera's focal length, aperture and other parameters can be adjusted to obtain a clearer monitoring image; according to the target's appearance frequency and regularity, the camera's shooting time and storage strategy can be adjusted to save storage space and improve data processing efficiency.
[0033] The type, quantity and corresponding parameter settings of the cameras are determined according to the target feature data, and the distribution planning strategy of the cameras is generated.
[0034] Step S203, planning the distribution of cameras in a preset area according to the distribution planning strategy of cameras.
[0035] Specifically, according to the generated camera distribution planning strategy and the needs of the preset area, select the appropriate camera type (such as face recognition camera, vehicle monitoring camera, etc.), and determine the number of cameras, specific installation locations and parameter settings according to the camera distribution planning strategy. If it is found that the monitoring effect of the preset area is not ideal, the system can automatically adjust the distribution location and parameter settings of the camera to improve the monitoring effect. At the same time, the system can also be flexibly expanded and adjusted according to the actual situation of the monitoring area and user needs to meet the monitoring needs in different scenarios.
[0036] Through the above steps S201 to S203, the video data to be detected for the preset area is input into the pre-trained target detection model to obtain target feature data; the distribution planning strategy of the camera is determined according to the target feature data; and the distribution of the camera is planned for the preset area according to the distribution planning strategy of the camera. Compared with the prior art in which the customer relies on experience to plan the distribution of cameras, the present application detects the video data to be detected through a pre-trained target detection model to obtain target feature data, and plans the distribution of cameras according to the target feature data, thereby arranging the types and data of cameras in the preset area, solving the problem that the camera distribution cannot be planned efficiently and automatically due to the lack of data support.
[0037] In some of the embodiments, before inputting the video data to be detected for a preset area into a pre-trained target detection model to obtain target feature data, it also includes: acquiring original video data in the preset area; performing frame sampling on the original video data according to a preset time period to obtain sampled video data.
[0038] Specifically, the original video data of the area where camera distribution planning is required is collected, wherein the original video data can be a real-time video stream captured by different cameras or a recorded video file, specifically including real-scene video, traffic data, geographic data, etc.
[0039] The original video data is frame sampled according to a preset time period or a certain frame interval to reduce the amount of data and improve processing efficiency, thereby obtaining sampled video data. The frame sampling method can also adopt adaptive sampling or key frame sampling.
[0040] In another embodiment, frame sampling is performed on the original video data according to a preset time period to obtain video data to be detected, including: performing color, contrast and color distribution standardization processing on the sampled video data to obtain standardized sampled video data; performing image preprocessing on each video frame in the standardized sampled video data to obtain preprocessed video data; and performing enhancement processing on the preprocessed video data to obtain video data to be detected.
[0041] Specifically, the sampled video data is obtained by frame sampling, and the color, contrast and color distribution of the sampled video data are standardized to obtain standardized sampled video data. The visibility of the video under different lighting conditions is ensured by automatically adjusting the brightness, contrast and saturation, and the color, contrast and color distribution of the video are adjusted to a preset standard or specification so that it has similar brightness, contrast and color distribution. After the video data is standardized, each video frame in the data video is subjected to image preprocessing to obtain preprocessed video data, including denoising, sharpening, edge detection, etc., so as to improve the clarity of the image, and the image of each video frame is subjected to contrast enhancement, brightness enhancement, and color balance adjustment to highlight key information in the video, such as faces, vehicles, etc., for subsequent detection and recognition. Finally, the preprocessed video data is enhanced to expand the sample data volume, thereby increasing the robustness and generalization ability of the model, and obtaining the video data to be detected.
[0042] In another embodiment, the target detection model is constructed based on the YOLOv4 model; wherein the spatial pyramid pooling structure in the YOLOv4 model is composed of three sizes of dilated convolutions, and the network width in the YOLOv4 model is a widened width. wherein the YOLOv4 model uses an attention mechanism combined with a model compression module to replace the ordinary convolution in the YOLOv4 model.
[0043] Specifically, target detection is a crucial part of planning camera distribution. It can identify and track targets of interest and reduce monitoring of irrelevant areas. Current target detection can be divided into two categories: target detection based on traditional algorithms and target detection based on deep learning. Traditional target detection methods mainly use manually designed features and machine learning algorithms for target detection, such as Haar features (Haar features for short) and Histogram of Oriented Gradient (HOG features for short) combined with Support Vector Machine (SVM) methods. These methods perform well in some simple scenarios, but their performance in complex scenarios is limited. Landmark detection based on deep learning uses a deep neural network model to automatically detect and locate targets in images or videos. Convolutional Neural Network (CNN) is usually used as the basic model, and different technologies and architectures are combined for detection. It can identify and locate multiple targets in the video and classify them into different categories.
[0044] Detection algorithms based on deep learning can be divided into two-stage algorithms and single-stage algorithms. The two-stage method first generates candidate target areas, and then classifies and locates each candidate area. It usually has higher detection accuracy, but slower speed. The single-stage method directly predicts the category and position of the target in the image without generating candidate areas. It has faster speed but lower accuracy. Common single-stage methods include YOLO and SSD. There is a problem that it is difficult to balance speed and accuracy in the two-stage algorithm and the single-stage algorithm. This embodiment uses an improved YOLOv4 model as the target detection model to solve the problem that it is difficult to balance speed and accuracy during the detection process.
[0045] Specifically, first, Darknet-53 is used as the backbone network to extract high-level semantic features from the input video data. For example, after the input is an RGB three-channel image, convolution conv1 is first performed to output 32 channels, the convolution kernel is 3×3, the stride is 1, and the padding is 1), and a feature map with 32 channels is obtained. Then convolution conv2=conv(32, 64, 3, 2, 1) is performed to output a 64-channel feature map.
[0046] Secondly, in the spatial pyramid pooling structure (SPP structure) of YOLOv4, the traditional maximum pooling operation is used to construct a spatial pyramid to capture features of different scales. In order to further improve the model's perception of multi-scale targets, especially for targets with large scale changes such as pedestrians and vehicles, the SPP structure in the YOLOv4 model is improved, and three sizes of dilated convolutions are used to obtain the perception information of pedestrians and vehicles of different scales. That is, according to the different distances between two adjacent weights in the convolution kernel, the dilated convolution layer is constructed with three different dilation rates of 2, 8, and 16. For example, a smaller dilation rate (such as 2) can capture local detail information, while a larger dilation rate (such as 8 or 16) can capture more extensive contextual information. These hole convolution layers of different sizes will run in parallel, and then their output feature maps will be fused to generate a feature representation containing multi-scale information, thereby obtaining pedestrian and vehicle perception information of different scales; the network width in the original YOLOv4 model will be widened so that the network can extract multi-scale features of pedestrians and vehicles, solving the problem of low detection accuracy caused by scale changes, especially in dense scenes, when pedestrians and vehicles occlude or overlap each other, further improving the problem of low detection accuracy of dense pedestrians due to multi-scale phenomena.
[0047] Finally, in the middle network layer, the YOLOv4 model uses the attention mechanism (ETA) combined with the model compression module (Ghost) to replace the ordinary convolution in the YOLOv4 model. The Ghost module is a lightweight network structure based on the assumption that not all feature maps need to be generated through complex convolution operations. The Ghost module generates more feature maps from the original feature map through a set of simple linear transformations (such as deep separable convolutions), thereby obtaining rich feature representations at a low computational cost. The ETA attention mechanism is a self-attention method that focuses on improving model efficiency and performance. It helps the model focus on more important information by learning the importance of each feature channel and weighting the feature map accordingly. In this embodiment, by fusing the ETA attention mechanism with the Ghost module, a part of the main feature map is first generated through a conventional convolution operation, and then the remaining "Ghost feature map" is generated from the main feature map using linear transformations such as deep separable convolutions of the Ghost module. These Ghost feature maps are similar in structure to the main feature maps, but contain different information. After the Ghost feature map is generated, the ETA attention mechanism is introduced. The mechanism evaluates the importance of each feature channel and generates corresponding weights, and then applies these weights to the feature map to achieve feature re-weighting. Finally, the main feature map and the Ghost feature map processed by the ETA attention mechanism are fused to generate the final output feature map. The fusion method of this embodiment not only retains the richness of the original feature map, but also reduces the number of parameters and computational cost of the model through the Ghost module and the ETA attention mechanism, thereby improving the calculation speed.
[0048] Among them, when Ghost is calculating, the input data X is: (1) Where c is the number of input channels, h is the length of the input data, and w is the width of the input data; Input Data f for: (2) Among them, k is the convolution kernel size, m is the number of convolution kernels in the standard convolution part; The formula for obtaining the feature map is: (3) in, is the output feature map, is the length of the output feature map, is the width of the output feature map, and b is the bias.
[0049] The feature map obtained by linear operation is: (4) Among them, is the i-th feature map in y, is the j-th linear operation on the -th feature map to obtain the -th feature map. When j = s, the -th feature map is obtained, and the number of channels of the convolution remains the same.
[0050] The floating-point operation amount by this method is: (5) Among them, Q1 is the previous floating-point operation amount, Q2 is the current floating-point operation amount, s is the number of linear operations, d × d is the kernel size of the linear operation, and its magnitude is similar to that of k×k; The theoretical speedup ratio is obtained as: (6) Among them, c is the number of input channels; When s << c: (7) It can be seen that when d×d = k×k, the speed of using the Ghost module is s times faster than that of the original YOLOv4 model.
[0051] In another embodiment, the distribution planning strategy of the cameras includes the installation positions, monitoring ranges, and monitoring angles of the cameras.
[0052] Specifically, information such as the distribution, flow rate, and speed of pedestrians and vehicles is obtained based on the results of scene analysis and feature extraction, and combined with preset rules and strategies to make planning decisions for the cameras. This includes information such as the installation positions, monitoring ranges, and monitoring angles of the cameras to optimally meet the monitoring requirements and target requirements. For example, face recognition cameras can be added in crowded areas, and vehicle recognition cameras can be added in areas with more vehicles such as road intersections.
[0053] In one of the embodiments, the planned camera distribution information is visually displayed.
[0054] Specifically, the results of camera planning decisions are visualized, and relevant reports and statistical information are generated. The layout and monitoring effects of cameras are displayed in an intuitive and easy-to-understand form, which is convenient for users to view and analyze. Among them, it includes layout display, based on a map or floor plan, marking the location, direction and coverage of each camera; distinguishing different monitoring areas by color or pattern, and showing the overlapping coverage and blind spots of cameras; simulating the monitoring effects of cameras at different times and weather conditions, such as night vision mode at night, clarity on rainy days, etc.; highlighting important areas (such as entrances, exits, storage areas for valuables, etc.) to emphasize their importance of monitoring; for complex environments or scenes that require more detailed display, 3D modeling software (such as SketchUp, Blender) can be used for modeling and rendering. The report content includes camera distribution map, monitoring effect map, key area analysis, blind spot analysis, etc.; statistical information can be the number of statistical cameras, model distribution, coverage, etc., and generate corresponding charts or tables.
[0055] This embodiment also provides a camera distribution planning method. Figure 3 is a flow chart of another camera distribution planning method of this embodiment. Figure 3 As shown, the process includes the following steps: Step S301, obtaining original video data in a preset area, and performing frame sampling on the original video data according to a preset time period to obtain sampled video data; Step S302, performing color, contrast and color distribution standardization processing on the sampled video data to obtain standardized sampled video data; Step S303, performing image preprocessing on each video frame in the standardized sampled video data to obtain preprocessed video data; Step S304, performing enhancement processing on the pre-processed video data to obtain the video data to be detected; Step S305, inputting the video data to be detected into the pre-trained YOLOv4 model to obtain target feature data; wherein the spatial pyramid pooling structure in the YOLOv4 model is composed of three sizes of dilated convolutions, the network width in the YOLOv4 model is the width after widening processing, and the ordinary convolution in the YOLOv4 model is an attention mechanism combined with a model compression module; Step S306, determining a distribution planning strategy of cameras according to the target feature data; Step S307, planning the distribution of cameras in the preset area according to the distribution planning strategy of cameras; Step S308: Visually display the planned camera distribution information.
[0056] Through the above steps S301 to S308, the collected video data is first subjected to frame sampling and image preprocessing to obtain the video data to be detected, the video data to be processed is reduced to improve the processing efficiency, and the video data to be detected is input into the improved YOLOv4 model, wherein the improvement of the SPP structure in the YOLOv4 model includes: using three sizes of hole convolutions and widening the network width. Then the Ghost module is fused with the ETA attention mechanism to replace the original ordinary convolution to obtain the improved YOLOv4 model. By improving the YOLOv4 model, more feature maps are generated with a smaller amount of parameters to improve the detection efficiency. The video data to be detected is input into the improved YOLOv4 algorithm to obtain the target feature data, the camera distribution planning strategy is designed according to the target feature data, the distribution is visualized according to the camera distribution planning strategy, and statistical information is generated, which solves the problem that the current camera distribution cannot be efficiently and automatically planned.
[0057] In this embodiment, a camera distribution planning device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0058] Figure 4 is a structural block diagram of the camera distribution planning device of this embodiment, such as Figure 4 As shown, the device 40 includes: a video acquisition module 41, a standardization processing module 42, an image preprocessing module 43, a feature extraction module 44, a strategy module 45, a distribution module 46 and a visualization module 47, wherein: The video acquisition module 41 is used to obtain the original video data in the preset area; perform frame sampling on the original video data according to the preset time period to obtain the sampled video data; A data standardization processing module 42 is used to perform color, contrast and color distribution standardization processing on the sampled video data to obtain standardized sampled video data; An image preprocessing module 43 is used to perform image preprocessing on each video frame in the standardized sampled video data to obtain preprocessed video data, and to perform enhancement processing on the preprocessed video data to obtain video data to be detected; A feature extraction module 44 is used to input the video data to be detected for a preset area into a pre-trained target detection model to obtain target feature data; A strategy module 45, used to determine the distribution planning strategy of the camera according to the target feature data; A distribution module 46, used to plan the distribution of cameras in a preset area according to the distribution planning strategy of the cameras; The visualization module 47 is used to visualize the planned camera distribution information.
[0059] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0060] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0061] Optionally, 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.
[0062] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, inputting the video data to be detected for the preset area into the pre-trained target detection model to obtain target feature data; S2, determining the distribution planning strategy of the camera according to the target feature data; S3, planning the distribution of cameras in a preset area according to the distribution planning strategy of cameras.
[0063] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0064] In addition, in combination with the camera distribution planning method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the camera distribution planning method. The storage medium stores a computer program; when the computer program is executed by a processor, any camera distribution planning method in the above embodiments is implemented.
[0065] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0066] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0067] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0068] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0069] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0070] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A camera distribution planning method, It is characterized in that include: Inputting the video data to be detected for the preset area into the pre-trained target detection model to obtain target feature data; Determining a distribution planning strategy of the cameras according to the target feature data; The camera distribution is planned for the preset area according to the camera distribution planning strategy.
2. The camera distribution planning method according to claim 1, It is characterized in that Before inputting the video data to be detected for the preset area into the pre-trained target detection model to obtain target feature data, the method further includes: Obtaining original video data within a preset area; The original video data is frame sampled according to a preset time period to obtain sampled video data.
3. The camera distribution planning method according to claim 2, It is characterized in that The performing frame sampling on the original video data according to a preset time period to obtain the video data to be detected includes: Performing color, contrast and color distribution standardization processing on the sampled video data to obtain standardized sampled video data; Performing image preprocessing on each video frame in the standardized sampled video data to obtain preprocessed video data; The preprocessed video data is enhanced to obtain the video data to be detected.
4. The camera distribution planning method according to claim 1, It is characterized in that The target detection model is constructed based on the YOLOv4 model; wherein the spatial pyramid pooling structure in the YOLOv4 model is composed of three sizes of hole convolutions, and the network width in the YOLOv4 model is a widened width.
5. The camera distribution planning method according to claim 4, It is characterized in that The YOLOv4 model uses an attention mechanism combined with a model compression module to replace the ordinary convolution in the YOLOv4 model.
6. The camera distribution planning method according to claim 1, It is characterized in that The distribution planning strategy of the cameras includes the installation location, monitoring range and monitoring angle of the cameras.
7. The camera distribution planning method according to claim 1, It is characterized in that The method further comprises: Visualize the planned camera distribution information.
8. A camera distribution planning device, It is characterized in that include: Feature extraction module, strategy module and distribution module, where: The feature extraction module is used to input the video data to be detected for the preset area into the pre-trained target detection model to obtain target feature data; The strategy module is used to determine the distribution planning strategy of the camera according to the target feature data; The distribution module is used to plan the distribution of cameras in the preset area according to the distribution planning strategy of the cameras.
9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to execute the camera distribution planning method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the camera distribution planning method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Traffic flow information monitoring equipment setting method and system
CN106816010A
Target detection method
CN115019148A
Pedestrian trajectory analysis method and system, image acquisition device, equipment and medium
CN115761634A
Visual field determination method and device of high point monitoring equipment, electronic equipment and system
CN117176918A
Cruising method, device and system of pan-tilt camera, electronic equipment and storage medium
CN117294944A
Cited By
Calibration method and device of camera deployed and controlled by AI algorithm, and storage medium
CN119922408A
