Method and system for quantitative evaluation of sniffer dog olfactory ability based on posture behavior recognition
Patent Information
- Application Number
- CN202611135356.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]本发明旨在解决现有警犬嗅觉能力量化评估中存在的以下问题:评估过程依赖人工观察和经验判断,主观性较强;缺少基于行为过程数据的客观量化指标;传统评估方式难以对视频中的警犬嗅地行为进行连续、自动、逐帧分析;不同训练场景、不同评估人员之间评价标准不易统一;现有方法难以形成可视化、结构化、可追溯的警犬训练评估数据
(1)本发明通过姿态估计模型和嗅地行为分类器自动识别警犬嗅地行为,并以嗅地时长占比作为量化指标,从根本上摆脱了对训导员肉眼观察与经验判断的依赖;由于评估结果依赖于可复现的视频帧级客观数据,而非评估人员的即时主观印象,不同评估人员、不同测试批次之间的一致性与可比性显著提升,有效削弱了因疲劳、注意力分散或经验差异带来的评分偏差。
Smart Images

Figure CN122990793A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and animal behavior analysis technology, specifically to a method and system for quantitatively evaluating the olfactory ability of police dogs based on posture behavior recognition, as well as the system and computer-readable storage medium. Background Technology
[0002] Police dogs play a vital role in public security, customs, fire fighting, emergency rescue, and security checks. Their olfactory search capabilities are one of the core indicators for evaluating their overall work ability. Currently, the assessment of police dogs' olfactory search capabilities mainly relies on on-site observation by handlers or examiners. This involves a comprehensive judgment based on the dog's search enthusiasm, sniffing frequency, and focus, using subjective experience to determine its ability level.
[0003] However, the aforementioned traditional assessment methods have significant shortcomings. First, the assessment results heavily rely on the personal experience and subjective judgment of the assessors, with significant differences in evaluation standards among different assessors, resulting in poor comparability across scenarios and batches. Second, the lack of objective quantitative indicators based on behavioral process data makes it difficult to create traceable and comparable assessment records, hindering the systematic analysis of police dog training effectiveness. Third, manual observation methods struggle to conduct continuous, automatic, and frame-by-frame fine-grained analysis of police dog behavior in videos, and the accuracy of identifying brief sniffing events is greatly affected by the assessor's level of focus. Fourth, existing methods fail to generate visualized, structured, and traceable police dog training assessment data, hindering long-term tracking of training effectiveness and systematic analysis of individual ability changes.
[0004] With the development of computer vision technology, deep learning-based pose estimation methods have been widely applied in fields such as human behavior analysis, motion analysis, and medical rehabilitation. Applying pose estimation technology to animal behavior analysis, by extracting key points from the animal skeleton, constructing behavioral features, and achieving behavior classification, provides a new technical path for the objective quantitative analysis of animal behavior. However, current research on the automatic identification and quantitative evaluation of police dog ground-sniffing behavior is insufficient, lacking mature technical solutions that are suitable for actual training and assessment scenarios, can resist key point occlusion and pose changes, and provide a formal definition of ground-sniffing behavior. Summary of the Invention
[0005] This invention aims to address the following problems in the existing quantitative assessment of police dog olfactory abilities: the assessment process relies on manual observation and experience-based judgment, which is highly subjective; there is a lack of objective quantitative indicators based on behavioral process data; traditional assessment methods make it difficult to conduct continuous, automatic, and frame-by-frame analysis of police dog sniffing behavior in videos; evaluation standards are not easily unified among different training scenarios and different assessors; and existing methods are unable to generate visualized, structured, and traceable police dog training assessment data.
[0006] To address the aforementioned technical problems, the first aspect of this invention provides a method for quantitatively evaluating the olfactory ability of police dogs based on posture behavior recognition, comprising the following steps: S1. Acquire a video of the police dog's olfactory ability test, process the video frame by frame, and use a pose estimation model to extract the coordinate information of key points of the police dog's skeleton in each frame; each key point is output in the form of coordinate values and visibility markers [x, y, v], where v is used to indicate whether the key point is visible, occluded, or outside the image range; when the core key point used to judge the ground-sniffing behavior is missing or marked as invisible, the frame is marked as an invalid frame and excluded from subsequent statistics; S2. Based on the coordinate information of the key points of the skeleton, construct a posture feature vector to characterize the police dog's ground-sniffing behavior. The posture feature vector includes at least two of the following posture feature parameters: the height ratio of the nose tip key point to the trunk reference point, the tilt angle of the head and neck relative to the trunk direction, the angle between the line connecting the nose tip to the shoulder reference point and the horizontal reference direction, and the distance ratio between key segments calculated based on the key points of the skeleton; wherein, the trunk reference point is selected from the shoulder reference point, the hip reference point, the midpoint of the left and right shoulder key points, the midpoint of the left and right hip key points, or the midpoint of the line connecting the two. S3. Input the posture feature vector into the pre-trained ground-sniffing behavior classifier, and perform a binary classification of the police dog behavior in each effective frame or preset time window as ground-sniffing and non-ground-sniffing. S4. Calculate the proportion of frames or durations identified as ground sniffing behavior within the effective test period to the total number of effective video frames or durations. S5. Compare the percentage of time spent sniffing the ground with a preset evaluation threshold, and output the quantitative evaluation result of the police dog's olfactory ability.
[0007] Furthermore, the pose estimation model mentioned in step S1 is an end-to-end pose estimation model based on convolutional neural networks or visual Transformers, preferably a YOLO series pose estimation model, which can simultaneously complete target detection and skeletal key point coordinate regression of the police dog in a single forward inference; the skeletal key points cover one or more of the following: nose tip, ear base, neck, shoulder, elbow, wrist, hip, knee, ankle and tail of the police dog.
[0008] Furthermore, the criteria for determining the ground-sniffing behavior in step S3 are defined as follows: the police dog's nose is clearly lowered and close to the ground, and it continues to explore the ground scent; the non-ground-sniffing behaviors include standing, walking without sniffing the ground, sitting, looking back, looking up to observe, and the state of interrupting the search due to the influence of the trainer. This formal definition is used to standardize the labeling and judgment of the ground-sniffing behavior classifier and improve consistency across scenarios and across evaluators.
[0009] Furthermore, the ground-sniffing behavior classifier described in step S3 is trained in the following way: using video data containing police dog ground-sniffing behavior as the source, and combining the key point coordinate information output by the pose estimation model, professional annotators manually annotate the video frames frame by frame according to the above-mentioned judgment criteria. The pose feature vectors of the annotated frames are used as training samples, and the behavior annotation labels are used as supervision information to train the ground-sniffing behavior classifier. The training dataset is divided as follows: when the annotated data comes from a single video segment, the first 80% of the frames are divided into the training set and the last 20% of the frames are divided into the test set according to the time sequence. When it comes from multiple videos, it is divided by video segment, with all frames of at least one complete video used as the test set and the rest used as the training set, in order to avoid adjacent frames appearing in both the training set and the test set, which would lead to artificially high performance indicators.
[0010] Furthermore, the ground-sniffing behavior classifier is preferably a random forest classification model, which constructs multiple decision trees based on random sampling and random feature subsets and integrates the voting results of each decision tree to output a behavior category determination; in other embodiments, the ground-sniffing behavior classifier can also be a support vector machine, gradient boosting tree, logistic regression, multilayer perceptron, or temporal neural network classification model.
[0011] Furthermore, in step S1, for non-core key points that are marked as invisible or missing, if they do not affect the calculation of the current pose feature parameters, the remaining visible key points are used to continue constructing features; if the position of the key point is stable in consecutive frames, linear interpolation or trajectory prediction is used to fill in the missing key point before constructing features, thereby improving the stability and robustness of pose feature vectors in complex scenarios such as occlusion and side view.
[0012] Furthermore, in step S4, a sliding time window method is used to count the proportion of sniffing time: k consecutive frames are used as a time window. When the number of frames that are judged as sniffing behavior in the window exceeds a preset proportion, the time window is judged as the sniffing behavior window, and the proportion of the cumulative sniffing behavior in the effective test period to the total effective test period is calculated accordingly, so as to smooth out the transient classification noise and improve the stability of the sniffing time statistics.
[0013] Furthermore, the proportion of the sniffing time mentioned in step S4 Calculate using the following formula:
[0014] in, This indicates the number of frames identified as ground-sniffing behavior within the valid test period. This represents the total number of valid video frames within the valid test period; or, it can be calculated using the following formula:
[0015] in, This indicates the cumulative duration of the behavior identified as "sniffing the ground" within the valid testing period. This indicates the total duration of the effective testing period; the preset evaluation threshold is determined through expert annotation and behavioral data backtesting: professional police dog handlers are invited to independently assess the ability levels of multiple police dog test videos, the proportion of sniffing time in each video is automatically calculated, and the proportion distribution characteristics corresponding to each ability level are statistically analyzed to determine the boundary threshold for distinguishing adjacent levels; the olfactory search operation ability level is divided into three levels: ≥60% is rated as excellent; (50% ≤ <60% were rated as good; A score of <50% is considered average. The above threshold is only a preferred implementation method, and can be adjusted according to the dog breed, training subjects, testing venue, or assessment standards in actual applications.
[0016] A second aspect of this invention provides a quantitative evaluation system for the olfactory ability of police dogs based on posture behavior recognition, comprising: a video acquisition module for acquiring test videos of the police dog's olfactory ability and processing the videos frame by frame; and a key point detection module for extracting the coordinate information of key points of the police dog's skeleton in each frame image using a posture estimation model, wherein each key point is defined by coordinates [x, y, ...]. The system outputs data in the form of v] and includes a visibility marker. When a core key point is missing, the frame is marked as an invalid frame. A feature construction module is used to construct the posture feature vector described in the first aspect based on the coordinates of the skeleton key points. A behavior classification module is used to input the posture feature vector into a pre-trained ground-sniffing behavior classifier to perform a binary classification of ground-sniffing and non-ground-sniffing behaviors within valid frames or a preset time window. A statistical calculation module is used to calculate the number of ground-sniffing behavior frames or the proportion of their duration within a valid test period to obtain the ground-sniffing duration proportion. A rating module is used to compare the ground-sniffing duration proportion with a preset evaluation threshold and output a quantitative evaluation result of the police dog's olfactory ability. The system may also include a visualization module and / or a behavior annotation module. The visualization module is used to overlay and display skeleton key point connections, behavior classification labels, and ground-sniffing statistical information during video playback. The behavior annotation module is used to assist in constructing a classifier training dataset and store the annotation results in the form of frame-by-frame labels.
[0017] A third aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the quantitative evaluation method for police dog olfactory ability based on posture estimation and behavior classification as described in the first aspect.
[0018] The beneficial effects of this invention are reflected in the following aspects: (1) This invention automatically identifies the sniffing behavior of police dogs by using a posture estimation model and a sniffing behavior classifier, and uses the sniffing time ratio as a quantitative indicator, which fundamentally eliminates the reliance on the handler's visual observation and experience judgment. Since the evaluation results rely on reproducible video frame-level objective data rather than the immediate subjective impression of the evaluator, the consistency and comparability between different evaluators and different test batches are significantly improved, effectively reducing the scoring bias caused by fatigue, distraction or experience differences.
[0019] (2) The present invention can complete the analysis based only on ordinary visible light video data (such as surveillance cameras and handheld devices), without the need to put collar sensors, inertial measurement units (IMUs) or any restraint or weight-bearing devices on the police dogs; since no additional equipment is introduced to interfere with the police dogs, their natural sniffing, walking, and looking back behaviors in the search operation are not changed, and the collected behavioral data are closer to the real operation state, which improves the ecological validity and on-site practicality of the evaluation results.
[0020] (3) The present invention can perform frame-by-frame analysis of video and can also perform segmented statistics according to a preset sliding time window. It can accurately locate the start and end time of each sniffing behavior and can also depict the sniffing intensity and rhythm distribution of the entire operation. The point-segment-whole analysis method makes the evaluation results traceable, which is convenient for post-event playback, verification and re-analysis of the behavior process, and overcomes the defect that manual observation is difficult to continuously cover short sniffing events.
[0021] (4) The present invention automatically maps the proportion of continuous sniffing time to discrete ability levels (such as excellent, good, average) by setting a preset evaluation threshold, forming a unified quantitative scale. This scale allows for direct comparison of olfactory abilities between different individuals (horizontal) or between different periods of the same police dog (vertical), providing a standardized and reproducible decision-making basis for police dog selection, training plan formulation and performance evaluation.
[0022] (5) This invention integrates video reading, key point detection, feature construction, behavior classification, statistical calculation and evaluation result output into an end-to-end processing pipeline, eliminating the need for manual switching between multiple software programs or manual transcription of intermediate results; the full-process automation significantly reduces the operational threshold and dependence on professional evaluation personnel, enabling grassroots users to conveniently and efficiently conduct large-scale police dog olfactory ability evaluations.
[0023] (6) The present invention can export frame-by-frame detection results (including key point coordinates, visibility markers and behavior tags for each frame) and summary statistical data (including the number of sniffing frames, total number of frames, duration percentage, ability level, etc.) to form a structured data file. The structured data provides a reliable data foundation for the long-term tracking of police dog training effects, analysis of individual ability change trends, and iterative optimization of subsequent classification models and posture estimation models, enabling the evaluation system to have the ability to continuously evolve. Attached Figure Description
[0024] Figure 1 is a flowchart of the quantitative evaluation method for police dog olfactory ability based on posture estimation and behavior classification provided in an embodiment of the present invention; Figure 2 is a schematic diagram of key points of the police dog skeleton provided in an embodiment of the present invention; Figure 3 is a schematic diagram comparing the snoring behavior and non-snoring behavior postures provided in an embodiment of the present invention; Figure 4 is a schematic diagram of posture feature vector construction and ground-sniffing behavior classification provided in an embodiment of the present invention; Figure 5 is a flowchart of the training process for the ground-smelling behavior classifier provided in an embodiment of the present invention; Figure 6 is a structural block diagram of the police dog olfactory ability quantitative evaluation system provided in an embodiment of the present invention; Figure 7 is a schematic diagram of the visual display interface provided in an embodiment of the present invention. Detailed Implementation
[0025] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention. All equivalent substitutions, modifications or improvements made based on the technical concept of the present invention should fall within the scope of protection of the present invention.
[0026] Example 1: A Video-Based Quantitative Assessment Method for Police Dogs' Olfactory Ability This embodiment provides a method and system for quantitatively evaluating the olfactory ability of police dogs based on posture behavior recognition, combined with... Figure 1 The flowchart shown includes the following steps.
[0027] Step S1: Video Acquisition and Skeleton Keypoint Extraction Acquire test videos of police dogs' olfactory abilities. These videos can be captured by a fixed camera, a mobile camera, or a real-time camera, and include the police dogs' behaviors such as searching, sniffing, moving, and stopping within the test area. The video is read frame by frame to obtain an image frame sequence. To improve processing stability, each frame can undergo preprocessing operations such as scaling, color space conversion, and normalization. Frames where the police dog did not enter the test area, are severely obstructed, are blurry, or where key points cannot be identified are marked as invalid frames and not included in the subsequent sniffing time percentage statistics.
[0028] The preprocessed image frames are input into the pose estimation model to extract the coordinate information of the key points of the police dog's skeleton. (See [link / reference]) Figure 2 The diagram shows the key points of the police dog's skeleton; in this embodiment, the number of key points is 24. In this embodiment, the pose estimation model adopts a single-stage end-to-end pose estimation model based on a convolutional neural network, specifically the YOLO11m-pose model fine-tuned on the police dog pose key point dataset. This model belongs to the YOLO series of pose estimation models and can simultaneously complete police dog target detection and skeleton key point coordinate regression in a single forward inference, exhibiting high inference efficiency and suitability for video frame-by-frame processing scenarios.
[0029] The skeletal key points cover key areas of the police dog, including the nose tip, ear base, neck, shoulders, elbows, wrists, hips, knees, ankles, and tail. Each key point is output in the form of [x, y, v]. Here, x and y are the normalized horizontal and vertical coordinates of the key point in the image, respectively, and v is the visibility marker, with values representing: visible, occluded, or not within the image range.
[0030] When a keypoint is marked as invisible, it can be handled as follows: If a core keypoint used for determining ground-sniffing behavior (such as the nose tip) is missing, the frame is marked as invalid; if the missing keypoint does not affect the calculation of the current feature, the visible keypoint is used to continue constructing the feature; if the position of the keypoint is stable in consecutive frames, linear interpolation or trajectory prediction can be used. The method is to fill in the missing key points.
[0031] Step S2: Construction of pose feature vectors Based on the skeleton key point coordinates output in step S1, a posture feature vector that can characterize the police dog's ground-sniffing behavior is constructed. (See [link to relevant documentation]). Figure 3 The diagram showing the comparison of olfactory and non-olfactory behaviors is as follows: Figure 4 The diagram shows the construction of posture feature vectors. Police dogs' ground-sniffing behavior typically manifests as a nose tip noticeably close to the ground, head and neck lowered, and a significant change in the angle between the head and torso. Therefore, this embodiment constructs the following feature parameters.
[0032] feature The height ratio of the tip of the nose relative to a reference point on the torso. Let the coordinates of the key point of the tip of the nose be... The coordinates of the torso reference point are: Reference length of torso Take shoulder reference points Hip reference point Given the Euclidean distance between them, then:
[0033]
[0034] Since the vertical axis in the image coordinate system points downwards... The larger the nose, the lower the nose tip is relative to the body reference point, and the more likely the police dog is to be in a sniffing state.
[0035] feature The angle of inclination of the head and neck relative to the line connecting the head and neck to the torso. Let the coordinates of the key points of the neck be... The coordinates of the key point of the nose tip are The coordinates of the shoulder reference point are: The coordinates of the hip reference point are: Then the head and neck vector and the trunk direction vector are respectively:
[0036]
[0037] The tilt angle is:
[0038]
[0039] in, To prevent extremely small constants with a denominator of zero. This angle is used to reflect the degree of downward movement of the head and neck relative to the trunk; it is usually larger when the head and neck are in a sniffing state.
[0040] feature The angle between the line connecting the tip of the nose to the shoulder and the horizontal reference direction. Let the coordinates of the shoulder reference point be... The coordinates of the key point of the nose tip are ,but:
[0041] Using functions The included angle is calculated to preserve quadrant information and avoid the problem of a denominator of zero. This feature is used to characterize the downward direction of the nasal tip relative to a shoulder reference point.
[0042] feature , : The ratio of distances between key segments. Based on the trunk reference length. Normalize the distances of key points related to head and neck posture:
[0043]
[0044] in, This is the Euclidean distance between the key point of the nose tip and the reference point on the shoulder. This is the Euclidean distance between the key point of the nose tip and the reference point of the hip.
[0045] The above features are combined in a preset order to obtain the pose feature vector input to the ground-sniffing behavior classifier:
[0046] Where m is the feature dimension; when only the above five features are used... When further statistical features such as motion speed, rate of change of angle, or time window are added, It can be greater than 5.
[0047] Step S3: Classification of olfactory behavior The posture feature vector obtained in step S2 is input into the pre-trained ground-sniffing behavior classifier. For each valid frame or preset time window, the dog's behavior is classified into ground-sniffing and non-ground-sniffing categories using a binary classification. (See [link to relevant documentation]). Figure 5 The flowchart shown is for training the ground-smelling behavior classifier.
[0048] The training process of the ground-sniffing behavior classifier is as follows: Using video data containing police dogs' ground-sniffing behavior as the data source, and combining the keypoint coordinate information output by the pose estimation model, professional annotators manually annotated each video frame. The annotation categories included ground-sniffing behavior and non-ground-sniffing behavior. Ground-sniffing behavior was defined as the police dog's nose clearly pointing downwards and approaching the ground, continuously exploring for ground scent. Non-ground-sniffing behavior included standing, walking without sniffing, sitting, looking back, looking up to observe, and interrupting the search due to the trainer's influence. Using the pose feature vectors corresponding to the annotated frames as training samples and the manually annotated categories as supervision labels, the ground-sniffing behavior classifier was trained.
[0049] In this embodiment, the ground-sniffing behavior classifier employs a random forest classification model. Random forests construct multiple decision trees, each trained on randomly sampled training samples and a randomly selected subset of features. During the prediction phase, each decision tree independently outputs its classification result, and the final behavior category is determined through majority voting. Random forests exhibit strong generalization ability in scenarios with limited sample sizes and are insensitive to feature dimensions, making them suitable for the pose feature vector input, which consists of multiple types of geometric features, as described in this invention. In other embodiments, the ground-sniffing behavior classifier may also employ classification models such as support vector machines, gradient boosting trees, logistic regression, multilayer perceptrons, or temporal neural networks.
[0050] To mitigate the issue of inflated model performance metrics caused by high correlation between adjacent frames, the training dataset is partitioned as follows: When the labeled data originates from a single video segment, the first 80% of frames are allocated to the training set, and the last 20% to the test set, in chronological order. When the labeled data originates from multiple video segments, the dataset is partitioned on a video-by-video basis, with all frames from at least one complete video segment used as the test set, and all frames from the remaining videos used as the training set. This partitioning method effectively prevents adjacent frames from appearing simultaneously in both the training and test sets during random frame-by-frame partitioning, thereby improving the reliability of classifier performance evaluation.
[0051] Step S4: Ground Sniffing Duration Statistics For the police dog test video to be evaluated, extract the pose feature vector of each valid frame according to steps S1 to S2, and input it into the trained ground-sniffing behavior classifier to obtain the behavior classification result of each valid frame.
[0052] In the implementation based on frame-by-frame statistics, the sniffing time percentage is calculated using the following formula:
[0053] in, This indicates the number of frames identified as ground-sniffing behavior within the valid test period. This indicates the total number of valid video frames within the valid test period.
[0054] In the sliding time window-based implementation, k consecutive frames are considered as a time window. When the number of sniffing frames within a window exceeds a preset proportion, the time window is determined to be a sniffing behavior window. At this time, the sniffing duration proportion is calculated according to the following formula:
[0055] in, This indicates the cumulative duration of the behavior identified as "sniffing the ground" within the valid testing period. This represents the total duration of the effective testing period. The time window approach helps smooth out brief classification noise and improves the stability of the sniffing time statistics.
[0056] Step S5: Ability Level Assessment After obtaining the percentage of time spent sniffing the ground, it is compared with the preset evaluation threshold to output the quantitative evaluation results of the police dog's olfactory ability.
[0057] The preset evaluation thresholds are determined through expert annotation and behavioral data backtesting: experienced police dog trainers are invited to independently watch test videos of multiple police dogs and assess the olfactory search capabilities of each dog; the method of this invention is used to automatically calculate the proportion of sniffing time for each dog in the same video; the distribution characteristics of the sniffing time proportions corresponding to each capability level are statistically analyzed, the distribution differences between adjacent levels are analyzed, and the boundary thresholds that can effectively distinguish adjacent levels are determined, thereby constructing a quantitative evaluation standard.
[0058] In this embodiment, the grading criteria are as follows: When A score of ≥60% is rated as excellent, indicating strong persistence in olfactory exploration and high concentration during tasks; a score of ≤50% is rated as good. When the olfactory efficiency is less than 60%, it is rated as good, indicating that the police dog's olfactory activity basically meets the operational requirements; when A score below 50% is considered average, indicating insufficient sustained ground-sniffing ability and easy distraction in the police dog. It should be noted that the above threshold is only a preferred implementation method, and in practical applications, the threshold can be adjusted according to the dog breed, training subjects, testing ground, assessment standards, or management requirements of the police dog organization.
[0059] Example 2: A quantitative assessment system for police dog olfactory abilities based on posture estimation and behavior classification This embodiment provides a quantitative evaluation system for the olfactory ability of police dogs based on posture behavior recognition, which can be used to perform the method described in Embodiment 1. See [link to embodiment]. Figure 6 The system structure block diagram is shown below.
[0060] The video acquisition module is used to acquire videos of police dogs' olfactory ability tests and process the videos frame by frame. This module supports multiple input methods, including local video files, local image files, and real-time camera capture, to meet the needs of different usage scenarios such as on-site acquisition at training sites and offline video playback evaluation.
[0061] The keypoint detection module is used to extract the coordinate information of key points of the police dog's skeleton in each frame of the image using a pose estimation model. This module integrates the pose estimation model by loading an external model file, which supports replacing or upgrading the model file without modifying the system program code, and has good scalability.
[0062] The feature construction module is used to construct a posture feature vector representing the police dog's ground-sniffing behavior based on the skeleton key point coordinate information output by the key point detection module. This module calculates feature parameters such as the height ratio of the nose tip key point relative to the torso reference point, the tilt angle of the line connecting the head and neck to the torso, the angle between the line connecting the nose tip to the shoulder key points and the horizontal reference direction, and the distance ratio between key limb segments. It also performs normalization, outlier removal, missing value completion, and smoothing on the key point coordinates to improve the stability of subsequent behavior classification results.
[0063] The behavior classification module is used to input the posture feature vector into a pre-trained ground-sniffing behavior classifier, and to perform a binary classification of the police dog's behavior within each valid frame or preset time window as ground-sniffing and non-ground-sniffing. The classifier model file in this module is also integrated using an external loading method, which makes it easy to directly replace the classifier model file after adding training data or optimizing model parameters, without redeploying the system.
[0064] The statistical calculation module is used to calculate the proportion of frames or durations identified as "ground sniffing" behavior within the valid test period, relative to the total number of valid video frames or durations, and to obtain the ground sniffing duration percentage. The module outputs data including the total number of valid video frames, the number of frames exhibiting ground sniffing behavior, the number of frames exhibiting non-ground sniffing behavior, the cumulative duration of ground sniffing behavior, the ground sniffing duration percentage, and frame-by-frame behavior classification results. It also supports exporting these results to structured data files such as CSV, JSON, or tables for easy archiving, analysis, and tracking.
[0065] The rating module is used to compare the proportion of time spent sniffing the ground with a preset evaluation threshold and output the quantitative evaluation results of the police dog's sense of smell.
[0066] In a preferred embodiment, the system further includes a visualization module, see [link to relevant documentation]. Figure 7 The diagram shows a visual display interface. This module is configured to overlay skeleton key point lines and behavior classification labels in real time during video playback. When a frame is classified as a ground-sniffing behavior, a "ground-sniffing" label is displayed on the screen; when it is classified as a non-ground-sniffing behavior, a "non-ground-sniffing" label is displayed. At the same time, it updates and displays statistical data such as the number of ground-sniffing frames, ground-sniffing duration, and the percentage of ground-sniffing duration, so that users can intuitively grasp the real-time behavior status of the police dog.
[0067] In another preferred embodiment, the system further includes a behavior annotation module configured to assist in constructing a training dataset for a ground-smelling behavior classifier. Annotators can simultaneously view the original video footage, the skeleton keypoint connections, and the nose tip movement trajectory during the annotation process, thereby reducing the uncertainty of manual judgment. This module stores the annotation results as frame-by-frame behavior category labels in a label file, which is used for classifier training in the behavior classification module, achieving a closed-loop connection between the annotation and training processes.
[0068] Example 3: Computer-readable storage medium and evaluation report generation This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the quantitative evaluation method for police dog olfactory ability based on posture estimation and behavior classification as described in Embodiment 1, including the entire processing flow of steps S1 to S5.
[0069] In this embodiment, after completing the analysis of the video to be tested, the system can automatically generate a quantitative evaluation report on the police dog's olfactory ability. The evaluation report includes: basic information such as the police dog's ID number, breed, age, and gender; test information such as test time, test location, video duration, and effective test duration; the name and version of the posture estimation model used; the type and version of the ground-sniffing behavior classifier; the total number of effective video frames; the number of ground-sniffing behavior frames; the cumulative duration of ground-sniffing behavior; the percentage of ground-sniffing time; the police dog's olfactory search capability level; the frame-by-frame behavior classification result file; keyframe screenshots containing the skeleton keypoint overlay effect; and training suggestions or retesting suggestions.
[0070] Through the evaluation report, trainers or managers can intuitively understand the police dog's persistence in sniffing, search focus and ability level during the test, and can make longitudinal comparisons of multiple test results to provide data support for the development of individualized training plans.
[0071] Example 4: Batch Assessment and Training Tracking of Multiple Dogs This embodiment describes the application of the present invention in multi-dog batch evaluation and long-term training tracking scenarios.
[0072] In multi-dog batch evaluation scenarios, the system can perform the entire process of posture estimation, feature construction, behavior classification and statistical evaluation on test videos of multiple police dogs, obtain the sniffing time ratio and ability level of each police dog, and output a batch evaluation summary table for horizontal comparison of the differences in olfactory search capabilities among different police dogs, and assist training units in classifying and managing police dogs and allocating targeted training resources.
[0073] In training tracking scenarios, the system can record the changing trend of the proportion of time the same police dog spends sniffing the ground at different training stages or on different test dates. By comparing the results of each test longitudinally, the system can help trainers objectively judge the training effect, promptly identify situations such as decreased search focus, fluctuations in the dog's condition, or training progress, thereby providing a quantitative basis for adjusting individualized training plans.
[0074] Industrial applicability This invention provides a method and system for quantitatively evaluating the olfactory ability of police dogs based on posture estimation and behavior classification. It can automatically identify and quantify the ground-sniffing behavior of police dogs using ordinary video capture equipment, eliminating the need for sensors on the dogs or complex specialized detection equipment. It offers advantages such as low implementation cost, flexible deployment, simple operation, and objective, traceable results. This invention can be widely applied in police dog training, screening, assessment, and daily ability evaluation scenarios in fields such as public security, customs, fire protection, emergency rescue, and security inspection, demonstrating good industrial applicability and promotional value.
Claims
1. A method for quantitatively evaluating the olfactory ability of police dogs based on posture behavior recognition, characterized in that, Includes the following steps: S1. Acquire a video of the police dog's olfactory ability test, process the video frame by frame, and use a pose estimation model to extract the coordinate information of key points of the police dog's skeleton in each frame; each key point is output in the form of coordinate value and visibility marker [x, y, v], where v is used to indicate whether the key point is visible, occluded, or not within the image range; when the core key point used to judge the ground-sniffing behavior is missing or marked as invisible, the frame is marked as an invalid frame and excluded from subsequent statistics; S2. Based on the coordinate information of the key points of the skeleton, construct a posture feature vector to characterize the police dog's ground-sniffing behavior. The posture feature vector includes at least two of the following posture feature parameters: the height ratio of the nose tip key point to the trunk reference point, the tilt angle of the head and neck relative to the trunk direction, the angle between the line connecting the nose tip to the shoulder reference point and the horizontal reference direction, and the distance ratio between key segments calculated based on the key points of the skeleton; wherein, the trunk reference point is selected from the shoulder reference point, the hip reference point, the midpoint of the left and right shoulder key points, the midpoint of the left and right hip key points, or the midpoint of the line connecting the two. S3. Input the posture feature vector into the pre-trained ground-sniffing behavior classifier, and perform a binary classification of the police dog behavior in each effective frame or preset time window as ground-sniffing and non-ground-sniffing. S4. Calculate the proportion of frames or durations identified as ground sniffing behavior within the effective test period to the total number of effective video frames or durations. S5. Compare the percentage of time spent sniffing the ground with a preset evaluation threshold, and output the quantitative evaluation result of the police dog's olfactory ability.
2. The method according to claim 1, characterized in that, The pose estimation model mentioned in step S1 is an end-to-end pose estimation model based on convolutional neural networks or visual Transformers, preferably a YOLO series pose estimation model, which can simultaneously complete target detection and skeletal key point coordinate regression of police dogs in a single forward inference; the skeletal key points cover one or more of the following: nose tip, ear base, neck, shoulder, elbow, wrist, hip, knee, ankle and tail of the police dog.
3. The method according to claim 1, characterized in that, The criteria for judging the ground-sniffing behavior in step S3 are defined as: the police dog’s nose tip is obviously lowered and close to the ground, and it continues to explore the ground scent; the non-ground-sniffing behavior includes standing, walking but not sniffing the ground, sitting, looking back, looking up to observe, and the state of interrupting the search due to the influence of the trainer.
4. The method according to claim 3, characterized in that, The ground-sniffing behavior classifier in step S3 is trained as follows: using video data containing police dog ground-sniffing behavior as the source, and combining the key point coordinate information output by the pose estimation model, professional annotators manually annotate the video frames frame by frame according to the judgment criteria. The pose feature vectors of the annotated frames are used as training samples, and the behavior annotation labels are used as supervision information to train the ground-sniffing behavior classifier. The training dataset is divided as follows: when the annotated data comes from a single video segment, the first 80% of the frames are divided into the training set and the last 20% of the frames are divided into the test set according to the time sequence; when it comes from multiple videos, it is divided by video segment, with all frames of at least one complete video used as the test set and the rest used as the training set.
5. The method according to claim 4, characterized in that, The ground-sniffing behavior classifier is preferably a random forest classification model, which constructs multiple decision trees based on random sampling and random feature subsets and integrates the voting results of each decision tree to output the behavior category determination; or it can be a support vector machine, gradient boosting tree, logistic regression, multilayer perceptron or temporal neural network classification model.
6. The method according to claim 1, characterized in that, In step S1, for non-core key points that are marked as invisible or missing, if they do not affect the calculation of the current pose feature parameters, the remaining visible key points are used to continue constructing features. If the position of the key point is stable in consecutive frames, then linear interpolation or trajectory prediction is used to fill in the missing key point before constructing the feature.
7. The method according to claim 1, characterized in that, In step S4, a sliding time window method is used to count the proportion of ground sniffing time: k consecutive frames are used as a time window. When the number of frames that are judged as ground sniffing behavior in the window exceeds a preset proportion, the time window is judged as the ground sniffing behavior window. Based on this, the proportion of the cumulative ground sniffing behavior in the effective test period to the total effective test period is calculated to smooth out the transient classification noise.
8. The method according to claim 1, characterized in that, The proportion of ground-sniffing time mentioned in step S4 Calculate using the following formula: ; in, This indicates the number of frames identified as ground-sniffing behavior within the valid test period. This represents the total number of valid video frames within the valid test period; or, it can be calculated using the following formula: ; in, This indicates the cumulative duration of the behavior identified as "sniffing the ground" within the valid testing period. This indicates the total duration of the effective testing period; the preset evaluation threshold is determined through expert annotation and behavioral data backtesting: professional police dog handlers are invited to independently assess the ability levels of multiple police dog test videos, the proportion of sniffing time in each video is automatically calculated, and the proportion distribution characteristics corresponding to each ability level are statistically analyzed to determine the boundary threshold for distinguishing adjacent levels; the olfactory search operation ability level is divided into three levels: ≥60% is rated as excellent; (50% ≤ <60% were rated as good; <50% are rated as average.
9. A quantitative evaluation system for the olfactory ability of police dogs based on posture and behavior recognition, characterized in that, include: The video acquisition module is used to acquire test videos of police dogs' sense of smell and process the videos frame by frame. The key point detection module is used to extract the coordinate information of key points of the police dog skeleton in each frame of the image using the pose estimation model. Each key point is output in the form of [x, y, v] and includes a visibility marker. When the core key points are missing, the frame is marked as an invalid frame. The feature construction module is used to construct the pose feature vector as described in claim 1 based on the coordinates of the skeleton key points; The behavior classification module is used to input the posture feature vector into a pre-trained ground-sniffing behavior classifier to perform a binary classification of the police dog's behavior within the effective frame or a preset time window, distinguishing between ground-sniffing and non-ground-sniffing behaviors. The statistical calculation module is used to count the number of frames or the percentage of time spent on ground sniffing behavior within the effective test period, and to obtain the percentage of ground sniffing time. The rating module is used to compare the proportion of time spent sniffing the ground with a preset evaluation threshold and output a quantitative evaluation result of the police dog's olfactory ability. The system may also include a visualization module and / or a behavior annotation module. The visualization module is used to overlay and display skeleton key point connections, behavior classification labels, and olfactory statistics during video playback. The behavior annotation module is used to assist in constructing a classifier training dataset and store the annotation results in the form of frame-by-frame labels.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the quantitative evaluation method for police dog olfactory ability based on posture estimation and behavior classification as described in any one of claims 1 to 8.