Cough detection method, device, storage medium and electronic device
By using the image recognition model trained by machine learning, the target image is analyzed to determine whether the target object is coughing, which solves the shortcomings of sound acquisition in the prior art in anti-noise interference and positioning accuracy, and achieves a high-accuracy cough Test and reduce the cost of testing.
Patent Information
- Application Number
- CN202010745961.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-29
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-07-29
AI Technical Summary
In the prior art, it is difficult to detect coughs through sound collection in scenes where there are many people and sounds, and it is difficult to accurately detect them. It is impossible to intuitively and accurately locate the emitter of coughs, making it difficult to be practical in large places and the detection cost. high.
The target image is analyzed by using a model trained through machine learning through multiple sets of data to determine whether the target object is coughing. Based on image recognition, the model can identify whether the target object is coughing, solving the shortcomings of sound acquisition.
It improves the accuracy of cough detection, can effectively perform cough detection in large places, and eliminates the need for additional sound acquisition equipment, reducing detection costs.
Smart Images

Figure CN111860415B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a cough detection method, device, storage medium and electronic device. Background Art
[0002] Coughing is an important symptom of many respiratory infectious diseases, such as influenza, SARS, and novel coronavirus pneumonia. At the same time, the droplets produced by coughing are also an important or even one of the main ways for these diseases to spread. Rapidly and accurately detecting people with coughing symptoms in public places is of great significance for controlling the spread of the epidemic when it breaks out.
[0003] In the related art, it is usually determined whether a cough occurs by collecting sound. First, the collected audio data is preprocessed to obtain several frames of audio sequences. Then, a deep learning method is used to identify coughs on the audio sequences. At the same time, voiceprint recognition is performed on these audio sequences to determine the speaker of the audio data. However, the use of sound for cough recognition has poor noise resistance and is difficult to be practical in scenes with many people and noises. For example, it is difficult to implement in large places such as stations and subway stations. In addition, in some actual scenarios such as station monitoring, this method cannot intuitively and accurately locate the person who coughs, which is not conducive to real-time disposal by staff. Moreover, in many scenarios, additional sound collection equipment needs to be deployed to confirm whether a cough has occurred. The method of detecting whether a cough has occurred through sound collection equipment will lead to high detection costs and long detection cycles.
[0004] Currently, no effective solution has been proposed for the above-mentioned problems existing in the related technologies. Summary of the invention
[0005] The embodiments of the present invention provide a cough detection method, device, storage medium and electronic device to at least solve the problem of inaccurate cough detection in the related art.
[0006] According to one embodiment of the present invention, a cough detection method is provided, comprising: extracting a target image of a target object; analyzing the target image using a first model to determine whether the target object is coughing in the target image, wherein the first model is trained by machine learning using multiple groups of first data, and each group of first data in the multiple groups of first data includes: an image and identification information for identifying whether the object in the image is coughing.
[0007] According to another embodiment of the present invention, a cough detection device is provided, comprising: an extraction module, used to extract a target image of a target object; an analysis module, used to analyze the target image using a first model to determine whether the target object is coughing in the target image, wherein the first model is trained by machine learning using multiple groups of first data, and each group of the multiple groups of first data includes: an image and identification information for identifying whether the object is coughing in the image.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0009] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] Through the present invention, a first model trained by machine learning using multiple sets of data is used to analyze a target image to determine whether a target object included in the target image is coughing. Since the first model is trained by machine learning and identifies whether the target object is coughing based on an image, the problem of inaccurate cough detection in the related art can be solved, and the accuracy of cough detection can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a hardware structure block diagram of a mobile terminal of a cough detection method according to an embodiment of the present invention;
[0012] Figure 2 is a flow chart of a cough detection method according to an embodiment of the present invention;
[0013] Figure 3 is a flow chart of a cough detection method according to a specific embodiment of the present invention;
[0014] Figure 4 4 is a structural block diagram of a cough detection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0016] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0017] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a cough detection method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0018] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the cough detection method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0019] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0020] In this embodiment, a cough detection method is provided. Figure 2 is a flow chart of a cough detection method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0021] Step S202, extracting a target image of a target object;
[0022] Step S204: Use a first model to analyze the target image to determine whether the target object in the target image is coughing, wherein the first model is trained by machine learning using multiple groups of first data, and each group of first data in the multiple groups of first data includes: an image and identification information for identifying whether the object in the image is coughing.
[0023] In the above embodiment, the image captured by the camera or the input image can be scaled to obtain the target image, and the video captured by the camera or the input video can be framed, scaled, etc. to obtain the target image. The scaling process is to make the image meet the requirements of the first model for the input image. When the size, pixels, etc. of the original image meet the requirements of the first model for the image, the scaling process can be omitted. The identification information can be yes, no, or 0, 1, etc. The present invention does not limit the identification information. The above target object can be a person, or other creatures that may cough, such as a dog, a cow, etc.
[0024] In the above embodiment, the original image or video may be first obtained. If the input is an image, the image may be scaled to meet the requirements of the first model. If the input is a video stream, the video stream may be frame-extracted as required, and then the image may be scaled to the input size, pixels, etc. required by the first model. The first model may be a model including a cough detection module.
[0025] Exemplarily, the execution subject of the above steps can be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone and other terminals, but is not limited to this.
[0026] Through the present invention, a first model trained by machine learning using multiple sets of data is used to analyze a target image to determine whether a target object included in the target image is coughing. Since the first model is trained by machine learning and identifies whether the target object is coughing based on an image, the problem of inaccurate cough detection in the related art can be solved, and the accuracy of cough detection can be improved.
[0027] In an exemplary embodiment, extracting a target image of a target object includes: obtaining a first image including the target image, wherein the first image includes an image of one or more objects; analyzing the first image using a second model to determine the coordinates of the image frames of the objects included in the first image, wherein the second model is trained by machine learning using multiple sets of second data, and each set of second data in the multiple sets of second data includes: an image and the coordinates of the image blocks of the objects included in the image; extracting the target image from the first image based on the coordinates of the image frame of the target object included in the first image. In this embodiment, when the target object is a person, the second model can be a human body detection module trained based on machine learning, and the human body detection module is implemented using a deep convolutional neural network. The preprocessed image is input into the human body detection module for human body detection to determine the coordinates of the image frames of the objects included in the first image. In the training stage, the second model takes the image and all the human body frames in the image (corresponding to the above-mentioned image frames) as inputs. The model inputs the detected human body frames, and a certain loss function can be used to measure the difference between the input labeled human body frames, and then a certain optimization method is used to update the parameters of the model until the training is completed. After the training is completed, the deployment phase begins. The input is an image, the model parameters are the parameters trained in the above training phase, and the output is the coordinates of the detected human detection frame. The detection result can contain one or more human frames, or no human frame, and it is marked that no human is detected in the input image.
[0028] In an exemplary embodiment, obtaining a first image including the target image includes: performing frame extraction processing on the received video stream to obtain at least two frames of the first image including the target image extracted sequentially; using the second module to analyze the first image, and determining the coordinates of the image frames of each object included in the first image includes: using the second model to analyze at least two frames of the first image in sequence, and respectively determining the coordinates of the image frames of each object included in each of the first images; extracting the target image from the first image based on the coordinates of the image frame of the target object included in the first image includes: extracting the target image from at least two frames of the first image based on the coordinates of the image frame of the target object included in at least two frames of the first image. In this embodiment, since coughing is a continuous process, single-frame detection is prone to false detection, so continuous multiple-frame images can be input for detection to improve the accuracy of detection. When a video stream is received, the video stream can be subjected to frame extraction processing to obtain at least two frames of the first image including the target image, analyze them, determine the image frame coordinates of each object in the first image, and extract the target image from the first image according to the image frame coordinates. The specific implementation can adopt a 3D convolutional neural network model, that is, the first model can be a 3D convolutional neural network model. The following is to detect whether a person coughs for illustration. In this embodiment, 2 consecutive frames (or 5 frames, or 8 frames, or more frames, 2 frames are only an exemplary description) of the same human body can be pre-processed human body images and input into the 3D convolutional neural network model for cough analysis. In the training stage, the model input is 2 consecutive frames of human body images and whether the cough label (corresponding to the above-mentioned identification information), and the model output is whether a cough is detected. A certain loss function can also be used to measure the difference between the model output and the input label, and then a certain optimization method is used to optimize and update the model parameters until the training is completed. The model in the deployment stage uses the model trained in the training stage, and the input is a human body image, and the output is whether the cough is. Of course, when there is only one image, it is also possible not to input 2 frames of images, but only input one frame for image cough recognition. The first model correspondingly becomes a common convolutional neural network model, and the training and deployment methods are similar to them, which will not be repeated here.
[0029] In an exemplary embodiment, extracting the target image from at least two frames of the first image based on the coordinates of the image frame of the target object included in at least two frames of the first image includes: assigning a unique identification ID to each object included in at least two frames of the first image, wherein the same object is assigned the same ID; determining the target ID corresponding to the target image; determining the coordinates of the image frame of the object corresponding to the target ID included in at least two frames of the first image, and extracting the target image from at least two frames of the first image based on the determined image frame coordinates of the object corresponding to the target ID. In this embodiment, different IDs can be assigned to different human bodies, and the same ID can be assigned to different frames of the same human body.
[0030] In an exemplary embodiment, after assigning a unique identification ID to each object included in at least two frames of the first image, the method further includes: determining the coordinates of the image frame of the object corresponding to other IDs other than the target ID included in at least two frames of the first image, and extracting the image of the object corresponding to other IDs from at least two frames of the first image based on the determined coordinates of the image frame of the object corresponding to other IDs; caching the images of the object corresponding to other IDs extracted from at least two frames of the first image according to the shooting time. In this embodiment, the human body image is extracted from the entire image, scaled to a fixed size suitable for the first model input, and then cached in frame order according to different IDs. When the number of image frames of the same ID is at least 2 frames, it is input into the cough detection module in chronological order. Of course, when the original input is only one image instead of a video frame, only one frame is cached.
[0031] In an exemplary embodiment, extracting a target image of a target object includes: extracting multiple target images of the target object according to the shooting time; analyzing the target image using a first model, and determining whether the target object coughs in the target image includes: analyzing multiple target images using a first model, and determining whether the target object coughs in the multiple target images, wherein each group of first data in the multiple groups of first data includes: multiple images of the object extracted according to the shooting time and identification information for identifying whether the object coughs in the multiple images. In this embodiment, multiple target images of the target object can be extracted according to the time sequence of the images shot by the shooting device, and the multiple target objects extracted according to the time are input into the first model for analysis to determine whether the target object coughs. Therefore, when training the first model, the images included in the first data should also be images extracted in time sequence.
[0032] In an exemplary embodiment, after analyzing the target image using the first model to determine whether the target object in the target image is coughing, the method further includes: if it is determined that the target object is coughing, performing an alarm operation. In this embodiment, if it is determined that the target object is coughing, an alarm operation may be performed. The alarm operation includes different alarm modes such as voice alarm and information alarm.
[0033] In an exemplary embodiment, when it is determined that the target object is coughing, performing an alarm operation includes at least one of the following: outputting an alarm message to the target platform, wherein the alarm message carries the identity information of the target object and / or the target image; highlighting the target image in a first image including the target image, wherein the first image includes images of one or more objects. In this embodiment, when it is determined that the target object is coughing, an alarm signal can be output to the platform, and the human body can be framed in the first image on the platform with an agreed eye-catching color. The platform can be a display connected to a shooting device, etc. When the first image includes multiple objects, it can be determined whether the human body image currently being processed is the last human body detected. If not, detection continues until all detected human body images have been processed.
[0034] The cough detection method is described below in conjunction with specific implementations:
[0035] Figure 3 is a flow chart of a cough detection method according to a specific embodiment of the present invention. Figure 3 As shown, the process includes:
[0036] Step S302, use the image acquisition and preprocessing module to process the image. First, obtain the input original image or video. If the input is an image, the image is scaled to meet the requirements of the human body detection module; if the input is a video stream, the video stream is frame-processed as needed, and then the image is scaled to the input size required by the human body detection module.
[0037] Step S304, using the human body detection module based on deep learning to perform the following steps: The human body detection module is implemented using a deep convolutional neural network, and the preprocessed image (corresponding to the above target image) is input into the human body detection module for human body detection. In the training phase, the human body detection module takes the image and all the human body frames in the image as input, and the model inputs the detected human body frame, and uses a certain loss function to measure the difference between the input annotated human body frame, and then uses a certain optimization method to update the parameters of the model until the training is completed. In the deployment phase, the input is an image, the model parameters are the parameters trained in the above training phase, and the output is the coordinates of the detected human body detection frame. The detection result may contain one or more human body frames, or there may be no human body frame, and it is marked that no human body is detected in the input image.
[0038] Step S306, using the human body tracking and preprocessing module to perform the following steps: the input of the human body tracking and preprocessing module is a number of human body frames in the multi-frame image output by the human body detection module, the tracking module performs association matching on these human bodies, assigns different IDs to different human bodies, and assigns the same ID to different frames of the same human body, the human body tracking and preprocessing module extracts the human body image from the entire image according to the detection frame, and scales it to a fixed size suitable for the input of the cough detection module, and then caches it in frame order according to different IDs. When the number of image frames with the same ID is full of 5 frames, they are input into the cough detection module in chronological order; when the original input is only an image instead of a video frame, only one frame is cached.
[0039] Step S308, using the deep learning-based cough detection module to perform the following steps: Since coughing is a continuous process, single-frame detection is prone to false detection. Therefore, continuous multi-frame images can be input into the cough detection module for detection to improve the detection accuracy. The specific implementation adopts a 3D convolutional neural network model to implement it. Five consecutive frames of preprocessed human images of the same human body are input into the 3D convolutional neural network model for cough classification. In the training stage, the model inputs five consecutive human body images and whether the cough label is detected, and the model outputs whether the cough is detected. A certain loss function is used to measure the difference between the model output and the input label, and then a certain optimization method is used to optimize and update the model parameters until the training is completed. The model in the deployment stage uses the model trained in the training stage, and the input is a human body image, and the output is whether the cough is. When there is only one image, it is also possible not to input five frames of images, but only one frame for image cough recognition. The detection module correspondingly becomes an ordinary convolutional neural network, and the training and deployment methods are similar.
[0040] Step S310, using the detection result output and processing module to perform the following steps: input the classification result of the above-mentioned cough detection module into the detection result output and processing module, if the classification result is cough, output an alarm signal to the platform, and frame the human body in the original image (corresponding to the above-mentioned first image) input in step S302 with an agreed eye-catching color on the platform.
[0041] Step S312, determining whether the processed human body image is the last human body detected, if not, repeating the above step S306 until all detected human body images have been processed, if so, executing step S314.
[0042] Step S314: All human body images are detected and the process ends.
[0043] In the aforementioned embodiment, cough recognition is performed by adopting an image recognition method, which has strong resistance to noise interference; and the coughing of multiple people can be tracked at the same time, which is suitable for large-scale scene deployment; and, after the recognition is completed, a snapshot image of the detected cougher can be given, which is visual and intuitive, and convenient for staff to respond quickly; in addition, a large number of existing video surveillance equipment that has been deployed in public places can be utilized, without the need for additional hardware, saving cost and time.
[0044] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0045] In this embodiment, a cough detection device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0046] Figure 4 is a structural block diagram of a cough detection device according to an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0047] An extraction module 42, used to extract a target image of a target object;
[0048] The analysis module 44 is used to analyze the target image using a first model to determine whether the target object in the target image is coughing, wherein the first model is trained by machine learning using multiple groups of first data, and each group of first data in the multiple groups of first data includes: an image and identification information for identifying whether the object in the image is coughing.
[0049] The extraction module 42 corresponds to the image acquisition and preprocessing module, the human body tracking module and the human body detection module, and the analysis module 44 corresponds to the cough detection module.
[0050] In an exemplary embodiment, the extraction module 42 can extract the target image of the target object in the following manner: obtain a first image including the target image, wherein the first image includes images of one or more objects; use a second model to analyze the first image to determine the coordinates of the image frames of each object included in the first image, wherein the second model is trained through machine learning using multiple sets of second data, and each set of second data in the multiple sets of second data includes: the image and the coordinates of the image blocks of each object included in the image; extract the target image from the first image based on the coordinates of the image frame of the target object included in the first image.
[0051] In an exemplary embodiment, the extraction module 42 can obtain the first image including the target image in the following manner: perform frame extraction processing on the received video stream to obtain at least two frames of the first image including the target image extracted sequentially; the extraction module 42 can analyze the first image using the second module to determine the coordinates of the image frame of each object included in the first image: use the second model to analyze at least two frames of the first image in sequence to respectively determine the coordinates of the image frame of each object included in each of the first images; the extraction module 42 can extract the target image from the first image based on the coordinates of the image frame of the target object included in the first image in the following manner: extract the target image from at least two frames of the first image based on the coordinates of the image frame of the target object included in at least two frames of the first image.
[0052] In an exemplary embodiment, the extraction module 42 can extract the target image from at least two frames of the first images based on the coordinates of the image frame of the target object included in at least two frames of the first images in the following manner: assigning a unique identification ID to each object included in at least two frames of the first images, wherein the same object is assigned the same ID; determining the target ID corresponding to the target image; determining the coordinates of the image frame of the object corresponding to the target ID included in at least two frames of the first images, and extracting the target image from at least two frames of the first images based on the determined image frame coordinates of the object corresponding to the target ID.
[0053] In an exemplary embodiment, the device can be used to determine the coordinates of the image frames of objects corresponding to other IDs other than the target ID included in at least two frames of the first images after assigning a unique identification ID to each object included in at least two frames of the first images, and extract the images of the objects corresponding to the other IDs from the at least two frames of the first images based on the determined coordinates of the image frames of the objects corresponding to the other IDs; and cache the images of the objects corresponding to the other IDs extracted from the at least two frames of the first images according to the shooting time.
[0054] In an exemplary embodiment, the extraction module 42 can extract the target image of the target object in the following manner: extract multiple target images of the target object according to the shooting time; the analysis module 44 can analyze the target image using the first model to determine whether the target object is coughing in the target image: use the first model to analyze the multiple target images to determine whether the target object is coughing in the multiple target images, wherein each group of first data in the multiple groups of first data includes: multiple images of the object extracted according to the shooting time and identification information for identifying whether the object is coughing in the multiple images.
[0055] In an exemplary embodiment, the apparatus may be configured to analyze the target image using a first model to determine whether the target object in the target image is coughing, and then, if it is determined that the target object is coughing, perform an alarm operation.
[0056] In an exemplary embodiment, when it is determined that the target object is coughing, performing an alarm operation includes at least one of the following: outputting an alarm message to a target platform, wherein the alarm message carries the identity information of the target object and / or the target image; highlighting the target image in a first image including the target image, wherein the first image includes images of one or more objects.
[0057] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0058] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0059] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0060] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0061] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0062] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0063] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0064] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cough detection method, characterized in that: include: Extracting a target image of a target object, wherein the target object is a person; Analyzing the target image using a first model to determine whether the target object in the target image is coughing, wherein the first model is trained by machine learning using multiple sets of first data, and each set of first data in the multiple sets of first data includes: an image and identification information for identifying whether the human object in the image is coughing; The step of extracting a target image of a target object comprises: acquiring a first image including the target image, wherein the first image includes an image of one or more human objects; analyzing the first image using a second model to determine coordinates of a human frame of each human object included in the first image, wherein the second model is trained by machine learning using multiple sets of second data, and each set of second data in the multiple sets of second data includes: an image and coordinates of image blocks of each human object included in the image; extracting the target image from the first image based on the coordinates of the human frame of the target object included in the first image; Analyzing the first image using the second model to determine the coordinates of the human body frame of each human object included in the first image includes: analyzing at least two frames of the first image in sequence using the second model to respectively determine the coordinates of the human body frame of each human object included in each of the first images; Extracting the target image from the first image based on the coordinates of the human body frame of the target object included in the first image includes: extracting the target image from at least two frames of the first image based on the coordinates of the human body frame of the target object included in at least two frames of the first image.
2. The method according to claim 1, characterized in that: Acquiring the first image including the target image includes: performing frame extraction processing on the received video stream to obtain at least two sequentially extracted frames of the first image including the target image.
3. The method according to claim 1, characterized in that Extracting the target image from at least two frames of the first image based on the coordinates of the human body frame of the target object included in at least two frames of the first image comprises: Assigning a unique identification ID to each human object included in at least two frames of the first image, wherein the same human object is assigned the same ID; Determining a target ID corresponding to the target image; The coordinates of a human frame of a human object corresponding to the target ID included in at least two frames of the first image are determined, and the target image is extracted from the at least two frames of the first image based on the determined coordinates of the human frame of the human object corresponding to the target ID.
4. The method according to claim 3, characterized in that: After allocating a unique identification ID to each human object included in at least two frames of the first image, the method further includes: Determine the coordinates of the human body frames of the human body objects corresponding to other IDs except the target ID included in at least two frames of the first images, and extract the images of the human body objects corresponding to other IDs from the at least two frames of the first images based on the determined coordinates of the human body frames of the human body objects corresponding to other IDs; The images of human objects corresponding to other IDs extracted from at least two frames of the first image are cached by ID according to the shooting time.
5. The method according to claim 1, characterized in that Extracting a target image of the target object includes: extracting a plurality of target images of the target object according to shooting time; Analyzing the target image using the first model to determine whether the target object coughs in the target image includes: analyzing a plurality of the target images using the first model to determine whether the target object coughs in the plurality of the target images, wherein each group of the plurality of groups of first data includes: a plurality of images of human objects extracted according to shooting time and identification information for identifying whether the human object coughs in the plurality of images.
6. The method according to claim 1, characterized in that After analyzing the target image using the first model to determine whether the target object in the target image is coughing, the method further includes: When it is determined that the target object coughs, an alarm operation is performed.
7. The method according to claim 6, characterized in that When it is determined that the target object is coughing, performing an alarm operation includes at least one of the following: Outputting warning information to a target platform, wherein the warning information carries the identity information of the target object and / or the target image; The target image is highlighted in a first image including the target image, wherein the first image includes images of one or more human objects.
8. A cough detection device, characterized in that: include: An extraction module, used for extracting a target image of a target object, wherein the target object is a person; an analysis module, configured to analyze the target image using a first model to determine whether the target object in the target image is coughing, wherein the first model is trained by machine learning using multiple sets of first data, and each set of first data in the multiple sets of first data includes: an image and identification information for identifying whether the human object in the image is coughing; The extraction module is used to extract a target image of a target object in the following manner: acquiring a first image including the target image, wherein the first image includes images of one or more human objects; analyzing the first image using a second model to determine the coordinates of a human frame of each human object included in the first image, wherein the second model is trained by machine learning using multiple sets of second data, and each set of second data in the multiple sets of second data includes: an image and coordinates of image blocks of each human object included in the image; extracting the target image from the first image based on the coordinates of the human frame of the target object included in the first image; The extraction module is used to determine the coordinates of the human body frame of each human object included in the first image by: using the second model to analyze at least two frames of the first image in sequence, and respectively determine the coordinates of the human body frame of each human object included in each of the first images; The extraction module is used to extract the target image from the first image in the following manner: extracting the target image from at least two frames of the first image respectively based on the coordinates of the human body frame of the target object included in at least two frames of the first image.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cough monitoring method and device based on deep learning
CN109360584A
KR1018914390000B1