A behavior control method and system based on AI
By acquiring and tracking subject features in the AI behavior control system, combining video acquisition and training local models with different accuracy, the problem of slow AI recognition speed is solved and the recognition efficiency is improved.
Patent Information
- Application Number
- CN202510690718.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The existing AIs are slow to identify during the personnel identification process, which leads to excessive time-consuming time when there are too many people, affecting the recognition efficiency.
By acquiring subject images at the area entrance, identifying and extracting subject features, inserting into the area feature library for real-time tracking, combining video acquisition and recognition with different precisions, local neural network models are trained to optimize the recognition process.
The recognition task volume is reduced, the total recognition time is shortened, and the recognition efficiency is improved through local models.
Smart Images

Figure CN120220251B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent supervision technology, and specifically to an AI-based behavior management method and system. Background Art
[0002] With the advancement of AI technology, AI has more and more application scenarios, such as regional behavior control. In some public places or places with frequent personnel flow, the application of AI can greatly alleviate the work pressure of managers. However, although AI has strong recognition capabilities and a wide recognition range, its recognition speed is very slow, measured in seconds. When the number of people is large, the recognition process takes a long time, affecting the recognition efficiency. How to optimize the AI recognition process and improve the recognition efficiency for multi-person recognition tasks is the technical problem that the technical solution of the present invention aims to solve. Summary of the Invention
[0003] The purpose of the present invention is to provide an AI-based behavior management method and system to solve the problems raised in the above background technology.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] An AI-based behavior control method and system, the method comprising:
[0006] Obtain the subject image at the entrance of the area, identify the subject image, determine the subject area, and simultaneously extract the subject features;
[0007] Inserting the subject features into the regional feature library, tracking the regional video in real time based on the regional feature library to determine the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy;
[0008] Locating the abnormal subject according to the subject's motion trajectory, capturing a close-up video of the abnormal subject based on a second precision, and identifying the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the identification result;
[0009] Record the close-up video recognized by AI and its recognition results, and train a local recognition model; the local recognition model is a neural network model.
[0010] As a further solution of the present invention, the steps of acquiring a subject image at the region entrance, identifying the subject image, determining the subject region, and simultaneously extracting subject features include:
[0011] A camera with a temperature measurement module is installed at the entrance of the area, and the camera obtains the entrance image containing temperature information in real time;
[0012] locating the subject area in the inlet image based on the temperature information;
[0013] Traverse the main area and calculate the horizontal gradient and vertical gradient of each pixel in the main area. When the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions, mark the pixel;
[0014] Count the marked pixels to obtain the subject outline, and construct the subject features based on the subject outline.
[0015] As a further solution of the present invention, the steps of counting the marked pixel points to obtain the subject outline and constructing subject features based on the subject outline include:
[0016] Count the marked pixels to get the subject outline;
[0017] Extract the inner area of the subject outline from the layers of different channels, traverse the pixels in each layer, record the pixel values, and construct an array; the traversal order of the pixels in all layers is the same;
[0018] For each array, calculate the independent value of each value in sequence; the independent value is used to represent the degree of difference between each value and other values in the array;
[0019] Accumulate independent values. When the independent value reaches the preset value, mark the corresponding serial number;
[0020] The serial numbers are screened and the screened serial numbers are used as main features.
[0021] As a further solution of the present invention, the step of inserting the subject feature into the regional feature library, tracking the regional video in real time based on the regional feature library, and determining the subject's motion trajectory includes:
[0022] Insert the subject feature into the regional feature library;
[0023] Read the regional video and select video frames in the regional video according to the preset time step;
[0024] Read the subject features in the regional feature library in turn, traverse the selected video frames, and determine the subject position corresponding to the subject features;
[0025] Count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position;
[0026] Obtain a regional map, select mapping points in the regional map based on the center point, synchronously determine the color value, fit all mapping points, and obtain the subject motion trajectory corresponding to the subject feature;
[0027] Among them, when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced. When the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
[0028] As a further solution of the present invention, the steps of locating the abnormal subject according to the subject's motion trajectory, capturing a close-up video of the abnormal subject based on the second precision, and identifying the close-up video based on AI include:
[0029] Receiving the backdating time determined by the staff;
[0030] Obtain all subject motion trajectories within the retrospective time based on the regional map;
[0031] Cluster pixels of the area map containing the subject's motion trajectory to obtain sub-areas;
[0032] Calculate the mean color value of each pixel in each sub-region and determine the area to be analyzed based on the mean color value of the pixels;
[0033] Determine the magnification factor based on the average pixel color value, obtain the close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI;
[0034] Recursively adjust the magnification based on AI recognition results.
[0035] As a further solution of the present invention: the step of recording the close-up video recognized by AI and its recognition results and training the local recognition model includes:
[0036] Record close-up videos identified by AI and their identification results;
[0037] Extract features from close-up videos to obtain video features;
[0038] Construct a sample set of video features to recognition results and train the neural network model;
[0039] When the error rate of the neural network model is less than a preset error rate threshold, the neural network model is output as a local recognition model.
[0040] The technical solution of the present invention also provides an AI-based behavior management system, which includes:
[0041] The subject feature extraction module is used to obtain the subject image at the entrance of the area, identify the subject image, determine the subject area, and simultaneously extract the subject features;
[0042] A subject tracking module is used to insert subject features into a regional feature library, track the regional video in real time based on the regional feature library, and determine the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy;
[0043] An AI target recognition module is configured to locate an abnormal subject based on the subject's motion trajectory, collect a close-up video of the abnormal subject based on a second precision, and identify the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the recognition result;
[0044] The local model training module is used to record the close-up video recognized by AI and its recognition results, and train the local recognition model; the local recognition model is a neural network model.
[0045] As a further solution of the present invention: the subject feature extraction module includes:
[0046] An entrance image acquisition unit is used to install a camera with a temperature measurement module at the entrance of the area, and the camera acquires the entrance image containing temperature information in real time;
[0047] a region positioning unit, configured to locate a subject region in the inlet image based on the temperature information;
[0048] A pixel marking unit is used to traverse the main area, calculate the horizontal gradient and vertical gradient of each pixel in the main area, and mark the pixel when the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions;
[0049] The contour construction unit is used to count the marked pixels to obtain the subject contour and construct the subject features based on the subject contour.
[0050] As a further solution of the present invention: the subject tracking module includes:
[0051] A feature insertion unit, used for inserting subject features into a regional feature library;
[0052] A video frame selection unit is used to read the regional video and select video frames in the regional video according to a preset time step;
[0053] A position determination unit is used to sequentially read subject features from the regional feature library, traverse the selected video frames, and determine the subject position corresponding to the subject feature;
[0054] A center point calculation unit, configured to count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position;
[0055] A fitting unit is used to obtain a regional map, select mapping points in the regional map based on the center point, synchronously determine the color value, fit all the mapping points, and obtain the subject motion trajectory corresponding to the subject feature;
[0056] Among them, when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced. When the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
[0057] As a further solution of the present invention: the AI target recognition module includes:
[0058] A backtracking time receiving unit, used to receive the backtracking time determined by the staff;
[0059] A trajectory acquisition unit, used to acquire the motion trajectories of all subjects within the retrospective time based on the regional map;
[0060] A pixel clustering unit is used to cluster pixels on the area map containing the subject's motion trajectory to obtain sub-areas;
[0061] A mean value calculation unit is used to calculate the mean color value of pixels in each sub-region and determine the region to be analyzed based on the mean color value of pixels;
[0062] A mean application unit is used to determine a magnification factor based on the mean pixel color value, obtain close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI;
[0063] The recursive adjustment unit is used to recursively adjust the magnification according to the AI recognition result.
[0064] Compared with the prior art, the present invention has the following beneficial effects:
[0065] The present invention performs subject recognition on the acquired video, determines the subject's motion trajectory, selects a partial area based on the motion trajectory, and applies AI for recognition, thereby reducing the amount of recognition tasks and thus shortening the total time of the recognition task. At the same time, a local model is distilled based on the recognition results, further improving the recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention.
[0067] Figure 1 The overall flow chart of the AI-based behavior control method is shown.
[0068] Figure 2The structure diagram of the AI-based behavior control system is shown. DETAILED DESCRIPTION
[0069] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0070] Figure 1 The following is a general flow chart of an AI-based behavior control method and system. In an embodiment of the present invention, an AI-based behavior control method includes:
[0071] Step S100: acquiring a subject image at the region entrance, identifying the subject image, determining the subject region, and simultaneously extracting subject features;
[0072] The technical solution of the present invention is applied to regional personnel monitoring scenarios, especially scenarios where personnel cannot be registered in advance, such as most existing public places or some production areas with frequent personnel transfers. The managers of these scenarios will pre-install cameras to obtain images in the area; for the areas involved in the technical solution of the present invention, their entrances will be pre-set, and the clarity of the cameras installed at the entrances of the areas are generally relatively high, and the operating frequency is also relatively high, and images are obtained in real time. When a person is detected, it is called a subject image. By identifying the subject image, the subject area can be determined. By analyzing the subject area, the subject features can be extracted in the subject area.
[0073] Step S200: inserting the subject feature into the regional feature library, tracking the regional video in real time based on the regional feature library, and determining the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy;
[0074] After the subject features are detected, they are inserted into the regional feature library. In the detection stage, the regional video is traversed based on each subject feature in the regional feature library to track the corresponding subject, extract all tracked positions, and obtain the trajectory of each subject, which is called the subject motion trajectory. In addition, the regional video is obtained by the camera installed in the area, and the accuracy of the regional video can be lower, which is the first accuracy mentioned above. The same camera can detect a larger range.
[0075] Step S300: Locating the abnormal subject according to the subject's motion trajectory, capturing a close-up video of the abnormal subject based on a second precision, and identifying the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the identification result;
[0076] By analyzing the motion trajectories of all extracted subjects, some subjects that may be abnormal can be selected. At this time, the close-up video of the abnormal subject is obtained by the camera installed in the area. At this time, the accuracy is higher, which is the second accuracy mentioned above. After obtaining the close-up video, AI-based recognition of the close-up video can obtain more accurate recognition results.
[0077] Among them, regarding the relationship between the first accuracy and the second accuracy, a feasible adjustment method is to link the accuracy with the magnification. The first accuracy corresponds to a smaller magnification. At this time, the camera's monitoring range is large, but the detail is insufficient. The second accuracy corresponds to a larger magnification. At this time, the camera only obtains video of a small area, and the monitoring range is very small.
[0078] Step S400: Recording the close-up video identified by AI and its recognition results, and training a local recognition model; the local recognition model is a neural network model;
[0079] Existing AI recognition capabilities are extremely strong and have high recognition accuracy, but they consume a lot of resources and the recognition speed is not that fast. Therefore, the technical solution of the present invention records the close-up video recognized by AI and its recognition results, and then trains a local recognition model. Since the behavior types in an area are highly repeatable, the data volume of the local recognition model may be very small and the recognition speed is extremely fast.
[0080] Regarding step S100, the steps of acquiring a subject image at the region entrance, identifying the subject image, determining the subject region, and simultaneously extracting subject features include:
[0081] A camera with a temperature measurement module is installed at the entrance of the area, and the camera obtains the entrance image containing temperature information in real time;
[0082] locating the subject area in the inlet image based on the temperature information;
[0083] Traverse the main area and calculate the horizontal gradient and vertical gradient of each pixel in the main area. When the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions, mark the pixel;
[0084] Count the marked pixels to obtain the subject outline, and construct the subject features based on the subject outline.
[0085] In an example of the technical solution of the present invention, the feature extraction process at the entrance of the area is described. A camera containing a temperature measurement module is installed at the entrance of the area. The camera obtains an entrance image containing temperature information in real time. The temperature information is used to simplify the target positioning process. The main area is located in the entrance image based on the temperature information, the main area is traversed, and the horizontal gradient and vertical gradient of each pixel point in the main area are calculated. The horizontal gradient represents the lateral difference of the pixel point, and the vertical gradient represents the vertical difference of the pixel point. When the horizontal gradient and vertical gradient of a pixel point meet the preset gradient conditions, the pixel point is marked; at this time, the marked pixel point is the contour point, and the marked pixel points are counted to obtain the main contour, and the main feature is constructed according to the main contour.
[0086] Furthermore, the steps of counting the marked pixel points to obtain the subject outline and constructing subject features according to the subject outline include:
[0087] Count the marked pixels to get the subject outline;
[0088] Extract the inner area of the subject outline from the layers of different channels, traverse the pixels in each layer, record the pixel values, and construct an array; the traversal order of the pixels in all layers is the same;
[0089] For each array, calculate the independent value of each value in sequence; the independent value is used to represent the degree of difference between each value and other values in the array;
[0090] Accumulate independent values. When the independent value reaches the preset value, mark the corresponding serial number;
[0091] The serial numbers are screened and the screened serial numbers are used as main features.
[0092] After obtaining the main contour, extract the layers of the internal area of the main contour under different channels, and convert the pixel points in the layer into an array in a preset order. For example, read the value of each pixel point from left to right and from top to bottom. This process is a dimensionality reduction process, and the information in the layer will be converted into an array; for each array, calculate the difference between each value and other values in turn. If the difference is small, it can be considered that it forms an area with the surrounding pixels. At this time, mark the corresponding serial number; count the serial numbers of the marks corresponding to each layer, which can be used as the main features.
[0093] Regarding the calculation process of the independence value, for each element, the difference between its value and the values of other elements is calculated, and then accumulated. Taking into account the distance factor, this application introduces a weight coefficient so that the elements closer to the current element have a greater influence on the current element. Generally speaking, the larger the difference, the greater the difference between the current element and other elements, the higher the independence, and the larger the independence value. Therefore, a feasible calculation method is:
[0094] The calculation process of independent value is: Where, For the preset parameters, It is The distance between the element and the current element in the image, N is the total number of elements, For the The difference between the value of the first element and the value of the current element; during the calculation process, the independent value is inversely proportional to the sum of the differences.
[0095] It is worth mentioning that the above summation process involves all elements in the array. In fact, the staff can set a range, such as 20% of the array elements, to determine the independent value of a certain element relative to a limited number of surrounding elements.
[0096] Regarding step S200, the steps of inserting the subject feature into the regional feature library, tracking the regional video in real time based on the regional feature library, and determining the subject's motion trajectory include:
[0097] Insert the subject feature into the regional feature library;
[0098] Read the regional video and select video frames in the regional video according to the preset time step;
[0099] Read the subject features in the regional feature library in turn, traverse the selected video frames, and determine the subject position corresponding to the subject features;
[0100] Count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position;
[0101] Obtain a regional map, select mapping points in the regional map based on the center point, determine the color value simultaneously, fit all mapping points, and obtain the subject motion trajectory corresponding to the subject feature.
[0102] The regional feature library contains multiple main features, and these main features must be applied to read the regional video. The acquisition frequency of the regional video is very high, perhaps 24 frames per second, and the number of images is large. If each image is analyzed, a lot of computing resources will be consumed. Therefore, the present invention limits a time step, such as one second. The meaning of selecting video frames in the regional video according to the preset time step is to select an image every second, which greatly simplifies the data processing process. In the trajectory recognition process, due to the continuity of space, people will not teleport. This simplified data processing process can still obtain very accurate trajectories.
[0103] Specifically, regarding the data processing process, the subject features are read in the regional feature library in turn, the selected video frames are traversed, the subject position corresponding to the subject feature is determined, all subject positions of the same subject feature are counted according to the time sequence of the video frames, the center point of the subject position is calculated (the center point calculation process belongs to the conventional image processing technology), the regional map is obtained, the mapping point is selected in the regional map based on the center point, the color value is determined synchronously, all the mapping points are fitted, and the subject motion trajectory corresponding to the subject feature is obtained.
[0104] The method for inserting color values into the area map is as follows: a circular area is constructed with the center point corresponding to the mapping point as the center and a preset value as the radius, and a preset unit color value is superimposed once within the circular area. The trajectory generation process uses a cumulative "drawing" process to obtain the area map. Each time the subject's position is detected, a color value is inserted at the subject's position. The more frequently a position appears, the larger the corresponding color value. In this case, the larger the color value, the longer the subject stays. For each subject, its corresponding trajectory contains a unique label to indicate the corresponding relationship between the trajectory and the subject. In addition, the radius of the circular area mentioned above is used to adjust the width of the trajectory.
[0105] As a preferred embodiment of the technical solution of the present invention, an update scheme for the regional feature library is introduced, which is as follows: when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced; when the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
[0106] The meaning of this process is that if a subject feature does not appear in the regional video, the time step is reduced, more images are obtained, and traversal is performed. If it still does not appear, it is continued to be reduced until it is small enough (step threshold). If it still does not appear, it is checked how long the subject feature has been applied, that is, how long the subject feature has not been detected. If the time is long enough (duration threshold), the subject feature is deleted from the regional feature library.
[0107] It is worth mentioning that the practical significance of this deletion method is that if a subject feature is not detected for a long time at a sufficiently high frequency, it means that the corresponding subject has disappeared in the area and will no longer be detected. At this time, if there is an exit (usually there will be multiple exits), the subject is detected in the exit video and the whereabouts of the subject are obtained. According to the whereabouts of the subject, it can be determined whether the subject has left or is still in the area. If it is still in the area, it means that the subject has disappeared in the area for a long time. At this time, a warning message is generated; the update logic of the traditional regional feature library is to set a camera corresponding to the entrance and a detection logic at the exit. Once a subject is detected leaving the area, the corresponding subject feature is deleted and the length of stay of each subject is recorded. If it is long enough, a warning message is generated. This method is also feasible and has a different logic from the above scheme. The difference is that the architecture of the technical solution of the present invention has a one-step time step adjustment process. In other words, for subjects that are not easy to find, a higher frequency is used for tracking.
[0108] It is worth mentioning that there may be many situations in which no matching is achieved in the present invention. For example, if the subject's posture changes or is blocked, its state in the image will be different from the subject's features, and matching failure may occur.
[0109] Regarding step S300, the steps of locating the abnormal subject according to the subject's motion trajectory, capturing a close-up video of the abnormal subject based on the second precision, and identifying the close-up video based on AI include:
[0110] Receiving the backdating time determined by the staff;
[0111] Obtain all subject motion trajectories within the retrospective time based on the regional map;
[0112] Cluster pixels of the area map containing the subject's motion trajectory to obtain sub-areas;
[0113] Calculate the mean color value of each pixel in each sub-region and determine the area to be analyzed based on the mean color value of the pixels;
[0114] Determine the magnification factor based on the average pixel color value, obtain the close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI;
[0115] Recursively adjust the magnification based on AI recognition results.
[0116] In an example of the technical solution of the present invention, a backtracking time determined by a staff member is received, and the current moment is taken as the time starting point, and all subject motion trajectories within the backtracking time are obtained forward, and these subject motion trajectories are inserted into the same regional map. Then, pixel points of the regional map containing the subject motion trajectories are clustered to obtain sub-regions. The clustering process uses two types of pixel point difference calculation processes, including position difference and color value difference. The clustering scheme can adopt a conventional clustering scheme, such as a K-means clustering scheme or other clustering schemes with no limit on the number of classes. The mean color value of pixels in each sub-region is calculated. The larger the mean color value of pixels, the longer the stay time and the higher the importance of the corresponding region. A type of pixel points whose mean color value of pixels is greater than a preset mean threshold are selected as the region to be analyzed.
[0117] Regarding step S400, the steps of recording the AI-recognized close-up video and its recognition results and training the local recognition model include:
[0118] Record close-up videos identified by AI and their identification results;
[0119] Extract features from close-up videos to obtain video features;
[0120] Construct a sample set of video features to recognition results and train the neural network model;
[0121] When the error rate of the neural network model is less than a preset error rate threshold, the neural network model is output as a local recognition model.
[0122] In an example of the technical solution of the present invention, the training process of the local recognition model is described, the close-up video recognized by AI and its recognition results are recorded, feature extraction is performed on the close-up video to obtain video features, a sample set of video features to recognition results is constructed, and a neural network model is trained; when the error rate of the neural network model is less than a preset error rate threshold, the neural network model is output as a local recognition model.
[0123] Figure 2 The structure diagram of the AI-based behavior control system is shown. In a preferred embodiment of the technical solution of the present invention, an AI-based behavior control system is also provided. The system 10 includes:
[0124] The subject feature extraction module 11 is used to obtain the subject image at the area entrance, identify the subject image, determine the subject area, and simultaneously extract the subject features;
[0125] The subject tracking module 12 is used to insert the subject features into the regional feature library, track the regional video in real time based on the regional feature library, and determine the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy;
[0126] An AI target recognition module 13 is configured to locate an abnormal subject based on the subject's motion trajectory, collect a close-up video of the abnormal subject based on a second precision, and identify the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the recognition result;
[0127] The local model training module 14 is used to record the close-up video recognized by AI and its recognition results, and train the local recognition model; the local recognition model is a neural network model.
[0128] Furthermore, the subject feature extraction module 11 includes:
[0129] An entrance image acquisition unit is used to install a camera with a temperature measurement module at the entrance of the area, and the camera acquires the entrance image containing temperature information in real time;
[0130] a region positioning unit, configured to locate a subject region in the inlet image based on the temperature information;
[0131] A pixel marking unit is used to traverse the main area, calculate the horizontal gradient and vertical gradient of each pixel in the main area, and mark the pixel when the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions;
[0132] The contour construction unit is used to count the marked pixels to obtain the subject contour and construct the subject features based on the subject contour.
[0133] Specifically, the subject tracking module 12 includes:
[0134] A feature insertion unit, used for inserting subject features into a regional feature library;
[0135] A video frame selection unit is used to read the regional video and select video frames in the regional video according to a preset time step;
[0136] A position determination unit is used to sequentially read subject features from the regional feature library, traverse the selected video frames, and determine the subject position corresponding to the subject feature;
[0137] A center point calculation unit, configured to count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position;
[0138] A fitting unit is used to obtain a regional map, select mapping points in the regional map based on the center point, synchronously determine the color value, fit all the mapping points, and obtain the subject motion trajectory corresponding to the subject feature;
[0139] Among them, when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced. When the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
[0140] Furthermore, the AI target recognition module 13 includes:
[0141] A backtracking time receiving unit, used to receive the backtracking time determined by the staff;
[0142] A trajectory acquisition unit, used to acquire the motion trajectories of all subjects within the retrospective time based on the regional map;
[0143] A pixel clustering unit is used to cluster pixels on the area map containing the subject's motion trajectory to obtain sub-areas;
[0144] A mean value calculation unit is used to calculate the mean color value of pixels in each sub-region and determine the region to be analyzed based on the mean color value of pixels;
[0145] A mean application unit is used to determine a magnification factor based on the mean pixel color value, obtain close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI;
[0146] The recursive adjustment unit is used to recursively adjust the magnification according to the AI recognition result.
[0147] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An AI-based behavior control method, characterized in that: The method comprises: A camera with a temperature measurement module is installed at the entrance of the area, and the camera obtains the entrance image containing temperature information in real time; locating the subject area in the inlet image based on the temperature information; Traverse the main area and calculate the horizontal gradient and vertical gradient of each pixel in the main area. When the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions, mark the pixel; Count the marked pixels to get the subject outline; Extract the inner area of the subject outline from the layers of different channels, traverse the pixels in each layer, record the pixel values, and construct an array; the traversal order of the pixels in all layers is the same; For each array, calculate the independent value of each value in sequence; the independent value is used to represent the degree of difference between each value and other values in the array; Accumulate independent values. When the independent value reaches the preset value, mark the corresponding serial number; Screening the serial numbers and using the screened serial numbers as main features; Inserting the subject features into the regional feature library, tracking the regional video in real time based on the regional feature library to determine the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy; Locating the abnormal subject according to the subject's motion trajectory, capturing a close-up video of the abnormal subject based on a second precision, and identifying the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the identification result; Record the close-up video recognized by AI and its recognition results, and train a local recognition model; the local recognition model is a neural network model.
2. The AI-based behavior control method according to claim 1, characterized in that: The steps of inserting the subject features into the regional feature library, tracking the regional video in real time based on the regional feature library, and determining the subject's motion trajectory include: Insert the subject feature into the regional feature library; Read the regional video and select video frames in the regional video according to the preset time step; Read the subject features in the regional feature library in turn, traverse the selected video frames, and determine the subject position corresponding to the subject features; Count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position; Obtain a regional map, select mapping points in the regional map based on the center point, synchronously determine the color value, fit all mapping points, and obtain the subject motion trajectory corresponding to the subject feature; Among them, when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced. When the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
3. The AI-based behavior control method according to claim 1, characterized in that: The steps of locating the abnormal subject according to the subject's motion trajectory, collecting a close-up video of the abnormal subject based on the second precision, and identifying the close-up video based on AI include: Receiving the backdating time determined by the staff; Obtain all subject motion trajectories within the retrospective time based on the regional map; Cluster pixels of the area map containing the subject's motion trajectory to obtain sub-areas; Calculate the mean color value of each pixel in each sub-region and determine the area to be analyzed based on the mean color value of the pixels; Determine the magnification factor based on the average pixel color value, obtain the close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI; Recursively adjust the magnification based on AI recognition results.
4. The AI-based behavior control method according to claim 3, characterized in that: The steps of recording the close-up video recognized by AI and its recognition results and training the local recognition model include: Record close-up videos identified by AI and their identification results; Extract features from close-up videos to obtain video features; Construct a sample set of video features to recognition results and train the neural network model; When the error rate of the neural network model is less than a preset error rate threshold, the neural network model is output as a local recognition model.
5. An AI-based behavior management system, characterized by: The system comprises: An entrance image acquisition unit is used to install a camera with a temperature measurement module at the entrance of the area, and the camera acquires the entrance image containing temperature information in real time; a region positioning unit, configured to locate a subject region in the inlet image based on the temperature information; A pixel marking unit is used to traverse the main area, calculate the horizontal gradient and vertical gradient of each pixel in the main area, and mark the pixel when the horizontal gradient and vertical gradient of a pixel meet the preset gradient conditions; The contour construction unit is used to count the marked pixels to obtain the subject contour and construct the subject features based on the subject contour; it includes: Count the marked pixels to get the subject outline; Extract the inner area of the subject outline from the layers of different channels, traverse the pixels in each layer, record the pixel values, and construct an array; the traversal order of the pixels in all layers is the same; For each array, calculate the independent value of each value in sequence; the independent value is used to represent the degree of difference between each value and other values in the array; Accumulate independent values. When the independent value reaches the preset value, mark the corresponding serial number; screening the serial numbers and using the screened serial numbers as main features; A subject tracking module is used to insert subject features into a regional feature library, track the regional video in real time based on the regional feature library, and determine the subject's motion trajectory; the acquisition accuracy of the regional video is a preset first accuracy; An AI target recognition module is configured to locate an abnormal subject based on the subject's motion trajectory, collect a close-up video of the abnormal subject based on a second precision, and identify the close-up video based on AI; the first precision is a constant, the second precision is a variable, and the second precision is related to the positioning result and the recognition result; The local model training module is used to record the close-up video recognized by AI and its recognition results, and train the local recognition model; the local recognition model is a neural network model.
6. The AI-based behavior control system according to claim 5, characterized in that: The subject tracking module includes: A feature insertion unit, used for inserting subject features into a regional feature library; A video frame selection unit is used to read the regional video and select video frames in the regional video according to a preset time step; A position determination unit is used to sequentially read subject features from the regional feature library, traverse the selected video frames, and determine the subject position corresponding to the subject feature; A center point calculation unit, configured to count all subject positions of the same subject feature according to the time sequence of the video frames and calculate the center point of the subject position; A fitting unit is used to obtain a regional map, select mapping points in the regional map based on the center point, synchronously determine the color value, fit all the mapping points, and obtain the subject motion trajectory corresponding to the subject feature; Among them, when the subject position traversed by the subject feature in the regional feature library is empty, the time step is reduced. When the reduced time step is less than the preset step threshold and the duration of the traversed subject position being empty is greater than the preset duration threshold, the subject feature is deleted from the regional feature library.
7. The AI-based behavior control system according to claim 6, characterized in that: The AI target recognition module includes: A backtracking time receiving unit, used to receive the backtracking time determined by the staff; A trajectory acquisition unit, used to acquire the motion trajectories of all subjects within the retrospective time based on the regional map; A pixel clustering unit is used to cluster pixels on the area map containing the subject's motion trajectory to obtain sub-areas; A mean value calculation unit is used to calculate the mean color value of pixels in each sub-region and determine the region to be analyzed based on the mean color value of pixels; A mean application unit is used to determine a magnification factor based on the mean pixel color value, obtain close-up video within the area to be analyzed based on the magnification factor, and identify the close-up video based on AI; The recursive adjustment unit is used to recursively adjust the magnification according to the AI recognition result.
Citation Information
Patent Citations
Abnormal behavior identification method and system in swimming scene and storage medium
CN115797832A
Voice model optimization method and device, equipment and medium
CN117079645A
Park security and protection method and system based on image recognition
CN119888620A