CN115100159A - Breathing state detection method, device, equipment and storage medium - Google Patents

Breathing state detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN115100159A
CN115100159A CN202210774384.7A CN202210774384A CN115100159A CN 115100159 A CN115100159 A CN 115100159A CN 202210774384 A CN202210774384 A CN 202210774384A CN 115100159 A CN115100159 A CN 115100159A
Authority
CN
China
Prior art keywords
chest
state
image
target object
frame
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.)
Pending
Application number
CN202210774384.7A
Other languages
Chinese (zh)
Inventor
张阿强
毛宁元
许亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Lingang Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Lingang Intelligent Technology Co Ltd
Priority to CN202210774384.7A priority Critical patent/CN115100159A/en
Publication of CN115100159A publication Critical patent/CN115100159A/en
Priority to PCT/CN2023/094673 priority patent/WO2024001588A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • G06T7/0014Biomedical image inspection using an image reference approach
    • G06T7/0016Biomedical image inspection using an image reference approach involving temporal comparison
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the disclosure provides a breathing state detection method, a breathing state detection device and a storage medium, wherein the method comprises the following steps: acquiring a chest image sequence, wherein the chest image sequence comprises a plurality of frames of chest images of a target object within a preset time period; obtaining a chest fluctuation signal according to the change of the pixel value of the chest image in the chest image sequence in the preset time period; determining a respiratory state of the target subject from the chest undulation signal. The method determines the breathing state of the target object according to the chest fluctuation signal, and can accurately detect the breathing state of the target object under the condition of no contact.

Description

Breathing state detection method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting a respiratory state.
Background
With the continuous improvement of the quality of life, people pay more and more attention to the health condition of the people, and the breathing state can directly reflect the health condition of the human body. Most of the current breath detection is carried out by wearing breath detection equipment, wires and electrodes are required to be connected with the equipment, or the equipment is required to be contacted with a human body for measurement, and the detection process is inconvenient.
Disclosure of Invention
In view of the above, the disclosed embodiments provide at least one respiratory state detection method, apparatus, device and storage medium.
Specifically, the embodiment of the present disclosure is implemented by the following technical solutions:
in a first aspect, a respiratory state detection method is provided, the method comprising:
acquiring a chest image sequence, wherein the chest image sequence comprises a plurality of frames of chest images of a target object within a preset time period;
obtaining a chest fluctuation signal according to the change of the pixel value of the chest image in the chest image sequence in the preset time period;
determining a respiratory state of the target subject from the chest rise and fall signal.
In a second aspect, there is provided a respiratory state detection apparatus, the apparatus comprising:
the system comprises an image acquisition module, a processing module and a display module, wherein the image acquisition module is used for acquiring a chest image sequence, and the chest image sequence comprises a plurality of frames of chest images of a target object within a preset time period;
the signal acquisition module is used for obtaining a breast fluctuation signal according to the change of the pixel value of the breast image in the breast image sequence in the preset time period;
and the state determination module is used for determining the breathing state of the target object according to the chest fluctuation signal.
In a third aspect, an electronic device is provided, the device comprising a memory for storing computer instructions executable on a processor, the processor being configured to implement the respiratory state detection method according to any one of the embodiments of the present disclosure when executing the computer instructions.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the method of respiratory state detection according to any one of the embodiments of the present disclosure.
According to the breathing state detection method in the technical scheme provided by the embodiment of the disclosure, the breathing state of the target object can be accurately detected without contact by acquiring the multi-frame chest image of the target object in the preset time period, obtaining the chest fluctuation signal according to the pixel value change of the multi-frame chest image in the preset time period, and determining the breathing state of the target object according to the chest fluctuation signal.
Drawings
In order to more clearly illustrate one or more embodiments of the present disclosure or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in one or more embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without inventive exercise.
Fig. 1 is a flow chart illustrating a method of respiratory state detection in accordance with at least one embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a chest relief signal in accordance with at least one embodiment of the present disclosure;
fig. 3 is a flow chart illustrating another method of respiratory state detection in accordance with at least one embodiment of the present disclosure;
fig. 4 is a flow chart illustrating a method of determining a location of a chest region in accordance with at least one embodiment of the present disclosure;
fig. 5 is a block diagram of a respiratory state detection device, shown in at least one embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating a hardware structure of an electronic device according to at least one embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with this description. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to effectively ensure the health of an individual, people often need to know the physical health condition of the individual by mastering the breathing condition of the individual or other people and identify the occurrence of some diseases in time. In the related art, the respiration detection device is worn for direct detection, and the heart rate detection can be performed first to infer the respiration rate according to the result of the heart rate detection, however, the method has low accuracy in obtaining the respiration rate, and the respiration rate is difficult to accurately reflect the actual condition of respiration.
As shown in fig. 1, fig. 1 is a flowchart illustrating a respiratory state detection method according to at least one embodiment of the present disclosure, the method including the steps of:
in step 102, a sequence of chest images is acquired, the sequence of chest images containing a plurality of frames of chest images of a target object over a preset time period.
The breathing state detection method in this embodiment is a non-contact detection method, and for example, a video stream may be obtained by acquiring image information of a target object by an image pickup apparatus disposed around the target object to be subjected to breathing state detection, and a chest image of a chest region of the target object is extracted from a plurality of frames of images of the video stream to obtain a chest image sequence. The present embodiment does not limit the acquisition manner of the chest image sequence, wherein the preset time period is a continuous time period, and the acquisition time of the multi-frame chest images is continuous.
The target object can be in a moving state or a static state, and the relative position between the camera device and the target object can be kept unchanged when the camera device collects images of the target object.
In step 104, a chest fluctuation signal is obtained according to the change of the pixel value of the chest image in the chest image sequence within the preset time period.
The chest fluctuation signal takes time as a unit and comprises a plurality of signal values in a preset time period.
The thorax of the target subject is expanded and reduced rhythmically with the occurrence of the respiratory motion, which causes the chest images to be acquired differently at different phases of the respiratory motion, and the pixel values of the chest images to be different. The pixel value change of a plurality of frames of breast images in a time sequence in the breast image sequence can reflect the breast fluctuation condition of the target object in a preset time period. The present embodiment does not limit the method of determining the pixel value change of the plurality of frames of breast images within the preset time period.
In one example, when determining the change of the pixel value of the chest image in the preset time period, the change of the average value of the pixel values of the chest image may be calculated, specifically: determining a signal value of each frame of the chest image based on an average value of pixel values of all pixel points of each frame of the chest image; and obtaining a chest fluctuation signal according to the change of the signal values of the plurality of chest images with continuous time sequence in the preset time period.
For example, when the preset time period is 10s and the frame rate of the video stream is 30 frames/s, the acquired multiple frames of breast images of the target object in the preset time period are 300 frames, an average value of pixel values corresponding to each pixel point of each frame of breast image is calculated and used as a signal value of a time point corresponding to the frame of breast image to form an array consisting of the average values of the pixel values, the length of the array is 10 × 30, each value in the array represents a signal value at one time and is represented as a fluctuating curve in the time domain, that is, a breast fluctuation signal.
In another example, the step may be to perform pooling on pixel values of each pixel in each frame of chest image to obtain a feature value corresponding to each frame of chest image, use the feature value as a signal value of a time point corresponding to the frame of chest image, and obtain a chest fluctuation signal according to a change in the feature values corresponding to a plurality of chest images with continuous time sequence in a preset time period.
In step 106, a breathing state of the target subject is determined from the chest fluctuation signal.
The breathing state may include at least one breathing parameter of the target subject, such as a breathing frequency, a breathing cycle, a number of breaths, an expiration time, an inspiration time, a breath holding time ratio, and the like, and may further include a breathing phase of the target subject at a specific time point, such as an expiration state, an inspiration state, and a breath holding state.
The fluctuations of the chest fluctuation signal contain information about the breathing motion of the target subject, and the breathing state of the target subject can be determined by analyzing the waveform of the chest fluctuation signal. For example, as shown in the chest fluctuation signal diagram of fig. 2, the waveform rises from the trough of the breath, and the breath time is from the trough to the peak of the breath; the waveform begins to decline from the wave crest during inspiration, the inspiration time is the time from the wave crest to the wave trough, the waveform is smooth when breath is held, and the breath holding time is the time when the waveform fluctuation is not obvious; the time period between two peaks (troughs) is a respiratory cycle, and the respiratory rate can be obtained by calculating the number of respiratory cycles per unit time.
In one example, the breathing state includes an exhalation state, an inhalation state, and a breath-hold state, and the step of determining the breathing state of the target subject based on the chest fluctuation signal includes:
determining the slope of the chest fluctuation signal at the corresponding moment of each chest image;
and determining the breathing state of the target object at the corresponding moment of each chest image according to the expiratory slope threshold corresponding to the expiratory state, the inspiratory slope threshold corresponding to the inspiratory state and the slope of the chest fluctuation signal at the corresponding moment of each chest image.
In this example, the slope represents the change of the waveform, and the respiration state at the specific time corresponding to each chest image can be automatically obtained by the slope of the waveform corresponding to the time corresponding to each chest image in the chest relief signal diagram, so that the rapid change of respiration can be accurately judged, and the accurate respiration state of the target object can be grasped.
And calculating the slope of the waveform of the corresponding moment of each chest image in the chest fluctuation signal diagram, wherein the slope of the waveform starts from a wave trough to the top during expiration, and the slope is larger than zero, but the slope is larger than zero, and the breath-holding state is possible. Because the waveform change in the breath-holding state is gentle, and the absolute value of the slope is obviously lower than that in the exhalation or inhalation state, the exhalation slope threshold corresponding to the exhalation state and the inhalation slope threshold corresponding to the inhalation state can be set by combining the actual respiration state or by a person skilled in the art according to actual requirements.
In one example, an expiratory slope threshold (greater than zero) is set for an expiratory condition and an inspiratory slope threshold (less than zero) is set for an inspiratory condition. When the slope of the waveform of a certain time point (the time point is the time corresponding to a certain chest image) is smaller than an inspiration slope threshold value, the breathing state of the certain time point is an inspiration state; when the slope of the waveform at a certain time point is greater than an expiratory slope threshold, indicating that the respiratory state at the time point is an expiratory state; when the slope of the waveform at a certain time point is between the inspiration slope threshold and the expiration slope threshold, the breathing state at the time point is indicated as the breath-holding state.
In one example, where the expiratory slope threshold and the inspiratory slope threshold are positive values, the determination of the respiratory state may be made using the following method:
for the time instance corresponding to each of said chest images,
in response to the slope of the chest relief signal at the time being greater than zero and greater than the expiratory slope threshold, determining that the target subject's respiratory state at the time is an expiratory state;
determining that the target subject's breathing state at the time instant is an inspiratory state in response to the slope of the chest rise and fall signal at the time instant being less than zero and less than the inspiratory slope threshold;
determining that the breathing state of the target subject at the time is a breath-hold state in response to the slope of the chest relief signal at the time being greater than zero and not greater than the expiratory slope threshold, or the slope of the chest relief signal at the time being less than zero and not less than the inspiratory slope threshold, or the slope of the chest relief signal at the time being equal to zero.
For example, it may be determined that the slope of a certain breast image at a corresponding time is greater than zero, less than zero, or equal to zero. When the slope is greater than zero, further judging whether the slope is greater than an expiratory slope threshold, if so, determining that the breathing state of the target object at the moment is an expiratory state, and if not, determining that the breathing state of the target object at the moment is a breath-hold state.
In other examples, the breathing state at a specific time point may be determined in other manners, for example, the breathing state where the waveform corresponding to the specific time point is located between the peak and the trough is determined as the inspiration state, and the breathing state where the waveform corresponding to the specific time point is located between the trough and the peak is determined as the expiration state. This is not limited in this embodiment.
According to the breathing state detection method in the embodiment of the disclosure, the multi-frame chest image of the target object in the preset time period is obtained, the chest fluctuation signal is obtained according to the pixel value change of the multi-frame chest image in the preset time period, so that the breathing state of the target object is determined according to the chest fluctuation signal, the breathing state of the target object can be accurately detected under the non-contact condition, and the breathing state detection method can be widely applied to the scenes such as automobile, hospital or home sleep monitoring.
In an embodiment, the breathing state includes an exhalation state, an inhalation state and a breath-holding state, and on the basis of the above embodiment, the breathing state of the target subject may be determined according to the chest fluctuation signal by means of a neural network, and the step 106 may include the following processing:
and processing the chest fluctuation signals based on a pre-trained respiratory state detection neural network to obtain the respiratory state of the target object at the corresponding moment of each chest image.
The chest fluctuation signals are input into a pre-trained respiratory state detection neural network, and the respiratory states of the target object at the corresponding moments of the chest images can be output and obtained. For example, the output result may be a confidence that the time corresponding to each chest image belongs to each breathing state in the breathing state set, and the breathing state corresponding to the maximum confidence is determined as the breathing state of the target object at the time corresponding to each chest image.
The present embodiment does not limit the network model specifically used by the respiratory state detection neural network, for example, the respiratory state detection neural network may be Fast RCNN (convolutional neural network based on acceleration region), Fast RCNN (convolutional neural network based on Fast region), R-CNN (convolutional neural network based on region), and the like.
The following describes a training method of the respiratory state detection neural network. The training sample of the respiratory state detection neural network comprises a sample chest image set with respiratory state labeling information at corresponding time, wherein the sample chest image set comprises a plurality of frames of sample chest images with continuous time sequence of at least one sample object. The more sample objects, the stronger the generalization ability of the trained respiratory state detection neural network.
Inputting a sample chest image of a sample object into a respiratory state detection neural network to be trained, and obtaining the confidence of the sample object belonging to each respiratory state in a respiratory state set at the time corresponding to each chest image.
And determining the network loss according to the confidence coefficient and the respiratory state labeling information of the sample object belonging to each respiratory state in the respiratory state set at the corresponding time of each chest sample image. The network loss may be calculated by a loss function to determine the difference between the actual output and the desired output, for example, a binary cross entropy loss function may be used.
And adjusting network parameters of the respiratory state detection neural network according to the network loss.
In particular implementations, network parameters in a neural network can be detected by adjusting the breathing state through back propagation. And when a network iteration ending condition is reached, ending the network training, wherein the ending condition can be that the iteration reaches a certain number of times or the network loss is less than a certain threshold value.
After the respiratory state detection neural network is trained, the respiratory state detection neural network can be used for determining the respiratory state of the target object according to the chest fluctuation signal.
Fig. 3 is a flow chart illustrating a respiratory state detection method that describes the respiratory state detection process in more detail in accordance with at least one embodiment of the present disclosure. As shown in fig. 3, the method may include the following processing, wherein the same flow as that in fig. 1 in this embodiment is not described herein again.
In step 202, a sequence of chest images is acquired, the sequence of chest images containing a plurality of frames of chest images of a target object over a preset time period.
When the relative positions of the imaging device and the target object are always constant for a target object in a stationary state, such as a target object lying down, sitting or standing, and for a target object in a moving state, such as a target object walking, riding or driving, the position of the chest region in a video stream acquired from the target object is fixed, and a chest image sequence can be acquired by:
the following processing is carried out on one frame of video image frame in a video stream within a preset time period containing a target object: carrying out face detection on the video image frame to obtain a face detection frame of the target object; determining a position of the chest region of the target object in the video image frame based on the position of the face detection box in the video image frame.
Acquiring chest images in a plurality of video image frames within the preset time period based on the position of the chest region of the target object in the video image frames to form the chest image sequence.
In a specific implementation, a face detection algorithm, for example, a face detector in an opencv (open source computer vision library), a face detector in a dlib (face recognition library), or other target detection algorithms, is used to perform face detection on any frame in a video stream to obtain a face detection frame of a target object, and then, a ratio and a distance between a face area and a chest area, which are set by a person skilled in the art according to experience, are used to calculate a position of the chest area of the target object in the video image frame according to the position of the face detection frame.
Furthermore, when acquiring a sequence of breast images, the face of a person may also be verified to avoid as far as possible the detection of a false "target object" during the detection process or the obtaining of inaccurate results due to the continued detection in the case of a sudden disappearance of the target object, and the following may be performed:
after the video image frame is subjected to face detection to obtain a face detection frame of the target object, face recognition is further carried out based on the face detection frame to obtain a first recognition result.
For example, a face image in the face detection frame may be identified by using a face identification algorithm to obtain a first identification result including a face identifier.
When the above-mentioned chest images in the plurality of video image frames within the preset time period are acquired based on the position of the chest region of the target object in the video image frames, so as to form the chest image sequence, the method includes:
estimating the position of the chest region of the target object in a plurality of video frames within a preset time period based on the position of the chest region of the target object in the video image frames to obtain a chest estimated position. And estimating the positions of the face region of the target object in a plurality of video frames within the preset time period according to the chest estimation position to obtain a face estimation position.
For example, when the target object is in a still state, the position of the chest region in the video image frame may be estimated as chest estimated positions in a plurality of video frames of the chest region of the target object within a preset time period, and the face estimated positions are obtained from the chest estimated positions using the proportion and distance between the face region and the chest region set by the person skilled in the art according to experience.
And carrying out face recognition on the target objects in the plurality of video frames based on the face estimation positions to obtain a second face recognition result.
For example, a face recognition algorithm may be used to sequentially perform face recognition on images at the face estimation positions in the plurality of video frames to obtain a second recognition result including the face identifier.
Under the condition that the first face recognition result is consistent with the second face recognition result, acquiring chest images in a plurality of video image frames in the first time period based on the chest estimation position to form the chest image sequence.
For example, if the face identifiers in the first face identification result and the second face identification result are identifiers of the same face, it is determined that the first face identification result is consistent with the second face identification result, and chest images of chest estimation positions in a plurality of video image frames in a first time period are obtained to form a chest image sequence. And if the face identification in the first face identification result and the second face identification result is different face identification, determining that the first face identification result is inconsistent with the second face identification result, not performing subsequent chest image acquisition steps, and sending an alarm to prompt that the target object is wrong or disappears.
In one example, as shown in fig. 4, determining the position of the chest region of the target object in the video image frame based on the position of the face detection frame in the video image frame may include the steps of:
in step 302, a downshifting distance is determined based on the height of the face detection box.
Assuming that the face detection frame detected for one frame in the video stream is rect1, the height of rect1 is enlarged by a certain proportion according to the proportion of human body, and is determined as the distance of downward movement, which may be, for example, the height of rect1 is enlarged by 1.5 times to obtain the distance of downward movement.
In step 304, based on the center point coordinates of the face detection frame in the video image frame, the downward movement distance is moved downward, and the chest center point coordinates of the chest region in the video image frame are obtained.
For example, in the video image frame, the coordinates of the center point of the face of rect1 are moved down by a distance 1.5 times the height of the face detection frame, and the moved coordinates are used as the coordinates of the center point of the chest area to be selected.
In step 306, the height and width of the chest region are determined according to the height and width of the face detection frame, respectively.
And respectively amplifying the height and the width of the face detection frame by a certain proportion to obtain the height and the width of the chest area. For example, the height of the rect1 is enlarged by 2 times to obtain the height of the chest region, and the width of the rect1 is enlarged by 3 times to obtain the width of the chest region.
In step 308, the position of the chest region of the target subject in the video image frame is determined based on the chest center point coordinates, height and width of the chest region.
And taking the coordinates of the center point of the chest as the center of the chest area, and combining the height and the width of the chest area to obtain a corresponding coordinate frame rect2 of the chest area in the video image frame.
The ratio used above can be set according to actual needs, and is not limited here. After the position of the chest region of the target object in a certain video image frame is determined through the above processing, the position is the fixed position of the chest region in a plurality of video image frames, for example, the chest image can be cut out in any other frame in the video stream by using rect2, so as to obtain the chest image in each video image frame within the preset time period, and the chest image sequence is formed. That is, for multiple frames of video image frames in a video stream, the determination of the position of the chest region need only be made once.
In other examples, each video image frame in the video stream within the preset time period containing the target object may be processed: carrying out face detection on each frame of video image frame to obtain a face detection frame of a target object in each frame of video image frame; and obtaining a chest image of a chest area containing a plurality of target objects based on the position of the face detection frame in each frame of the video image. The chest detection algorithm can also be used for directly detecting the video image frame to obtain the chest image of the target object.
In step 204, a signal value of each frame of chest image is determined based on an average value of pixel values of each pixel point of each frame of chest image, and a chest fluctuation signal is obtained according to a change of the signal values of a plurality of chest images with continuous time sequence in a preset time period.
By carrying out mean processing on the pixel values of the chest image, a single numerical value is used for representing the signal value of the current frame instead of directly using the pixel values of all pixel points of the video frame image, so that the algorithm processing speed is greatly improved, and the real-time processing can be realized.
In step 206, the chest relief signal is subjected to a smoothing filtering process to obtain a smooth-filtered chest relief signal.
For example, Savitzky-Golay filtering processing is performed on a chest fluctuation signal to remove burrs and noise of a time sequence signal, so that the time sequence signal is smoother, and the shape and the width of the signal are ensured to be unchanged while the noise is filtered.
In step 208, a plurality of signal values in the chest relief signal are detrended.
For example, a best fit straight line is subtracted from the chest fluctuation signal, so that the mean value of signal values in the processed chest fluctuation signal is zero, the deviation of the signal due to noise is corrected, and data analysis is concentrated on the fluctuation of the chest fluctuation signal.
In this step, step 208 may be performed to perform smoothing filtering on the chest fluctuation signal, and perform trend removing processing on the chest fluctuation signal after smoothing filtering; alternatively, without performing step 206, the de-trending process is performed directly on a plurality of signal values in the chest undulation signal.
In step 210, a breathing state of the target subject is determined from the chest fluctuation signal.
The breathing state of the target subject is determined from the waveform of the chest fluctuation signal. When determining the breathing state of the target object, the breathing state of the target object at the corresponding time of each frame of the chest image may be determined according to the chest fluctuation signal, or the breathing state at the specified target time may be determined.
After the breathing state of the target object at the corresponding moment of each frame of the chest image is determined, the breathing frequency of the target object can be determined according to the breathing state of the target object at the corresponding moment of each frame of the chest image. For example, the breathing frequency may be determined as the frequency in the expiratory state per unit time, or the breathing frequency may be determined as the frequency in the inspiratory state per unit time.
According to the respiratory state detection method in the embodiment of the disclosure, a chest fluctuation signal is obtained through the change of the average value of the pixel values of a target object in a plurality of frames of chest images within a preset time period, and each signal value in the chest fluctuation signal is a single numerical value so as to accelerate the subsequent processing speed; smooth filtering and trend removing are carried out on the chest fluctuation signals so that the time sequence signals are more stable and smooth, the breathing state of the target object is determined according to the waveform of the chest fluctuation signals, the breathing state of the target object can be rapidly and accurately detected under the non-contact condition, the target object is reminded to have a rest or seek medical advice in time, and the method and the device can be widely applied to scenes such as automobiles, hospitals or home sleep monitoring.
In one embodiment, the respiration status detection method of the present embodiment can be used to perform real-time respiration status detection. The acquiring of the sequence of breast images in the above embodiment comprises: acquiring a new frame of chest image at the current time, adding the new frame of chest image into the chest image sequence, and removing the one frame of chest image with the earliest acquisition time from the chest image sequence; the number of the multi-frame chest images of the target object in the preset time period is a fixed number.
For example, assuming that the preset time period is 10s, when detecting the real-time respiratory state of the video stream acquired by the image acquisition device, the latest video image frame of each frame may be processed to obtain a chest image starting from the 10 th s of the video stream, the chest image sequence of the previous 10s is added, and the chest image of the frame with the earliest acquisition time is removed to maintain the number of chest images in the chest image sequence as a fixed number. Processing the updated chest image sequence in the subsequent steps, and after obtaining a chest fluctuation signal, obtaining a breathing state of the target object at the current time according to the chest fluctuation signal, for example, determining that the target object at the current time is in an exhalation state, an inhalation state or a breath holding state according to a slope of a waveform corresponding to the current time, a set exhalation slope threshold corresponding to the exhalation state and an inhalation slope threshold corresponding to the inhalation state; for another example, the breathing state can be monitored in real time in a non-contact visual manner for a patient in a hospital or an individual in a house by calculating the real-time breathing frequency according to the updated chest fluctuation signal in the preset time period.
In an implementation, the heart rate detection method of this embodiment may be used in a driver detection system or a passenger detection system to perform contactless respiration state detection on a person in a vehicle cabin, and in the above embodiment, when acquiring a chest image sequence, it may be: acquiring a plurality of frames of personnel images of personnel in the cabin within a preset time period to form the chest image sequence; the person image comprises: the chest area of the person in the cabin. For example, when the personnel in the vehicle cabin have the breathing state detection requirement, the image acquisition can be carried out on the personnel in the vehicle cabin in real time through the camera in the vehicle cabin after the consent of the personnel in the vehicle cabin is obtained, so that the breathing state detection is carried out according to the acquired image. For the person in the vehicle cabin, the chest position has little movement, so that the heart rate detection can be accurately carried out based on the time-series continuous chest image.
As shown in fig. 5, fig. 5 is a block diagram of a respiratory state detection apparatus according to at least one embodiment of the present disclosure, the apparatus including:
an image acquisition module 51, configured to acquire a chest image sequence, where the chest image sequence includes multiple frames of chest images of a target object within a preset time period;
a signal obtaining module 52, configured to obtain a chest fluctuation signal according to a change of a pixel value of a chest image in the chest image sequence within the preset time period;
a state determination module 53, configured to determine a respiratory state of the target object according to the chest fluctuation signal.
In an alternative embodiment, the signal obtaining module 52 is specifically configured to: determining a signal value of each frame of the chest image based on an average value of pixel values of all pixel points of each frame of the chest image; and obtaining a chest fluctuation signal according to the change of the signal values of the plurality of chest images with continuous time sequence in the preset time period.
In an alternative embodiment, the signal obtaining module 52 is further configured to:
carrying out smooth filtering processing on the chest fluctuation signal, and carrying out trend removing processing on the chest fluctuation signal after smooth filtering; alternatively, the chest undulation signal is detrended.
In an alternative embodiment, the breathing state includes an expiratory state, an inspiratory state, and a breath-hold state; the state determining module 53 is specifically configured to:
determining the slope of the chest fluctuation signal at the corresponding moment of each chest image;
and determining the breathing state of the target object at the corresponding moment of each chest image according to the expiratory slope threshold corresponding to the expiratory state, the inspiratory slope threshold corresponding to the inspiratory state and the slope of the chest fluctuation signal at the corresponding moment of each chest image.
In an alternative embodiment, the state determining module 53, when configured to determine the breathing state of the target subject at the time corresponding to each chest image according to the expiratory slope threshold corresponding to the expiratory state, the inspiratory slope threshold corresponding to the inspiratory state, and the slope of the chest fluctuation signal at the time corresponding to each chest image, is specifically configured to:
for the time instance corresponding to each of said chest images,
in response to the slope of the chest relief signal at the time being greater than zero and greater than the expiratory slope threshold, determining that the target subject's respiratory state at the time is an expiratory state;
determining that the target subject's breathing state at the time instant is an inspiratory state in response to the slope of the chest rise and fall signal at the time instant being less than zero and less than the inspiratory slope threshold;
determining that the breathing state of the target subject at the time is a breath-hold state in response to the slope of the chest relief signal at the time being greater than zero and not greater than the expiratory slope threshold, or the slope of the chest relief signal at the time being less than zero and not less than the inspiratory slope threshold, or the slope of the chest relief signal at the time being equal to zero.
In an alternative embodiment, the breathing state includes an expiratory state, an inspiratory state, and a breath-hold state; the state determining module 53 is specifically configured to:
processing the chest fluctuation signals based on a pre-trained respiratory state detection neural network to obtain the respiratory states of the target object at the corresponding moments of the chest images;
the training sample of the respiratory state detection neural network comprises a sample chest image set with respiratory state labeling information at corresponding time, wherein the sample chest image set comprises a plurality of frames of sample chest images with continuous time sequence of at least one sample object.
In an alternative embodiment, the image obtaining module 51 is specifically configured to:
the following processing is carried out on one frame of video image frame in a video stream within a preset time period containing a target object: carrying out face detection on the video image frame to obtain a face detection frame of the target object; determining a position of a chest region of the target object in the video image frame based on the position of the face detection box in the video image frame;
acquiring chest images in a plurality of video image frames within the preset time period based on the position of the chest area of the target object in the video image frames to form the chest image sequence.
In an alternative embodiment, the image obtaining module 51 is further configured to: carrying out face recognition based on the face detection frame to obtain a first recognition result;
when the processing unit is configured to acquire a breast image in the plurality of video image frames within the preset time period based on the position of the breast area of the target object in the video image frames to form the breast image sequence, the processing unit is specifically configured to:
estimating the position of the chest region of the target object in a plurality of video frames within a preset time period based on the position of the chest region of the target object in the video image frames to obtain a chest estimation position;
estimating the positions of the face region of the target object in a plurality of video frames within the preset time period according to the chest estimation position to obtain a face estimation position;
carrying out face recognition on the target objects in the plurality of video frames based on the face estimation positions to obtain a second face recognition result;
under the condition that the first face recognition result is consistent with the second face recognition result, obtaining chest images in a plurality of video image frames in the preset time period based on the chest estimation position to form the chest image sequence.
In an alternative embodiment, the image obtaining module 51 is specifically configured to:
acquiring a new chest image of a frame at the current time, adding the new chest image into the chest image sequence, and removing the chest image of the frame with the earliest acquisition time from the chest image sequence;
the determining the breathing state of the target subject from the chest fluctuation signal comprises:
and obtaining the breathing state of the target object at the current time according to the chest fluctuation signal.
In an optional implementation, the state determining module 53 is specifically configured to: according to the chest fluctuation signal, the breathing state of the target object at the corresponding moment of each frame of chest image is determined; and is also used for: and determining the breathing frequency of the target object according to the breathing state of the target object at the corresponding moment of each frame of the chest image.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
An electronic device is further provided in the embodiments of the present disclosure, as shown in fig. 6, the electronic device includes a memory 61 and a processor 62, the memory 61 is used for storing computer instructions executable on the processor, and the processor 62 is used for implementing the respiratory state detection method according to any one of the embodiments of the present disclosure when executing the computer instructions.
Embodiments of the present disclosure also provide a computer program product comprising a computer program/instructions that, when executed by a processor, implement the respiratory state detection method according to any of the embodiments of the present disclosure.
Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement the method for detecting a respiratory state according to any embodiment of the present disclosure.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the present specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following the general principles of the specification and including such departures from the present disclosure as come within known or customary practice in the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (13)

1. A method of respiratory state detection, the method comprising:
acquiring a chest image sequence, wherein the chest image sequence comprises a plurality of frames of chest images of a target object within a preset time period;
obtaining a chest fluctuation signal according to the change of the pixel value of the chest image in the chest image sequence in the preset time period;
determining a respiratory state of the target subject from the chest undulation signal.
2. The method of claim 1,
the obtaining a breast fluctuation signal according to the change of the pixel value of the breast image in the breast image sequence within the preset time period includes:
determining a signal value of each frame of the chest image based on an average value of pixel values of all pixel points of each frame of the chest image;
and obtaining a chest fluctuation signal according to the change of the signal values of the plurality of chest images with continuous time sequence in the preset time period.
3. The method of claim 2,
after the deriving a chest fluctuation signal according to the variation of the pixel values of the chest images in the chest image sequence within the preset time period, the method further comprises:
performing smooth filtering processing on the chest fluctuation signal, and performing trend removing processing on the chest fluctuation signal after smooth filtering; alternatively, the first and second electrodes may be,
de-trending the chest undulation signal.
4. The method of any one of claims 1 to 3, wherein the respiratory state comprises an expiratory state, an inspiratory state, and a breath-hold state;
the determining the breathing state of the target subject from the chest fluctuation signal comprises:
determining the slope of the chest fluctuation signal at the corresponding moment of each chest image;
and determining the breathing state of the target object at the corresponding moment of each chest image according to the expiratory slope threshold corresponding to the expiratory state, the inspiratory slope threshold corresponding to the inspiratory state and the slope of the chest fluctuation signal at the corresponding moment of each chest image.
5. The method of claim 4, wherein the determining the breathing state of the target subject at the time corresponding to each chest image according to the expiratory slope threshold corresponding to the expiratory state, the inspiratory slope threshold corresponding to the inspiratory state, and the slope of the chest relief signal at the time corresponding to each chest image comprises:
for the time instance corresponding to each of said chest images,
in response to the slope of the chest relief signal at the time being greater than zero and greater than the expiratory slope threshold, determining that the target subject's respiratory state at the time is an expiratory state;
in response to the slope of the chest relief signal at the time being less than zero and less than the inspiratory slope threshold, determining that the target subject's respiratory state at the time is an inspiratory state;
determining that the breathing state of the target subject at the time is a breath-hold state in response to the slope of the chest relief signal at the time being greater than zero and not greater than the expiratory slope threshold, or the slope of the chest relief signal at the time being less than zero and not less than the inspiratory slope threshold, or the slope of the chest relief signal at the time being equal to zero.
6. The method of any one of claims 1 to 3, wherein the respiratory state comprises an expiratory state, an inspiratory state, and a breath hold state;
the determining the breathing state of the target subject from the chest fluctuation signal comprises:
processing the chest fluctuation signals based on a pre-trained respiratory state detection neural network to obtain the respiratory states of the target object at the corresponding moments of the chest images;
the training sample of the respiratory state detection neural network comprises a sample chest image set with respiratory state labeling information at corresponding time, wherein the sample chest image set comprises a plurality of frames of sample chest images with continuous time sequence of at least one sample object.
7. The method according to any one of claims 1 to 6,
the acquiring a sequence of thoracic images includes:
the following processing is carried out on one frame of video image frame in a video stream within a preset time period containing a target object: carrying out face detection on the video image frame to obtain a face detection frame of the target object; determining a position of a chest region of the target object in the video image frame based on the position of the face detection box in the video image frame;
acquiring chest images in a plurality of video image frames within the preset time period based on the position of the chest region of the target object in the video image frames to form the chest image sequence.
8. The method of claim 7, wherein the acquiring the sequence of breast images further comprises:
carrying out face recognition based on the face detection frame to obtain a first recognition result;
the acquiring, based on the position of the chest region of the target object in the video image frames, a chest image in a plurality of video image frames within the preset time period, constituting the chest image sequence, including:
estimating the position of the chest region of the target object in a plurality of video frames within a preset time period based on the position of the chest region of the target object in the video image frames to obtain chest estimated positions;
estimating the positions of the face area of the target object in a plurality of video frames within the preset time period according to the chest estimation position to obtain a face estimation position;
carrying out face recognition on the target objects in the plurality of video frames based on the face estimation positions to obtain a second face recognition result;
under the condition that the first face recognition result is consistent with the second face recognition result, obtaining chest images in a plurality of video image frames in the preset time period based on the chest estimation position to form the chest image sequence.
9. The method according to any one of claims 1 to 8,
the acquiring a sequence of thoracic images includes:
acquiring a new chest image of a frame at the current time, adding the new chest image into the chest image sequence, and removing the chest image of the frame with the earliest acquisition time from the chest image sequence;
the determining the breathing state of the target subject from the chest fluctuation signal comprises:
and obtaining the breathing state of the target object at the current time according to the chest fluctuation signal.
10. The method according to any one of claims 1 to 9, wherein determining the breathing state of the target subject from the chest fluctuation signal comprises:
according to the chest fluctuation signal, determining the breathing state of the target object at the corresponding moment of each frame of chest image;
the method further comprises the following steps:
and determining the breathing frequency of the target object according to the breathing state of the target object at the corresponding moment of each frame of the chest image.
11. A respiratory condition detection apparatus, the apparatus comprising:
the system comprises an image acquisition module, a processing module and a display module, wherein the image acquisition module is used for acquiring a chest image sequence, and the chest image sequence comprises a plurality of frames of chest images of a target object within a preset time period;
the signal acquisition module is used for obtaining a breast fluctuation signal according to the change of the pixel value of the breast image in the breast image sequence in the preset time period;
and the state determination module is used for determining the breathing state of the target object according to the chest fluctuation signal.
12. An electronic device, comprising a memory for storing computer instructions executable on a processor, the processor being configured to implement the method of any one of claims 1 to 10 when executing the computer instructions.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 10.
CN202210774384.7A 2022-07-01 2022-07-01 Breathing state detection method, device, equipment and storage medium Pending CN115100159A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210774384.7A CN115100159A (en) 2022-07-01 2022-07-01 Breathing state detection method, device, equipment and storage medium
PCT/CN2023/094673 WO2024001588A1 (en) 2022-07-01 2023-05-17 Breathing state detection method and apparatus, device, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210774384.7A CN115100159A (en) 2022-07-01 2022-07-01 Breathing state detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115100159A true CN115100159A (en) 2022-09-23

Family

ID=83295010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210774384.7A Pending CN115100159A (en) 2022-07-01 2022-07-01 Breathing state detection method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115100159A (en)
WO (1) WO2024001588A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024001588A1 (en) * 2022-07-01 2024-01-04 上海商汤智能科技有限公司 Breathing state detection method and apparatus, device, storage medium and computer program product

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117831744B (en) * 2024-03-06 2024-05-10 大连云间来客科技有限公司 Remote monitoring method and system for critically ill patients

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299967B (en) * 2005-11-04 2010-06-02 株式会社东芝 Respiration monitoring device, respiration monitoring system, medical treatment system, respiration monitoring method, and respiration monitoring program
CN107616795A (en) * 2017-08-17 2018-01-23 华东师范大学 A kind of contactless respiratory rate detection method in real time based on camera
JP7472573B2 (en) * 2020-03-23 2024-04-23 コニカミノルタ株式会社 PROGRAM, DYNAMIC ANALYSIS DEVICE AND DIAGNOSTIC SUPPORT SYSTEM
CN114140496A (en) * 2021-11-12 2022-03-04 国家海洋局南海调查技术中心(国家海洋局南海浮标中心) Non-contact respiration detection method and device
CN115100159A (en) * 2022-07-01 2022-09-23 上海商汤临港智能科技有限公司 Breathing state detection method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024001588A1 (en) * 2022-07-01 2024-01-04 上海商汤智能科技有限公司 Breathing state detection method and apparatus, device, storage medium and computer program product

Also Published As

Publication number Publication date
WO2024001588A1 (en) 2024-01-04

Similar Documents

Publication Publication Date Title
US20200260996A1 (en) Method and apparatus for processing a cyclic physiological signal
US9336594B2 (en) Cardiac pulse rate estimation from source video data
RU2637610C2 (en) Monitoring device for physiological signal monitoring
CN108135487A (en) For obtaining the equipment, system and method for the vital sign information of object
CN115100159A (en) Breathing state detection method, device, equipment and storage medium
EP2772189A1 (en) Apparatus and method for determining vital sign information from a subject
US20160228069A1 (en) Processing apparatus, processing method and system for processing a physiological signal
CN109328034B (en) Determining system and method for determining sleep stage of subject
JP2005218507A (en) Method and apparatus for measuring vital sign
WO2015018752A1 (en) Processing apparatus and processing method for determining a respiratory signal of a subject
US20210225489A1 (en) Determining the likelihood of patient self-extubation
CN112806966A (en) Non-interference type early warning system and method for apnea in sleep
US10292623B2 (en) Apparatus and method for determining a respiration volume signal from image data
CN112244796A (en) Method for intelligently detecting human body physiological indexes and nursing equipment
JP6911998B2 (en) Biometric information estimation device, biometric information estimation method, and biometric information estimation program
JP7301275B2 (en) Sleep state estimation system
Hurnanen et al. Heartbeat detection using multidimensional cardiac motion signals and dynamic balancing
KR102275263B1 (en) Respiratory measurement system using depth camera
JP7372966B2 (en) Device, system, method of operating the device, and computer program for providing a skeletal model
JP2007195699A (en) Vital measuring apparatus
Romano et al. A signal quality index for improving the estimation of breath-by-breath respiratory rate during sport and exercise
CN115429253A (en) Fusion respiration detection method and device, sports garment and storage medium
CN114943732A (en) Heart rate detection method, device, equipment and storage medium
CN113951869A (en) Breathing disorder detection method, device, equipment and medium
CN116510254A (en) Upper respiratory tract rehabilitation system, device and medium

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