CN116883946B - Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly - Google Patents
Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly Download PDFInfo
- Publication number
- CN116883946B CN116883946B CN202310923016.9A CN202310923016A CN116883946B CN 116883946 B CN116883946 B CN 116883946B CN 202310923016 A CN202310923016 A CN 202310923016A CN 116883946 B CN116883946 B CN 116883946B
- Authority
- CN
- China
- Prior art keywords
- elderly
- optical flow
- flow field
- real
- behavior
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/02—Alarms for ensuring the safety of persons
- G08B21/04—Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons
- G08B21/0407—Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons based on behaviour analysis
- G08B21/043—Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons based on behaviour analysis detecting an emergency event, e.g. a fall
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/02—Alarms for ensuring the safety of persons
- G08B21/04—Alarms for ensuring the safety of persons responsive to non-activity, e.g. of elderly persons
- G08B21/0438—Sensor means for detecting
- G08B21/0476—Cameras to detect unsafe condition, e.g. video cameras
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Emergency Management (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Psychiatry (AREA)
- Business, Economics & Management (AREA)
- Social Psychology (AREA)
- Gerontology & Geriatric Medicine (AREA)
- Psychology (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Alarm Systems (AREA)
- Image Analysis (AREA)
Abstract
本发明涉及老人异常行为实时检测技术领域,解决了现有技术中无法准确地对老人异常行为进行实时检测,用户的老人看护体验差的问题,提供了一种老人异常行为实时检测方法、装置、设备及存储介质。该方法包括:获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。本发明实现了对老人异常行为的实时准确的检测,提升了用户的老人看护体验。
The present invention relates to the technical field of real-time detection of abnormal behavior of the elderly. It solves the problem in the existing technology that the abnormal behavior of the elderly cannot be accurately detected in real time and the user's elderly care experience is poor. It provides a method and device for real-time detection of abnormal behavior of the elderly. Equipment and storage media. The method includes: obtaining a real-time video stream in an elderly care scenario, decomposing the real-time video stream into multiple frames of real-time images; performing feature extraction on each of the real-time images, and obtaining a target containing the elderly based on the extracted human body feature information. image; perform motion analysis on each of the target images, and output motion characteristic information of the preset parts of the elderly; detect the preset abnormal behavior of the elderly based on the motion characteristic information, and output the detection results; according to the detection results, when When abnormal behavior of the elderly is identified, a safety reminder is issued to the user. The invention realizes real-time and accurate detection of abnormal behavior of the elderly and improves the user's elderly care experience.
Description
技术领域Technical field
本发明涉及老人异常行为实时检测技术领域,尤其涉及一种老人异常行为实时检测方法、装置、设备及存储介质。The invention relates to the technical field of real-time detection of abnormal behavior of the elderly, and in particular to a real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly.
背景技术Background technique
随着全球人口老龄化的趋势不断增强,如何提供优质、有效的老年人照护服务,尤其是在他们的日常生活中及时检测并处理各种异常行为,已经成为社会关注的重要问题。近年来,智能化技术的快速发展,特别是人工智能、机器学习、物联网等技术的应用,为老人异常行为的实时检测提供了新的可能。通过利用这些技术,可以提高检测的准确性和实时性,从而更好地保障老人的生活安全。然而,如何设计并实现一种有效、准确的老人异常行为实时检测方法,仍然是一个重要的研究课题。传统的老人异常行为检测主要依赖于人工观察或者一些简单的传感器设备,例如压力传感器、红外传感器等。这些方法存在明显的局限性。首先,人工观察需要大量的人力物力,而且无法做到24小时不间断的监控。其次,老年人可能因为认知功能下降而注意力不集中,出现异常徘徊行为,忘记自己的目的地或迷失方向,例如认知障碍:老年痴呆症等认知障碍疾病可能导致老人迷路和徘徊,因为他们难以记住环境和方向;抑郁或焦虑:情绪问题可能导致老人有意无意地徘徊,以寻求舒适或缓解情绪;生活环境改变:老年人可能因为住所改变或身边亲人的减少而迷茫和徘徊;老年人也可能由于骨骼疾病(如骨折)、肌肉萎缩或关节炎等问题而无法站立;中风、帕金森病等神经系统疾病可能影响老人的平衡和站立能力;其中,帕金森病的主要症状之一就是手部颤抖,可能导致老人难以控制手部动作。简单的传感器设备虽然可以全天候监测,但是只能提供有限的信息,难以准确判断上述老人的异常行为状态。As the trend of global population aging continues to increase, how to provide high-quality and effective care services for the elderly, especially how to promptly detect and deal with various abnormal behaviors in their daily lives, has become an important issue of social concern. In recent years, the rapid development of intelligent technology, especially the application of artificial intelligence, machine learning, Internet of Things and other technologies, has provided new possibilities for real-time detection of abnormal behaviors of the elderly. By utilizing these technologies, the accuracy and real-time nature of detection can be improved, thereby better ensuring the life safety of the elderly. However, how to design and implement an effective and accurate real-time detection method for abnormal behavior of the elderly is still an important research topic. Traditional abnormal behavior detection of the elderly mainly relies on manual observation or some simple sensor devices, such as pressure sensors, infrared sensors, etc. These methods have obvious limitations. First of all, manual observation requires a lot of manpower and material resources, and 24-hour uninterrupted monitoring is not possible. Secondly, the elderly may have difficulty concentrating due to cognitive decline, exhibit abnormal wandering behavior, forget their destination or become disoriented, such as cognitive impairment: Alzheimer's disease and other cognitive impairment diseases may cause the elderly to get lost and wander. Because they have difficulty remembering the environment and directions; Depression or anxiety: Emotional problems may cause the elderly to wander intentionally or unintentionally in search of comfort or emotional relief; Changes in living environment: The elderly may become confused and wander due to changes in residence or fewer relatives around them; The elderly may also be unable to stand due to bone diseases (such as fractures), muscle atrophy or arthritis; neurological diseases such as stroke and Parkinson's disease may affect the elderly's balance and standing ability; among them, one of the main symptoms of Parkinson's disease is One is hand tremors, which may make it difficult for the elderly to control hand movements. Although simple sensor devices can monitor around the clock, they can only provide limited information and are difficult to accurately judge the abnormal behavior of the above-mentioned elderly people.
现有中国专利CN116189232A公开了一种基于机器视觉的养老院老人异常行为检测方法及系统,所述方法包括:获取摄像机拍摄的视频数据;对含有目标对象的视频数据分别基于不同的异常行为识别模型进行异常行为检测;其中,所述异常行为识别模型中包括主动举手求救识别模型、跌倒行为识别模型和久驻不动行为识别模型;针对举手主动求救这一异常行为采用主动举手求救识别模型进行检测,主动举手求救识别模型为基于YOLOv5的目标检测算法;跌倒行为识别模型采用上述的YOLOV5-CBAM检测模型进行目标对象的检测,对于人体的跌倒和直立状态,其外接矩形框的形状会有明显不同,所以可以采用对人体检测外接框的高宽比进行判断从而确定检测目标是否跌倒;针对久驻不动这一异常行为采用久驻不动行为识别模型进行检测,基于上述YOLOV5-CBAM检测模型检测结果,结合Deepsort目标跟踪模型对现有目标进行跟踪、对新目标新建对象、对过久时间未匹配到目标进行删除。上述方法仅仅使用YOLOv5的目标检测算法进行异常行为检测,目标检测算法的性能和准确性可能会受到一些因素的影响,例如目标遮挡、光照变化或者目标尺度变化,这可能导致目标检测的不准确性,进而影响异常行为检测的结果。The existing Chinese patent CN116189232A discloses a method and system for detecting abnormal behavior of the elderly in nursing homes based on machine vision. The method includes: obtaining video data captured by a camera; performing video data containing target objects based on different abnormal behavior recognition models. Abnormal behavior detection; wherein, the abnormal behavior recognition model includes an active raising hand for help recognition model, a falling behavior recognition model and a permanent immobility behavior recognition model; for the abnormal behavior of raising a hand to actively ask for help, an active raising hand for help recognition model is used. Detection, the active hand-raising for help recognition model is a target detection algorithm based on YOLOv5; the fall behavior recognition model uses the above-mentioned YOLOV5-CBAM detection model to detect target objects. For the human body's falling and upright states, the shape of its circumscribed rectangular box will be Obviously different, so the height-to-width ratio of the human body detection frame can be judged to determine whether the detection target has fallen; for the abnormal behavior of standing still for a long time, the standing still behavior recognition model is used to detect, based on the above YOLOV5-CBAM detection The model detection results are combined with the Deepsort target tracking model to track existing targets, create new objects for new targets, and delete targets that have not been matched for a long time. The above method only uses the YOLOv5 target detection algorithm for abnormal behavior detection. The performance and accuracy of the target detection algorithm may be affected by some factors, such as target occlusion, illumination changes, or target scale changes, which may lead to inaccuracy in target detection. , thereby affecting the results of abnormal behavior detection.
为此,如何准确地对老人异常行为进行实时检测,提升用户的老人看护体验是亟待解决的问题。For this reason, how to accurately detect the abnormal behavior of the elderly in real time and improve the user's elderly care experience is an urgent problem to be solved.
发明内容Contents of the invention
有鉴于此,本发明提供了一种老人异常行为实时检测方法、装置、设备及存储介质,用以解决现有技术中无法准确地对老人异常行为进行实时检测,用户的老人看护体验差的问题。In view of this, the present invention provides a real-time detection method, device, equipment and storage medium for the abnormal behavior of the elderly to solve the problem in the existing technology that the abnormal behavior of the elderly cannot be accurately detected in real time and the user's elderly care experience is poor. .
本发明采用的技术方案是:The technical solution adopted by the present invention is:
第一方面,本发明提供了一种老人异常行为实时检测方法,其特征在于,所述方法包括:In a first aspect, the present invention provides a real-time detection method for abnormal behavior of the elderly, which is characterized in that the method includes:
S1:获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;S1: Obtain the real-time video stream in the elderly care scenario, and decompose the real-time video stream into multiple frames of real-time images;
S2:对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;S2: Perform feature extraction on each of the real-time images, and obtain the target image containing the elderly based on the extracted human body feature information;
S3:对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;S3: Perform motion analysis on each of the target images, and output the motion characteristic information of the preset parts of the elderly;
S4:依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;S4: Based on the motion characteristic information, detect the preset abnormal behavior of the elderly and output the detection results;
S5:依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。S5: Based on the detection results, when abnormal behavior of the elderly is identified, a safety reminder is issued to the user.
优选地,所述S2包括:Preferably, the S2 includes:
S21:依据目标检测算法,对各所述图像进行检测,输出人体的上半身位置信息;S21: Detect each of the images according to the target detection algorithm, and output the upper body position information of the human body;
S22:依据所述上半身位置信息,利用目标分类网络对人体的上半身区域进行特征提取,输出人体的上半身特征信息;S22: Based on the upper body position information, use the target classification network to extract features of the upper body area of the human body, and output the upper body feature information of the human body;
S23:将所述上半身特征信息输入预训练的分类器中,输出分类结果;S23: Input the upper body feature information into the pre-trained classifier and output the classification result;
S24:依据所述分类结果,当各所述实时图像中被分类为老人的图像帧数大于预设的图像帧数时,获取所述目标图像。S24: According to the classification result, when the number of image frames classified as elderly in each of the real-time images is greater than the preset number of image frames, obtain the target image.
优选地,所述S3包括:Preferably, the S3 includes:
S31:利用目标匹配算法,对所述目标图像中的老人进行跟踪;S31: Use the target matching algorithm to track the old man in the target image;
S32:将所述目标图像输入预训练的目标检测模型中,输出老人预设部位图像,其中,预设部位图像包括手部和躯干部图像;S32: Input the target image into the pre-trained target detection model, and output the preset part image of the elderly, where the preset part image includes hand and torso images;
S33:对所述躯干部图像和手部图像进行光流场计算,输出躯干部图像的平均光流场和手部图像的中心光流场作为所述运动特征信息。S33: Perform optical flow field calculation on the torso image and hand image, and output the average optical flow field of the torso image and the center optical flow field of the hand image as the motion feature information.
优选地,所述S4包括:Preferably, the S4 includes:
S41:获取预设的老人异常行为,其中,所述老人异常行为至少包括以下行为之一:老人异常徘徊、老人无法站立和老人手部颤抖;S41: Obtain preset abnormal behaviors of the elderly, wherein the abnormal behaviors of the elderly include at least one of the following behaviors: abnormal wandering of the elderly, inability to stand, and trembling hands of the elderly;
S42:获取预设的时间间隔,依据所述时间间隔内所述平均光流场的方差,当判断老人躯干部存在反复运动时,识别为所述老人异常徘徊行为;S42: Obtain a preset time interval, and based on the variance of the average optical flow field within the time interval, when it is determined that there is repeated movement of the old man's torso, identify the old man's abnormal wandering behavior;
S43:依据所述时间间隔内所述平均光流场的第一平均值和所述中心光流场的第二平均值,识别所述老人无法站立行为;S43: Identify the old man's inability to stand based on the first average value of the average optical flow field and the second average value of the central optical flow field within the time interval;
S44:依据所述时间间隔内所述中心光流场,当判断老人手部存在微弱运动时,识别为所述老人手部颤抖行为。S44: Based on the central optical flow field within the time interval, when it is determined that there is weak movement of the old man's hand, identify it as trembling behavior of the old man's hand.
优选地,所述S42包括:Preferably, the S42 includes:
S421:获取所述时间间隔和预设的第一光流场阈值;S421: Obtain the time interval and the preset first optical flow field threshold;
S422:对所述时间间隔内的所述平均光流场进行计算,输出所述平均光流场的方差;S422: Calculate the average optical flow field within the time interval, and output the variance of the average optical flow field;
S423:当所述方差大于所述第一光流场阈值时,识别为所述老人异常徘徊行为。S423: When the variance is greater than the first optical flow field threshold, identify the old man's abnormal wandering behavior.
优选地,所述S43包括:Preferably, the S43 includes:
S431:获取预设的第二光流场阈值和第三光流场阈值;S431: Obtain the preset second optical flow field threshold and the third optical flow field threshold;
S432:对所述时间间隔内的所述平均光流场和中心光流场进行计算,输出所述第一平均值和第二平均值;S432: Calculate the average optical flow field and the central optical flow field within the time interval, and output the first average value and the second average value;
S433:当所述第一平均值小于所述第二光流场阈值且所述第二平均值大于所述第三光流场阈值时,识别为所述老人无法站立行为。S433: When the first average value is less than the second optical flow field threshold and the second average value is greater than the third optical flow field threshold, identify the old man's behavior as being unable to stand.
优选地,所述S44包括:Preferably, the S44 includes:
S441:获取预设的第四光流场阈值;S441: Obtain the preset fourth optical flow field threshold;
S442:对所述时间间隔内的所述中心光流场进行傅里叶变换,输出中心光流场对应的频率分量;S442: Perform Fourier transform on the central optical flow field within the time interval, and output the frequency component corresponding to the central optical flow field;
S443:对各所述频率分量进行比较,当频率分量的最大值大于所述第四光流场阈值时,识别为所述手部颤抖行为。S443: Compare each of the frequency components. When the maximum value of the frequency component is greater than the fourth optical flow field threshold, identify the hand trembling behavior.
第二方面,本发明提供了一种老人异常行为实时检测装置,所述装置包括:In a second aspect, the present invention provides a device for real-time detection of abnormal behavior of the elderly, which device includes:
实时图像获取模块,用于获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;A real-time image acquisition module, used to acquire a real-time video stream in an elderly care scenario, and decompose the real-time video stream into multiple frames of real-time images;
老人识别模块,用于对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;The elderly identification module is used to extract features from each of the real-time images, and obtain target images containing the elderly based on the extracted human body feature information;
运动特征提取模块,用于对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;A motion feature extraction module is used to perform motion analysis on each of the target images and output motion feature information of the preset parts of the elderly;
老人异常行为检测模块,用于依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;The abnormal behavior detection module of the elderly is used to detect the preset abnormal behavior of the elderly based on the motion characteristic information and output the detection results;
安全提醒模块,用于依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。A safety reminder module is used to issue a safety reminder to the user when abnormal behavior of the elderly is identified based on the detection results.
第三方面,本发明实施例还提供了一种电子设备,包括:至少一个处理器、至少一个存储器以及存储在存储器中的计算机程序指令,当计算机程序指令被处理器执行时实现如上述实施方式中第一方面的方法。In a third aspect, embodiments of the present invention also provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the above embodiments are implemented. The first aspect of the method.
第四方面,本发明实施例还提供了一种存储介质,其上存储有计算机程序指令,当计算机程序指令被处理器执行时实现如上述实施方式中第一方面的方法。In a fourth aspect, embodiments of the present invention also provide a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method of the first aspect in the above embodiments is implemented.
综上所述,本发明的有益效果如下:To sum up, the beneficial effects of the present invention are as follows:
本发明提供的老人异常行为实时检测方法、装置、设备及存储介质,所述方法包括:获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。本发明通过对实时视频流进行分析和异常行为检测,分析老人的运动特征信息和异常行为,获取对老人个体化的了解,从而准确地检测出老人的异常行为,一旦检测到老人的异常行为,系统可以向用户发送安全提醒,及时的安全提醒和干预措施有助于减少事故和突发情况对老人健康和安全的威胁,提升用户的老人看护体验。The invention provides a real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly. The method includes: obtaining a real-time video stream in an elderly care scene, decomposing the real-time video stream into multiple frames of real-time images; Real-time image feature extraction is performed, and a target image containing the elderly is obtained based on the extracted human body feature information; motion analysis is performed on each of the target images to output motion feature information of the preset parts of the elderly; based on the motion feature information, the preset It is designed to detect the abnormal behavior of the elderly and output the detection results; based on the detection results, when the abnormal behavior of the elderly is identified, a safety reminder is issued to the user. This invention analyzes the real-time video stream and detects abnormal behaviors, analyzes the motion characteristic information and abnormal behaviors of the elderly, and obtains individualized understanding of the elderly, thereby accurately detecting the abnormal behaviors of the elderly. Once the abnormal behaviors of the elderly are detected, The system can send safety reminders to users. Timely safety reminders and intervention measures can help reduce the threats to the health and safety of the elderly from accidents and emergencies, and improve the user's elderly care experience.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图,这些均在本发明的保护范围内。In order to explain the technical solutions of the embodiments of the present invention more clearly, the drawings required to be used in the embodiments of the present invention will be briefly introduced below. For those of ordinary skill in the art, without exerting creative efforts, they can also Other drawings can be obtained based on these drawings, and these are all within the protection scope of the present invention.
图1为本发明实施例1中老人异常行为实时检测方法的整体工作的流程示意图;Figure 1 is a schematic flow chart of the overall work of the real-time detection method for abnormal behavior of the elderly in Embodiment 1 of the present invention;
图2为本发明实施例1中获取包含老人的目标图像的流程示意图;Figure 2 is a schematic flowchart of obtaining a target image containing an elderly person in Embodiment 1 of the present invention;
图3为本发明实施例1中对目标图像进行运动分析的流程示意图;Figure 3 is a schematic flow chart of motion analysis of a target image in Embodiment 1 of the present invention;
图4为本发明实施例1中识别老人异常行为的流程示意图;Figure 4 is a schematic flowchart of identifying abnormal behavior of the elderly in Embodiment 1 of the present invention;
图5为本发明实施例1中识别老人异常徘徊行为的流程示意图;Figure 5 is a schematic flowchart of identifying abnormal wandering behavior of the elderly in Embodiment 1 of the present invention;
图6为本发明实施例1中识别老人无法站立行为的流程示意图;Figure 6 is a schematic flowchart of identifying the behavior of an elderly person unable to stand in Embodiment 1 of the present invention;
图7为本发明实施例1中识别老人手部颤抖行为的流程示意图;Figure 7 is a schematic flowchart of identifying the hand trembling behavior of the elderly in Embodiment 1 of the present invention;
图8为本发明实施例2中老人异常行为实时检测装置的结构框图;Figure 8 is a structural block diagram of a real-time detection device for abnormal behavior of the elderly in Embodiment 2 of the present invention;
图9为本发明实施例3中电子设备的结构示意图。Figure 9 is a schematic structural diagram of an electronic device in Embodiment 3 of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。在本发明的描述中,需要理解的是,术语“中心”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。如果不冲突,本发明实施例以及实施例中的各个特征可以相互结合,均在本发明的保护范围之内。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations are mutually exclusive. any such actual relationship or sequence exists between them. In the description of the present invention, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", The orientations or positional relationships indicated by "top", "bottom", "inner", "outside", etc. are based on the orientations or positional relationships shown in the drawings. They are only for the convenience of describing the present application and simplifying the description, and are not indicated or implied. The devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation and therefore are not to be construed as limitations of the invention. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprising..." does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element. If there is no conflict, the embodiments of the present invention and various features in the embodiments can be combined with each other, and they are all within the protection scope of the present invention.
实施例1Example 1
请参见图1,本发明实施例1公开了一种老人异常行为实时检测方法,所述方法包括:Please refer to Figure 1. Embodiment 1 of the present invention discloses a real-time detection method for abnormal behavior of the elderly. The method includes:
S1:获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;S1: Obtain the real-time video stream in the elderly care scenario, and decompose the real-time video stream into multiple frames of real-time images;
具体地,获取老人看护场景下的实时视频流,所述实时视频流是指倾斜视角下安装的摄像头拍摄的彩色视频流,将所述实时视频流分解为N帧实时图像;倾斜视角下的摄像头提供了多角度更加全面的视频信息,可以实时监控老人的状态和行为,同时,通过将实时视频流分解为多帧实时图像,监护人员可以远程关注老人的情况。这样可以及时发现潜在的问题、提供帮助和进行远程指导,增加老人的安全感和照护质量。Specifically, a real-time video stream in an elderly care scenario is obtained. The real-time video stream refers to a color video stream captured by a camera installed at an oblique perspective, and the real-time video stream is decomposed into N frames of real-time images; the camera at an oblique perspective It provides more comprehensive video information from multiple angles and can monitor the status and behavior of the elderly in real time. At the same time, by decomposing the real-time video stream into multiple frames of real-time images, guardians can remotely monitor the elderly's condition. In this way, potential problems can be discovered in time, help and remote guidance can be provided, increasing the sense of security and quality of care for the elderly.
S2:对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;S2: Perform feature extraction on each of the real-time images, and obtain the target image containing the elderly based on the extracted human body feature information;
具体地,对各所述实时图像进行特征提取,可以通过图像处理和计算机视觉技术从图像中提取出有用的人体特征信息。依据提取出的人体特征信息,可以获取包含老人的目标图像,即将图像中与老人相关的部分提取出来。,其中,在特征提取阶段,利用图像处理和计算机视觉技术,对每个实时图像进行分析和处理,提取出具有区分性的人体特征信息。所述人体特征信息至少包括人体的轮廓、关键点、姿态、运动轨迹、表情等,通过分析所述人体特征信息,识别和提取出包含老人的目标图像。通过特征提取,将注意力集中在图像中与老人相关的部分,减少不必要的背景干扰,提高目标定位的准确性和精度,从而更好地捕捉老人的动作、行为和状态变化;提取的人体特征信息用于老人异常行为的检测,通过分析老人的姿态、运动轨迹等特征,可以检测跌倒、徘徊、突然离开等异常行为,这有助于及时发现老人的紧急情况,并采取适当的安全措施。同时,通过提取人体特征信息,可以减少需要处理的图像数据量,从而提高图像处理和分析的效率,只关注与老人相关的部分,可以减少计算资源和时间的消耗,使系统能够更快速地响应和处理实时视频流。Specifically, by performing feature extraction on each of the real-time images, useful human body feature information can be extracted from the images through image processing and computer vision technology. Based on the extracted human body feature information, the target image containing the elderly can be obtained, that is, the parts related to the elderly in the image can be extracted. , among which, in the feature extraction stage, image processing and computer vision technology are used to analyze and process each real-time image to extract distinctive human body feature information. The human body feature information at least includes the outline, key points, postures, movement trajectories, expressions, etc. of the human body. By analyzing the human body feature information, target images containing the elderly are identified and extracted. Through feature extraction, focus on the parts of the image related to the elderly, reduce unnecessary background interference, and improve the accuracy and precision of target positioning, thereby better capturing the movements, behaviors, and status changes of the elderly; the extracted human body Feature information is used to detect abnormal behaviors of the elderly. By analyzing the characteristics of the elderly's posture, movement trajectories, etc., abnormal behaviors such as falling, wandering, and sudden departure can be detected. This helps to promptly detect emergencies of the elderly and take appropriate safety measures. . At the same time, by extracting human body feature information, the amount of image data that needs to be processed can be reduced, thereby improving the efficiency of image processing and analysis. Only focusing on the parts related to the elderly can reduce the consumption of computing resources and time, allowing the system to respond more quickly. and processing live video streams.
在一实施例中,请参见图2,所述S2包括:In an embodiment, please refer to Figure 2, the S2 includes:
S21:依据目标检测算法,对各所述图像进行检测,输出人体的上半身位置信息;S21: Detect each of the images according to the target detection algorithm, and output the upper body position information of the human body;
具体地,下载并准备YOLOv8s模型及其相应的权重文件,所述文件包含了预训练的权重参数,用于目标检测任务;使用适当的深度学习框架(如PyTorch、TensorFlow)加载YOLOv8s模型及其权重;对于分解得出的N帧图像,依次处理每一帧:对每一帧图像进行预处理操作,如图像缩放、归一化、通道调整等,以适应YOLOv8s模型的输入要求,将经过预处理的图像输入到YOLOv8s模型中,进行目标检测操作。模型将输出图像中检测到的行人目标及其边界框的位置信息,根据行人目标的边界框位置信息,提取出对应的上半身区域,其中,可以根据需求定义上半身的具体区域范围,如从头部到腰部,将提取的上半身图像保存下来,以备后续使用或展示,重复处理下一帧图像,直到遍历完所有的N帧图像。Specifically, download and prepare the YOLOv8s model and its corresponding weight file, which contains pre-trained weight parameters for the target detection task; use an appropriate deep learning framework (such as PyTorch, TensorFlow) to load the YOLOv8s model and its weights ; For the N frames of images decomposed, process each frame in turn: perform preprocessing operations on each frame of image, such as image scaling, normalization, channel adjustment, etc., to adapt to the input requirements of the YOLOv8s model, which will be preprocessed The image is input into the YOLOv8s model to perform target detection operations. The model will output the position information of the pedestrian target and its bounding box detected in the image, and extract the corresponding upper body area based on the boundary box position information of the pedestrian target. Among them, the specific area range of the upper body can be defined according to the needs, such as from the head to the waist, save the extracted upper body image for subsequent use or display, and repeatedly process the next frame of image until all N frames of images have been traversed.
S22:依据所述上半身位置信息,利用目标分类网络对人体的上半身区域进行特征提取,输出人体的上半身特征信息;S22: Based on the upper body position information, use the target classification network to extract features of the upper body area of the human body, and output the upper body feature information of the human body;
具体地,下载并准备适用于行人特征提取的ResNet模型及其相应的权重文件,这些文件包含了预训练的权重参数,用于特征提取任务,使用适当的深度学习框架(如PyTorch、TensorFlow)加载ResNet模型及其权重,遍历上一步中得到的行人上半身图像:对于每帧上半身图像,依次进行下面的处理。对每个上半身图像进行预处理操作,如图像缩放、归一化、通道调整等,以适应ResNet模型的输入要求。将经过预处理的上半身图像输入到ResNet模型中,进行特征提取操作,ResNet模型将输出行人上半身图像对应的特征向量,将提取的行人上半身特征向量保存下来,可以以矩阵或向量的形式进行存储,用于后续的行人分析、异常检测等任务,重复处理下一帧上半身图像,直到遍历完所有的行人上半身图像,通过以上步骤,可以利用ResNet网络对行人上半身图像进行特征提取,得到具有判别性的特征向量。这些特征向量可以用于进一步的行人识别、行为分析、异常检测等任务,从而提高对老人看护场景下的行人行为的理解和判断能力。Specifically, download and prepare the ResNet model and its corresponding weight files suitable for pedestrian feature extraction. These files contain pre-trained weight parameters for feature extraction tasks, and are loaded using an appropriate deep learning framework (such as PyTorch, TensorFlow). The ResNet model and its weights traverse the pedestrian upper body images obtained in the previous step: for each upper body image frame, the following processing is performed in sequence. Preprocessing operations are performed on each upper body image, such as image scaling, normalization, channel adjustment, etc., to adapt to the input requirements of the ResNet model. Input the preprocessed upper body image into the ResNet model to perform feature extraction operations. The ResNet model will output the feature vector corresponding to the pedestrian's upper body image, and save the extracted pedestrian's upper body feature vector, which can be stored in the form of a matrix or vector. Used for subsequent pedestrian analysis, anomaly detection and other tasks, the next frame of upper body images is repeatedly processed until all pedestrian upper body images have been traversed. Through the above steps, the ResNet network can be used to extract features from the pedestrian upper body images and obtain discriminative Feature vector. These feature vectors can be used for further pedestrian recognition, behavior analysis, anomaly detection and other tasks, thereby improving the understanding and judgment of pedestrian behavior in elderly care scenarios.
S23:将所述上半身特征信息输入预训练的分类器中,输出分类结果;S23: Input the upper body feature information into the pre-trained classifier and output the classification result;
具体地,获取已经训练好了的用于老人分类的SVM分类器,并保存其相关参数和权重,使用机器学习库(如scikit-learn)加载已经训练好的SVM分类器模型及其权重,将提取的行人上半身特征向量作为输入数据,准备用于分类的特征向量,根据SVM分类器的要求,对特征向量进行必要的预处理,例如归一化、标准化或其他转换操作,将预处理后的特征向量输入到SVM分类器中,进行分类操作,SVM将输出对应于每个特征向量的分类标签,表示行人上半身是否属于老人,对于每个图像中的行人上半身,根据SVM的分类结果判断其是否属于老人。可以根据分类标签的置信度或概率进行进一步的决策,根据分类结果,可以将每个图像中行人上半身是否属于老人的判断结果输出,例如以二进制形式(老人/非老人)或概率值的形式。通过利用已训练好的SVM分类器对提取的行人上半身特征进行分类,判断其是否属于老人。这样可以实现对老人的识别和分类,为后续的老人行为分析、异常检测等提供基础。Specifically, obtain the already trained SVM classifier for elderly classification, save its relevant parameters and weights, use a machine learning library (such as scikit-learn) to load the already trained SVM classifier model and its weights, and The extracted pedestrian upper body feature vector is used as input data to prepare the feature vector for classification. According to the requirements of the SVM classifier, necessary preprocessing is performed on the feature vector, such as normalization, standardization or other conversion operations, and the preprocessed The feature vector is input into the SVM classifier for classification operation. SVM will output a classification label corresponding to each feature vector, indicating whether the upper body of the pedestrian belongs to an old person. For the upper body of the pedestrian in each image, it is judged according to the classification result of SVM whether it is Belongs to the elderly. Further decisions can be made based on the confidence or probability of the classification label. Based on the classification results, the judgment result of whether the upper body of the pedestrian in each image belongs to an old person can be output, for example, in binary form (elderly/non-elderly) or in the form of a probability value. By using the trained SVM classifier to classify the extracted upper body features of pedestrians, it is judged whether they belong to the elderly. This can realize the identification and classification of the elderly, and provide a basis for subsequent analysis of the elderly's behavior, abnormality detection, etc.
S24:依据所述分类结果,当各所述实时图像中被分类为老人的图像帧数大于预设的图像帧数时,获取所述目标图像。S24: According to the classification result, when the number of image frames classified as elderly in each of the real-time images is greater than the preset number of image frames, obtain the target image.
具体地,对于每帧图像,记录SVM分类器的分类结果,标记为老人或非老人,计算所有图像帧中被判断为老人的次数,即判断为老人的图像帧数量,根据总帧数N,计算超过2/3以上的图像帧的阈值,即N乘以2/3,比较老人判断次数与阈值的关系。如果老人判断次数大于阈值,即超过2/3以上的图像帧判断为老人,则认为该行人目标框为老人,获取对应的目标图像,将行人目标框是否为老人的判断结果输出,可以以二进制形式(老人/非老人)或其他形式表示。通过对N帧图像的分类结果进行综合分析,根据超过2/3以上的图像帧判断为老人的条件来确定行人目标框是否为老人,可以提高判断的准确性和稳定性,确保对老人目标的准确识别。Specifically, for each frame of image, record the classification result of the SVM classifier, label it as elderly or non-elderly, and calculate the number of times that all image frames are judged to be elderly, that is, the number of image frames judged to be elderly. According to the total number of frames N, Calculate the threshold for image frames exceeding 2/3, that is, multiply N times 2/3, and compare the relationship between the number of judgments made by the old man and the threshold. If the number of elderly judgments is greater than the threshold, that is, more than 2/3 of the image frames are judged to be elderly, then the pedestrian target frame is considered to be an elderly person, the corresponding target image is obtained, and the judgment result of whether the pedestrian target frame is an elderly person is output, which can be expressed in binary form (elderly/non-elderly) or other forms of expression. By comprehensively analyzing the classification results of N frames of images and determining whether the pedestrian target frame is an elderly person based on the condition that more than 2/3 of the image frames are judged to be elderly, the accuracy and stability of the judgment can be improved and the accuracy of the elderly target can be ensured. Accurate identification.
S3:对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;S3: Perform motion analysis on each of the target images, and output the motion characteristic information of the preset parts of the elderly;
具体地,对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;通过对目标图像中老人预设部位的运动进行分析,提取相关的运动特征信息。这些特征信息可以帮助理解老人的行为模式、监测异常行为,从而实现对老人的行为监控和健康状况评估。Specifically, motion analysis is performed on each of the target images, and motion feature information of the preset parts of the elderly is output; and relevant motion feature information is extracted by analyzing the motion of the preset parts of the elderly in the target image. This characteristic information can help understand the behavior patterns of the elderly and monitor abnormal behaviors, thereby enabling behavioral monitoring and health status assessment of the elderly.
在一实施例中,请参见图3,所述S3包括:In an embodiment, please refer to Figure 3, the S3 includes:
S31:利用目标匹配算法,对所述目标图像中的老人进行跟踪;S31: Use the target matching algorithm to track the old man in the target image;
具体地,通过目标检测算法(如YOLO、SSD等)检测出当前帧中的老人目标,并获取其边界框(bounding box)位置信息。将当前帧中的边界框与前一帧中的边界框进行IOU计算,衡量它们的重叠程度,根据IOU计算结果,进行目标匹配,采用最大IOU匹配策略,即将当前帧中的边界框与前一帧中具有最大IOU的边界框进行匹配,根据目标匹配的结果,更新老人目标的跟踪信息,包括边界框位置、速度、运动状态等,使用卡尔曼滤波、Kalman-IOU等方法进行跟踪的状态估计和更新,重复对后续帧中的老人目标进行检测、IOU计算、目标匹配,从而实现对所述目标图像中的老人目标的跟踪更新。采用IOU匹配进行老人目标跟踪具有简单、实时性好、鲁棒性高、连续性跟踪和目标关联性等优势,适用于老人监护、行为分析和安全监控等场景。Specifically, the elderly target in the current frame is detected through a target detection algorithm (such as YOLO, SSD, etc.), and its bounding box position information is obtained. Calculate the IOU between the bounding box in the current frame and the bounding box in the previous frame, measure their overlap, perform target matching based on the IOU calculation results, and adopt the maximum IOU matching strategy, that is, compare the bounding box in the current frame with the previous frame The bounding box with the largest IOU in the frame is matched. According to the target matching results, the tracking information of the elderly target is updated, including the bounding box position, speed, motion status, etc., and tracking state estimation is performed using methods such as Kalman filtering and Kalman-IOU. and update, repeatedly detecting, IOU calculation, and target matching the elderly target in subsequent frames, thereby achieving tracking and updating of the elderly target in the target image. The use of IOU matching for elderly target tracking has the advantages of simplicity, good real-time performance, high robustness, continuous tracking and target correlation, and is suitable for elderly monitoring, behavior analysis, security monitoring and other scenarios.
S32:将所述目标图像输入预训练的目标检测模型中,输出老人预设部位图像,其中,预设部位图像包括手部和躯干部图像;S32: Input the target image into the pre-trained target detection model, and output the preset part image of the elderly, where the preset part image includes hand and torso images;
具体地,使用YoloV8s目标检测算法对图像进行处理,以检测老人的手部和躯干部,其中,所述手部指手掌,躯干部指身体和四肢(除手掌之外),根据目标检测的结果,从图像中提取出老人的头部、手部和身体躯干区域,通过使用目标的边界框信息来截取相应的图像区域,输出老人预设部位图像,其中,预设部位图像包括手部和躯干部图像;YoloV8s算法具有较高的定位和识别准确性,能够准确地检测出老人的头部、手部和身体躯干,提供可靠的目标位置信息,同时,YoloV8s算法具有较快的处理速度和较高的计算效率,适用于实时应用场景,可以在实时视频流中快速检测老人的不同身体部位。通过检测头部、手部和身体躯干,可以获取老人不同身体部位的特征信息,从而提供更全面和多样化的分析依据。Specifically, the YoloV8s target detection algorithm is used to process the image to detect the hands and torso of the old man, where the hands refer to the palms and the torso refers to the body and limbs (except the palms). According to the results of the target detection , extract the old man's head, hands and body torso areas from the image, intercept the corresponding image area by using the target's bounding box information, and output the old man's preset part image, where the preset part image includes the hands and torso head image; the YoloV8s algorithm has high positioning and recognition accuracy, can accurately detect the head, hands and body torso of the elderly, and provides reliable target location information. At the same time, the YoloV8s algorithm has faster processing speed and High computational efficiency, suitable for real-time application scenarios, and can quickly detect different body parts of the elderly in real-time video streams. By detecting the head, hands and body torso, the characteristic information of different body parts of the elderly can be obtained, thereby providing a more comprehensive and diversified analysis basis.
S33:对所述躯干部图像和手部图像进行光流场计算,输出躯干部图像的平均光流场和手部图像的中心光流场作为所述运动特征信息。S33: Perform optical flow field calculation on the torso image and hand image, and output the average optical flow field of the torso image and the center optical flow field of the hand image as the motion feature information.
具体地,使用光流算法(例如Lucas-Kanade算法、Farneback算法等)计算躯干部图像中各个像素点的光流向量,光流向量表示了相邻帧之间像素点的运动方向和速度,对躯干部图像中的所有像素点的光流向量进行求平均操作,得到躯干部图像的平均光流向量值。这可以通过将所有光流向量的x和y分量进行累加,再除以像素点数量来实现;根据手部图像中心点区域的位置,提取该区域的光流向量。可以选择手部中心点为中心,以一定的区域范围为半径提取该区域内的光流向量。通过计算躯干部图像的平均光流向量值,可以获得整体躯干部位的运动信息。这有助于判断老人的整体运动状态和运动模式,例如是否出现异常运动或徘徊行为。老年人通常因为身体的衰老和机能减退而运动比较缓慢,由于光流法是一种基于像素位移计算的方法,它对于缓慢运动非常敏感,即使老人的动作较为缓慢,光流法也能有效地捕捉到这些微小的位移,从而实现对其运动特征的提取;老年人的运动往往较为缓慢,而且很多情况下需要实时监测,以防止潜在的意外发生,光流法具有实时处理图像的能力,能够在视频流中实时提取运动特征,及时反馈老人的动作状态,以便及早采取必要的措施。尽管老人的运动较为缓慢,但光流法的位移计算精度较高,能够准确地捕捉像素之间的微小位移,这种精准度使得光流法在跟踪老人的运动轨迹和动作变化方面表现出色,有助于提供更准确的行为监测和分析结果,光流法是一种基于图像处理的技术,不需要对老人进行额外的传感器佩戴或干预,这种非侵入性使得光流法在老人的行为监测中更容易被接受和应用,不会给老人带来不适或困扰;通过计算手部图像中心点区域的光流速度场,可以获得手部运动的具体特征。手部四肢运动可能与手部区域的运动不一致,因此通过分析手部中心点区域的光流速度场,可以更准确地捕捉手部的运动信息。Specifically, an optical flow algorithm (such as the Lucas-Kanade algorithm, Farneback algorithm, etc.) is used to calculate the optical flow vector of each pixel in the torso image. The optical flow vector represents the movement direction and speed of the pixel between adjacent frames. The optical flow vectors of all pixels in the torso image are averaged to obtain the average optical flow vector value of the torso image. This can be achieved by accumulating the x and y components of all optical flow vectors and dividing by the number of pixels; extract the optical flow vector of the area based on the position of the center point area of the hand image. You can choose the center point of the hand as the center and extract the optical flow vector in the area with a certain area as the radius. By calculating the average optical flow vector value of the torso image, the motion information of the overall torso part can be obtained. This helps determine the overall movement status and movement patterns of the elderly, such as whether there are abnormal movements or wandering behaviors. The elderly usually move slowly due to physical aging and functional decline. Since the optical flow method is a method based on pixel displacement calculation, it is very sensitive to slow movements. Even if the elderly move slowly, the optical flow method can effectively Capture these tiny displacements to extract their motion features; the movement of the elderly is often slow, and in many cases real-time monitoring is required to prevent potential accidents. The optical flow method has the ability to process images in real time and can Extract motion features in the video stream in real time and provide timely feedback on the elderly person's action status so that necessary measures can be taken early. Although the movement of the elderly is relatively slow, the optical flow method has a high precision in displacement calculation and can accurately capture the tiny displacements between pixels. This accuracy makes the optical flow method excellent in tracking the movement trajectories and movement changes of the elderly. Helping to provide more accurate behavioral monitoring and analysis results, optical flow method is a technology based on image processing that does not require additional sensor wearing or intervention for the elderly. This non-invasiveness makes optical flow method more effective in the behavior of the elderly. It is easier to be accepted and applied in monitoring and will not cause discomfort or trouble to the elderly; by calculating the optical flow velocity field in the center point area of the hand image, the specific characteristics of the hand movement can be obtained. The movement of the hand limbs may be inconsistent with the movement of the hand area, so by analyzing the optical flow velocity field in the center point area of the hand, the movement information of the hand can be captured more accurately.
S4:依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;S4: Based on the motion characteristic information, detect the preset abnormal behavior of the elderly and output the detection results;
具体地,依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;通过对预设的老人异常行为进行检测,可以提前发现可能存在的问题或紧急情况。及时的预警可以促使相关人员采取适当的措施,以确保老人的安全和健康。Specifically, based on the motion characteristic information, the preset abnormal behavior of the elderly is detected and the detection results are output; by detecting the preset abnormal behavior of the elderly, possible problems or emergencies can be discovered in advance. Timely early warning can prompt relevant personnel to take appropriate measures to ensure the safety and health of the elderly.
在一实施例中,请参见图4,所述S4包括:In an embodiment, please refer to Figure 4, the S4 includes:
S41:获取预设的老人异常行为,其中,所述老人异常行为至少包括以下行为之一:老人异常徘徊、老人无法站立和老人手部颤抖;S41: Obtain preset abnormal behaviors of the elderly, wherein the abnormal behaviors of the elderly include at least one of the following behaviors: abnormal wandering of the elderly, inability to stand, and trembling hands of the elderly;
具体地,老年人可能因为认知功能下降而注意力不集中,出现异常徘徊行为,忘记自己的目的地或迷失方向,例如认知障碍:老年痴呆症等认知障碍疾病可能导致老人迷路和徘徊,因为他们难以记住环境和方向;抑郁或焦虑:情绪问题可能导致老人有意无意地徘徊,以寻求舒适或缓解情绪;生活环境改变:老年人可能因为住所改变或身边亲人的减少而迷茫和徘徊;老年人也可能由于骨骼疾病(如骨折)、肌肉萎缩或关节炎等问题而无法站立;中风、帕金森病等神经系统疾病可能影响老人的平衡和站立能力;其中,帕金森病的主要症状之一就是手部颤抖,可能导致老人难以控制手部动作。首先,根据具体应用需求和关注的老人异常行为,预设一组老人异常行为的定义和规则,例如针对上述问题设置老人异常徘徊、老人无法站立和老人手部颤抖;具体地,根据实际需求,也可以灵活定义和调整预设的老人异常行为,根据特定场景和老人群体的特点进行定制,提高检测的准确性和适应性。Specifically, the elderly may have difficulty concentrating, exhibit abnormal wandering behavior, forget their destination, or become disoriented due to cognitive decline, such as cognitive impairment: Alzheimer's disease and other cognitive impairment diseases may cause the elderly to get lost and wander. , because they have difficulty remembering the environment and directions; Depression or anxiety: Emotional problems may cause the elderly to wander intentionally or unintentionally in search of comfort or emotional relief; Changes in living environment: The elderly may become confused and wander due to changes in residence or fewer relatives around them ; The elderly may also be unable to stand due to bone diseases (such as fractures), muscle atrophy or arthritis; neurological diseases such as stroke and Parkinson's disease may affect the elderly's balance and standing ability; among them, the main symptoms of Parkinson's disease One of them is hand tremor, which may make it difficult for the elderly to control hand movements. First, according to the specific application needs and the abnormal behaviors of the elderly that are of concern, a set of definitions and rules for the elderly's abnormal behaviors are preset, such as abnormal wandering of the elderly, inability to stand, and trembling hands of the elderly for the above problems; specifically, according to actual needs, It can also flexibly define and adjust preset abnormal behaviors of the elderly, and customize them according to specific scenarios and characteristics of the elderly group to improve detection accuracy and adaptability.
S42:获取预设的时间间隔,依据所述时间间隔内所述平均光流场的方差,当判断老人躯干部存在反复运动时,识别为所述老人异常徘徊行为;S42: Obtain a preset time interval, and based on the variance of the average optical flow field within the time interval, when it is determined that there is repeated movement of the old man's torso, identify the old man's abnormal wandering behavior;
在一实施例中,请参见图5,所述S42包括:In an embodiment, please refer to Figure 5, the S42 includes:
S421:获取所述时间间隔和预设的第一光流场阈值;S421: Obtain the time interval and the preset first optical flow field threshold;
S422:对所述时间间隔内的所述平均光流场进行计算,输出所述平均光流场的方差;S422: Calculate the average optical flow field within the time interval, and output the variance of the average optical flow field;
S423:当所述方差大于所述第一光流场阈值时,识别为所述老人异常徘徊行为。S423: When the variance is greater than the first optical flow field threshold, identify the old man's abnormal wandering behavior.
具体地,利用光流场L1代表预设时间间隔内躯干部图像的平均光流场,身体躯干部位包含了大部分的核心和平衡支持区域,在老年人的异常行为监测中,关注身体躯干的运动特征对于预防摔倒和评估姿势的稳定性至关重要,身体躯干部位的运动更加整体化,平均光流场能够捕捉到整体运动趋势和方向,帮助判断老人的行动是否在一个方向上稳定。如果在一个时间窗口内L1的方差超过设定阈值,那么我们可以认为可能存在徘徊行为:定义身体躯干部分在时间t到t+Δt内的光流场为L1(t,t+Δt),设定一个第一光流场阈值Th1,若Var[L1(t,t+Δt)]>Th1,则判断存在老人异常徘徊行为;其中,Var[]表示方差,t代表当前时间,Δt代表设定的时间窗口,具体取决于实验来决定,Th1是设定的第一光流场阈值,如果在Δt时间内身体的位置变化超过这个阈值,那么就认为存在老人异常徘徊行为;光流场的方差是基于实时视频流计算得出的,可以实时监测老人的行为,通过连续地计算光流场的方差,可以对老人的行为进行持续跟踪和监测,及时发现异常徘徊行为,同时,通过设定合适的第一光流场阈值,可以根据光流场的方差来判断身体位置变化的程度,当方差超过阈值时,可以较准确地识别出老人的异常徘徊行为,提高了检测的精准性和灵敏性,具体设定第一光流场阈值和时间窗口的大小可以根据实际情况进行调整,不同老人、不同环境和不同需求可能有不同的阈值和时间窗口设置,这样可以提高算法的适应性和可调性。Specifically, the optical flow field L1 is used to represent the average optical flow field of the torso image within a preset time interval. The body torso contains most of the core and balance support areas. In the abnormal behavior monitoring of the elderly, attention should be paid to the body torso. Movement characteristics are crucial for preventing falls and assessing posture stability. The movement of the body's trunk is more integrated. The average optical flow field can capture the overall movement trend and direction, helping to judge whether the elderly's actions are stable in one direction. If the variance of L1 exceeds the set threshold within a time window, then we can consider that there may be wandering behavior: define the optical flow field of the body trunk part from time t to t+Δt as L1(t,t+Δt), let Set a first optical flow field threshold Th1. If Var[L1(t,t+Δt)]>Th1, it is judged that there is abnormal wandering behavior of the elderly; among them, Var[] represents the variance, t represents the current time, and Δt represents the setting The time window is determined by the experiment. Th1 is the first optical flow field threshold set. If the position change of the body exceeds this threshold within Δt time, then it is considered that there is abnormal wandering behavior of the elderly; the variance of the optical flow field It is calculated based on real-time video streams and can monitor the behavior of the elderly in real time. By continuously calculating the variance of the optical flow field, the behavior of the elderly can be continuously tracked and monitored, and abnormal wandering behavior can be discovered in time. At the same time, by setting the appropriate The first optical flow field threshold can be used to judge the degree of body position change based on the variance of the optical flow field. When the variance exceeds the threshold, the abnormal wandering behavior of the elderly can be more accurately identified, improving the accuracy and sensitivity of detection. , the specific setting of the first optical flow field threshold and time window size can be adjusted according to the actual situation. Different elderly people, different environments and different needs may have different threshold and time window settings, which can improve the adaptability and adjustability of the algorithm. sex.
S43:依据所述时间间隔内所述平均光流场的第一平均值和所述中心光流场的第二平均值,识别所述老人无法站立行为;S43: Identify the old man's inability to stand based on the first average value of the average optical flow field and the second average value of the central optical flow field within the time interval;
在一实施例中,请参见图6,所述S43包括:In an embodiment, please refer to Figure 6, the S43 includes:
S431:获取预设的第二光流场阈值和第三光流场阈值;S431: Obtain the preset second optical flow field threshold and the third optical flow field threshold;
S432:对所述时间间隔内的所述平均光流场和中心光流场进行计算,输出所述第一平均值和第二平均值;S432: Calculate the average optical flow field and the central optical flow field within the time interval, and output the first average value and the second average value;
S433:当所述第一平均值小于所述第二光流场阈值且所述第二平均值大于所述第三光流场阈值时,识别为所述老人无法站立行为。S433: When the first average value is less than the second optical flow field threshold and the second average value is greater than the third optical flow field threshold, identify the old man's behavior as being unable to stand.
具体地,利用光流场L2代表手部图像的中心光流场,手部是人体最灵活和精细的部位之一,它在老人日常生活中进行各种细微的动作,如捏取、握紧、书写等,使用中心光流场可以更加敏感地检测到手部中心点周围像素的细微运动,帮助捕捉手部的精细动作特征;在老人的行为监测中,可能会有整体的摄像头或图像运动,如镜头的移动或相机的抖动,使用中心光流场可以部分去除这些整体运动的影响,将重点放在手部图像本身的细微运动上,减少不必要的干扰。老人无法站起指的是他的身体躯干应该会保持相对小范围运动,即L1会很小,同时,他可能会试图用手来支撑,所以L2会变大,当Mean[L1(t,t+Δt)]<Th2且Mean[L2(t,t+Δt)]>Th3时,判断为老人无法站立行为,其中,Mean表示求平均值,t是当前时间,Δt是设定的时间窗口,Th2和Th3是设定的第二光流场阈值和第三光流场阈值。利用光流场来分析手部图像的运动特征,可以更加准确地识别老人无法站立的行为,将其与其他异常行为进行区分,提高检测的准确性和可靠性;通过综合考虑光流场的两个方向(L1和L2),可以更好地捕捉到老人无法站立行为的特征,避免仅仅依赖单一特征造成的误判。通过设定合适的第二光流场阈值和第三光流场阈值,可以根据实际情况对行为进行灵活调整,提高算法的适应性和可调性。Specifically, the optical flow field L2 is used to represent the central optical flow field of the hand image. The hand is one of the most flexible and delicate parts of the human body. It performs various subtle movements in the daily life of the elderly, such as pinching and grasping. , writing, etc., using the central optical flow field can more sensitively detect the subtle movements of pixels around the center point of the hand, helping to capture the fine movement characteristics of the hand; in the behavior monitoring of the elderly, there may be overall camera or image movement, Such as lens movement or camera shake, using the central optical flow field can partially remove the influence of these overall movements, focusing on the subtle movements of the hand image itself, reducing unnecessary interference. The old man's inability to stand up means that his body trunk should maintain a relatively small range of motion, that is, L1 will be small. At the same time, he may try to support it with his hands, so L2 will become larger. When Mean[L1(t, t +Δt)]<Th2 and Mean[L2(t,t+Δt)]>Th3, it is judged that the old man cannot stand, where Mean means averaging, t is the current time, and Δt is the set time window, Th2 and Th3 are the set second optical flow field threshold and the third optical flow field threshold. Using the optical flow field to analyze the movement characteristics of the hand image can more accurately identify the elderly person's inability to stand, distinguish it from other abnormal behaviors, and improve the accuracy and reliability of detection; by comprehensively considering both aspects of the optical flow field Two directions (L1 and L2) can better capture the characteristics of the elderly's inability to stand and avoid misjudgments caused by relying solely on a single feature. By setting appropriate second optical flow field thresholds and third optical flow field thresholds, the behavior can be flexibly adjusted according to the actual situation and the adaptability and adjustability of the algorithm can be improved.
S44:依据所述时间间隔内所述中心光流场,当判断老人手部存在微弱运动时,识别为所述老人手部颤抖行为。S44: Based on the central optical flow field within the time interval, when it is determined that there is weak movement of the old man's hand, identify it as trembling behavior of the old man's hand.
在一实施例中,请参见图7,所述S44包括:In one embodiment, please refer to Figure 7, the S44 includes:
S441:获取预设的第四光流场阈值;S441: Obtain the preset fourth optical flow field threshold;
S442:对所述时间间隔内的所述中心光流场进行傅里叶变换,输出中心光流场对应的频率分量;S442: Perform Fourier transform on the central optical flow field within the time interval, and output the frequency component corresponding to the central optical flow field;
S443:对各所述频率分量进行比较,当频率分量的最大值大于所述第四光流场阈值时,识别为所述手部颤抖行为。S443: Compare each of the frequency components. When the maximum value of the frequency component is greater than the fourth optical flow field threshold, identify the hand trembling behavior.
具体地,老人手部颤抖指的是老人手部发生异常,其手不自觉地颤抖,其行为可能会导致L2频繁地在一个较小的范围内变化:设定一个时间区间,统计这段时间内手部的光流场;计算手部光流的快速傅里叶变换;当Max[Freq(L2(t,t+Δt))]>Th4时,判断为可能的手抖行为;其中,Freq表示快速傅里叶变换后的频率分量,t是当前时间,Δt是设定的时间窗口,Th4是设定的第四光流场阈值,Max表示最大值。利用光流场和频率分量的变化来判断手部颤抖行为,可以准确识别老人手部异常情况,及时发现可能存在的健康问题;通过进行快速傅里叶变换,可以提取手部光流场中的频率信息,将手部颤抖行为与其他运动行为进行区分,提高检测的准确性和可靠性;设定适当的第四光流场阈值Th4,可以根据实际情况对手部颤抖行为进行判断,避免误判或漏判的情况发生。Specifically, hand tremor in the elderly refers to abnormalities in the hands of the elderly. The hands tremble unconsciously, and their behavior may cause L2 to frequently change within a small range: set a time interval and count this period. Optical flow field inside the hand; calculate the fast Fourier transform of the hand optical flow; when Max[Freq(L2(t,t+Δt))]>Th4, it is judged as possible hand shaking behavior; where, Freq Represents the frequency component after fast Fourier transform, t is the current time, Δt is the set time window, Th4 is the set fourth optical flow field threshold, and Max represents the maximum value. Using changes in the optical flow field and frequency components to judge hand trembling behavior, we can accurately identify abnormalities in the hands of the elderly and promptly detect possible health problems; by performing fast Fourier transform, we can extract the components in the optical flow field of the hands. Frequency information distinguishes hand trembling behavior from other movement behaviors to improve the accuracy and reliability of detection; setting an appropriate fourth optical flow field threshold Th4 can judge hand trembling behavior based on the actual situation to avoid misjudgment Or missed judgments may occur.
S5:依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。S5: Based on the detection results, when abnormal behavior of the elderly is identified, a safety reminder is issued to the user.
具体地,当识别到老人的异常行为时,系统可以通过合适的方式向用户发出安全提醒。例如,通过移动应用程序、短信、电话或警报系统等方式向用户发送通知,提醒他们关注老人的情况,通过实时监测老人的行为,并在识别到异常行为时立即发出安全提醒,确保能够及时采取措施处理可能的紧急情况;通过向用户发送安全提醒,可以增强老人看护的安全性,帮助用户及时关注老人的健康和安全状况,避免潜在风险和事故的发生。Specifically, when an abnormal behavior of an elderly person is recognized, the system can issue a safety reminder to the user in an appropriate manner. For example, notifications are sent to users through mobile applications, text messages, phone calls or alarm systems to remind them to pay attention to the elderly's situation. By monitoring the elderly's behavior in real time and immediately issuing safety reminders when abnormal behavior is identified, ensuring that timely action can be taken. Measures to deal with possible emergencies; by sending safety reminders to users, it can enhance the safety of elderly care, help users pay attention to the health and safety of the elderly in a timely manner, and avoid potential risks and accidents.
实施例2Example 2
请参见图8,本发明实施例2还提供了一种老人异常行为实时检测装置,所述装置包括:Please refer to Figure 8. Embodiment 2 of the present invention also provides a real-time detection device for abnormal behavior of the elderly. The device includes:
实时图像获取模块,用于获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;A real-time image acquisition module, used to acquire a real-time video stream in an elderly care scenario, and decompose the real-time video stream into multiple frames of real-time images;
老人识别模块,用于对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;The elderly identification module is used to extract features from each of the real-time images, and obtain target images containing the elderly based on the extracted human body feature information;
在一实施例中,所述老人识别模块包括:In one embodiment, the elderly identification module includes:
上半身位置获取单元,用于依据目标检测算法,对各所述图像进行检测,输出人体的上半身位置信息;The upper body position acquisition unit is used to detect each of the images according to the target detection algorithm and output the upper body position information of the human body;
上半身特征提取单元,用于依据所述上半身位置信息,利用目标分类网络对人体的上半身区域进行特征提取,输出人体的上半身特征信息;An upper body feature extraction unit is used to extract features of the upper body region of the human body using a target classification network based on the upper body position information, and output the upper body feature information of the human body;
上半身特征分类单元,用于将所述上半身特征信息输入预训练的分类器中,输出分类结果;An upper body feature classification unit is used to input the upper body feature information into a pre-trained classifier and output a classification result;
目标图像获取单元,用于依据所述分类结果,当各所述实时图像中被分类为老人的图像帧数大于预设的图像帧数时,获取所述目标图像。The target image acquisition unit is configured to acquire the target image based on the classification result when the number of image frames classified as elderly in each of the real-time images is greater than a preset number of image frames.
运动特征提取模块,用于对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;A motion feature extraction module is used to perform motion analysis on each of the target images and output motion feature information of the preset parts of the elderly;
在一实施例中,所述运动特征提取模块包括:In one embodiment, the motion feature extraction module includes:
老人跟踪单元,用于利用目标匹配算法,对所述目标图像中的老人进行跟踪;An old man tracking unit is used to track the old man in the target image using a target matching algorithm;
老人预设部位图像获取单元,用于将所述目标图像输入预训练的目标检测模型中,输出老人预设部位图像,其中,预设部位图像包括手部和躯干部图像;The preset part image acquisition unit for the elderly is used to input the target image into the pre-trained target detection model and output the preset part image for the elderly, where the preset part image includes hand and torso images;
光流场计算单元,用于对所述躯干部图像和手部图像进行光流场计算,输出躯干部图像的平均光流场和手部图像的中心光流场作为所述运动特征信息。An optical flow field calculation unit is configured to perform optical flow field calculation on the torso image and hand image, and output the average optical flow field of the torso image and the center optical flow field of the hand image as the motion feature information.
老人异常行为检测模块,用于依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;The abnormal behavior detection module of the elderly is used to detect the preset abnormal behavior of the elderly based on the motion characteristic information and output the detection results;
在一实施例中,所述老人异常行为检测模块包括:In one embodiment, the elderly abnormal behavior detection module includes:
老人异常行为获取单元,用于获取预设的老人异常行为,其中,所述老人异常行为至少包括以下行为之一:老人异常徘徊、老人无法站立和老人手部颤抖;The abnormal behavior acquisition unit of the elderly is used to obtain preset abnormal behaviors of the elderly, wherein the abnormal behaviors of the elderly include at least one of the following behaviors: abnormal wandering of the elderly, inability of the elderly to stand, and trembling of the hands of the elderly;
老人异常徘徊识别单元,用于获取预设的时间间隔,依据所述时间间隔内所述平均光流场的方差,当判断老人躯干部存在反复运动时,识别为所述老人异常徘徊行为;An abnormal wandering identification unit for the elderly is used to obtain a preset time interval and, based on the variance of the average optical flow field within the time interval, when it is determined that there is repeated movement of the elderly man's torso, identify the elderly man's abnormal wandering behavior;
第一光流场阈值获取子单元,用于获取所述时间间隔和预设的第一光流场阈值;The first optical flow field threshold acquisition subunit is used to acquire the time interval and the preset first optical flow field threshold;
方差计算子单元,用于对所述时间间隔内的所述平均光流场进行计算,输出所述平均光流场的方差;A variance calculation subunit, used to calculate the average optical flow field within the time interval and output the variance of the average optical flow field;
老人异常徘徊检测子单元,用于当所述方差大于所述第一光流场阈值时,识别为所述老人异常徘徊行为。The elderly's abnormal wandering detection subunit is used to identify the elderly's abnormal wandering behavior when the variance is greater than the first optical flow field threshold.
老人无法站立识别单元,用于依据所述时间间隔内所述平均光流场的第一平均值和所述中心光流场的第二平均值,识别所述老人无法站立行为;An elderly person cannot stand identification unit, configured to identify the behavior of the elderly person being unable to stand based on the first average value of the average optical flow field and the second average value of the central optical flow field within the time interval;
在一实施例中,所述老人无法站立识别单元包括:In one embodiment, the elderly unable to stand identification unit includes:
第二光流场阈值和第三光流场阈值获取子单元,用于获取预设的第二光流场阈值和第三光流场阈值;The second optical flow field threshold and the third optical flow field threshold acquisition subunit are used to acquire the preset second optical flow field threshold and the third optical flow field threshold;
第一平均值和第二平均值计算子单元,用于对所述时间间隔内的所述平均光流场和中心光流场进行计算,输出所述第一平均值和第二平均值;The first average value and the second average value calculation subunit are used to calculate the average optical flow field and the central optical flow field within the time interval, and output the first average value and the second average value;
老人无法站立行为检测子单元,用于当所述第一平均值小于所述第二光流场阈值且所述第二平均值大于所述第三光流场阈值时,识别为所述老人无法站立行为。An old man's inability to stand behavior detection subunit is used to identify that the old man is unable to stand when the first average value is less than the second optical flow field threshold and the second average value is greater than the third optical flow field threshold. standing behavior.
老人手部颤抖识别单元,用于依据所述时间间隔内所述中心光流场,当判断老人手部存在微弱运动时,识别为所述老人手部颤抖行为。The old man's hand trembling identification unit is used to identify the old man's hand trembling behavior when it is determined that there is weak movement in the old man's hand based on the central optical flow field within the said time interval.
在一实施例中,所述老人手部颤抖识别单元包括:In one embodiment, the elderly hand tremor identification unit includes:
第四光流场阈值获取子单元,用于获取预设的第四光流场阈值;The fourth optical flow field threshold acquisition subunit is used to acquire the preset fourth optical flow field threshold;
频率分量计算子单元,用于对所述时间间隔内的所述中心光流场进行傅里叶变换,输出中心光流场对应的频率分量;A frequency component calculation subunit, used to perform Fourier transform on the central optical flow field within the time interval and output the frequency component corresponding to the central optical flow field;
手部颤抖行为检测子单元,用于对各所述频率分量进行比较,当频率分量的最大值大于所述第四光流场阈值时,识别为所述手部颤抖行为。A hand trembling behavior detection subunit is used to compare each of the frequency components, and when the maximum value of the frequency component is greater than the fourth optical flow field threshold, identify the hand trembling behavior.
安全提醒模块,用于依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。A safety reminder module is used to issue a safety reminder to the user when abnormal behavior of the elderly is identified based on the detection results.
具体地,本发明实施例2提供的老人异常行为实时检测装置,所述装置包括:实时图像获取模块,用于获取老人看护场景下的实时视频流,将所述实时视频流分解为多帧实时图像;老人识别模块,用于对各所述实时图像进行特征提取,依据提取出的人体特征信息,获取包含老人的目标图像;运动特征提取模块,用于对各所述目标图像进行运动分析,输出老人预设部位的运动特征信息;老人异常行为检测模块,用于依据所述运动特征信息,对预设的老人异常行为进行检测,输出检测结果;安全提醒模块,用于依据所述检测结果,当识别为老人异常行为时,向用户发出安全提醒。本装置通过对实时视频流进行分析和异常行为检测,分析老人的运动特征信息和异常行为,获取对老人个体化的了解,从而准确地检测出老人的异常行为,一旦检测到老人的异常行为,系统可以向用户发送安全提醒,及时的安全提醒和干预措施有助于减少事故和突发情况对老人健康和安全的威胁,提升用户的老人看护体验。Specifically, Embodiment 2 of the present invention provides a real-time detection device for abnormal behavior of the elderly. The device includes: a real-time image acquisition module, used to obtain a real-time video stream in an elderly care scenario, and decompose the real-time video stream into multiple frames of real-time video. image; the elderly recognition module is used to extract features of each of the real-time images, and obtain a target image containing the elderly based on the extracted human body feature information; the motion feature extraction module is used to perform motion analysis on each of the target images, Output the motion characteristic information of the preset parts of the elderly; the abnormal behavior detection module of the elderly is used to detect the preset abnormal behavior of the elderly based on the motion characteristic information and output the detection results; the safety reminder module is used to detect the abnormal behavior of the elderly based on the detection results , when an abnormal behavior of the elderly is identified, a safety reminder is issued to the user. This device analyzes the real-time video stream and detects abnormal behaviors, analyzes the movement characteristics information and abnormal behaviors of the elderly, and obtains personalized understanding of the elderly, thereby accurately detecting the abnormal behaviors of the elderly. Once the abnormal behaviors of the elderly are detected, The system can send safety reminders to users. Timely safety reminders and intervention measures can help reduce the threats to the health and safety of the elderly from accidents and emergencies, and improve the user's elderly care experience.
实施例3Example 3
另外,结合图1描述的本发明实施例1的老人异常行为实时检测方法可以由电子设备来实现。图9示出了本发明实施例3提供的电子设备的硬件结构示意图。In addition, the real-time detection method of abnormal behavior of the elderly in Embodiment 1 of the present invention described with reference to FIG. 1 can be implemented by an electronic device. FIG. 9 shows a schematic diagram of the hardware structure of the electronic device provided in Embodiment 3 of the present invention.
电子设备可以包括处理器以及存储有计算机程序指令的存储器。Electronic devices may include a processor and a memory storing computer program instructions.
具体地,上述处理器可以包括中央处理器(CPU),或者特定集成电路(ApplicationSpecific Integrated Circuit,ASIC),或者可以被配置成实施本发明实施例的一个或多个集成电路。Specifically, the above-mentioned processor may include a central processing unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits that may be configured to implement embodiments of the present invention.
存储器可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器可包括可移除或不可移除(或固定)的介质。在合适的情况下,存储器可在数据处理装置的内部或外部。在特定实施例中,存储器是非易失性固态存储器。在特定实施例中,存储器包括只读存储器(ROM)。在合适的情况下,该ROM可以是掩模编程的ROM、可编程ROM(PROM)、可擦除PROM(EPROM)、电可擦除PROM(EEPROM)、电可改写ROM(EAROM)或闪存或者两个或更多个以上这些的组合。Memory may include bulk storage for data or instructions. By way of example and not limitation, the memory may include a Hard Disk Drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or two or more A combination of these. Storage may include removable or non-removable (or fixed) media, where appropriate. Where appropriate, the memory may be internal or external to the data processing device. In certain embodiments, the memory is non-volatile solid state memory. In certain embodiments, the memory includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically rewritable ROM (EAROM) or flash memory or A combination of two or more of these.
处理器通过读取并执行存储器中存储的计算机程序指令,以实现上述实施例中的任意一种老人异常行为实时检测方法。The processor reads and executes the computer program instructions stored in the memory to implement any of the real-time detection methods of abnormal behavior of the elderly in the above embodiments.
在一个示例中,电子设备还可包括通信接口和总线。其中,如图9所示,处理器、存储器、通信接口通过总线连接并完成相互间的通信。In one example, the electronic device may also include a communication interface and bus. Among them, as shown in Figure 9, the processor, memory, and communication interface are connected through the bus and complete communication with each other.
通信接口,主要用于实现本发明实施例中各模块、装置、单元和/或设备之间的通信。The communication interface is mainly used to implement communication between modules, devices, units and/or equipment in the embodiments of the present invention.
总线包括硬件、软件或两者,将所述设备的部件彼此耦接在一起。举例来说而非限制,总线可包括加速图形端口(AGP)或其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线可包括一个或多个总线。尽管本发明实施例描述和示出了特定的总线,但本发明考虑任何合适的总线或互连。A bus includes hardware, software, or both, that couples the components of the device to each other. By way of example, and not limitation, the bus may include Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) interconnect, Industry Standard Architecture (ISA) Bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Micro Channel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, a bus may include one or more buses. Although embodiments of the invention describe and illustrate a particular bus, the invention contemplates any suitable bus or interconnection.
实施例4Example 4
另外,结合上述实施例1中的老人异常行为实时检测方法,本发明实施例4还可提供一种计算机可读存储介质来实现。该计算机可读存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现上述实施例中的任意一种老人异常行为实时检测方法。In addition, combined with the real-time detection method of abnormal behavior of the elderly in the above-mentioned Embodiment 1, Embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by the processor, any of the real-time detection methods of abnormal behavior of the elderly in the above embodiments can be implemented.
综上所述,本发明实施例提供了一种老人异常行为实时检测方法、装置、设备及存储介质。To sum up, embodiments of the present invention provide a real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly.
需要明确的是,本发明并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本发明的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本发明的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。It is to be understood that this invention is not limited to the specific arrangements and processes described above and illustrated in the drawings. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications and additions, or change the order between steps after understanding the spirit of the present invention.
以上所述的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本发明的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网络被下载。The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, or the like. When implemented in software, elements of the invention are programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communications link via a data signal carried in a carrier wave. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. Code segments may be downloaded via computer networks such as the Internet, intranets, and the like.
还需要说明的是,本发明中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本发明不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps. That is to say, the steps may be performed in the order mentioned in the embodiments, or may be different from the order in the embodiments, or several steps may be performed simultaneously.
以上所述,仅为本发明的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。The above are only specific implementations of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described systems, modules and units can be referred to the foregoing method embodiments. The corresponding process will not be described again here. It should be understood that the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be covered. within the protection scope of the present invention.
Claims (7)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310923016.9A CN116883946B (en) | 2023-07-24 | 2023-07-24 | Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly |
| CN202410478552.7A CN118351483A (en) | 2023-07-24 | 2023-07-24 | Method, device, equipment and storage medium for detecting hand trembling behavior of old people in real time |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310923016.9A CN116883946B (en) | 2023-07-24 | 2023-07-24 | Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410478552.7A Division CN118351483A (en) | 2023-07-24 | 2023-07-24 | Method, device, equipment and storage medium for detecting hand trembling behavior of old people in real time |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116883946A CN116883946A (en) | 2023-10-13 |
| CN116883946B true CN116883946B (en) | 2024-03-22 |
Family
ID=88260289
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410478552.7A Pending CN118351483A (en) | 2023-07-24 | 2023-07-24 | Method, device, equipment and storage medium for detecting hand trembling behavior of old people in real time |
| CN202310923016.9A Active CN116883946B (en) | 2023-07-24 | 2023-07-24 | Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410478552.7A Pending CN118351483A (en) | 2023-07-24 | 2023-07-24 | Method, device, equipment and storage medium for detecting hand trembling behavior of old people in real time |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN118351483A (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119445651A (en) * | 2023-12-15 | 2025-02-14 | 武汉星巡智能科技有限公司 | Ground area detection method, device, equipment and medium in video surveillance scene |
| CN118397712A (en) * | 2024-06-28 | 2024-07-26 | 宁波星巡智能科技有限公司 | Method, device and medium for detecting learning state of user in learning accompanying |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014026566A (en) * | 2012-07-30 | 2014-02-06 | Pioneer Electronic Corp | Gesture detection device, gesture detection method, and program |
| WO2019157344A1 (en) * | 2018-02-12 | 2019-08-15 | Avodah Labs, Inc. | Real-time gesture recognition method and apparatus |
| CN112232190A (en) * | 2020-10-15 | 2021-01-15 | 南京邮电大学 | Method for detecting abnormal behaviors of old people facing home scene |
| CN112818807A (en) * | 2021-01-27 | 2021-05-18 | 深圳英飞拓科技股份有限公司 | Tumble detection method, tumble detection device, tumble detection apparatus, and storage medium |
| CN114495150A (en) * | 2021-12-06 | 2022-05-13 | 南京信息工程大学 | A method and system for human fall detection based on time series features |
| CN114469076A (en) * | 2022-01-24 | 2022-05-13 | 南京邮电大学 | Identity feature fused old solitary people falling identification method and system |
| CN114842397A (en) * | 2022-05-19 | 2022-08-02 | 华南农业大学 | Real-time old man falling detection method based on anomaly detection |
| CN115116133A (en) * | 2022-06-14 | 2022-09-27 | 鹏城实验室 | A system and method for detecting abnormal behavior for monitoring of elderly people living alone |
| CN115719347A (en) * | 2022-11-28 | 2023-02-28 | 北汽福田汽车股份有限公司 | Behavior recognition method and device, electronic equipment and vehicle |
-
2023
- 2023-07-24 CN CN202410478552.7A patent/CN118351483A/en active Pending
- 2023-07-24 CN CN202310923016.9A patent/CN116883946B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014026566A (en) * | 2012-07-30 | 2014-02-06 | Pioneer Electronic Corp | Gesture detection device, gesture detection method, and program |
| WO2019157344A1 (en) * | 2018-02-12 | 2019-08-15 | Avodah Labs, Inc. | Real-time gesture recognition method and apparatus |
| CN112232190A (en) * | 2020-10-15 | 2021-01-15 | 南京邮电大学 | Method for detecting abnormal behaviors of old people facing home scene |
| CN112818807A (en) * | 2021-01-27 | 2021-05-18 | 深圳英飞拓科技股份有限公司 | Tumble detection method, tumble detection device, tumble detection apparatus, and storage medium |
| CN114495150A (en) * | 2021-12-06 | 2022-05-13 | 南京信息工程大学 | A method and system for human fall detection based on time series features |
| CN114469076A (en) * | 2022-01-24 | 2022-05-13 | 南京邮电大学 | Identity feature fused old solitary people falling identification method and system |
| CN114842397A (en) * | 2022-05-19 | 2022-08-02 | 华南农业大学 | Real-time old man falling detection method based on anomaly detection |
| CN115116133A (en) * | 2022-06-14 | 2022-09-27 | 鹏城实验室 | A system and method for detecting abnormal behavior for monitoring of elderly people living alone |
| CN115719347A (en) * | 2022-11-28 | 2023-02-28 | 北汽福田汽车股份有限公司 | Behavior recognition method and device, electronic equipment and vehicle |
Non-Patent Citations (1)
| Title |
|---|
| 自拍相机运动手势交互界面的设计与实现;褚少微 等;计算机工程与应用(10);第181-186页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116883946A (en) | 2023-10-13 |
| CN118351483A (en) | 2024-07-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108960056B (en) | A Fall Detection Method Based on Attitude Analysis and Support Vector Data Description | |
| Zhao et al. | Real-time detection of fall from bed using a single depth camera | |
| CN116883946B (en) | Real-time detection method, device, equipment and storage medium for abnormal behavior of the elderly | |
| Badgujar et al. | Fall detection for elderly people using machine learning | |
| US9036902B2 (en) | Detector for chemical, biological and/or radiological attacks | |
| EP2123221A2 (en) | Abnormal motion detector and monitor | |
| CN114469076B (en) | Identity-feature-fused fall identification method and system for solitary old people | |
| CN115393956A (en) | CNN-BilSTM fall detection method for improving attention mechanism | |
| Patel et al. | Deep learning based driver drowsiness detection | |
| Liu et al. | Automatic fall risk detection based on imbalanced data | |
| CN111178134B (en) | A Fall Detection Method Based on Deep Learning and Network Compression | |
| CN119169530A (en) | A remote monitoring method for the elderly based on artificial intelligence | |
| CN116631063B (en) | Intelligent care method, device and equipment for the elderly based on medication behavior recognition | |
| CN117409538A (en) | Wireless anti-fall alarm system and method for nursing care | |
| Kasnesis et al. | Morse: Deep learning-based arm gesture recognition for search and rescue operations | |
| De et al. | Fall detection approach based on combined two-channel body activity classification for innovative indoor environment | |
| Pillai et al. | Wearable sensor and machine learning model-based fall detection system for safety of elders and movement disorders | |
| Khandnor et al. | A survey of activity recognition process using inertial sensors and smartphone sensors | |
| CN116386272A (en) | An early warning system for real-time detection of pedestrian falls | |
| AU2020104377A4 (en) | Intelligent Safe Home System for the Elderly People | |
| CN119936864A (en) | Fall detection method and storage medium based on infrared camera and millimeter wave radar | |
| CN119851421A (en) | Household safety monitoring and early warning system for old people | |
| Al-Risi et al. | Automated fall detection for disabled individuals using mobile phone sensors and machine learning: a survey | |
| CN111563397B (en) | Detection method, detection device, intelligent equipment and computer storage medium | |
| Hai et al. | PCA-SVM algorithm for classification of skeletal data-based eigen postures |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |