ID-YOLOv8-based old, young, pregnancy and disabled detection method
By adding special detection heads and convolution and attention fusion modules to the YOLOv8 model, the problem of difficult identification and classification of the elderly, children, pregnant women and disabled people in the existing technology is solved, and accurate detection of these groups is achieved and improved Safety and quality of life are guaranteed.
Patent Information
- Application Number
- CN202411176225.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-02-07
AI Technical Summary
Existing human detection technologies are difficult to effectively identify and classify the elderly, children, pregnant women and people with disabilities, and cannot meet the special needs of these groups in terms of safety and quality of life.
Design and train a detection method based on ID-YOLOv8. By adding a special "old, young, pregnant, and residual detection head" to the YOLOv8 model, combining convolution and attention fusion modules, the accuracy and freedom of object detection classification are improved. Great.
It has achieved stable and accurate testing of the elderly, children, pregnant women and people with disabilities in complex environments, and improved the security and quality of life of these groups.
Smart Images

Figure CN119399423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target detection, and in particular to an old, young, pregnant and disabled detection method based on ID-YOLOv8. Background Art
[0002] With the rapid development of computer vision and deep learning technologies, human body detection technology plays an increasingly important role in today's society. The core principle of this technology is to accurately identify and locate key features such as the position, posture and movement of the human body by analyzing image or video data. Human body detection not only shows great application potential in the fields of intelligent security, intelligent traffic management, medical image analysis, etc., but also brings convenience and safety to various scenarios in life.
[0003] However, general human body detection technology is mainly designed for healthy adult populations, while the elderly, pregnant women, children and disabled people have special needs and challenges for human body detection technology due to their unique physical characteristics and behavioral patterns. The elderly are usually slow to move and react due to age, and are more dependent on safety in daily life; pregnant women may face problems such as body balance and fatigue during pregnancy; children are prone to getting lost or injured in unfamiliar environments due to their young age and incomplete cognitive development; disabled people face higher safety risks in life due to specific challenges such as wheelchair use, vision or hearing impairment.
[0004] Therefore, through specialized data sets and algorithms, the movements, behaviors, and locations of these groups can be accurately identified and understood, improving their safety and quality of life. For example, on a bus, if the presence of the elderly, children, pregnant women, and people with disabilities can be accurately identified, the system can promptly remind the driver to pay attention to these passengers, thereby improving overall driving safety and service quality.
[0005] The present invention aims to propose a method for detecting the elderly, children, pregnant women and the disabled based on ID-YOLOv8. This method improves the YOLOv8 model, adds a special "old, young, pregnant and disabled detection head" to identify and classify the elderly, children, pregnant women and disabled people, and combines the convolution and attention fusion modules to effectively improve the accuracy and robustness of target detection classification. The improved model is named ID-YOLOv8, which specially optimizes the perception ability of these four groups of people, enabling stable and accurate detection in complex environments, and is widely used in application scenarios such as smart security, smart traffic management, and medical image analysis. The data involved in the present invention has obtained relevant authorization, complies with all applicable laws, regulations and industry standards, and ensures that personal privacy is not violated. Summary of the invention
[0006] The purpose of this invention is to propose an old, young, pregnant and disabled detection method based on ID-YOLOv8, aiming to solve the problem that the existing human body detection technology cannot effectively identify and classify the elderly, children, pregnant women and disabled people.
[0007] The technical solution of the present invention is to design and train the proposed model, and use the model to test on old, young, pregnant and disabled data sets.
[0008] The old, young, pregnant, and disabled detection framework based on ID-YOLOv8 is as follows Figure 1 As shown in Figure 2, the framework consists of the ID-YOLOv8 backbone network, neck network, and prediction head.
[0009] (1) Backbone network
[0010] The backbone network adopts the CSPDarkNet structure, which mainly extracts multi-scale feature maps such as 80×80, 40×40 and 20×20 from the input image and outputs rich feature representations for use in subsequent network layers.
[0011] In order to further enhance the feature extraction capability, we introduced convolution and attention fusion modules based on CSPDarkNet. The convolution and attention fusion modules improve the modeling capabilities of global and local features by capturing long-range dependencies and local spectral correlations. After embedding these modules into the backbone network, the model can more effectively combine global context information with local detail features, making feature expression more accurate and more robust.
[0012] (2) Neck network
[0013] The neck network adopts the PAFPN structure. PAFPN is a bidirectional pathway network that introduces a bottom-up path in addition to the top-down path, thereby enhancing the multi-scale information fusion capability of the feature map. In PAFPN, the multi-scale feature maps output by the backbone network (after different degrees of downsampling) are first upsampled and fused through the top-down path. Then, these fused feature maps are passed layer by layer through downsampling in the bottom-up path, so that the underlying spatial information can be effectively transferred to the high-level feature map. This design enables the model to capture the details of the target object in a larger range and improve the accuracy of detection.
[0014] Finally, multiple output feature maps of PAFPN are passed to the prediction head for loss calculation and result resolution of target detection. The bidirectional information transmission mechanism of the PAFPN structure ensures the accuracy and robustness of the model in multi-scale target detection.
[0015] (3) Prediction head and loss function
[0016] In the prediction head, a decoupling head design is adopted. Each output branch is divided into two sub-branches, classification and regression, which are responsible for target classification and bounding box prediction respectively. Each branch consists of a multi-layer convolution module, including a convolution layer, a batch normalization layer, and an activation function. Finally, a 1x1 convolution layer is used to reduce the number of channels and generate the final output, including category prediction, bounding box regression, and target confidence. In addition, a special "old, young, pregnant, and disabled detection head" is added, with the following structure: Figure 2 As shown, an identity recognition sub-branch is added to the output branch to identify and classify the elderly, children, pregnant women and disabled people. The final total loss function is:
[0017] λ (1)
[0018] in , , , denote classification, identity prediction, and regression respectively ( and ), λ represents the weight coefficient of the prediction loss of old, young, pregnant and disabled, which is set to 0.5.
[0019] Defined by formula (2):
[0020] (2)
[0021] in, is the label value of the category, is the corresponding predicted value, is the number of positive anchors;
[0022] Defined by formula (3):
[0023] (3)
[0024] in, is the label value for identification, is the corresponding predicted value, is the number of positive anchors;
[0025] Defined by formula (4):
[0026] (4)
[0027] In this formula, IoU is the intersection over union ratio, b and represents the center point of the two rectangular boxes, p represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient;
[0028] Defined by formula (5):
[0029] (5)
[0030] Among them, y represents the position of the true label, and are two points close to label y, , . BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 Old, young, pregnant, and disabled detection framework based on ID-YOLOv8
[0032] Figure 2 Old, young, pregnant, disabled detection head structure
[0033] Figure 3 Prediction box visualization
[0034] Figure 4 Results of the tests and assessments for the elderly, children, pregnant women and the disabled DETAILED DESCRIPTION
[0035] The present invention is an old, young, pregnant and disabled detection method based on ID-YOLOv8, and the specific steps are as follows:
[0036] (1) First, prepare the training dataset. The training set comes from a subset of the EYPDDD dataset that we carefully prepared, which contains 4,634 images for model training.
[0037] (2) Create a detection framework for the elderly, children, pregnant women, and the disabled. In this framework, the backbone network uses CSPDarkNet, introduces convolution and attention fusion modules, and uses the PAFPN structure for the neck network. The prediction head is the classification head, and the elderly, children, pregnant women, and disabled detection heads and regression heads are used. Each branch consists of a multi-layer convolution module, including a convolution layer, a batch normalization layer, and an activation function.
[0038] (3) The batch size is set to 8 and the initial learning rate is A total of 300 rounds of training were conducted, with 4634 images input in each round, and the learning rate was reduced by 10 times after 280 rounds. After training with our special "old, young, pregnant, and disabled detection heads", the model is more accurate in identifying these four groups.
[0039] (4) Prepare a test dataset, a subset of the EYPDDD dataset. We carefully prepared a dataset called EYPDDD, which contains 6,621 images covering public and private spaces and including various variations such as different distances and lighting conditions. Among these images, we selected those with clear human targets and relatively easy-to-distinguish images of the elderly, pregnant women, children, and disabled people (hereinafter collectively referred to as identities) as research objects. The EYPDDD dataset is divided into two main subsets: training set and test set, with a ratio of 7:3. The training set contains 4,634 images for model training; the test set contains 1,987 images for model performance evaluation. Each image of the test set is fed into the framework in sequence, and the output result is the predicted box of each image. The predicted box can be displayed on the image through the visualization output, such as Figure 3 shown.
[0040] (5) Detect the target using the old, young, pregnant, and disabled detection methods based on ID-YOLOv8. Figure 4 The model testing and evaluation results are given.
Claims
1. A method for detecting old, young, pregnant, and disabled people based on ID-YOLOv8, characterized by: S1: Collect old, young, pregnant, and disabled image datasets, classify all images according to the target category, and annotate each image; S2: The input of the framework is the image to be detected; S3: The framework includes the backbone network, the neck network and the prediction head; S4: The backbone network adopts the CSPDarkNet structure and adds convolution and attention fusion modules to enhance the effectiveness of feature extraction and the perception of the target. The input is the original image, and the backbone network extracts multi-scale feature maps, such as 80×80, 40×40 and 20×20, and the output is a feature map with rich feature representation. S5: In the neck network part, the PAFPN structure is used to fuse multi-scale features to improve the accuracy and speed of detection; S6: In the prediction head, a decoupled head design is adopted. Each output branch is divided into two sub-branches: classification and regression, which are responsible for object classification and bounding box prediction respectively. Each branch consists of a multi-layer convolution module, including a convolution layer, a batch normalization layer, and an activation function. Finally, a 1x1 convolution layer is used to reduce the number of channels and generate the final output, including category prediction, bounding box regression, and object confidence. S7: Added a dedicated "Old, Child, Pregnant, and Disabled Detection Head" and added an identity recognition sub-branch in the output branch to identify and classify the elderly, children, pregnant women, and disabled people; S8: The loss function used when training the model Calculated by formula (1): l (1) in , , , denote classification, identity prediction, and regression respectively ( and ), λ represents the weight coefficient of the prediction loss of old, young, pregnant and disabled; S9: Defined by formula (2): (2) in, is the label value of the category, is the corresponding predicted value, is the number of positive anchors; S10: Defined by formula (3): (3) in, is the label value for identification, is the corresponding predicted value, is the number of positive anchors; S11: Defined by formula (4): (4) In this formula, IoU is the intersection over union ratio, b and represents the center point of the two rectangular boxes, p represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient; S12: Defined by formula (5): (5) Among them, y represents the position of the true label, and are two points close to label y, , .