Regional occupancy analysis method and device, storage medium, and computer equipment
Through image collection and grid segmentation of the vehicle occupancy area, combined with the neural network model for analysis, the inefficiency problem of vehicle occupancy analysis in the existing technology is solved, and real-time and accurate response of traffic management is achieved.
Patent Information
- Application Number
- CN202010628775.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-02
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-07-02
AI Technical Summary
Existing technology cannot efficiently analyze vehicle occupancy, resulting in difficult traffic management and delayed response to road congestion.
By collecting images of the area to be analyzed, identifying the target area and performing grid segmentation, the classification network and probabilistic fusion model are used to determine the area occupancy, and the target detection and result fusion models are combined to improve the accuracy and automation of the analysis results.
It achieves real-time, accurate and efficient analysis of vehicle occupancy, automatically detects congestion, reduces human misjudgment, and improves the response speed and accuracy of traffic management.
Smart Images

Figure CN114092891B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image analysis, and in particular to a method and device for analyzing area occupancy, a storage medium, and a computer device. Background Art
[0002] With the development of transportation, cars and other means of transportation play an increasingly important role in our daily travel and transportation industry. However, the increase in the number of means of transportation has also brought about problems such as difficulties in traffic management and traffic congestion caused by car parking.
[0003] Traditionally, we can use surveillance cameras to record the traffic conditions of a road or area. To determine whether the road or area is actually occupied, we need to manually analyze the captured video, which is a lot of work and cannot detect congestion and respond in time. Summary of the invention
[0004] The technical problem solved by the present invention is how to efficiently analyze the occupancy situation of a certain area.
[0005] To solve the above technical problems, an embodiment of the present invention provides a method for analyzing area occupancy, the method comprising: acquiring an initial image by performing image acquisition on the area to be analyzed, and identifying a target area corresponding to the area to be analyzed from the initial image; dividing the target area into a plurality of target grids, and obtaining the occupancy status of each target grid; comprehensively analyzing the occupancy status of the plurality of target grids in the target area to determine whether the area to be analyzed is occupied, and recording the determination result as a first analysis result.
[0006] Optionally, dividing the target area into a plurality of target grids includes: evenly dividing each side of the target area to obtain a plurality of initial grids; and performing distortion correction on each initial grid to obtain a target grid corresponding to each initial grid.
[0007] Optionally, the performing distortion correction on each initial grid includes: acquiring viewing angle information of capturing the initial image, and restoring a top view effect on each initial grid according to the viewing angle information.
[0008] Optionally, obtaining the occupancy status of each target grid includes: inputting each target grid into a classification network, and obtaining the occupancy status of each target grid through the classification network; wherein the classification network is a neural network model obtained by performing big data training using annotated area images as training samples.
[0009] Optionally, the comprehensive occupancy status of several target grids in the target area to determine whether the area to be analyzed is occupied includes: inputting the occupancy status of each target grid into a probability fusion model, and determining whether the area to be analyzed is occupied based on the probability fusion model; wherein the probability fusion model is a neural network model obtained by big data training using multiple area images, several training grids contained in each area image, the occupancy status of each grid, and occupancy determination results of multiple area images as training samples.
[0010] Optionally, after identifying the target area corresponding to the area to be analyzed from the initial image, it also includes: performing target detection on the target area to determine whether the area to be analyzed is occupied by the target, and recording the determination result as a second analysis result; after obtaining the first analysis result and the second analysis result, it also includes: determining whether the area to be analyzed is occupied based on the first analysis result and the second analysis result.
[0011] Optionally, judging whether the area to be analyzed is occupied based on the first analysis result and the second analysis result includes: inputting the first analysis result and the second analysis result into a result fusion model, and judging whether the area to be analyzed is occupied based on the result fusion model; wherein the result fusion model is a neural network model obtained by performing big data training using detection analysis results of target detection on multiple area images and probability analysis results obtained by a probability fusion model on multiple area images as training samples.
[0012] Optionally, judging whether the area to be analyzed is occupied according to the result fusion model includes: calculating a probability that the area to be analyzed is occupied according to the result fusion model; when the probability that the area to be analyzed is occupied is greater than a preset value, the area to be analyzed is occupied.
[0013] An embodiment of the present invention also provides an area occupancy analysis device, which includes: an image acquisition module, used to acquire an initial image by performing image acquisition on the area to be analyzed, and identify a target area corresponding to the area to be analyzed from the initial image; a grid segmentation module, used to segment the target area into a plurality of target grids, and obtain the occupancy status of each target grid; a first occupancy analysis module, used to comprehensively analyze the occupancy status of the plurality of target grids in the target area to determine whether the area to be analyzed is occupied, and record the determination result as a first analysis result.
[0014] An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned area occupancy analysis method are implemented.
[0015] An embodiment of the present invention further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned area occupancy analysis method when executing the computer program.
[0016] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:
[0017] The embodiment of the present invention provides an analysis method for area occupancy, comprising: acquiring an initial image by performing image acquisition on an area to be analyzed, identifying a target area corresponding to the area to be analyzed from the initial image; segmenting the target area to obtain a plurality of target grids, and acquiring the occupancy status of each target grid; comprehensively analyzing the occupancy status of the plurality of target grids in the target area to determine whether the area to be analyzed is occupied, and recording the determination result as a first analysis result. Compared with the prior art, in the scheme of the present invention, image acquisition is performed on the area to be analyzed to obtain the real-time occupancy status of the area to be analyzed based on the acquired initial image. When performing occupancy analysis on the area to be analyzed, the target area corresponding to the area to be analyzed in the initial image may be grid segmented, and the occupancy analysis may be performed on the plurality of segmented target grids respectively, thereby improving the accuracy of the analysis result on the occupancy status of the target area, so as to automatically and efficiently perform congestion detection on the target area.
[0018] Furthermore, by performing distortion correction on the initial grids obtained by each segmentation, the viewing angle information in the initial image can be filtered out, and the degree of information analysis during the occupancy analysis of each target grid can be improved, thereby improving the accuracy of the analysis result.
[0019] Furthermore, the classification network obtained through big data training obtains the occupancy status of each grid, which can integrate the occupancy status reflected in the real collected regional images and accurately analyze the input target grid.
[0020] Furthermore, the occupancy of multiple grids in the actual area and the actual occupancy of the actual area are used as training samples, and big data training is performed to obtain a probabilistic fusion model, which can accurately analyze the relationship between the grid occupancy of a certain area and its overall occupancy.
[0021] Furthermore, target detection is supplemented to determine the actual occupied targets in the area to be analyzed, so as to accurately calculate the occupancy of the area to be analyzed by combining the actual size and dimensions of the target, thereby avoiding the influence of the distance between the target and the collected lens on the judgment result, and formulating treatment measures according to the detected target. For example, if the detected target is a vehicle, the vehicle can be removed. In addition, target detection can also eliminate the misjudgment caused by the lens being blocked by stains, haze and other factors. In the actual occupancy determination process, misjudgment due to the above factors may occur. The targets in target detection usually have certain appearance characteristics, which can be distinguished from stains, haze, etc., thereby improving the accuracy of the determination.
[0022] Furthermore, the training samples of the result fusion model should have a certain correlation with the format of the first analysis result and the second analysis result of the area to be analyzed, and the corresponding actual area, so that the trained model can more accurately integrate the situations reflected by the first analysis result and the second analysis result to accurately determine the occupancy of the area to be analyzed. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of a flow chart of a method for analyzing area occupancy according to an embodiment of the present invention;
[0024] Figure 2 A schematic flow chart of another method for analyzing area occupancy according to an embodiment of the present invention;
[0025] Figure 3 It is a structural schematic diagram of a device for analyzing area occupancy according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] As mentioned in the background art, the existing technology cannot efficiently analyze the occupancy status of a certain area.
[0027] To solve this problem, an embodiment of the present invention provides an analysis method for area occupancy, comprising: acquiring an initial image by performing image acquisition on the area to be analyzed, and identifying a target area corresponding to the area to be analyzed from the initial image; dividing the target area into a plurality of target grids, and acquiring the occupancy status of each target grid; comprehensively analyzing the occupancy status of the plurality of target grids in the target area to determine whether the area to be analyzed is occupied, and recording the determination result as a first analysis result.
[0028] Through the above solution, the accuracy of the analysis result of the occupation status of the target area can be improved.
[0029] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0030] See also Figure 1 , an embodiment of the present invention provides a method for analyzing area occupancy, the method comprising:
[0031] Step S101, acquiring an initial image by performing image acquisition on the area to be analyzed, and identifying a target area corresponding to the area to be analyzed from the initial image;
[0032] The area to be analyzed is an area within various physical spaces, for example, it can be an area on a road (such as a road in a logistics park, a fire escape, a corridor between two buildings, etc.), an area in a building, a storage area in a warehouse, etc., and image acquisition equipment can be set inside or around the area to be analyzed. Image acquisition equipment such as a camera and a video camera is used to acquire an image of the area to be analyzed to obtain an initial image of the area to be analyzed. The initial image can be one or more independent images, or it can be multiple images that are continuous in time in a video shot. Among them, the initial image can be a real-time monitoring image of the area to be analyzed.
[0033] The area corresponding to the area to be analyzed in the initial image is the target area to be analyzed for occupancy, that is, the target area is a part of the initial image, i.e., an image area. The target area is identified from the initial image to perform occupancy analysis on it.
[0034] Step S102, dividing the target area corresponding to the area to be analyzed in the initial image into a plurality of target grids, and obtaining the occupancy status of each target grid;
[0035] First, the target area is divided into grids to obtain a number of target grids in the target area, and occupancy analysis is performed on each of the multiple target grids.
[0036] Optionally, the target area may be divided into grids according to a preset grid segmentation method. For example, the target area may be divided according to a certain area to obtain multiple target area grids of the same area; or the target area may be divided according to a certain aspect ratio to obtain a target grid with a fixed aspect ratio.
[0037] It should be noted that the grid segmentation method includes but is not limited to the methods listed above, and any solution for grid segmentation of the target area according to a preset segmentation rule falls within the protection scope of the present invention.
[0038] Optionally, when performing occupancy analysis on each target grid, the recognition model obtained by big data training can be used to identify the occupancy ratio of other objects in each target grid to obtain the occupancy status of the grid.
[0039] The occupancy of each grid can be expressed as the proportion of the grid occupied by other objects. A threshold can also be set to mark the grids whose proportion occupied by other objects exceeds the threshold as occupied grids, and mark other grids as unoccupied grids.
[0040] Step S103, comprehensively analyzing the occupancy status of several target grids in the target area to determine whether the area to be analyzed is occupied, and recording the determination result as the first analysis result.
[0041] After performing occupancy analysis on all target grids in the initial image and obtaining their occupancy status, the occupancy status of some or all of the target grids may be combined to determine whether the area to be analyzed is occupied, thereby obtaining a first analysis result.
[0042] Optionally, if the occupancy of each grid is expressed as the proportion of the grid occupied by other objects, the proportion of the total occupancy of the target area can be calculated to determine whether the area to be analyzed is occupied. If each grid is marked as occupied, the proportion of the occupied grids in the target area to the total grids can be calculated to determine whether the area to be analyzed is occupied.
[0043] In this embodiment, image acquisition is performed on the area to be analyzed to obtain the real-time occupancy status of the area to be analyzed based on the acquired initial image. When performing occupancy analysis on the area to be analyzed, the target area corresponding to the area to be analyzed in the initial image can be grid-segmented, and occupancy analysis is performed on the segmented target grids respectively, thereby improving the accuracy of the analysis result of the occupancy status of the target area, so as to automatically and efficiently perform congestion detection on the target area.
[0044] In one embodiment, Figure 1 In step S102, the target area corresponding to the area to be analyzed in the initial image is divided into a plurality of target grids, which may include: evenly dividing each side of the target area to obtain a plurality of initial grids; and performing distortion correction on each initial grid to obtain a target grid corresponding to each initial grid.
[0045] Each side of a target region including a plurality of sides may be evenly divided, thereby dividing the target region into a plurality of initial grids whose corresponding sides are the same.
[0046] Optionally, the performing distortion correction on each initial grid includes: acquiring viewing angle information of capturing the initial image, and restoring a top view effect on each initial grid according to the viewing angle information.
[0047] It should be noted that the method of correcting the distortion of each initial grid includes but is not limited to top view restoration, and other methods capable of removing the viewing angle information of the shooting, such as reverse projection and multi-angle analysis of the initial image, may also be used.
[0048] In the actual image acquisition process, the target area is usually not its top view, but a projection containing the perspective information, due to the perspective of the acquisition device. The top view of each grid can be restored according to the perspective of the acquisition device to obtain the target grid corresponding to each initial grid, and then the occupancy analysis of each target grid can be performed.
[0049] If the viewing angle information of the initial image cannot be obtained, the viewing angle information of the initial image can be obtained by performing a viewing angle analysis based on the features of the object captured in the initial image. For example, when capturing an image of a rectangular road, if the captured image contains viewing angle information, the rectangular road will usually present a trapezoidal projection in the image due to the viewing angle information, and the intersection of the extension lines of two non-adjacent sides of the trapezoid can correspond to the viewing angle information of the image.
[0050] In this embodiment, the top view restoration is performed on each initial grid obtained by segmentation, which can filter out the viewing angle information in the initial image, improve the information analysis degree during the occupancy analysis of each target grid, and thus improve the accuracy of the analysis result.
[0051] In one embodiment, please continue to see Figure 1 The step S103 of obtaining the occupancy status of each target grid may include: inputting each target grid into a classification network, and obtaining the occupancy status of each target grid through the classification network; wherein the classification network is a neural network model obtained by performing big data training using the annotated regional images as training samples.
[0052] The regional image is an image obtained by collecting and selecting images of one or more real regions. The regional image and the image of the region to be analyzed have associated features (eg, the two can be images of the same type or the same region).
[0053] Optionally, if the regional image contains background or interferences other than the region to be analyzed, the regional image may be identified to eliminate the influence of the background or interferences in the regional image on the training.
[0054] A classification network is obtained by performing big data training using a large number of regional images as training samples.
[0055] Optionally, the classification network can be used to identify whether each input target grid is occupied and calculate the proportion of the occupied area occupying the target grid. The classification network can also directly determine whether each input target grid is occupied.
[0056] Optionally, the classification network may be a binary classifier obtained by a convolutional neural network (CNN).
[0057] Optionally, to ensure that the recognition ability of the classification network is more closely matched to the input grid, the acquired regional image may be processed by the same grid segmentation and / or top view effect restoration as the initial image, and the processed regional image or the multiple grids contained in the regional image may be used as training samples for the classification network. For the classification network, top view restoration of the grid or regional image can avoid waste of receptive field.
[0058] In this embodiment, the classification network obtained through big data training obtains the occupancy status of each grid, and can integrate the occupancy status reflected in the real collected regional images to accurately analyze the input target grid.
[0059] In one embodiment, please continue to see Figure 1 , Figure 1 Step S103 integrates the occupancy status of several target grids in the target area to determine whether the area to be analyzed is occupied, including: inputting the occupancy status of each target grid into a probability fusion model, and determining whether the area to be analyzed is occupied according to the probability fusion model; wherein the probability fusion model is a neural network model obtained by big data training using multiple area images, several training grids contained in each area image, the occupancy status of each grid, and the occupancy determination results of multiple area images as training samples.
[0060] The probabilistic fusion model is a neural network model obtained by big data training, which uses multiple regional images obtained by collecting and selecting images of one or more real areas, multiple training grids obtained by the regional images according to the same grid segmentation method as the target area, and the occupancy results of each training grid as training samples, and takes whether the area reflected by the real marked regional image is occupied as the convergence result.
[0061] Optionally, if the regional image contains background or interference other than the region to be analyzed, the regional image may be identified to eliminate the influence of the background or interference in the regional image on the model training.
[0062] Optionally, top view restoration can be performed on multiple grids after regional image segmentation to eliminate the influence of viewing angle information on model training.
[0063] Optionally, the regional image in this embodiment may be the same as or different from the training image of the classification network.
[0064] In this embodiment, the occupancy of multiple grids in the actual area and the actual occupancy of the actual area are used as training samples, and big data training is performed to obtain a probabilistic fusion model, which can accurately analyze the relationship between the grid occupancy of a certain area and its overall occupancy.
[0065] In one embodiment, please continue to see Figure 1 , Figure 1 After identifying the target area corresponding to the area to be analyzed from the initial image in step S101, the method may also include: performing target detection on the target area to determine whether the area to be analyzed is occupied by the target, and recording the determination result as the second analysis result; after obtaining the first analysis result and the second analysis result, the method may also include: determining whether the area to be analyzed is occupied based on the first analysis result and the second analysis result.
[0066] The target can be any person or object, and the detection target can be set according to the area to be analyzed. For example, for a road, the occupied targets may be vehicles, pedestrians, etc.; for a display area, the occupied targets may be display boards, display stands, etc.; for storage areas such as warehouses, the occupied targets may be goods, trucks, etc.
[0067] Based on the areas to be analyzed in the above-mentioned scenes, a target detection model can be obtained through big data training to perform target detection, and the targets occupying the area to be analyzed (that is, the target area in the image) can be detected as a supplement to the above-mentioned first analysis result.
[0068] In this embodiment, target detection is performed to determine the actual occupied targets in the area to be analyzed, so as to accurately calculate the occupancy of the area to be analyzed by combining the actual size and dimensions of the target, thereby avoiding the influence of the distance between the target and the captured lens on the judgment result, and formulating treatment measures according to the detected target. For example, if the detected target is a vehicle, the vehicle can be removed. In addition, target detection can also eliminate the misjudgment caused by the lens being blocked by stains, haze and other factors. In the actual occupancy determination process, misjudgment due to the above factors may occur. The targets in target detection usually have certain appearance characteristics, which can be distinguished from stains, haze, etc., thereby improving the accuracy of the determination.
[0069] In one embodiment, judging whether the area to be analyzed is occupied based on the first analysis result and the second analysis result includes: inputting the first analysis result and the second analysis result into a result fusion model, and judging whether the area to be analyzed is occupied based on the result fusion model; wherein the result fusion model is a neural network model obtained by big data training using detection analysis results of target detection on multiple area images and probability analysis results obtained by a probability fusion model on multiple area images as training samples.
[0070] When making a comprehensive judgment on the first analysis result and the second analysis result, the judgment result can also be obtained with the help of a result fusion model obtained through big data training.
[0071] The regional image in this embodiment may be the same as or different from the regional image of the above-mentioned probability fusion model and classification network.
[0072] Optionally, if the regional image contains background or interference other than the region to be analyzed, the regional image may be identified to eliminate the influence of the background or interference in the regional image on the model training.
[0073] In this embodiment, the training samples of the result fusion model should have a certain correlation with the format of the first analysis result and the second analysis result of the area to be analyzed, and the corresponding actual area, so that the trained model can more accurately integrate the situations reflected by the first analysis result and the second analysis result to accurately determine the occupancy of the area to be analyzed.
[0074] In one embodiment, judging whether the area to be analyzed is occupied according to the result fusion model includes: calculating the probability of the area to be analyzed being occupied according to the result fusion model; when the probability of the area to be analyzed being occupied is greater than a preset value, the area to be analyzed is occupied.
[0075] Optionally, the determination result of whether the area to be analyzed is occupied output by the result fusion model is output in the form of probability (score or percentage), and a preset value can be set based on experience or experiments to compare whether the probability of occupancy is greater than the preset value to determine whether the area to be analyzed is occupied.
[0076] See also Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a method for analyzing area occupancy in another embodiment of the present invention; the method specifically includes:
[0077] Step S21, acquiring an initial image and identifying a target area;
[0078] Step S22, performing target detection on the target area;
[0079] Step S231, gridding the target area;
[0080] Step S232, performing distortion correction on each of the segmented grids;
[0081] Step S233, inputting each corrected grid into the classification network for analysis to obtain the occupancy status of each grid;
[0082] Step S234, inputting multiple grids of the target area into the probability fusion model to analyze the occupancy of the target area;
[0083] Step S24, inputting the target detection result obtained in step S22 and the occupancy status of the target area obtained in step S234 into the result fusion model for analysis, and comparing the analysis result with a preset threshold to perform threshold determination;
[0084] Step S25, obtaining a comprehensive occupancy result of the target area according to the result of the threshold determination, and outputting the comprehensive occupancy result.
[0085] Optionally, the occupancy results of the target area obtained in each embodiment of the present invention may be used to manage the target area. For example, if it is detected that the occupancy of the target area exceeds a certain proportion, notification information may be sent to other terminals.
[0086] For example, if a road is detected to be occupied, the corresponding personnel can be notified to choose another road to pass through, or to move the occupied objects on the road.
[0087] See also Figure 3 The present invention also provides a device for analyzing area occupancy, which may include:
[0088] An image acquisition module 301 is used to acquire an initial image by performing image acquisition on the area to be analyzed, and identify a target area corresponding to the area to be analyzed from the initial image;
[0089] A grid segmentation module 302 is used to segment the target area into a plurality of target grids and obtain the occupancy status of each target grid;
[0090] The first occupancy analysis module 303 is used to comprehensively analyze the occupancy of several target grids in the target area to determine whether the area to be analyzed is occupied, and record the determination result as the first analysis result. In one embodiment, the grid segmentation module 302 may include:
[0091] A grid division unit, used for evenly dividing each side of the target area to obtain a plurality of initial grids;
[0092] The distortion correction unit is used to perform distortion correction on each initial grid to obtain a target grid corresponding to each initial grid.
[0093] In one embodiment, the distortion correction unit is further used to obtain viewing angle information of the initial image, and restore the top view effect of each initial grid according to the viewing angle information.
[0094] In one embodiment, the grid segmentation module 302 can also be used to input each target grid into a classification network, and obtain the occupancy status of each target grid through the classification network; wherein the classification network is a neural network model obtained by big data training using annotated area images as training samples.
[0095] In one embodiment, the first occupancy analysis module 303 can also be used to input the occupancy status of each target grid into a probabilistic fusion model, and determine whether the area to be analyzed is occupied based on the probabilistic fusion model; wherein the probabilistic fusion model is a neural network model obtained by performing big data training using multiple area images, a number of training grids contained in each area image, the occupancy status of each grid, and the occupancy determination results of multiple area images as training samples.
[0096] In one embodiment, the area occupancy analysis device may further include:
[0097] A target detection module, used for performing target detection on the target area to determine whether the area to be analyzed is occupied by the target, and recording the determination result as a second analysis result;
[0098] A comprehensive analysis module is used to determine whether the area to be analyzed is occupied according to the first analysis result and the second analysis result.
[0099] In one embodiment, the comprehensive analysis module can also be used to input the first analysis result and the second analysis result into a result fusion model, and determine whether the area to be analyzed is occupied based on the result fusion model; wherein the result fusion model is a neural network model obtained by big data training using the detection analysis results of target detection on multiple area images and the probability analysis results obtained by a probability fusion model on multiple area images as training samples.
[0100] In one embodiment, the comprehensive analysis module may include:
[0101] A probability calculation unit, used for calculating the probability that the area to be analyzed is occupied according to the result fusion model;
[0102] The occupation determination unit is used to determine that the area to be analyzed is occupied when the probability that the area to be analyzed is occupied is greater than a preset value.
[0103] Furthermore, the embodiment of the present invention also discloses a storage medium having a computer program stored thereon, and the computer program executes the above-mentioned Figure 1 and Figure 2 Technical scheme of the method for analyzing area occupancy shown.
[0104] Furthermore, an embodiment of the present invention also discloses a computer device, including a memory and a processor, wherein a computer program that can be run on the processor is stored in the memory, and the processor executes the above-mentioned Figure 1 and Figure 2 Technical scheme of the method for analyzing area occupancy shown.
[0105] Specifically, in the embodiment of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0106] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus RAM (DR RAM).
[0107] It should be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article indicates that the associated objects before and after are in an "or" relationship.
[0108] The "plurality" appearing in the embodiments of the present application refers to two or more.
[0109] The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
[0110] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.
[0111] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A method for analyzing area occupancy, characterized in that: The method comprises: Acquire an initial image by performing image acquisition on the area to be analyzed, and identify a target area corresponding to the area to be analyzed from the initial image; perform target detection on the target area to determine whether the area to be analyzed is occupied by a target, and record the determination result as a second analysis result; Dividing the target area into a plurality of target grids, and obtaining the occupancy status of each target grid; Comprehensively analyzing the occupation conditions of several target grids in the target area to determine whether the area to be analyzed is occupied, and recording the determination result as a first analysis result; Judging whether the area to be analyzed is occupied according to the first analysis result and the second analysis result, comprising: inputting the first analysis result and the second analysis result into a result fusion model, and judging whether the area to be analyzed is occupied according to the result fusion model; wherein the result fusion model is a neural network model obtained by performing big data training using detection analysis results of target detection on multiple area images and probability analysis results obtained by a probability fusion model on multiple area images as training samples; Among them, the comprehensive occupancy status of several target grids in the target area to determine whether the area to be analyzed is occupied includes: inputting the occupancy status of each target grid into a probability fusion model, and judging whether the area to be analyzed is occupied according to the probability fusion model; wherein the probability fusion model is a neural network model obtained by big data training using multiple area images, several training grids contained in each area image, the occupancy status of each grid, and the occupancy judgment results of multiple area images as training samples.
2. The method according to claim 1, characterized in that The target area is divided into a plurality of target grids, including: Each side of the target area is evenly divided to obtain a plurality of initial grids; Each initial grid is subjected to distortion correction to obtain a target grid corresponding to each initial grid.
3. The method according to claim 2, characterized in that The step of performing distortion correction on each initial grid comprises: The viewing angle information of the initial image is acquired, and the top view effect of each initial grid is restored according to the viewing angle information.
4. The method according to any one of claims 1 to 3, characterized in that: The obtaining of the occupancy status of each target grid includes: Input each target grid into a classification network, and obtain the occupancy status of each target grid through the classification network; The classification network is a neural network model obtained by performing big data training using labeled region images as training samples.
5. The method according to claim 1, characterized in that The determining whether the area to be analyzed is occupied according to the result fusion model includes: Calculating the probability that the area to be analyzed is occupied according to the result fusion model; When the probability that the area to be analyzed is occupied is greater than a preset value, the area to be analyzed is occupied.
6. An area occupancy analysis device, characterized in that: The device comprises: An image acquisition module is used to acquire an initial image by performing image acquisition on the area to be analyzed, and identify a target area corresponding to the area to be analyzed from the initial image; perform target detection on the target area to determine whether the area to be analyzed is occupied by a target, and record the determination result as a second analysis result; A grid segmentation module is used to segment the target area into a plurality of target grids and obtain the occupancy status of each target grid; A first occupancy analysis module, used to comprehensively analyze the occupancy conditions of a plurality of target grids in the target area to determine whether the area to be analyzed is occupied, and record the determination result as a first analysis result; A second occupancy analysis module is used to determine whether the area to be analyzed is occupied according to the first analysis result and the second analysis result, including: inputting the first analysis result and the second analysis result into a result fusion model, and determining whether the area to be analyzed is occupied according to the result fusion model; wherein the result fusion model is a neural network model obtained by performing big data training using the detection analysis results of target detection on multiple area images and the probability analysis results obtained by the probability fusion model on the multiple area images as training samples; Among them, the comprehensive occupancy status of several target grids in the target area to determine whether the area to be analyzed is occupied includes: inputting the occupancy status of each target grid into a probability fusion model, and judging whether the area to be analyzed is occupied according to the probability fusion model; wherein the probability fusion model is a neural network model obtained by big data training using multiple area images, several training grids contained in each area image, the occupancy status of each grid, and the occupancy judgment results of multiple area images as training samples.
7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
