CN116824311A - Performance detection method, device, equipment and storage medium of crowd analysis algorithm - Google Patents

Performance detection method, device, equipment and storage medium of crowd analysis algorithm Download PDF

Info

Publication number
CN116824311A
CN116824311A CN202310810772.0A CN202310810772A CN116824311A CN 116824311 A CN116824311 A CN 116824311A CN 202310810772 A CN202310810772 A CN 202310810772A CN 116824311 A CN116824311 A CN 116824311A
Authority
CN
China
Prior art keywords
crowd
analysis algorithm
abnormal event
video frame
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310810772.0A
Other languages
Chinese (zh)
Inventor
康婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202310810772.0A priority Critical patent/CN116824311A/en
Publication of CN116824311A publication Critical patent/CN116824311A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The application relates to artificial intelligence, and discloses a performance detection method, device, equipment and storage medium of a crowd analysis algorithm, comprising the following steps: extracting video frame images from a target video; according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images; inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist; counting each abnormal event according to the abnormal event alarming information to obtain a counting result; and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result. The method can effectively judge the accuracy of the crowd analysis algorithm model, reduces the investment of manpower and material resources, and also supports comprehensive testing of the model in various scenes.

Description

Performance detection method, device, equipment and storage medium of crowd analysis algorithm
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting performance of a crowd analysis algorithm.
Background
The crowd analysis system is an intelligent security detection product, and can analyze and predict the activity states such as crowd flow, crowd gathering, movement trend, residence time and the like in real time by using a deep learning algorithm model. The crowd analysis system can be used for well alarming abnormal emergencies in time, and management and control measures are taken in advance to avoid disastrous occurrence. The key function of the crowd analysis system is that the crowd analysis algorithm identifies abnormal indexes, so that the performance of the crowd analysis algorithm (such as the accuracy of predicting abnormal events) is particularly critical.
In order to test the performance of the crowd analysis algorithm, the prior art usually comprises the steps of playing a video after the system is accessed to the video, extracting a frame of picture, manually setting related parameters of the crowd analysis algorithm, and checking whether the crowd analysis algorithm accurately identifies abnormal points in each frame of video picture and whether an alarm is normally produced by naked eyes after the crowd analysis algorithm starts identification; therefore, the video is continuously played, a large amount of manpower and material resources are required to be consumed, the detection efficiency is low, and the accuracy is doubtful.
Disclosure of Invention
The application mainly aims to provide a performance detection method, device, equipment and storage medium for a crowd analysis algorithm, which can solve the technical problems of low performance detection efficiency, low accuracy and manpower and material resource consumption of the algorithm in the prior art.
In order to achieve the above object, a first aspect of the present application provides a performance detection method of a crowd analysis algorithm, the method comprising:
extracting video frame images from a target video;
according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
In order to achieve the above object, a second aspect of the present application provides a performance detection apparatus for a crowd analysis algorithm, the apparatus comprising:
the image extraction module is used for extracting video frame images from the target video;
the frame selection module is used for setting a reference crowd height and an identification area for a target video frame image in the video frame images according to crowd height data and identification range data;
The crowd analysis module is used for inputting the extracted video frame images into a tested crowd analysis algorithm model, carrying out abnormal event identification on an identification area in the target video by utilizing the tested crowd analysis algorithm model, and outputting abnormal event warning information when determining that an abnormal event exists;
the statistics module is used for carrying out statistics on each abnormal event according to the abnormal event alarming information to obtain a statistics result, wherein the statistics result comprises details of the abnormal event;
and the performance analysis module is used for obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
To achieve the above object, a third aspect of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
extracting video frame images from a target video;
according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
Counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
To achieve the above object, a fourth aspect of the present application provides a computer apparatus including a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
extracting video frame images from a target video;
according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
The embodiment of the application has the following beneficial effects:
according to the application, the identification range and the reference crowd height are automatically set, the detected crowd analysis algorithm model is utilized to identify the abnormal event, the details of the abnormal event are recorded, the model performance is detected, the accuracy of the crowd analysis algorithm model can be effectively judged, the investment of manpower and material resources is reduced, and the comprehensive test of the model in each scene is supported.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is an application environment diagram of a performance detection method of a crowd analysis algorithm in an embodiment of the application;
FIG. 2 is a flowchart of a performance detection method of a crowd analysis algorithm according to an embodiment of the application;
FIG. 3 is a block diagram of a performance detection device of a crowd analysis algorithm in an embodiment of the application;
Fig. 4 is a block diagram of a computer device in an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
FIG. 1 is a diagram of an application environment of a performance detection method of a crowd analysis algorithm in one embodiment. Referring to fig. 1, the performance detection method of the crowd analysis algorithm is applied to a performance detection system of the crowd analysis algorithm. The performance detection system of the crowd analysis algorithm comprises a terminal. The terminal may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The terminal is used for extracting video frame images from the target video; according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images; inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist; counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event; and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
The trampling event is easy to occur in a crowded environment, in addition, entertainment activities are gradually enriched, the condition of large-scale crowd gathering is more and more common, and the occurrence of the event such as collision trampling and the like can also occur; it may also be desirable to prohibit people from gathering during some special periods. Therefore, in order to construct a smart city, it is necessary to intelligently and efficiently monitor the population density and population number in public activities or public places. The crowd analysis algorithm model can identify and count the number of people in a settable area, so that the crowd concentration density is calculated, and the crowd analysis algorithm model is widely applied to crowd concentration occasions. And the accuracy of the crowd analysis algorithm model plays a key role.
As shown in FIG. 2, in one embodiment, a method of performance detection for a crowd analysis algorithm is provided. The method can be applied to a terminal or a server, and the embodiment is applied to terminal illustration. The performance detection method of the crowd analysis algorithm specifically comprises the following steps:
s100: video frame images are extracted from the target video.
Specifically, preferably, the target video is a video in which the shooting angle, the video brightness, the crowd height and the switching rhythm of the abnormal scene are all kept uniform and clear. Therefore, the method can eliminate the interference of video noise as much as possible, can clearly test the recognition function of the crowd analysis algorithm on different abnormal events, and avoids confusion and chapter-free. And, stable input source makes the test conclusion more convincing.
And performing frame extraction processing on the target video to obtain a video frame image. The video frame images extracted from the target video comprise a plurality of video frame images, and particularly the video frame images can be intercepted or extracted in an equidistant mode, namely, the interval duration of any two adjacent video frame images is equal. Video frame images may also be decimated in a random sampling manner.
S200: and setting a reference crowd height and an identification area for a target video frame image in the video frame images according to the crowd height data and the identification range data.
Specifically, crowd height data and identification range data are basic values provided to crowd analysis algorithms. The shooting angles also affect the heights of people from far to near, so that the given crowd height data is equivalent to some reference heights of the crowd analysis algorithm. The identification area data is used for framing the area to be identified in the video frame image, so that the crowd analysis algorithm can be used for identifying abnormal events in the area to be identified in the target video in a targeted manner.
For example, in video, when a recognition range is framed, a focus is on a stair or a corridor, and people are easy to stay and risk, and the recognition range is required. The pool and river do not need to pay much attention and do not need to be used as identification areas. Therefore, the crowd analysis algorithm can be appointed to pay attention to the partial areas, and the attention to other non-target areas is reduced, so that different monitoring requirements are met.
In addition, for example, three people can be selected from the target video frame image from far to near, and the heights of the selected three people can be used as the reference crowd height. Of course, the selection of the reference crowd and the number of the reference crowd are specifically configured according to practical situations, and the application is not limited thereto.
The identified region may comprise a continuous region in the video frame image or may comprise a plurality of discrete regions in the video frame image.
The target video frame image is one of the decimated video frame images, and the first video frame image is typically selected as the target video frame image.
The crowd analysis algorithm model automatically detects and identifies abnormal events in the same identification areas of all input video frame images according to the designated reference crowd height and the identification areas in the target video by the same reference crowd height. The deviation existing in manual calibration is avoided, and the calibration data of each version of model test can be ensured to be the same.
S300: the extracted video frame images are input into a tested crowd analysis algorithm model, abnormal event identification is carried out on an identification area in the target video by utilizing the tested crowd analysis algorithm model, and abnormal event warning information is output when the existence of the abnormal event is determined.
Specifically, the crowd analysis algorithm model can be used for automatically detecting the traffic volume, the number of pedestrians and the like at places such as intersections, markets and the like in images or videos output by the image pickup equipment. The pedestrian density in the area can be calculated, and intelligent reminding and dispersion can be timely carried out when the crowd gathering degree is high; automatically marking and recording the detection result.
The video frame images input to the crowd analysis algorithm model include target video frame images. The crowd analysis algorithm model executes one or more of crowd density calculation, crowd number calculation, crowd retention time calculation and the like according to the input video frame image, judges whether an abnormal event occurs according to a set threshold value, and outputs abnormal event warning information when the abnormal event is determined to exist.
The crowd analysis algorithm model may identify at least one abnormal event, such as one or more of a crowd-sourced event, crowd-sourced event.
Each anomaly event has a corresponding identification criteria.
The abnormal event alert information may include, but is not limited to, information of an abnormal event type, a corresponding abnormal event image, and the like.
S400: and counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event.
Specifically, each time an abnormal event is identified, the abnormal event type and the abnormal event image of the abnormal event are output. And counting the same type of abnormal events to obtain the counting result of the target video.
The statistical result includes the total number of alarms of each abnormal event, the abnormal event image when each abnormal event occurs, and may further include information such as abnormal time when each abnormal event occurs.
S500: and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
Specifically, the crowd analysis algorithm model intercepts frame pictures when an abnormal event is identified, and generates an abnormal event image through rendering according to the frame pictures. The abnormal event image may be used to specifically indicate an abnormal point.
Therefore, according to the abnormal event details in the statistical result, whether the performance of the crowd analysis algorithm model such as abnormal event identification is accurate or not can be judged, and the purpose of detecting the performance of the model is achieved.
In general, a video is more in abnormal alarming times, and huge consumption of manpower and material resources is caused. In addition, the embodiment can test the performance of the model under different thresholds, and comprehensively test the model.
According to the embodiment, the identification range and the reference crowd height are automatically set, the detected crowd analysis algorithm model is utilized to identify the abnormal event, the details of the abnormal event are recorded, the model performance is detected, the accuracy of the crowd analysis algorithm model can be effectively judged, the investment of manpower and material resources is reduced, and the model is supported to be comprehensively tested in various scenes.
In one embodiment, the abnormal event details include an abnormal event type and an abnormal event image of each abnormal event and the number of alarms of each abnormal event;
the step S500 specifically includes:
displaying the abnormal event image and the corresponding abnormal event type, so that a user can determine whether the model alarms correctly according to the abnormal event image and the abnormal event setting threshold, wherein the abnormal event setting threshold is related to the abnormal event type;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the alarm judgment result of the user on each abnormal event.
Specifically, crowd-sourcing events: and setting a crowd density threshold, and triggering an alarm if the crowd density in the identification area exceeds the crowd density threshold. In addition, the video frame image of the alert may be stained.
Crowd gathering event: and setting an aggregate number threshold, and triggering an alarm if the aggregate number in the identification area exceeds the aggregate number threshold.
Crowd retention event: setting a detention time threshold, and triggering an alarm if the detention time of the crowd in the identification area exceeds the detention time threshold.
Crowd retrograde event: and selecting the forward direction, and judging whether a crowd reverse event occurs according to the selected forward direction and the actual walking direction of the pedestrian in the video frame image.
And each time the crowd analysis algorithm model determines an abnormal event, an alarm is given and the abnormal event type and the abnormal event image of the abnormal event are output. The testers can judge whether the model alarm is correct according to the abnormal event images, and then give out corresponding alarm judging results. If the abnormal event image display does not reach the alarm threshold, determining a model alarm misjudgment; if the abnormal event image display does reach the alarm threshold, the correct alarm of the model can be determined.
Therefore, according to the alarm judgment result, the performance detection result of the tested crowd analysis algorithm model can be obtained.
Specifically, if the alarm misjudgment exists in the alarm judgment result, determining the performance of the crowd analysis algorithm model according to the fault tolerance.
If the alarm judgment result does not have the situation of alarm misjudgment, namely all the alarm judgment result belongs to correct alarm, the crowd analysis algorithm model is determined to have good stable performance.
Each time an alarm is generated, a frame of picture of the video is intercepted, so that the client can see the alarm more intuitively. Specifically, when an abnormal event is judged to occur, a density map is intercepted, the density map is converted into a video frame image, an abnormal alarm range is drawn on the video frame image, and then character rendering is carried out, so that an abnormal event image is obtained. The abnormal alarm range can be rendered by a method of selecting characters or by a method of marking the heads of the characters by dots. Therefore, whether the abnormal event actually occurs can be clearly judged through the rendering effect on the abnormal event image.
According to the embodiment, based on the judgment standard of the abnormal event, whether the alarm is consistent with the intercepted image or not can be intuitively judged according to the abnormal event image, whether the model alarm is correct or not is determined, and further the performance of the model is effectively evaluated.
In one embodiment, the crowd analysis algorithm model to be tested is a crowd analysis algorithm model of any target version obtained by carrying out iterative updating on the same crowd analysis algorithm model;
All the crowd analysis algorithm models of the target version input video frame images, crowd heights and recognition areas set in the target video frame images and recognition standards for the same abnormal event are the same.
Specifically, as more training data is injected, the crowd analysis algorithm model is also continuously updated iteratively to learn the crowd analysis that adapts to more scenes. Therefore, it is necessary to compare the crowd analysis algorithm models of the new and old different versions to determine the effect of model update.
The algorithm is generally required to redeploy the system after updating, and all configurations are restored, such as to redefine the identification range, set the reference height, set the threshold, etc. The embodiment realizes the comparison of different versions of the same crowd analysis algorithm model. In order to ensure that the performance comparison of models of different new and old versions is comparable, the embodiment ensures that the input data of the models of the new and old versions are identical and the identification standards of the same abnormal event are also identical.
The same target video is used when each version of the model is tested, and the video frame images extracted from the target video, the selected target video frame images, the crowd height drawn on the target video frame images and the identification area are the same. In addition, for the same abnormal event, the same recognition criterion is configured for each version of the model, that is, the same threshold value is set.
In one embodiment, extracting video frame images from a target video includes: and extracting pictures in the target video in a second reading mode through the UI automation framework to obtain video frame images. This ensures that the video frame images extracted by each version of the model are identical.
The embodiment ensures that the input of the models of each version is the same as the abnormal event identification standard, eliminates the interference of irrelevant factors, and is used for objectively, reliably and accurately comparing the performances of the models of different versions.
In one embodiment, the abnormal event warning thresholds of all the target versions of the crowd analysis algorithm model are the same;
the method further comprises the steps of:
and comparing the performance of the crowd analysis algorithm models of the two target versions according to the statistical results of the crowd analysis algorithm models of the two target versions to obtain a performance comparison result.
Specifically, the performance detection result of the crowd analysis algorithm model of the target version can be determined through the statistical result of the crowd analysis algorithm model of the same target version. And according to the performance detection result, the performance comparison result of the crowd analysis algorithm models of the two target versions can be obtained.
Or,
and comparing the two versions of the model in multiple dimensions according to the abnormal event details of the crowd analysis algorithm models of the two target versions so as to compare the performances of the two versions.
Under the condition of the same test parameters and input, the output data of the old algorithm and the new algorithm are compared, so that testers and developers can more intuitively see the difference between the new algorithm and the old algorithm, and judge whether the new algorithm is more superior.
According to the embodiment, under the condition that the input of the model of each version and the abnormal event identification standard are the same, the performances of the models of different versions are compared, and the obtained performance comparison result is convenient for research personnel to effectively monitor the iterative updating effect of the crowd analysis algorithm model, prevent the model from being trained reversely and ensure the iterative updating effect of the model.
In one embodiment, the details of the abnormal event include the abnormal event type and the abnormal event image of each abnormal event, the alarming times of each abnormal event, and the abnormal time when the abnormal event occurs in the target video;
according to the statistical results of the crowd analysis algorithm models of the two target versions, performance comparison is carried out on the crowd analysis algorithm models of the two target versions to obtain performance comparison results, and the method comprises the following steps:
Comparing images of abnormal events which occur in the same type, similar abnormal time or the same alarming times in two different models to obtain a comparison result;
comparing the abnormal events in the two different models to obtain an abnormal event comparison result;
and obtaining a performance comparison result according to the picture comparison result and the abnormal event comparison result.
Specifically, in this embodiment, the two versions of the model are compared in multiple dimensions according to the details of the abnormal event, so as to compare the performances of the two versions.
Theoretically, if the performance of the two models is the same, the number of abnormal events identified by the two models to the target video is the same, and the abnormal event images are the same. Conversely, if the two properties are different, the identified anomaly may be different, or the anomaly images may be different.
Based on this, the present embodiment compares the number of abnormal events occurring in two different models with the abnormal time, determines whether the abnormal events occurring at the same or similar abnormal time are the same, whether the abnormal event images are the same or similar, whether the number of each abnormal event is the same, and the like.
In addition, the performance comparison report may be output in the form of a table. The performance comparison report comprises the types and images of the abnormal events of the two models at the same or similar abnormal time, the picture comparison result of the abnormal event images, the event comparison result of whether the abnormal event is the abnormal event of the same type, and the like. The picture comparison results are similar or dissimilar, and the event comparison results are the same event or different events. Specifically as shown in table 1:
TABLE 1
The performance comparison effect of the two models can be visually compared through the table 1. In addition, the tester can also perform human identification on the abnormal event with difference in the two model judgment, and give a judgment result, wherein the judgment result is one of alarm error judgment, correct alarm of the model version A, alarm error judgment of the model version B, alarm error judgment of the model version A and correct alarm of the model version B.
Of course, table 1 is merely an exemplary example, and the present application is not limited in this regard.
According to the embodiment, the model updating effect can be accurately judged through the comparison of the performance of the new model and the performance of the old model, and the performance of the model is verified through the side face.
In one embodiment, the identifying the abnormal event in the identified area in the target video by using the tested crowd analysis algorithm model in step S300 includes:
if the abnormal event to be predicted is a crowd over-dense event, taking the set reference crowd height as a far-near reference view angle, obtaining a crowd density estimation graph according to an input video frame image by using a detected crowd analysis algorithm model, estimating the crowd density of an identification area according to the crowd density estimation graph, and carrying out crowd over-dense event identification according to the crowd density and a set crowd density threshold;
If the abnormal event to be predicted is a people group gathering event, taking the set reference crowd height as a far-near reference view angle, obtaining a crowd density estimation graph according to an input video frame image by using a detected crowd analysis algorithm model, estimating the gathering number of people in the recognition area according to the crowd density estimation graph, and recognizing the people group gathering event according to the gathering number and a set gathering number threshold;
if the abnormal event to be predicted is a crowd detention event, taking the set reference crowd height as a far-near reference view angle, extracting the neural network characteristics from the input video frame images by using a detected crowd analysis algorithm model, comparing the displacement of the neural network characteristics of at least two front and rear video frame images, and carrying out crowd detention event identification according to the displacement, the time length experienced by the continuous video frame images and the set detention time length threshold.
Specifically, the crowd analysis algorithm model provided by the application can be self-adaptive to the change of the size of the characters/heads caused by perspective or image resolution, capture the characteristics of different sizes, analyze crowd behaviors of videos of any crowd density, any shooting angle and any character height, and accurately estimate the crowd quantity, crowd density, crowd retention and the like of any crowd density and perspective angle.
Wherein, the reference crowd height is the scale benchmark.
In addition, the recognition rules of the crowd analysis algorithm model can be preconfigured. For example, if the crowd density of m video frame images is continuously recognized to exceed the crowd density threshold, the occurrence of the crowd density event is determined.
For another example, if the aggregate population number of p video frame images is continuously identified to exceed the aggregate population number threshold, then the crowd aggregation event is determined to occur.
For another example, the displacements of the neural network features in the q consecutive video frame images are all less than the displacement threshold, and the duration that the q consecutive video frame images experience exceeds the retention duration threshold, then the crowd retention event is determined to occur.
In one embodiment, step S200 specifically includes:
reading configuration data, and acquiring crowd height data and identification range data from the configuration data;
and according to the crowd height data and the identification range data, carrying out reference crowd height calibration and identification region drawing on a target video frame image in the video frame images in a coordinate dotting mode.
Specifically, the prior art generally sets crowd heights and frame selection recognition ranges by human hands. According to the embodiment, the reference crowd height calibration and the identification region drawing are automatically carried out on the target video frame image in a coordinate dotting mode in a mode of automatically reading the configuration data. The problem that model performance comparison effect is inaccurate due to inconsistent model input of two versions caused by manual circling is avoided. The consistency and reliability of input data are ensured, so that model performance is more convincing than conclusion. And replace the manual work, improved model detection efficiency.
The crowd height data comprise coordinates and heights of a reference crowd in a target video frame image. And positioning the reference crowd through the coordinates, and calibrating the crowd height.
The identification range data includes a number of boundary point coordinates of an identification area in the target video frame image. The recognition area can be drawn by dotting and connecting the coordinates of the boundary points.
In addition, through configuration data, the configuration is identical when the performance of each version of target model is detected, manual repeated input is not needed, manpower and material resources are saved, and the input data and the configuration are identical.
Preferably, the crowd height sets the selected person as the person of the identification area. The crowd analysis algorithm model is more accurate in reference height, and detection of abnormal events in the identification area is facilitated.
In the prior art, the abnormal alarm of one video is basically hundreds of times, the consumption of manpower is huge, the mode of extraction is generally adopted for comparison, and if scenes with different thresholds need to be tested, one video needs to be tested repeatedly for N times, and under the condition of time tension, at most, only 2-3 scenes with different thresholds are tested, so that the accuracy of a test conclusion is greatly influenced. According to the application, through automatic testing, testing in different scenes can be covered, the investment of manpower and material resources is reduced, and the efficiency of algorithm detection is improved. Under the condition that the algorithm is updated frequently, the method can respond quickly and draw test conclusions. In addition, the advantages and disadvantages of the new algorithm and the old algorithm can be accurately evaluated by giving the same input and configuration to the new algorithm and the old algorithm, and the research personnel can be helped to timely and accurately grasp the updating effect of the algorithm.
Referring to fig. 3, the present application further provides a performance detection apparatus of a crowd analysis algorithm, the apparatus comprising:
an image extraction module 100 for extracting a video frame image from a target video;
the frame selection module 200 is configured to set a reference crowd height and an identification area for a target video frame image in the video frame images according to crowd height data and identification range data;
the crowd analysis module 300 is used for inputting the extracted video frame images into a tested crowd analysis algorithm model, identifying abnormal events in an identification area in the target video by utilizing the tested crowd analysis algorithm model, and outputting abnormal event warning information when determining that the abnormal events exist;
the statistics module 400 is configured to perform statistics on each abnormal event according to the abnormal event alarm information, so as to obtain a statistics result, where the statistics result includes details of the abnormal event;
the performance analysis module 500 is configured to obtain a performance detection result of the tested crowd analysis algorithm model according to the statistical result.
In one embodiment, the abnormal event details include an abnormal event type and an abnormal event image of each abnormal event and the number of alarms of each abnormal event;
the performance analysis module 500 specifically includes:
The display module is used for displaying the abnormal event image and the corresponding abnormal event type so as to enable a user to determine whether the model alarms correctly according to the abnormal event image and the abnormal event setting threshold, wherein the abnormal event setting threshold is related to the abnormal event type;
and the performance analysis module is used for obtaining the performance detection result of the tested crowd analysis algorithm model according to the alarm judgment result of the user on each abnormal event.
In one embodiment, the crowd analysis algorithm model to be tested is a crowd analysis algorithm model of any target version obtained by carrying out iterative updating on the same crowd analysis algorithm model;
all the crowd analysis algorithm models of the target version input video frame images, crowd heights and recognition areas set in the target video frame images and recognition standards for the same abnormal event are the same.
In one embodiment, the abnormal event warning thresholds of all the target versions of the crowd analysis algorithm model are the same;
the apparatus further comprises:
and the performance comparison module is used for comparing the performance of the crowd analysis algorithm models of the two target versions according to the statistical results of the crowd analysis algorithm models of the two target versions to obtain a performance comparison result.
In one embodiment, the details of the abnormal event include the abnormal event type and the abnormal event image of each abnormal event, the alarming times of each abnormal event, and the abnormal time when the abnormal event occurs in the target video;
the performance comparison module comprises:
the first comparison module is used for comparing the pictures of the abnormal event images of the abnormal events which occur in the same type, similar abnormal time or the same alarming times in the two different models to obtain a picture comparison result;
the second comparison module is used for comparing the abnormal events occurring in the two different models to obtain an abnormal event comparison result;
and the performance comparison analysis module is used for obtaining a performance comparison result according to the picture comparison result and the abnormal event comparison result.
In one embodiment, crowd analysis module 300 specifically includes:
the first person group analysis module is used for taking the set reference crowd height as a far-near reference view angle if the abnormal event to be predicted is a crowd density event, obtaining a crowd density estimation graph according to an input video frame image by using a detected crowd analysis algorithm model, estimating the crowd density of an identification area according to the crowd density estimation graph, and carrying out crowd density event identification according to the crowd density and a set crowd density threshold;
The second crowd analysis module is used for taking the set reference crowd height as a far-near reference view angle, obtaining a crowd density estimation graph according to an input video frame image by using a detected crowd analysis algorithm model, estimating the number of people in an identification area according to the crowd density estimation graph, and carrying out crowd aggregation event identification according to the number of people in the aggregation area and a set threshold value of the number of people in the aggregation area if the abnormal event to be predicted is a crowd aggregation event;
and the third crowd analysis module is used for taking the set reference crowd height as a far-near reference view angle if the abnormal event to be predicted is a crowd detention event, extracting the neural network characteristics from the input video frame images by using the detected crowd analysis algorithm model, comparing the displacement of the neural network characteristics of at least two front and rear video frame images, and identifying the crowd detention event according to the displacement, the time length of the continuous video frame images and the set detention time length threshold value.
In one embodiment, the box selection module 200 specifically includes:
the configuration reading module is used for reading the configuration data and acquiring crowd height data and identification range data from the configuration data;
and the drawing module is used for carrying out reference crowd height calibration and recognition area drawing on a target video frame image in the video frame images in a coordinate dotting mode according to crowd height data and recognition range data.
FIG. 4 illustrates an internal block diagram of a computer device in one embodiment. The computer device may specifically be a terminal or a server. As shown in fig. 4, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program which, when executed by a processor, causes the processor to implement the steps of the method embodiments described above. The internal memory may also have stored therein a computer program which, when executed by a processor, causes the processor to perform the steps of the method embodiments described above. It will be appreciated by persons skilled in the art that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
Extracting video frame images from a target video;
according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
extracting video frame images from a target video;
according to the crowd height data and the identification range data, setting a reference crowd height and an identification area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in a target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
Counting each abnormal event according to the abnormal event alarm information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
Those skilled in the art will appreciate that the processes implementing all or part of the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, and the program may be stored in a non-volatile computer readable storage medium, and the program may include the processes of the embodiments of the methods as above when executed. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method for detecting performance of a crowd analysis algorithm, the method comprising:
extracting video frame images from a target video;
according to the crowd height data and the recognition range data, setting a reference crowd height and a recognition area for a target video frame image in the video frame images;
inputting the extracted video frame images into a tested crowd analysis algorithm model, utilizing the tested crowd analysis algorithm model to identify abnormal events in an identification area in the target video, and outputting abnormal event warning information when the abnormal events are determined to exist;
Counting each abnormal event according to the abnormal event alarming information to obtain a counting result, wherein the counting result comprises details of the abnormal event;
and obtaining a performance detection result of the tested crowd analysis algorithm model according to the statistical result.
2. The method of claim 1, wherein the anomaly event details include anomaly event type and anomaly event image for each anomaly event and number of alarms for each anomaly event;
the step of obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result comprises the following steps:
displaying an abnormal event image and a corresponding abnormal event type, so that a user can determine whether a model is correctly alarmed according to the abnormal event image and an abnormal event setting threshold, wherein the abnormal event setting threshold is related to the abnormal event type;
and obtaining the performance detection result of the tested crowd analysis algorithm model according to the alarm judgment result of the user on each abnormal event.
3. The method of claim 1, wherein the crowd analysis algorithm model to be tested is a crowd analysis algorithm model of any one target version obtained by iteratively updating the same crowd analysis algorithm model;
All the crowd analysis algorithm models of the target version input video frame images, crowd heights and recognition areas set in the target video frame images and recognition standards for the same abnormal event are the same.
4. A method according to claim 3, wherein the anomaly event alert thresholds for all target versions of the crowd analysis algorithm model are the same;
the method further comprises the steps of:
and comparing the performance of the crowd analysis algorithm models of the two target versions according to the statistical results of the crowd analysis algorithm models of the two target versions to obtain a performance comparison result.
5. The method according to claim 4, wherein the abnormal event details include an abnormal event type and an abnormal event image of each abnormal event and the number of alarms of each abnormal event, an abnormal time at which an abnormal event occurs in a target video;
and comparing the performance of the crowd analysis algorithm models of the two target versions according to the statistical results of the crowd analysis algorithm models of the two target versions to obtain a performance comparison result, wherein the performance comparison result comprises the following steps:
comparing images of abnormal events which occur in the same type, similar abnormal time or the same alarming times in two different models to obtain a comparison result;
Comparing the abnormal events in the two different models to obtain an abnormal event comparison result;
and obtaining a performance comparison result according to the picture comparison result and the abnormal event comparison result.
6. The method of claim 1, wherein the identifying the identified region in the target video using the crowd analysis algorithm model comprises:
if the abnormal event to be predicted is a crowd over-dense event, taking the set reference crowd height as a far-near reference view angle, obtaining a crowd density estimation graph according to an input video frame image by using the detected crowd analysis algorithm model, estimating the crowd density of an identification area according to the crowd density estimation graph, and carrying out crowd over-dense event identification according to the crowd density and a set crowd density threshold value;
if the abnormal event to be predicted is a crowd gathering event, taking the set reference crowd height as a far-near reference view angle, obtaining a crowd density estimation graph according to an input video frame image by using the detected crowd analysis algorithm model, estimating the gathering number of the identification area according to the crowd density estimation graph, and carrying out crowd gathering event identification according to the gathering number and a set gathering number threshold;
If the abnormal event to be predicted is a crowd detention event, taking the set reference crowd height as a far-near reference view angle, extracting the neural network characteristics from the input video frame images by using the detected crowd analysis algorithm model, comparing the displacement of the neural network characteristics of at least two video frame images before and after, and carrying out crowd detention event identification according to the displacement, the time length of the continuous video frame images and the set detention time length threshold.
7. The method of claim 1, wherein the setting the reference crowd height and the identification area for the target video frame image in the video frame images based on crowd height data and identification range data comprises:
reading configuration data, and acquiring crowd height data and identification range data from the configuration data;
and according to the crowd height data and the recognition range data, carrying out reference crowd height calibration and recognition region drawing on the target video frame image in the video frame images in a coordinate dotting mode.
8. A performance detection apparatus for a crowd analysis algorithm, the apparatus comprising:
the image extraction module is used for extracting video frame images from the target video;
The frame selection module is used for setting a reference crowd height and an identification area for a target video frame image in the video frame images according to crowd height data and identification range data;
the crowd analysis module is used for inputting the extracted video frame images into a tested crowd analysis algorithm model, carrying out abnormal event identification on an identification area in the target video by utilizing the tested crowd analysis algorithm model, and outputting abnormal event warning information when the existence of an abnormal event is determined;
the statistics module is used for carrying out statistics on each abnormal event according to the abnormal event alarm information to obtain a statistics result, wherein the statistics result comprises details of the abnormal event;
and the performance analysis module is used for obtaining the performance detection result of the tested crowd analysis algorithm model according to the statistical result.
9. A computer readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 7.
CN202310810772.0A 2023-07-04 2023-07-04 Performance detection method, device, equipment and storage medium of crowd analysis algorithm Pending CN116824311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310810772.0A CN116824311A (en) 2023-07-04 2023-07-04 Performance detection method, device, equipment and storage medium of crowd analysis algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310810772.0A CN116824311A (en) 2023-07-04 2023-07-04 Performance detection method, device, equipment and storage medium of crowd analysis algorithm

Publications (1)

Publication Number Publication Date
CN116824311A true CN116824311A (en) 2023-09-29

Family

ID=88116487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310810772.0A Pending CN116824311A (en) 2023-07-04 2023-07-04 Performance detection method, device, equipment and storage medium of crowd analysis algorithm

Country Status (1)

Country Link
CN (1) CN116824311A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765480A (en) * 2024-02-20 2024-03-26 天科院环境科技发展(天津)有限公司 Method and system for early warning migration of wild animals along road

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117765480A (en) * 2024-02-20 2024-03-26 天科院环境科技发展(天津)有限公司 Method and system for early warning migration of wild animals along road
CN117765480B (en) * 2024-02-20 2024-05-10 天科院环境科技发展(天津)有限公司 Method and system for early warning migration of wild animals along road

Similar Documents

Publication Publication Date Title
CN110225299B (en) Video monitoring method and device, computer equipment and storage medium
CN110443109A (en) Abnormal behaviour monitor processing method, device, computer equipment and storage medium
CN110428522A (en) A kind of intelligent safety and defence system of wisdom new city
CN108319926A (en) A kind of the safety cap wearing detecting system and detection method of building-site
US20190213424A1 (en) Image processing system and image processing method
CN110717358B (en) Visitor number counting method and device, electronic equipment and storage medium
CN111724522A (en) Access control system, method and device, control equipment and storage medium
CN113343779B (en) Environment abnormality detection method, device, computer equipment and storage medium
CN113139403A (en) Violation behavior identification method and device, computer equipment and storage medium
CN110189355A (en) Safe escape channel occupies detection method, device, electronic equipment and storage medium
CN116824311A (en) Performance detection method, device, equipment and storage medium of crowd analysis algorithm
CN113052147A (en) Behavior identification method and device
CN114049593A (en) Monitoring method, device, equipment and storage medium
CN111666915A (en) Monitoring method, device, equipment and storage medium
CN111860187A (en) High-precision worn mask identification method and system
CN115346060A (en) Picture abnormity identification method and device, electronic equipment and storage medium
CN110393539B (en) Psychological anomaly detection method and device, storage medium and electronic equipment
CN111539595A (en) Method, apparatus, computer device and storage medium for handling alarms
CN114049658A (en) Floating population management method and device based on face recognition, computer equipment and storage medium
CN110505438B (en) Queuing data acquisition method and camera
CN117854010A (en) Detection method, detection device, equipment and medium for personnel behavior types
US11527091B2 (en) Analyzing apparatus, control method, and program
CN116863580A (en) Intelligent access control system based on Internet of things
CN112926481B (en) Abnormal behavior detection method and device
CN111178248B (en) Online experiment assessment method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination