A detection method for abnormal changes in the number of people in an examination room based on the location of examinees
Through the candidate position detection model based on deep learning, the examination room status diagram is generated and the Mahayana distance is calculated, the detection problem of cheating by multiple people outside the examination room monitoring is solved, and the abnormal changes in the number of people in the examination room is realized, and the accuracy and efficiency of the detection are improved.
Patent Information
- Application Number
- CN202510114959.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The existing technology is difficult to effectively detect the behavior of multiple people cooperating with each other outside examination room monitoring, which is highly concealed.
The candidate's position detection model is trained based on the deep learning model. By generating the examination room status map, the candidate sequence is established, the feature vector is constructed and the Mahayana distance is calculated, and the abnormal changes in the number of people in the examination room are judged to detect cheating by multiple people.
It improves the accuracy of detecting cheating behaviors of multiple people outside the examination room monitoring, can promptly detect changes in the number of abnormal people, and help prevent fraud.
Smart Images

Figure CN120088699B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision processing technology, and in particular to a method for detecting abnormal changes in the number of people in an examination room based on the positions of examinees. Background Art
[0002] Typical methods for preventing and detecting cheating include exam room inspections, on-site proctoring, and real-time surveillance video collection or post-manual review. However, with the advancement of machine learning, particularly the widespread application of deep learning, the combination of exam room video surveillance and machine learning has enabled intelligent video surveillance to achieve higher accuracy in identifying abnormal exam room behavior. However, current intelligent video surveillance primarily focuses on the actions of individual examinees at specific points in time to issue warnings or identify cheating. However, to circumvent in-exam monitoring, some examinees resort to using restrooms and other pretexts to obtain information about violations, communicate about test questions, and then return to cheat. This type of abnormal behavior typically involves multiple individuals, occurs outside the exam room's surveillance system, and is highly concealed.
[0003] Therefore, how to target the cheating method that occurs when multiple people cooperate outside the examination room surveillance is an urgent problem that needs to be solved. Summary of the Invention
[0004] The purpose of the present invention is to provide a detection method for identifying abnormal changes in the number of people in an examination room based on the positions of examinees, which effectively assists in detecting cheating methods that occur by multiple people outside the monitoring of the examination room.
[0005] The present invention provides a method for detecting abnormal changes in the number of people in an examination room based on the position of examinees, which adopts the following technical solutions:
[0006] A deep learning model is trained based on historical surveillance videos of the same specifications as the examination room to be tested to obtain an examination room candidate location detection model. Key frames of the surveillance video of the examination room to be tested are extracted at 30-second intervals to generate an examination room status diagram. The examination room candidate location detection model is used to detect the number of candidates and their corresponding location information in the examination room status diagram, and a candidate sequence is established.
[0007] A benchmark candidate sequence is constructed by taking the union of the candidate sequences from the first 3 minutes. A sequence to be detected in all the test room status diagrams of candidates leaving the test room is obtained based on the benchmark candidate sequence. A feature vector to be detected is generated based on the sequence to be detected, which contains the number of candidates leaving the test room in each time period.
[0008] Based on the historical surveillance video of the examination room, a feature vector dataset of the changes in the number of people leaving the examination room normally is obtained. The centroid of the feature vector dataset and the threshold for judging outliers are obtained. The Mahalanobis distance between the feature vector to be detected and the centroid is calculated. When the Mahalanobis distance is greater than the threshold, it is determined that there is an abnormality in the examination room to be detected.
[0009] Optionally, the process of training a deep learning model based on historical surveillance videos of the same specifications as the examination room to be tested to obtain an examination room candidate location detection model includes:
[0010] Obtain key frames from historical surveillance videos of the examination room, annotate the positions of examinees in the key frames to obtain training and test datasets, and preset anchor frames suitable for examinees and the intersection-over-union ratio threshold for determining examinees for the initial single-stage examinee position detection model;
[0011] Pre-training an initial single-stage examination room candidate location detection model based on a public dataset, adjusting the hyperparameters of the pre-trained model, and fine-tuning the model using the training dataset to obtain a test room candidate location detection model. The fine-tuning uses cosine learning rate decay;
[0012] The position detection model of the examinee in the test room is evaluated based on the test data set. When the harmonic mean of the model is less than the set expected value, the hyperparameters are reset and retraining is performed. Otherwise, the weights of the position detection model of the examinee in the test room are saved.
[0013] Optionally, the process of extracting key frames of the surveillance video of the examination room to be detected based on 30-second intervals to generate the examination room status diagram includes:
[0014] After the exam, obtain the surveillance video of the examination room to be tested, divide the examination room surveillance video into 30-second intervals, obtain a 30-second image frame sequence, use the key frame extraction tool to extract key frames from the video within 30 seconds, and convert the extracted one or several key frame images into standard images through brightness processing and size transformation. Use the reference-free image clarity detection algorithm on the standard image to obtain the clearest image as the examination room status diagram for that time period.
[0015] Optionally, the process of detecting the number of examinees and their corresponding position information in the examination room status diagram based on the examination room examinee position detection model and establishing the examinee sequence includes:
[0016] The examination room state diagram is input into the examination room candidate position detection model for detection to obtain the number and position of the prediction boxes. Redundant anchor boxes are removed based on the non-maximum suppression method. Based on whether there are candidates in the prediction box, whether they have left the examination room is determined to determine the number of candidates.
[0017] When the distance between the seats of the examinees is small, the coordinates of the center points of each prediction frame are calculated, the coordinates of the center points are sorted, and the sorting results are matched one-to-one with the seat numbers of the examination room to obtain the examinee's location;
[0018] When the seats in the examination room are relatively large, grids are divided according to the position of the prediction box, and each grid is numbered according to the examination room seat arrangement rules to obtain the candidate's location;
[0019] Based on the standard number of people in the examination room and the number and positions of candidates obtained by detection, a binary sequence corresponding to the examination room status diagram is constructed.
[0020] Optionally, based on the benchmark candidate sequence, the sequences to be detected of candidates leaving the examination room in all examination room status diagrams are obtained, including:
[0021] Based on the benchmark candidate sequence, the number and location of candidates taking the exam in the test room are obtained, and the benchmark sequence is XORed with the candidate sequence of each test room status diagram to obtain the sequence to be tested that includes the number of candidates leaving the test room within the time interval of each test room status diagram.
[0022] Optionally, based on the sequence to be detected, a feature vector to be detected is generated containing the number of candidates leaving the examination room in each time period, including:
[0023] The total examination duration is divided into time periods, and the sequences to be detected within the time periods are ORed to obtain a sequence of changes in the number of candidates leaving the examination room in each time period. Based on the sequence of changes in the number of candidates, a feature vector to be detected is constructed containing the number of candidates leaving the examination room in each time period.
[0024] Optional, in the process of dividing the exam into time periods according to the total duration, including:
[0025] When the exam duration is 120 minutes, the time periods are set as 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes and 60 minutes respectively.
[0026] Optionally, a feature vector dataset of the normal number of people leaving the examination room can be obtained based on historical surveillance videos of the examination room, including:
[0027] Through manual detection, suspicious surveillance videos showing frequent entry and exit of candidates are eliminated from historical surveillance videos. The remaining surveillance videos are detected using the examination room candidate location detection model, and a candidate sequence is established based on the detection results. Based on the candidate sequence, a feature vector dataset containing the number of candidates leaving the examination room in each time period is obtained.
[0028] Optionally, the process of obtaining the centroid of the feature vector data set and the threshold for determining an outlier includes:
[0029] The features of each time period in the feature vector data set are averaged to obtain the centroid of the data set, the Mahalanobis distance between all feature vectors in the data set and the centroid is calculated, and the Mahalanobis distance threshold for judging outliers is calculated using an adaptive threshold algorithm.
[0030] Optionally, the Mahalanobis distance between the feature vector to be detected and the centroid is calculated using the following formula:
[0031]
[0032] Among them, D M (x) is the Mahalanobis distance between the centroid and the feature vector to be detected, (x-μ) T is the covariance matrix between the centroid and the eigenvector to be detected in each time period, ∑ -1 (x-μ) is the inverse matrix of the covariance matrix, x is the eigenvector to be detected, and μ is the centroid.
[0033] The present invention proposes a method for detecting abnormal changes in the number of people in an examination room based on the position of examinees, which has the following beneficial effects:
[0034] 1. By calculating the Mahalanobis distance between the feature vector of the examination room to be tested and the historical feature vector dataset of the examination room, it is possible to identify abnormalities in the number of people leaving the examination room, thereby assisting in detecting whether there is multiple cheating behaviors. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Flow chart of the detection method provided by the present invention;
[0036] Figure 2 A sequence diagram of candidates leaving at time t provided by the present invention;
[0037] Figure 3 A schematic diagram of a candidate leaving the examination room at time t provided by the present invention;
[0038] Figure 4 Schematic diagram for outlier judgment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meanings understood by people with ordinary skills in the field to which the invention belongs. The words "including" and similar words used in this article mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0040] The embodiment of the present invention provides a method for detecting abnormal changes in the number of people in an examination room based on the position of the examinees. Figure 1 ,include:
[0041] S1. Train a deep learning model based on historical surveillance videos of the same specifications as the examination room to be tested to obtain an examination room candidate location detection model. Extract key frames from the surveillance video of the examination room to be tested at 30-second intervals to generate an examination room status diagram. Detect the number of candidates and their corresponding location information in the examination room status diagram based on the examination room candidate location detection model, and establish a candidate sequence.
[0042] S2. A benchmark candidate sequence is constructed by taking the union of the candidate sequences from the first three minutes. Using the benchmark candidate sequence as a control, a sequence to be detected in which candidates leave the examination room in all examination room status diagrams is obtained. Based on the sequence to be detected, a feature vector to be detected is generated containing the number of candidates leaving the examination room in each time period.
[0043] S3. Based on the historical surveillance video of the examination room, a feature vector data set of changes in the number of people leaving the examination room normally is obtained, the centroid of the feature vector data set and the threshold for judging as an outlier are obtained, and the Mahalanobis distance between the feature vector to be detected and the centroid is calculated. When the Mahalanobis distance is greater than the threshold, it is determined that there is an abnormality in the examination room to be detected.
[0044] In some embodiments, the process of executing step S1 includes:
[0045] S1.1. Train a deep learning model based on historical surveillance videos of the same specifications as the examination room to be tested to obtain a candidate location detection model;
[0046] S1.2. Extract key frames of the surveillance video of the examination room to be tested at intervals of 30 seconds to generate an examination room status diagram;
[0047] S1.3. Based on the examination room candidate location detection model, the number of candidates and corresponding location information in the examination room status diagram are detected, and a candidate sequence is established.
[0048] Specifically, in executing step S1.1, the process of training the deep learning model based on historical surveillance videos of the same specifications of the examination room to be detected to obtain the examination room candidate location detection model includes:
[0049] Obtain key frames from historical surveillance videos of the examination room, annotate the positions of examinees in the key frames to obtain training and test datasets, and preset anchor frames suitable for examinees and the intersection-over-union ratio threshold for determining examinees for the initial single-stage examinee position detection model;
[0050] Pre-training an initial single-stage examination room candidate location detection model based on a public dataset, adjusting the hyperparameters of the pre-trained model, and fine-tuning the model using the training dataset to obtain a test room candidate location detection model. The fine-tuning uses cosine learning rate decay;
[0051] The position detection model of the examinee in the test room is evaluated based on the test data set. When the harmonic mean of the model is less than the set expected value, the hyperparameters are reset and retraining is performed. Otherwise, the weights of the position detection model of the examinee in the test room are saved.
[0052] In fact, the present invention aims to detect collective cheating behavior of candidates in the examination room. Taking into account that there are many examination rooms in an examination and the examination time is long, there are high requirements for detection efficiency. Therefore, this example uses the single-stage target detection model YOLOV5m to detect candidates. The YOLOV5 model can ensure the detection speed and take into account the detection accuracy without occupying much memory, and is suitable for use in this scenario.
[0053] Furthermore, because exams often involve numerous venues and take long periods of time, the surveillance footage often contains excessively redundant information. This example uses fffmpeg to retrieve all keyframes from the historical surveillance footage. After obtaining the keyframes, labelImg is used to annotate the examinee's position within the keyframes, saving them in YOLO format. This method obtains labeled images of examinee positions from the exam surveillance footage, and uses the Mosaic method to augment the training data, with 75% of the images used as the training dataset and 25% as the test dataset.
[0054] Furthermore, this example first uses the public pedestrian datasets USC Pedestrian Database and MIT Pedestrian Database to pre-train the model. After the pre-training is completed, the model hyperparameters are adjusted, and then the training dataset is used to fine-tune the model. Cosine learning rate decay is used in model fine-tuning, with the initial learning rate set to 0.01, the decay period T_max set to 20, and eta_min, the minimum value of the learning rate decay, set to 0.001. The Adam optimizer is used, the momentum is set to 0.937, the weight decay is 0.0005, and a total of 600 rounds of training are performed. Since the examination environment may have a relatively dense population of candidates, this example replaces the standard NMS (non-maximum suppression) used in the YOLOV5m model with adaptive NMS (adaptive non-maximum suppression) to adapt to the examination environment.
[0055] Finally, after the model is trained using the training dataset, it is tested using the test dataset. In this example, the IOU (intersection-over-union) threshold between the predicted box and the true box is set to 0.5, and the calculation formula is: Where A is the true box, B is the predicted box, and A∩B is the area of intersection between A and B. Since there are only human and background classes, we only need to calculate the P value (precision) and R value (recall rate) of the model, and calculate the harmonic mean based on the P value and R value. In this example, the model is evaluated every 20 rounds of training. If the F-value is less than 0.8, the hyperparameters are reset and training is repeated. If there is an F-value greater than 0.8, the model weight with the highest F-value is saved.
[0056] Specifically, in the process of executing step S1.2, extracting key frames of the surveillance video of the examination room to be detected based on 30-second intervals to generate the examination room status diagram, the process includes:
[0057] After the exam, obtain the surveillance video of the examination room to be tested, divide the examination room surveillance video into 30-second intervals, obtain a 30-second image frame sequence, use the key frame extraction tool to extract key frames from the video within 30 seconds, and convert the extracted one or several key frame images into standard images through brightness processing and size transformation. Use the reference-free image clarity detection algorithm on the standard image to obtain the clearest image as the examination room status diagram for that time period.
[0058] Furthermore, according to the above method, a total of 240 test room state diagram sequences of the test room to be tested can be obtained and recorded as {f1, f2, f3, ..., f 240}.
[0059] Specifically, in executing step S1.3, the process of detecting the number of examinees and corresponding position information in the examination room state diagram based on the examination room examinee position detection model and establishing the examinee sequence includes:
[0060] The examination room state diagram is input into the examination room candidate position detection model for detection to obtain the number and position of the prediction boxes. Redundant anchor boxes are removed based on the non-maximum suppression method. Based on whether there are candidates in the prediction box, whether they have left the examination room is determined to determine the number of candidates.
[0061] When the distance between the seats of the examinees is small, the coordinates of the center points of each prediction frame are calculated, the coordinates of the center points are sorted, and the sorting results are matched one-to-one with the seat numbers of the examination room to obtain the examinee's location;
[0062] When the seats in the examination room are relatively large, grids are divided according to the position of the prediction box, and each grid is numbered according to the examination room seat arrangement rules to obtain the candidate's location;
[0063] Based on the standard number of people in the examination room and the number and positions of candidates obtained by detection, a binary sequence corresponding to the examination room status diagram is constructed.
[0064] In some embodiments, the process of executing step S2 includes:
[0065] S2.1. Construct a baseline candidate sequence based on the union of the candidate sequences in the first 3 minutes;
[0066] S2.2. Obtain the sequence of candidates leaving the examination room in all examination room status diagrams based on the baseline candidate sequence;
[0067] S2.3. Generate a feature vector to be detected based on the sequence to be detected, which includes the number of candidates leaving the examination room in each time period.
[0068] Specifically, in step S2.2, based on the reference candidate sequence, the sequence to be detected of candidates leaving the examination room in all examination room status diagrams is obtained, including:
[0069] Based on the benchmark candidate sequence, the number and location of candidates taking the exam in the test room are obtained, and the benchmark sequence is XORed with the candidate sequence of each test room status diagram to obtain the sequence to be tested that includes the number of candidates leaving the test room within the time interval of each test room status diagram.
[0070] In fact, see Figure 2 and Figure 3 By taking the XOR operation between the candidate sequence at time t and the reference sequence, we can obtain the candidate who left the examination room at time t.
[0071] Specifically, in step S2.3, a feature vector to be detected is generated based on the sequence to be detected, which includes the number of candidates leaving the examination room in each time period, including:
[0072] The total examination duration is divided into time periods, and the sequences to be detected within the time periods are ORed to obtain a sequence of changes in the number of candidates leaving the examination room in each time period. Based on the sequence of changes in the number of candidates, a feature vector to be detected is constructed containing the number of candidates leaving the examination room in each time period.
[0073] Furthermore, the process of dividing the time periods according to the total examination duration includes: when the examination duration is 120 minutes, the divided time periods are set to 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes and 60 minutes respectively.
[0074] In fact, in this embodiment, the test duration is set to 120 minutes, and the number of people changing sequences within every 1 minute, every 2 minutes, every 5 minutes, every 10 minutes, and every 30 minutes are calculated respectively. The number of people changing sequences in each time period are combined as feature vectors to obtain a feature vector to be detected with a length of 220, which is recorded as x = (x1, x2, ..., x 220 ) T .
[0075] In some embodiments, the process of executing step S3 includes:
[0076] S3.1. Obtain a feature vector dataset of the number of people leaving the examination room normally based on historical surveillance videos of the examination room; S3.2. Obtain the centroid of the feature vector dataset and the threshold for determining outliers;
[0077] S3.3. Calculate the Mahalanobis distance between the feature vector to be detected and the centroid;
[0078] S3.4. Identify abnormal candidates based on the test results.
[0079] Specifically, in step S3.1, a feature vector dataset of the change in the number of people leaving the examination room normally is obtained based on the historical surveillance video of the examination room, including:
[0080] Through manual detection, suspicious surveillance videos showing frequent entry and exit of candidates are eliminated from historical surveillance videos. The remaining surveillance videos are detected using the examination room candidate location detection model, and a candidate sequence is established based on the detection results. Based on the candidate sequence, a feature vector dataset containing the number of candidates leaving the examination room in each time period is obtained.
[0081] Specifically, in the process of executing step S3.2, obtaining the centroid of the feature vector data set and the threshold for determining an outlier, the process includes:
[0082] The features of each time period in the feature vector data set are averaged to obtain the centroid of the data set, the Mahalanobis distance between all feature vectors in the data set and the centroid is calculated, and the Mahalanobis distance threshold for judging outliers is calculated using an adaptive threshold algorithm.
[0083] In fact, the Mahalanobis distance threshold for judging outliers can be obtained by averaging the Mahalanobis distances between all eigenvectors and the centroid in the data set and multiplying it by k.
[0084] Furthermore, in this embodiment, k is set to 3.
[0085] Specifically, in step S3.3, the Mahalanobis distance between the feature vector to be detected and the centroid is calculated using the following formula:
[0086]
[0087] Among them, D M (x) is the Mahalanobis distance between the centroid and the feature vector to be detected, (x-μ) T is the covariance matrix between the centroid and the eigenvector to be detected in each time period, ∑ -1 (x-μ) is the inverse matrix of the covariance matrix, x is the eigenvector to be detected, and μ is the centroid.
[0088] In fact, taking the outlier judgment of the eigenvector of the i-th test site as an example, the i-th eigenvector is obtained and recorded as x=(x1,x2,...,x 220 ) T , calculate its Mahalanobis distance with the centroid μ, if its value is greater than t, it is determined that the change in the number of people in the examination room is abnormal.
[0089] For further information, see Figure 4 The black circular data in the figure represent the characteristic vectors of normal number changes obtained in the past three years (this figure only uses two-dimensional features for demonstration), the triangle is the obtained centroid μ, and the diamond is the feature of the examination room to be judged. If its distance from μ is greater than the threshold t, it means that it is outside the dotted box and is an outlier. It can be understood that this example uses the Mahalanobis distance as the outlier judgment because the Mahalanobis distance method can detect outliers of multivariate variables, and the Mahalanobis distance is not affected by the dimension. Because the change in the number of people in the examination room in the early, middle and late stages of the exam is often different, the Mahalanobis distance method can be used to effectively judge abnormal data. The parameter k for threshold calculation is generally set to 2 or 3. Since the data set in this example has been manually eliminated for anomalies, it is set to 3 in this example.
[0090] Furthermore, if the Mahalanobis distance between x and the centroid μ is less than the threshold t, but the number of people changes too much within a certain period of time, this example sets thresholds for different time periods, that is, the thresholds corresponding to 1 minute, 2 minutes, 5 minutes, 10 minutes, and 30 minutes are 2, 2, 3, 4, and 5 respectively. That is, this example will judge each value in the feature vector of length 220 and compare it with the corresponding threshold. If it is greater than or equal to this threshold, the feature vector of the examination room is determined to be an outlier.
[0091] Specifically, in step S3.4, judging abnormal candidates based on the test results includes:
[0092] If an outlier is identified, the admission ticket number sequence stuNoout for each candidate entering and exiting the examination room is obtained. The examination room surveillance video is carefully reviewed to determine whether any candidates who left the examination room midway are engaging in cheating. The information of candidates entering and exiting the same or different examination rooms during the same timeframe is then collected. Their test papers are then reviewed by professional examiners to determine if any duplicates exist, ultimately confirming any cheating.
[0093] While the embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations of these embodiments are possible. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the claims. Furthermore, the invention described herein is susceptible to other embodiments and may be practiced or implemented in a variety of ways.
Claims
1. A method for detecting abnormal changes in the number of people in an examination room based on the positions of examinees, characterized in that: The following steps are involved: A deep learning model is trained based on historical surveillance videos of the same specifications as the examination room to be tested to obtain an examination room candidate location detection model. Key frames of the surveillance video of the examination room to be tested are extracted at 30-second intervals to generate an examination room status diagram. The examination room candidate location detection model is used to detect the number of candidates and their corresponding location information in the examination room status diagram, and a candidate sequence is established. A benchmark candidate sequence is constructed by taking the union of the candidate sequences from the first 3 minutes. A sequence to be detected in all the test room status diagrams of candidates leaving the test room is obtained based on the benchmark candidate sequence. A feature vector to be detected is generated based on the sequence to be detected, which contains the number of candidates leaving the test room in each time period. Obtain a feature vector dataset of the number of people leaving the examination room normally based on historical surveillance videos of the examination room, obtain the centroid of the feature vector dataset and a threshold for determining an outlier, calculate the Mahalanobis distance between the feature vector to be detected and the centroid, and determine that an abnormality exists in the examination room to be detected when the Mahalanobis distance is greater than the threshold; The method of obtaining a sequence of candidates leaving the examination room in all examination room status diagrams based on the reference candidate sequence as a reference includes: obtaining the number and location of candidates taking the examination in the examination room to be tested based on the reference candidate sequence, performing an XOR operation on the reference sequence and the candidate sequence of each examination room status diagram to obtain a sequence of candidates leaving the examination room within the time interval of each examination room status diagram; A feature vector to be detected is generated based on the sequence to be detected, which includes the following steps: dividing the time periods according to the total duration of the examination, performing an OR operation on the sequence to be detected within the time period to obtain a sequence of changes in the number of candidates leaving the examination room in each time period, and constructing a feature vector to be detected based on the sequence of changes in the number of candidates leaving the examination room in each time period.
2. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The process of training a deep learning model based on historical surveillance videos of the same specifications as the examination room to be tested to obtain a candidate location detection model includes: Obtain key frames from historical surveillance videos of the examination room, annotate the positions of examinees in the key frames to obtain training and test datasets, and preset anchor frames suitable for examinees and the intersection-over-union ratio threshold for determining examinees for the initial single-stage examinee position detection model; Pre-training an initial single-stage examination room candidate location detection model based on a public dataset, adjusting the hyperparameters of the pre-trained model, and fine-tuning the model using the training dataset to obtain a test room candidate location detection model. The fine-tuning uses cosine learning rate decay; The position detection model of the examinee in the test room is evaluated based on the test data set. When the harmonic mean of the model is less than the set expected value, the hyperparameters are reset and retraining is performed. Otherwise, the weights of the position detection model of the examinee in the test room are saved.
3. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The process of extracting key frames from the surveillance video of the examination room to be detected based on 30-second intervals to generate the examination room status diagram includes: After the exam, obtain the surveillance video of the examination room to be tested, divide the examination room surveillance video into 30-second intervals, obtain a 30-second image frame sequence, use the key frame extraction tool to extract key frames from the video within 30 seconds, and convert the extracted one or several key frame images into standard images through brightness processing and size transformation. Use the reference-free image clarity detection algorithm on the standard image to obtain the clearest image as the examination room status diagram for that time period.
4. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The process of detecting the number of examinees and their corresponding positions in the examination room status diagram based on the examinee location detection model and establishing the examinee sequence includes: The examination room state diagram is input into the examination room candidate position detection model for detection to obtain the number and position of the prediction boxes. Redundant anchor boxes are removed based on the non-maximum suppression method. Based on whether there are candidates in the prediction box, whether they have left the examination room is determined to determine the number of candidates. When the distance between the seats of the examinees is small, the coordinates of the center points of each prediction box are calculated, the coordinates of the center points are sorted, and the sorting results are matched one-to-one with the seat numbers of the examination room to obtain the examinee's location; When the seats in the examination room are relatively large, grids are divided according to the position of the prediction box, and each grid is numbered according to the examination room seat arrangement rules to obtain the candidate's location; Based on the standard number of people in the examination room and the number and positions of candidates obtained by detection, a binary sequence corresponding to the examination room status diagram is constructed.
5. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The process of dividing the time periods according to the total length of the exam includes: When the exam duration is 120 minutes, the time periods are set as 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes and 60 minutes respectively.
6. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: Based on the historical surveillance videos of the examination room, a feature vector dataset of the normal number of people leaving the examination room is obtained, including: Through manual detection, suspicious surveillance videos showing frequent entry and exit of candidates are eliminated from historical surveillance videos. The remaining surveillance videos are detected using the examination room candidate location detection model, and a candidate sequence is established based on the detection results. Based on the candidate sequence, a feature vector dataset containing the number of candidates leaving the examination room in each time period is obtained.
7. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The process of obtaining the centroid of the feature vector data set and the threshold value for determining an outlier includes: The features of each time period in the feature vector data set are averaged to obtain the centroid of the data set, the Mahalanobis distance between all feature vectors in the data set and the centroid is calculated, and the Mahalanobis distance threshold for judging outliers is calculated using an adaptive threshold algorithm.
8. The method for detecting abnormal changes in the number of people in an examination room based on the position of examinees according to claim 1, characterized in that: The Mahalanobis distance between the feature vector to be detected and the centroid is calculated using the following formula: ; in, is the Mahalanobis distance between the centroid and the feature vector to be detected, is the covariance matrix between the centroid and the eigenvector to be detected in each time period, is the inverse matrix of the covariance matrix, is the feature vector to be detected, is the center of mass.
Citation Information
Patent Citations
An examinee examination room abnormal behavior analysis method based on deep learning
CN109815816A
Examination room abnormal behavior analysis method and system based on deep learning, and terminal
CN115546899A