A function point matching method for large-scale camera detection in hospitals
By using preset model sets in hospitals to judge camera pictures and automatically configure the detection algorithm, the time-consuming and labor-intensive configuration problem is solved, and intelligent management of large-scale cameras and safety accident detection are realized.
Patent Information
- Application Number
- CN202410500284.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-04-24
AI Technical Summary
In hospitals, configuring detection function points suitable for different camera installation locations requires a lot of manual time and professionals, which makes it time-consuming and labor-intensive and difficult to achieve intelligent management of large-scale cameras.
By obtaining the collection of pictures collected by the camera, using the detection function in the preset model set to judge the model, and automatically configure suitable detection algorithms, including fall detection, fire passage occupation detection, smoke detection, flame detection, sleeping post detection, and leaving post Detection and foreign object intrusion detection, etc., dynamically adjust the algorithm configuration according to the scene situation.
It realizes intelligent function matching of large-scale cameras in hospitals, simplifies the configuration process, improves efficiency, can automatically adapt to various safety accident detection needs, and reduces manual intervention.
Smart Images

Figure CN118379677B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method for matching function points of large-scale camera detection in a hospital. Background Art
[0002] Safety issues such as fire accidents in hospitals are becoming more and more important. With the advancement of technology, corresponding artificial intelligence (AI) algorithm detection will also be carried out in the surveillance cameras of hospitals. AI algorithm detection can be used to detect various safety issues that may occur in hospitals, such as: fall detection, fire passage occupancy detection, smoke detection, flame detection, sleep detection, and off-duty detection. However, different camera installation locations require different detection function points. For example, in the rehabilitation area, it is necessary to detect falls of patients and notify medical staff in time, while fire passage occupancy detection is only suitable for cameras monitoring fire passages, and other cameras do not involve this function. Manually judging and configuring the corresponding function points of hundreds or thousands of cameras is a very time-consuming and labor-intensive task, and it requires very professional personnel to carry out this work. Summary of the invention
[0003] The embodiment of the present invention provides a method and system for matching detection function points of large-scale cameras in a hospital, so as to realize intelligent and automatic matching of suitable detection algorithms for large-scale cameras in a hospital.
[0004] A first aspect of an embodiment of the present invention provides a method for matching function points of large-scale camera detection in a hospital, the method comprising:
[0005] Obtain the images collected by the target camera at multiple times as a target image set;
[0006] Input the target image set into each detection function judgment model in the preset model set one by one, and obtain the judgment result of each detection function judgment model on the target image set; the preset model set includes: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping detection judgment model, leaving the post detection judgment model and foreign object intrusion detection judgment model;
[0007] According to the judgment results of each detection function judgment model in the preset model set on the target image set, at least one detection algorithm is configured for the target camera, and the detection algorithms include: fall detection algorithm, fire passage occupancy detection algorithm, smoke detection algorithm, flame detection algorithm, sleeping detection algorithm, leaving the post detection algorithm and foreign object intrusion detection algorithm.
[0008] Optionally, the method further comprises:
[0009] Inputting the target picture set into a second preset model to determine whether there is a person in the target scene represented by the target picture set collected by the target camera;
[0010] When it is determined that there is a person in the target scene, the target picture set is input into each detection function judgment model in the preset model set one by one, including:
[0011] Input the target image set into each of the following detection function judgment models in the preset model set one by one: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping detection judgment model, leaving the post detection judgment model and foreign object intrusion detection judgment model;
[0012] When it is determined that there is no one in the target scene, it is determined that there is no need to configure a human-related detection algorithm for the target camera, and the human-related detection algorithms include: a fall detection algorithm, a sleep detection algorithm, an leaving detection algorithm and a foreign object intrusion detection algorithm.
[0013] Optionally, when it is determined that there is a person in the target scene, the target picture set is input into each detection function judgment model in the preset model set one by one, including:
[0014] The target image set is input one by one into each of the following detection function judgment models in the preset model set: a fire passage occupancy detection judgment model, a smoke detection judgment model, and a flame detection judgment model.
[0015] Optionally, the method comprises:
[0016] Obtain pictures collected by multiple cameras at multiple times, and use pictures collected by one camera at multiple times as a sample picture set;
[0017] According to the camera detection algorithm configured for each camera among the multiple cameras, a label is set for the corresponding sample picture set, and for the sample picture set corresponding to each camera: according to whether the camera has been configured with a first camera detection algorithm, a sample label is set to 1 or 0 for each picture in the sample picture set for the first camera detection algorithm; according to whether the camera has been configured with a second camera detection algorithm, a sample label is set to 1 or 0 for each picture in the sample picture set for the second camera detection algorithm; the camera detection algorithm configured for each camera includes one or more;
[0018] Input all sample picture sets into a third preset model, and train a first detection function judgment model based on sample labels set for each sample picture set for the first camera detection algorithm;
[0019] All sample picture sets are input into the third preset model, and based on the sample labels set for the second camera detection algorithm for each sample picture set, a second detection function judgment model is trained.
[0020] Optionally, the target picture set is input into each detection function judgment model in the preset model set one by one, and a judgment result of each detection function judgment model on the target picture set is obtained, including:
[0021] For each detection function judgment model: calculating an average value of the predicted probability value of each image in the target image set according to the detection function judgment model;
[0022] When the average value is greater than or equal to a preset threshold, it is determined that the target camera matches the corresponding detection algorithm.
[0023] Optionally, the method further comprises:
[0024] Obtain the image to be detected collected by the target camera in real time;
[0025] At least one detection algorithm configured for the target camera is used to perform target detection on the image content of the picture to be detected.
[0026] A second aspect of an embodiment of the present invention provides a hospital large-scale camera detection function point matching system, the system comprising: a plurality of cameras, a camera detection function matching server;
[0027] Each of the multiple cameras collects pictures respectively;
[0028] The server obtains pictures collected by each camera at multiple times to obtain multiple picture sets;
[0029] The server, for each picture set in the multiple picture sets: inputs the picture sets one by one into each detection function judgment model in the preset model set, and obtains the judgment results of each detection function judgment model on the picture set; the preset model set includes: a fall detection judgment model, a fire passage occupancy detection judgment model, a smoke detection judgment model, a flame detection judgment model, a sleep-on-the-job detection judgment model, a leave-on-the-job detection judgment model and a foreign object intrusion detection judgment model; according to the judgment results of each detection function judgment model in the preset model set on the picture set, configures at least one detection algorithm for the corresponding camera, and the detection algorithms include: a fall detection algorithm, a fire passage occupancy detection algorithm, a smoke detection algorithm, a flame detection algorithm, a sleep-on-the-job detection algorithm, a leave-on-the-job detection algorithm and a foreign object intrusion detection algorithm;
[0030] Each of the multiple cameras collects images in real time and completes corresponding target detection according to one or more camera detection algorithms configured for the camera.
[0031] Optionally, the system further comprises:
[0032] A determination module, used for inputting the target picture set into a second preset model to determine whether there is a person in the target scene represented by the target picture set collected by the target camera;
[0033] When it is determined that there are people in the target scene, the camera detection function matching server is specifically used to:
[0034] The target image set is input into each of the following detection function judgment models in the preset model set one by one: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping post detection judgment model, leaving post detection judgment model and foreign object intrusion detection judgment model; when it is determined that there is no one in the target scene, it is determined that there is no need to configure a human-related detection algorithm for the target camera, and the human-related detection algorithms include: fall detection algorithm, sleeping post detection algorithm, leaving post detection algorithm and foreign object intrusion detection algorithm.
[0035] Optionally, when it is determined that there is a person in the target scene, the camera detection function matching server is specifically used to:
[0036] The target image set is input one by one into each of the following detection function judgment models in the preset model set: a fire passage occupancy detection judgment model, a smoke detection judgment model, and a flame detection judgment model.
[0037] Optionally, the system further comprises:
[0038] A sample picture set acquisition module is used to acquire pictures collected by multiple cameras at multiple times, and to use pictures collected by one camera at multiple times as a sample picture set;
[0039] A labeling module, used for setting labels for corresponding sample picture sets according to camera detection algorithms configured for each camera among multiple cameras, and for the sample picture set corresponding to each camera: according to whether the camera has been configured with a first camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the first camera detection algorithm; according to whether the camera has been configured with a second camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the second camera detection algorithm; the camera detection algorithms configured for each camera include one or more;
[0040] A first training module is used to input all sample picture sets into a third preset model, and train a first detection function judgment model based on sample labels set for each sample picture set for the first camera detection algorithm;
[0041] The second training module is used to input all sample image sets into a third preset model, and train a second detection function judgment model based on the sample labels set for each sample image set for the second camera detection algorithm.
[0042] Optionally, the camera detection function matching server is specifically used for:
[0043] For each detection function judgment model: calculating an average value of the predicted probability value of each image in the target image set according to the detection function judgment model;
[0044] When the average value is greater than or equal to a preset threshold, it is determined that the target camera matches the corresponding detection algorithm.
[0045] Optionally, the system further comprises:
[0046] The acquisition module is used to obtain the image to be detected collected by the target camera in real time;
[0047] The detection module is used to perform target detection on the image content of the picture to be detected using at least one detection algorithm configured for the target camera.
[0048] A third aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the steps in the method for matching functional points in large-scale camera detection in a hospital as described in the first aspect of the present invention.
[0049] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method for matching function points in large-scale camera detection in a hospital as described in the first aspect of the present invention.
[0050] By adopting the detection function point matching method for large-scale cameras in a hospital provided by an embodiment of the present invention, for large-scale cameras in a hospital, each detection function judgment model in a preset model set obtained by pre-training can be used to judge the target image set collected by each camera, and the detection algorithm required to be configured for each camera can be determined. In this way, the corresponding detection functions can be matched for large-scale cameras in the hospital simply, quickly and intelligently, and various types of safety accident detection in the hospital can be realized according to each camera configured with a corresponding detection algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0052] Figure 1 1 is a schematic diagram of the steps of a method for matching function points of large-scale camera detection in a hospital provided in an embodiment of the present invention;
[0053] Figure 2 It is a schematic diagram of the steps of the hospital large-scale camera detection function point matching method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] In recent years, AI algorithms have gradually matured and been widely used. In hospital scenarios, AI algorithms can be combined with traditional surveillance cameras to achieve intelligent management of various safety accidents in hospitals. In related technologies, in order to save computing resources, reduce unnecessary calculations, and reduce false alarms, it is usually necessary to manually configure which detection algorithms need to be configured for each camera. This method is time-consuming and labor-intensive and requires professionals to complete. Based on this, an embodiment of the present invention proposes to use a detection function judgment model to predict the target image set collected by the target camera to determine whether it is necessary to configure the corresponding detection algorithm for the target camera.
[0056] Specifically, an embodiment of the present invention provides a method for matching function points of large-scale camera detection in a hospital, such as Figure 1 As shown, it shows a schematic diagram of the step flow of the hospital large-scale camera detection function point matching method provided in an embodiment of the present invention, and the method includes the following steps:
[0057] S101, obtaining pictures collected by a target camera at multiple times as a target picture set.
[0058] In the embodiment of the present invention, the multiple moments may be multiple preset moments in a day. Specifically, the multiple preset moments may be busy hours (e.g., 10 a.m.) and idle hours (10 p.m.) determined based on experience. The multiple preset moments may also be multiple moments in a day set at intervals of one hour. The multiple preset moments may also be multiple moments set at intervals of one hour during working hours in a day and multiple moments set at intervals of two hours at night. In the embodiment of the present invention, the pictures collected by the target camera at each preset moment are used as the target picture set.
[0059] In the embodiment of the present invention, the target picture set may reflect scene information, crowd flow information, etc. of the shooting scene corresponding to the target camera.
[0060] S102, inputting the target picture set into each detection function judgment model in the preset model set one by one, and obtaining the judgment result of each detection function judgment model on the target picture set.
[0061] Specifically, the preset model set includes: a fall detection and judgment model, a fire escape occupancy detection and judgment model, a smoke detection and judgment model, a flame detection and judgment model, a sleeping detection and judgment model, an leaving-the-post detection and judgment model, and a foreign object intrusion detection and judgment model.
[0062] In an embodiment of the present invention, each detection function judgment model is used to realize the adaptation judgment of the target camera and a corresponding detection algorithm. For example, the fall detection judgment model is used to judge whether it is necessary to configure a fall detection algorithm for the target camera, and the fire passage occupancy detection judgment model is used to judge whether it is necessary to configure a fire passage occupancy detection algorithm for the target camera.
[0063] S103: Configure at least one detection algorithm for the target camera according to the judgment results of each detection function judgment model in the preset model set on the target image set.
[0064] Specifically, the detection algorithms include: a fall detection algorithm, a fire escape occupancy detection algorithm, a smoke detection algorithm, a flame detection algorithm, a sleeping detection algorithm, an leaving-the-post detection algorithm and a foreign object intrusion detection algorithm.
[0065] Among them, the fall detection algorithm is used to detect whether a person falls in the target scene represented by the image collected by the camera. It is generally used in scenes with concentrated personnel such as wards, passages, and outpatient clinics. The fire passage occupancy detection algorithm is used to detect whether the fire passage is occupied in the target scene represented by the image collected by the camera. It is generally used in fire passage scenes. The smoke detection algorithm and the flame detection algorithm are used to detect whether smoke and fire appear in the target scene represented by the image collected by the camera. It is generally used in scenes related to people such as wards, passages, outpatient clinics, corridors, and elevators. The sleeping detection algorithm and the leaving detection algorithm are used to detect whether the staff at their posts sleep or leave their posts. They are generally used in scenes where staff are needed, such as gate posts, emergency departments, and outpatient clinics. The foreign object intrusion detection algorithm is used to detect whether foreign object intrusion occurs in the target scene represented by the image collected by the camera. It is generally used in hospital gate scenes.
[0066] In the embodiment of the present invention, each detection function judgment model can output a probability value that the target picture set needs to be configured with a corresponding detection algorithm, and when the probability value is greater than a preset judgment threshold, it can be determined that the corresponding detection algorithm needs to be configured for the target camera. After each detection function judgment model completes the judgment of the target picture set, at least one detection algorithm that needs to be configured for the target camera can be determined.
[0067] For example, the fall detection judgment model can output a probability value for the target image set that the target image set needs to be configured with a corresponding detection algorithm. When the probability value is greater than a preset judgment threshold, it can be determined that a corresponding fall detection algorithm needs to be configured for the target camera.
[0068] In an embodiment of the present invention, for large-scale cameras in a hospital, a detection function judgment model in a preset model set obtained through pre-training can be used to judge the target image set collected by each camera, and the detection algorithm required to be configured for each camera can be determined. This allows the corresponding detection functions to be matched simply, quickly, and intelligently for large-scale cameras in the hospital, and then various types of safety accident detection in the hospital can be achieved based on each camera configured with a corresponding detection algorithm.
[0069] The embodiment of the present invention also provides a method for matching function points of large-scale camera detection in a hospital, such as Figure 2 As shown, it shows a schematic flow chart of another method for matching function points of large-scale camera detection in a hospital provided in an embodiment of the present invention, the method comprising the following steps:
[0070] S201, obtaining pictures collected by a target camera at multiple times as a target picture set.
[0071] In an embodiment of the present invention, for the large-scale cameras in a hospital: camera 1, camera 2...camera i...camera n, a set of pictures {Q11, Q12, Q13...Q1j...Q1k} collected by camera 1 at k preset moments can be obtained, and a set of pictures {Qi1, Qi2, Qi3...Qij...Qik} collected by camera i at k preset moments can also be obtained, and so on, to obtain a target picture set corresponding to each camera.
[0072] S202: Input the target picture set into a second preset model to determine whether there is a person in the target scene represented by the target picture set collected by the target camera.
[0073] In an embodiment of the present invention, the second preset model may adopt a yolov5s model structure, and the second preset model may determine, through training, whether there is a person in the scene represented by the input picture.
[0074] S203, when it is determined that there are people in the target scene, input the target picture set into each of the following detection function judgment models in the preset model set one by one: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping on the post detection judgment model, leaving the post detection judgment model and foreign object intrusion detection judgment model; when it is determined that there are no people in the target scene, input the target picture set into each of the following detection function judgment models in the preset model set one by one: fire passage occupancy detection judgment model, smoke detection judgment model and flame detection judgment model.
[0075] In an embodiment of the present invention, a second preset model can be used to judge the target image set to determine whether the scene captured by the target camera is a scene with people or a scene without people. Specifically, a scene with people refers to a scene where there are people most of the time in a day, such as: guardhouses, wards, etc., and an unmanned scene refers to a scene where there are no people most of the time in a day, such as: fire escapes, stairwells, etc.
[0076] Specifically, in an embodiment of the present invention, a second preset model can be used to judge each picture in the target picture set. When there is a person in the target scene represented by the picture, it is determined to be a picture with people. When the number of pictures with people included in the target picture set is greater than a preset number threshold, it is determined that there is a person in the target scene represented by the target picture set, where the preset number threshold can be determined according to actual needs.
[0077] In an embodiment of the present invention, when it is determined that there are people in the target scene, it is determined that it needs to be equipped with a detection algorithm related to people, and it may also be necessary to equip it with a detection algorithm unrelated to people. Based on this, when it is determined that there are people in the target scene, the target image set can be input one by one into each detection function judgment model in the preset model set for judgment processing.
[0078] Specifically, when it is determined that there is no one in the target scene, it is determined that there is no need to configure the target camera with a detection algorithm related to people, and the detection algorithms related to people include: a fall detection algorithm, a sleep detection algorithm, a leave detection algorithm, and a foreign object intrusion detection algorithm. Based on this, when it is determined that there is no one in the target scene, it is only necessary to input the target picture set into each of the following detection function judgment models in the preset model set one by one: a fire passage occupancy detection judgment model, a smoke detection judgment model, and a flame detection judgment model.
[0079] Therefore, in the embodiment of the present invention, by using the second preset model to distinguish whether there are people in the target scene, when it is determined that there are no people in the target scene, there is no need to use the human-related detection function judgment model to judge and process the target image set, which can reduce the amount of model calculation and improve the efficiency of the intelligent configuration of large-scale camera detection functions in hospitals.
[0080] S204: Configure at least one detection algorithm for the target camera according to the judgment results of each detection function judgment model in the preset model set on the target image set.
[0081] In the embodiment of the present invention, the above step S204 may include the following sub-steps:
[0082] S2041, for each detection function judgment model: calculate an average value of the predicted probability value of each picture in the target picture set according to the detection function judgment model.
[0083] S2042: When the average value is greater than or equal to a preset threshold, determine to match the target camera with a corresponding detection algorithm.
[0084] Specifically, in the embodiment of the present invention, {M1, M2, M3, ... Mj ... Mk} can be used to represent a preset model set, wherein M1, M2, M3, ... Mj ... Mk represent each detection function judgment model. Specifically, M1, M2, M3, ... Mj ... Mk can be used one by one to perform corresponding reasoning and recognition calculations on each image in the target image set {Q11, Q12, Q13 ... Q1j ... Q1k}. For example, assuming that M1 is a fall detection judgment model, the model M1 can be used to perform reasoning and recognition on each image to determine whether the scene represented by the image needs to be judged for a fall, and obtain {r 11 ,r 12 ,r 13 ...r 1j ...r 1k}, where r 1j It represents the predicted probability value of M1 for each picture, ranging from 0 to 1. The prediction result of M1 for the target picture set is determined based on the following formula: Among them, J represents the prediction result of the detection function judgment model M1 on the target image set.
[0085] In the embodiment of the present invention, when J is greater than or equal to a preset threshold, it can be determined that the target camera matches the fall detection algorithm. The size of the preset threshold can be determined according to actual needs. Similarly, for other detection function judgment models, the same method can also be used for judgment.
[0086] S205, obtaining the image to be detected collected by the target camera in real time.
[0087] S206: Perform target detection on the image content of the to-be-detected picture respectively using at least one detection algorithm configured for the target camera.
[0088] In an embodiment of the present invention, after completing the detection algorithm matching of each target camera in the hospital's large-scale cameras, the pictures to be detected collected by the target camera in real time can be obtained, and various abnormal event detections in the hospital can be completed based on the detection algorithm that has been configured for each camera.
[0089] In the embodiment of the present invention, steps S205 to S206 can be executed by the camera or by a unified image processing server. When steps S205 to S206 are executed by a unified image processing server, the corresponding relationship between each camera identifier and the detection algorithm can be configured in the image processing server, and after obtaining the image to be detected collected by the camera in real time, target detection is completed based on the camera identifier and the corresponding detection algorithm.
[0090] In an embodiment of the present invention, a training method for the detection function judgment model involved in any of the above embodiments is also provided, which may specifically include the following steps:
[0091] S1, obtaining pictures collected by multiple cameras at multiple times, and taking pictures collected by one camera at multiple times as a sample picture set.
[0092] S2. According to the camera detection algorithm configured for each camera among the multiple cameras, set labels for the corresponding sample picture sets. For the sample picture set corresponding to each camera: according to whether the camera is configured with a first camera detection algorithm, set the sample label of each picture in the sample picture set to 1 or 0 for the first camera detection algorithm; according to whether the camera is configured with a second camera detection algorithm, set the sample label of each picture in the sample picture set to 1 or 0 for the second camera detection algorithm; the camera detection algorithm configured for each camera includes one or more.
[0093] S3, inputting all sample picture sets into a third preset model, and training a first detection function judgment model based on the sample labels set for each sample picture set for the first camera detection algorithm.
[0094] S4, inputting all sample picture sets into a third preset model, and training a second detection function judgment model based on the sample labels set for each sample picture set for the second camera detection algorithm.
[0095] Specifically, a collection of pictures collected by multiple cameras in multiple hospitals for which camera detection algorithms have been manually configured can be used as training samples.
[0096] In the embodiment of the present invention, the multiple moments may be multiple preset moments in a day. Specifically, the multiple preset moments may be multiple moments in a day set at intervals of one hour. The multiple preset moments may also be multiple moments set at intervals of one hour during working hours in a day and multiple moments set at intervals of two hours at night. It is understood that the acquisition time of the multiple pictures included in the sample picture set A and the multiple pictures included in the sample picture set B should be the same. It is understood that the multiple pictures included in the sample picture combination should be the same as the target picture set collected in the application process (for example: steps S101 to S103 or S201 to S04).
[0097] In an embodiment of the present invention, for a known camera set for which the hospital has completed manual configuration of a camera detection algorithm: known camera 1, known camera 2...known camera i...known camera n, obtain the pictures collected by the known camera 1 at multiple times as a sample picture set {P11, P12, P13...P1j...P1k}, obtain the pictures collected by the known cameras at multiple times as a sample picture set {Pi1, Pi2, Pi3...Pij...Pik}; and so on, to obtain n sample picture sets.
[0098] In the embodiment of the present invention, labels are set for the corresponding sample picture sets according to the camera detection algorithms configured in each known camera. Specifically, for each sample picture set, based on the camera detection algorithms configured in the known cameras, samples are marked for each camera detection algorithm based on one-hot coding. 1 indicates that the corresponding algorithm detection needs to be configured for the picture, and vice versa, 0 indicates that the algorithm detection does not need to be configured for the picture. Specifically, the sample picture set and its labels can be shown in the following table:
[0099]
[0100] In an embodiment of the present invention, based on the sample labels set for each camera detection algorithm for each picture in the sample picture set, the third preset network is trained for binary classification to obtain multiple detection function judgment models. Specifically, the third preset model can adopt the Resnet34 network structure.
[0101] For example, for the fall detection algorithm, the input sample image set is {P11, P12, P13...P1j...P1k}, and the label of the sample image set is {1,1,1...1...1}; the input sample image set is {P21, P22, P23...P2j...P2k}, and the label of the sample image set is {0,0,0...0...0}, and so on. The classification result output by the expected model is the same as the label of the sample image set, so as to train a fall detection judgment model; and so on, through the same method, other detection function judgment models are obtained; finally, the preset model set {M1, M2, M3,.Mj..Mk} is obtained.
[0102] In the training process of each model, in order to solve the problem of sample imbalance, the loss function adopts the following formula:
[0103] FL(p t )=-α t (1-p t ) γ log(p t );
[0104] Among them, log(p t ) represents the cross entropy, α t Cross entropy weighting coefficient when the category is unbalanced, p t Indicates the predicted probability of the true category of the sample, FL(p t ) represents the loss obtained after sample calculation, and γ represents the hyperparameter for adjusting the weight factor.
[0105] Specifically, when a sample is predicted incorrectly, the probability p t is small, then the weighted part of FL is close to 1, and the contribution of this sample to Loss is not penalized. If the prediction is already successful, the probability p t If it is very close to 1, then the weighted part is very close to 0, and the contribution of this sample to the Loss is very small. This is an idea for mining difficult samples.
[0106] Based on the same inventive concept, an embodiment of the present invention also provides a hospital large-scale camera detection function point matching system, the system comprising: a plurality of cameras, a camera detection function matching server;
[0107] Each of the multiple cameras collects pictures respectively;
[0108] The server obtains pictures collected by each camera at multiple times to obtain multiple picture sets;
[0109] The server, for each picture set in the multiple picture sets: inputs the picture sets one by one into each detection function judgment model in the preset model set, and obtains the judgment results of each detection function judgment model on the picture set; the preset model set includes: a fall detection judgment model, a fire passage occupancy detection judgment model, a smoke detection judgment model, a flame detection judgment model, a sleep-on-the-job detection judgment model, a leave-on-the-job detection judgment model and a foreign object intrusion detection judgment model; according to the judgment results of each detection function judgment model in the preset model set on the picture set, configures at least one detection algorithm for the corresponding camera, and the detection algorithms include: a fall detection algorithm, a fire passage occupancy detection algorithm, a smoke detection algorithm, a flame detection algorithm, a sleep-on-the-job detection algorithm, a leave-on-the-job detection algorithm and a foreign object intrusion detection algorithm;
[0110] Each of the multiple cameras collects images in real time and completes corresponding target detection according to one or more camera detection algorithms configured for the camera.
[0111] Optionally, the system further comprises:
[0112] A sample picture set acquisition module is used to acquire pictures collected by multiple cameras at multiple times, and to use pictures collected by one camera at multiple times as a sample picture set;
[0113] A labeling module, used for setting labels for corresponding sample picture sets according to camera detection algorithms configured for each camera among multiple cameras, and for the sample picture set corresponding to each camera: according to whether the camera has been configured with a first camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the first camera detection algorithm; according to whether the camera has been configured with a second camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the second camera detection algorithm; the camera detection algorithms configured for each camera include one or more;
[0114] A first training module is used to input all sample picture sets into a third preset model, and train a first detection function judgment model based on sample labels set for each sample picture set for the first camera detection algorithm;
[0115] The second training module is used to input all sample image sets into a third preset model, and train a second detection function judgment model based on the sample labels set for each sample image set for the second camera detection algorithm.
[0116] Based on the same inventive concept, an embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor is executed, the steps in the hospital large-scale camera detection function point matching method as described in any of the above embodiments are implemented.
[0117] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the hospital large-scale camera detection function point matching method described in any of the above embodiments are implemented.
[0118] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0119] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0120] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (apparatus), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0123] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0124] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0125] The above is a detailed introduction to a hospital large-scale camera detection function point matching method and system provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for matching function points of large-scale camera detection in a hospital, characterized in that: The method comprises: Obtain the images collected by the target camera at multiple times as a target image set; Input the target image set into each detection function judgment model in the preset model set one by one, and obtain the judgment result of each detection function judgment model on the target image set; the preset model set includes: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping detection judgment model, leaving the post detection judgment model and foreign object intrusion detection judgment model; According to the judgment results of each detection function judgment model in the preset model set on the target image set, at least one detection algorithm is configured for the target camera, and the detection algorithm includes: fall detection algorithm, fire passage occupancy detection algorithm, smoke detection algorithm, flame detection algorithm, sleeping detection algorithm, leaving detection algorithm and foreign object intrusion detection algorithm; The method further comprises: Inputting the target picture set into a second preset model to determine whether there is a person in the target scene represented by the target picture set collected by the target camera; When it is determined that there is a person in the target scene, the target picture set is input into each detection function judgment model in the preset model set one by one, including: Input the target image set into each of the following detection function judgment models in the preset model set one by one: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping detection judgment model, leaving the post detection judgment model and foreign object intrusion detection judgment model; When it is determined that there is no one in the target scene, it is determined that there is no need to configure a human-related detection algorithm for the target camera, and the human-related detection algorithms include: a fall detection algorithm, a sleep detection algorithm, an leaving detection algorithm and a foreign object intrusion detection algorithm.
2. The hospital large-scale camera detection function point matching method according to claim 1 is characterized in that: When it is determined that there is no one in the target scene, the target picture set is input into each detection function judgment model in the preset model set one by one, including: The target image set is input one by one into each of the following detection function judgment models in the preset model set: a fire passage occupancy detection judgment model, a smoke detection judgment model, and a flame detection judgment model.
3. The hospital large-scale camera detection function point matching method according to claim 1 is characterized in that: The method comprises: Obtain pictures collected by multiple cameras at multiple times, and use pictures collected by one camera at multiple times as a sample picture set; According to the camera detection algorithm configured for each camera among the multiple cameras, a label is set for the corresponding sample picture set, and for the sample picture set corresponding to each camera: according to whether the camera has been configured with a first camera detection algorithm, a sample label is set to 1 or 0 for each picture in the sample picture set for the first camera detection algorithm; according to whether the camera has been configured with a second camera detection algorithm, a sample label is set to 1 or 0 for each picture in the sample picture set for the second camera detection algorithm; the camera detection algorithm configured for each camera includes one or more; Input all sample picture sets into a third preset model, and train a first detection function judgment model based on sample labels set for each sample picture set for the first camera detection algorithm; All sample picture sets are input into the third preset model, and based on the sample labels set for the second camera detection algorithm for each sample picture set, a second detection function judgment model is trained.
4. The hospital large-scale camera detection function point matching method according to claim 3 is characterized in that: Inputting the target image set into each detection function judgment model in the preset model set one by one, and obtaining the judgment result of each detection function judgment model on the target image set, including: For each detection function judgment model: calculating an average value of the predicted probability value of each image in the target image set according to the detection function judgment model; When the average value is greater than or equal to a preset threshold, it is determined that the target camera matches the corresponding detection algorithm.
5. The hospital large-scale camera detection function point matching method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain the image to be detected collected by the target camera in real time; At least one detection algorithm configured for the target camera is used to perform target detection on the image content of the picture to be detected.
6. A hospital large-scale camera detection function point matching system, characterized in that: The system includes: a plurality of cameras, a camera detection function matching server; Each of the multiple cameras collects pictures respectively; The server obtains pictures collected by each camera at multiple times to obtain multiple picture sets; The server, for each picture set in the multiple picture sets: inputs the picture sets into each detection function judgment model in the preset model set one by one, and obtains the judgment results of each detection function judgment model on the picture set; the preset model set includes: a fall detection judgment model, a fire passage occupancy detection judgment model, a smoke detection judgment model, a flame detection judgment model, a sleep-on-the-job detection judgment model, a leave-on-the-job detection judgment model and a foreign object intrusion detection judgment model; according to the judgment results of each detection function judgment model in the preset model set on the picture set, configures at least one detection algorithm for the corresponding camera, and the detection algorithms include: a fall detection algorithm, a fire passage occupancy detection algorithm, a smoke detection algorithm, a flame detection algorithm, a sleep-on-the-job detection algorithm, a leave-on-the-job detection algorithm and a foreign object intrusion detection algorithm; Each of the multiple cameras collects images in real time, and performs corresponding target detection according to one or more camera detection algorithms configured for the camera; The system further comprises: A determination module, used for inputting the target picture set into a second preset model to determine whether there is a person in the target scene represented by the target picture set collected by the target camera; When it is determined that there are people in the target scene, the camera detection function matching server is specifically used to: The target image set is input into each of the following detection function judgment models in the preset model set one by one: fall detection judgment model, fire passage occupancy detection judgment model, smoke detection judgment model, flame detection judgment model, sleeping post detection judgment model, leaving post detection judgment model and foreign object intrusion detection judgment model; when it is determined that there is no one in the target scene, it is determined that there is no need to configure a human-related detection algorithm for the target camera, and the human-related detection algorithms include: fall detection algorithm, sleeping post detection algorithm, leaving post detection algorithm and foreign object intrusion detection algorithm.
7. The hospital large-scale camera detection function point matching system according to claim 6 is characterized in that: The system further comprises: A sample picture set acquisition module is used to acquire pictures collected by multiple cameras at multiple times, and to use pictures collected by one camera at multiple times as a sample picture set; A labeling module, used for setting labels for corresponding sample picture sets according to camera detection algorithms configured for each camera among multiple cameras, and for the sample picture set corresponding to each camera: according to whether the camera has been configured with a first camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the first camera detection algorithm; according to whether the camera has been configured with a second camera detection algorithm, setting a sample label of 1 or 0 for each picture in the sample picture set for the second camera detection algorithm; the camera detection algorithms configured for each camera include one or more; A first training module is used to input all sample picture sets into a third preset model, and train a first detection function judgment model based on sample labels set for each sample picture set for the first camera detection algorithm; The second training module is used to input all sample image sets into a third preset model, and train a second detection function judgment model based on the sample labels set for each sample image set for the second camera detection algorithm.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the hospital large-scale camera detection function point matching method described in any one of claims 1-5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the hospital large-scale camera detection function point matching method described in any one of claims 1-5 are implemented.
