Automatic alarm method and device, computer equipment and storage medium
The video frame detection and tracking algorithm automatically records the length of time firefighters enter the fire scene, which solves the problem of inaccurate recording when there are many firefighters and improves the accuracy and efficiency of fire safety personnel's alarms.
Patent Information
- Application Number
- CN202410507058.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-08-30
AI Technical Summary
When there are a large number of firefighters, inaccurate records in the existing technology make it difficult for fire safety personnel to issue alarms in time, affecting the efficiency of fire rescue.
Through the video frame detection and tracking algorithm, it automatically records the length of time firefighters enter the fire scene, and issues alarm information at the preset time, reducing human recording errors and improving the accuracy and timeliness of alarms.
It achieves accurate recording and timely warning of the time firefighters enter the fire scene, reduces the workload of fire safety personnel, and improves the efficiency of fire scene situation judgment and combat plan construction.
Smart Images

Figure CN118570944A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image recognition technology, and in particular to an automatic alarm method, device, computer equipment and storage medium. Background Art
[0002] When firefighters go deep into the fire scene to fight fires and rescue, in order to prevent toxic smoke from entering the firefighters' respiratory tract and causing burns or suffocation, which endangers the lives and health of firefighters, each firefighter must use a personal air respirator to breathe. At present, the capacity of air respirators equipped in fire stations is generally 6.5 liters and 9 liters. The compressed air in the air respirator can support firefighters to breathe for 20-30 minutes.
[0003] When the pressure of the air breathing apparatus is insufficient, the pressure alarm device of the air breathing apparatus will sound an alarm to remind the firefighters. At this time, the air in the air breathing apparatus can still supply the firefighters with air to maintain breathing for 5 minutes. The firefighters must leave the fire scene and replace the new air breathing apparatus. Due to the complex situation and chaotic sounds in the fire scene, if the firefighters do not hear the alarm or encounter danger and fail to return to the fire scene in time to replace the air breathing apparatus, the life safety of the firefighters will be seriously threatened.
[0004] At present, the practice of each fire station is that the fire safety officer manually records the time that all firefighters who enter the fire scene have been in the fire scene outside the fire scene, and uses a radio or other communication method to remind the corresponding firefighters about 5 minutes before the compressed air in the air breathing apparatus runs out. However, the manual recording method currently uses paper forms to record, which is prone to inaccurate records when there are a large number of firefighters, resulting in risks such as untimely reminders. Summary of the invention
[0005] In view of this, the present disclosure proposes an automatic alarm method, device, computer equipment and storage medium to solve the problem in related technologies that a large number of firefighters may easily cause inaccurate records of fire safety officers, resulting in untimely prompts, which in turn affects fire rescue.
[0006] The first aspect of the present disclosure provides an automatic alarm method, the method comprising:
[0007] Performing target detection on a current video frame of a monitoring area to obtain at least one target object; the monitoring area is located between an air call replacement area and a fire scene area;
[0008] For any tracking target object in the tracking set, determining whether the tracking target object exists in the at least one target object; the tracking set includes multiple tracking target objects;
[0009] If the tracking target object does not exist in the at least one target object, determining whether the tracking target object enters the fire scene area;
[0010] If the tracking target object enters the fire scene area, determining whether the tracking target object is the first target object;
[0011] If the tracking target object is the first target object, determining a first time length of time that the tracking target object enters the fire scene area;
[0012] If the tracking target is the first target, determining a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area;
[0013] If the first total time is equal to or greater than a preset air-exhalation-supply time, a first alarm message is sent to the tracking target.
[0014] The disclosed embodiment determines whether there is a tracking target object in at least one target object. If there is no tracking target object in at least one target object, it determines whether the tracking target object enters the fire area; if the tracking target object enters the fire area, it determines whether the tracking target object is the first target object; if the tracking target object is the first target object, it determines the first duration of the tracking target object entering the fire area; if the tracking target object is the first target object, it determines the first total duration of the tracking target object entering the fire area multiple times after starting from the air-breathing change area; if the first total duration is equal to or greater than the preset air-breathing supply duration, it sends a first alarm message to the tracking target object, which can accurately record the first duration of each target object entering the fire area, and then accurately infer the first total duration of each target object entering the fire area, and send alarm messages in time, which can reduce errors in human recording and reduce the workload of fire safety officers, so that fire safety officers can spend more time and energy on fire situation judgment and combat plan construction.
[0015] In the embodiment of the present disclosure, determining whether the tracking target object enters the fire area includes:
[0016] Determine a second duration between a first moment corresponding to the current video frame and a second moment corresponding to a second video frame; the second video frame is a video frame adjacent to the current video frame and containing the tracking target;
[0017] If the second time duration is greater than or equal to the preset loss time duration, it is determined based on the second video frame whether the tracked target object enters the fire area.
[0018] The disclosed embodiment can accurately determine the starting time of the tracked target object entering the fire scene by determining whether the tracked target object has entered the fire scene based on the second video frame on the basis that the second time duration between the first moment corresponding to the current video frame and the second moment corresponding to the second video frame is greater than or equal to the preset loss time duration, thereby facilitating accurate determination of the single stay time of the tracked target object in the fire scene, i.e., the first time duration, and further accurately inferring the first total time duration of the target object entering the fire scene area multiple times after starting from the air call change area, thereby facilitating timely issuance of alarm information.
[0019] In the embodiment of the present disclosure, judging whether the tracked target object has entered the fire area based on the second video frame includes:
[0020] If the tracking target object is located in the first area in the second video frame, it is determined that the tracking target object enters the fire area; the first area is connected to the fire area;
[0021] If the tracking target object is located in the second area in the second video frame, it is determined that the tracking target object enters the air call change area; and the second area is connected to the air call change area.
[0022] The disclosed embodiment can accurately determine whether the tracked target object has entered the fire area or the air call change area by determining whether the tracked target object is located in the first area or the second area in the second video frame, thereby helping to accurately record the first duration of each tracked target object entering the fire area, and then accurately infer the first total duration of the target object entering the fire area multiple times after starting from the air call change area, thereby timely issuing corresponding alarm information based on the first total duration, which can reduce errors in human recording and reduce the workload of fire safety officers, allowing fire safety officers to spend more time and energy on fire situation judgment and combat plan construction.
[0023] In an embodiment of the present disclosure, the method further includes:
[0024] If the tracked target is the second target or the third target, a second alarm message is sent to the tracked target; wherein, the second target and the third target have the same authority level to enter the fire area; the authority level of the second target is lower than the authority level of the first target; and the third target is the first target after the authority level is adjusted.
[0025] The disclosed embodiment can monitor whether the second target object (such as a junior firefighter) or the third target object (such as a senior firefighter who is in a tired state) enters the fire area. If they enter the fire area, corresponding alarm information will be issued in time, thereby reducing the workload of fire safety officers and enabling fire safety officers to focus more time and energy on fire situation assessment and combat plan construction.
[0026] In the embodiment of the present disclosure, determining the first duration of the tracking target object entering the fire area includes:
[0027] If the tracking target object is located in the first area in the second video frame, the duration between the second moment and the first moment is determined as the first duration of the tracking target object entering the fire area.
[0028] In the embodiment of the present disclosure, after determining that the tracking target object starts from the air call replacement area, the first total time duration of entering the fire scene area multiple times includes:
[0029] If the tracking target body starts from the air call change area and travels back and forth between the monitoring area and the fire area multiple times, the first duration of the tracking target body entering the fire area each time is calculated, and the first durations of multiple entries into the fire area are superimposed and summed to determine the first total duration of the tracking target body entering the fire area multiple times after starting from the air call change area.
[0030] In the embodiment of the present disclosure, after determining that the tracking target object is the first target object, the method further includes:
[0031] Determine the number of times the tracking target object has completed an operation; wherein one operation completion refers to the process in which the tracking target object moves from the air call change area to the fire area, and then returns from the fire area to the air call change area;
[0032] If the number of times the job is completed is greater than a preset number, the tracking target object is set as the third target object.
[0033] The disclosed embodiment determines whether to set the tracked target as the third target by tracking the number of completed operations of the target, which can allow senior firefighters who are exhausted to rest, thereby reducing the occurrence of accidents at the fire scene due to physical exhaustion of firefighters.
[0034] In an embodiment of the present disclosure, the method further includes:
[0035] Determine the length of time the third target object stays in the air call replacement area;
[0036] If the stay time is longer than the preset rest time, the third target object is reset to the first target object.
[0037] The disclosed embodiment determines the duration of stay of the third target object in the air call change area; if the tracked target object is located in the second area in the second video frame, the duration from the second moment to the first moment is determined as the duration of stay in the air call change area; if the stay duration is greater than the preset rest duration, the third target object is reset to the first target object, which can enable senior firefighters who are in a tired state to promptly devote themselves to the rescue and emergency work at the fire scene after a period of rest, thereby improving the efficiency of fire rescue work to a certain extent.
[0038] The embodiment of the second aspect of the present disclosure provides an automatic alarm device, comprising:
[0039] A target detection module, used to perform target detection on a current video frame of a monitoring area to obtain at least one target object; the monitoring area is located between the air call replacement area and the fire area;
[0040] A tracking target body judgment module, used for judging whether any tracking target body in a tracking set exists in the at least one target body; the tracking set includes a plurality of tracking target bodies;
[0041] a fire scene entry determination module, configured to determine whether the tracked target object has entered the fire scene area if the tracked target object does not exist in the at least one target object;
[0042] A first target object determination module, used for determining whether the tracked target object is a first target object if the tracked target object enters the fire scene area;
[0043] A first duration determination module, configured to determine a first duration of time that the tracked target object enters the fire scene area if the tracked target object is the first target object;
[0044] A first total duration determination module, for determining, if the tracking target is the first target, a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area;
[0045] The first alarm information generating module is used to send a first alarm information to the tracking target if the first time duration is equal to or greater than a preset air-exhalation-supply time duration.
[0046] An embodiment of the third aspect of the present disclosure provides an electronic device, which includes a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the automatic alarm method described in the first aspect by executing the computer instructions.
[0047] An embodiment of the fourth aspect of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the automatic alarm method described in the first aspect.
[0048] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will become apparent from the following description or be learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present disclosure. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.
[0050] In the attached picture:
[0051] Figure 1 A schematic diagram of a flow chart of an automatic alarm method provided by an embodiment of the present disclosure is shown;
[0052] Figure 2 A schematic diagram showing the distribution of various regions provided by an embodiment of the present disclosure is shown;
[0053] Figure 3 A schematic diagram of target detection provided by an embodiment of the present disclosure is shown;
[0054] Figure 4 A schematic diagram showing a flow chart of another automatic alarm method provided by an embodiment of the present disclosure;
[0055] Figure 5 A schematic diagram showing a flow chart of another automatic alarm method provided by an embodiment of the present disclosure;
[0056] Figure 6 A schematic diagram showing the completion of a job provided by an embodiment of the present disclosure is shown;
[0057] Figure 7 A schematic diagram of determining whether a tracking target object has entered a fire area provided by an embodiment of the present disclosure is shown;
[0058] Figure 8 A schematic diagram showing a flow chart of another automatic alarm method provided by an embodiment of the present disclosure;
[0059] Fig. 9 A schematic diagram showing a flow chart of another automatic alarm method provided by an embodiment of the present disclosure;
[0060] Fig.10A schematic diagram of the structure of an automatic alarm device provided by an embodiment of the present disclosure is shown;
[0061] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown;
[0062] Fig.12 A schematic diagram of a storage medium provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0063] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0064] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present disclosure should have the common meanings understood by those skilled in the art to which the present disclosure belongs.
[0065] The following describes the technical scenarios involved in the embodiments of the present disclosure.
[0066] During the fire rescue process, due to the complex and changeable fire scene conditions, junior firefighters lack practical experience and insufficient rescue capabilities. They can only be responsible for simple basic work such as laying trunk lines, patrolling trunk lines, and peripheral security. Entering the fire scene will face huge risks. In fact, junior firefighters are theoretically not allowed to go to the front line of the fire scene within one year of joining the team. After a period of training and drills, they can enter the front line of the fire scene after officially becoming senior firefighters.
[0067] The related art provides an internal attack registration card, which consists of a timer, an identity plate, and a red, yellow, and green scale timing code. When in use, the fire safety officer inserts the internal attack firefighter identity plate into the internal attack registration device from the side of the device, which can quickly and accurately record the identity information of the internal attack personnel; the forward timer and the reverse timer can be used to record the time of entering and leaving the fire scene. In addition, the scale of the registration card can more intuitively record the remaining amount of air in the breath, and send out the evacuation signal in a timely and accurate manner.
[0068] However, the above method of recording the remaining amount of gas in the air breath through the registration card and sending out the evacuation signal in a timely and accurate manner is prone to inaccurate records when there are a large number of firefighters and the workload of the fire safety officer increases. In addition, the fire safety officer needs to keep an eye on the timer at all times, which makes it difficult for him to observe other dangerous situations at the fire scene, and may even affect the fire safety officer's work of judging the fire scene situation and formulating combat plans. At the same time, it does not take into account the situation that junior firefighters cannot enter the fire scene for rescue due to lack of combat experience and safety considerations.
[0069] In order to completely free the fire safety officers from the job of closely watching the timer and to devote more time and energy to fire scene situation judgment and battle plan construction, the disclosed embodiment provides an automatic alarm method to assist fire safety officers. The method uses in-video target tracking technology to automatically record the time for each firefighter to enter and exit the fire scene to change air calls through the camera screen, and issues an alarm at the specified time, thereby reducing errors in human recording and the workload of fire safety officers, allowing fire safety officers to devote more time and energy to fire scene situation judgment and battle plan construction.
[0070] According to an embodiment of the present disclosure, an automatic alarm method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0071] In this embodiment, an automatic alarm method is provided. Figure 1 is a flow chart of an automatic alarm method according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:
[0072] Step S101, performing target detection on the current video frame of the monitoring area to obtain at least one target object.
[0073] In the step, the target body refers to the firefighter, and the monitoring area is located between the air breathing apparatus replacement area and the fire scene area. The air breathing apparatus replacement area refers to the area where the firefighter replaces the air breathing apparatus.
[0074] Specifically, Figure 2 As shown, by setting the camera between the fire area and the air call change area, the video data of the monitoring area (including multiple video frames arranged in chronological order) is acquired in real time, and at least one firefighter target is detected in each video frame.
[0075] In some embodiments, the paddleOCRv3 algorithm is used to detect the video data of the monitoring area in combination with the text detection + text recognition model, as follows:
[0076] Before entering the fire scene, firefighters usually set identity tags (such as name, affiliation, etc.) at specific locations (such as on their hats). The text detection + text recognition model is used to perform text detection and text recognition on the identity tags of each firefighter in each video frame to obtain a text target set; the text target set contains multiple text targets; thus, the identity information of each firefighter in the video frame is determined based on the multiple text targets, for example Figure 3 shown.
[0077] In some embodiments, after target detection is performed on the current video frame of the monitoring area and at least one target body is obtained, it is determined whether any one of the at least one target body exists in the tracking set. If not, the target body is added to the tracking set.
[0078] Specifically, through the multi-target tracking algorithm, multiple targets appearing in the video frame can be tracked and detected, and the new targets detected from the video frame will be added to the tracking set. The multi-target tracker has a tracking set, which contains multiple targets in the tracked state.
[0079] Step S102: for any tracking target object in the tracking set, determine whether the tracking target object exists in the at least one target object; the tracking set includes multiple tracking target objects.
[0080] Specifically, multiple tracking target objects in the tracking set are matched with at least one target object detected in the current video frame respectively, so as to determine which tracking target objects do not appear in the current video frame; if the tracking target object does not appear in the current video frame, it means that the tracking target object may be in the fire area or the air call change area. If it is in the fire area, it is necessary to further determine the length of time that the tracking target object enters the fire area, so as to determine whether to issue an alarm message based on the length of time.
[0081] Step S103: If the tracking target object does not exist in the at least one target object, determine whether the tracking target object enters the fire area.
[0082] In some embodiments, Figure 4 As shown, the above step S103 includes step S1031-step S1032:
[0083] Step S1031, determining a second duration between a first moment corresponding to the current video frame and a second moment corresponding to a second video frame; the second video frame is a video frame adjacent to the current video frame and containing the tracking target.
[0084] Specifically, the video data of the monitoring area is acquired in real time by a camera set in the monitoring area, thereby obtaining a video frame set, which includes multiple video frames arranged in chronological order (it can be shot every 1 second or every 0.5 second, with no limit on the interval time), and the last video frame in the set is the video frame shot at the current moment, and the other video frames in the set are shot before the current moment.
[0085] In this step, the first moment can be understood as the current moment, and the second moment can be understood as any moment before the current moment. The second video frame corresponding to the second moment can be understood as a video frame containing the tracking target object captured at a certain moment before the current moment, and the time difference between the video frame and the current video frame is the smallest, for example: the current video frame 1 is captured at 8:00 at the current moment, and the current video frame contains the tracking target object 1; video frames 2 and 3 containing the tracking target object 1 are also captured at 7:50 and 7:55 respectively; since the time difference between video frame 3 and the current video frame 1 is smaller, video frame 3 can be used as the second video frame.
[0086] Step S1032: If the second time duration is greater than or equal to the preset loss time duration, determine whether the tracked target object enters the fire area based on the second video frame.
[0087] Specifically, the preset loss duration can be set according to actual conditions and is not specifically limited here.
[0088] In some embodiments, Figure 5 As shown, the above step S1032 also includes steps 501 and 502:
[0089] Step 501: If the tracking target object is located in the first area in the second video frame, it is determined that the tracking target object enters the fire area.
[0090] Step 502: If the tracking target object is located in the second area in the second video frame, it is determined that the tracking target object enters the empty call change area.
[0091] In the above steps 501-502, if Figure 2 As shown, the video frame of the monitoring area includes a first area and a second area, wherein the first area is connected to the fire area, and the second area is connected to the air call replacement area.
[0092] In the embodiment of the present disclosure, considering that the cyclic motion trajectory of the target body is "air call replacement area → second area → first area → fire area → first area → second area → air call replacement area", as shown in FIG. Figure 6If there is a tracking target in the first area of the second video frame, and the second video frame is the closest to the current video frame and contains the tracking target, it can be determined that the movement trajectory of the tracking target after the second moment should be "first area → fire area", and then it can be determined that the tracking target enters the fire area, such as Figure 7 As shown by "a1" in . Assuming that the motion trajectory of the tracking target after the second moment is "first area → second area → air call change area", there should be a video frame 3, which should be closest to the current video frame compared to the second video frame and contain the tracking target. Obviously, there is no video frame 3, which means that the above assumption is not true. Therefore, the motion trajectory of the tracking target after the second moment should be "first area → fire area".
[0093] Similarly, if there is a tracking target in the second area of the second video frame, and the second video frame is the closest to the current video frame and contains the tracking target, then it is judged that the movement trajectory of the tracking target after the second moment should be "second area → air call change area", and then it can be determined that the tracking target enters the air call change area, such as Figure 7 As shown in “a2” in .
[0094] Step S104: if the tracking target object enters the fire scene area, determine whether the tracking target object is the first target object.
[0095] In some embodiments, the above step S104 includes steps S1041 and S1042:
[0096] Step S1041: if the tracking target object exists in the first target object set, determine that the tracking target object is the first target object.
[0097] Specifically, the first target object refers to a senior firefighter, and the first target object set includes identity information of multiple first target objects. If the identity information of the tracked target object appears in the first target object set, it can be determined that the tracked target object is the first target object.
[0098] Step S1042: if the tracking target does not exist in the first target set, determine that the tracking target is the second target or the third target.
[0099] Specifically, the second target and the third target have the same authority level to enter the fire area; the second target and the third target have lower authority levels to enter the fire area than the first target; the third target is the first target after the authority level is adjusted. There are two types of authority levels to enter the fire area, namely, the first level that allows entry into the fire area and the second level that prohibits entry into the fire area; the first target is at the first level, and the second and third target are at the second level.
[0100] More specifically, the second target can be understood as a junior firefighter, and the third target can be understood as a senior firefighter who is in a state of exhaustion. Among them, the state of exhaustion means that after a large amount of rescue work in a short period of time, the senior firefighter has consumed his physical strength to the upper limit and is in a state of exhaustion. If he continues to participate in firefighting and rescue operations, it will threaten his own safety and will also affect his combat efficiency and quality. Therefore, it is necessary to temporarily lower his authority level to enter the fire area and prohibit senior firefighters who are in a state of exhaustion from entering the fire area; after a period of rest and adjustment, the senior firefighters who are in a state of exhaustion will recover their energy, and their authority level to enter the fire area can be re-adjusted to allow them to enter the fire area again. Junior firefighters can only enter the front line of the fire scene after a period of training and drills and officially become senior firefighters.
[0101] In some specific embodiments, after the tracking target object has completed the air call replacement in the air call replacement area, the first total time duration of the tracking target object entering the fire scene area is reset to zero.
[0102] In some specific embodiments, when the number of operations in which the first target object continuously enters the fire scene area reaches a maximum number of operations, the first target object is set as the third target object.
[0103] More specifically, when the first target body has recovered its physical strength before reaching the maximum number of completed operations (ie, the stay time of the first target body exceeds the shortest rest time), the number of completed operations of the first target body is reset to zero.
[0104] Step S105: If the tracked target object is the first target object, determine a first duration of time that the tracked target object enters the fire area.
[0105] In some embodiments, the above step S105 includes step S1051:
[0106] Step S1051: If the tracking target is located in the first area in the second video frame, the duration from the second moment to the first moment is determined as the first duration of the tracking target entering the fire area.
[0107] Specifically, in the process of determining the first duration of the tracking target entering the fire area, it is necessary to first determine the moment when the tracking target enters the fire area through the above-mentioned step S501, that is, the second moment corresponding to the second video frame, and use it as the starting moment; then use the first moment corresponding to the current video frame as the ending moment; finally, the first duration of the tracking target entering the fire area can be determined through the starting moment and the ending moment, for example: the first duration = ending moment - starting moment.
[0108] Step S106: If the tracking target is the first target, determine a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area.
[0109] Specifically, if the tracking target starts from the air call change area and travels back and forth between the monitoring area and the fire area multiple times, the first duration of each entry of the tracking target into the fire area is calculated, and the first durations of multiple entries into the fire area are summed to obtain the first total duration.
[0110] Among them, through the above step S105, the first duration of each time the tracked target enters the fire area can be calculated, and the first durations of multiple times of the tracked target entering the fire area are summed to obtain the first total duration.
[0111] Step S107: If the first total time is equal to or greater than a preset air-exhalation-gas-supply time, a first alarm message is sent to the tracking target.
[0112] Specifically, the preset air-exhalation and air-supply time can be set according to the actual situation of the air respirator, and is not specifically limited here. For example, if the air respirator can support an exhalation time of 20 minutes, the preset air-exhalation and air-supply time can be set to 16 minutes; if the air respirator can support an exhalation time of 30 minutes, the preset air-exhalation and air-supply time can be set to 24 minutes.
[0113] More specifically, when it is determined that the first total time that the tracked target enters the fire area is equal to or greater than the preset air exhalation and gas supply time, an alarm of timeout for entering the fire scene can be issued to the tracked target, and the name of the firefighter target will be displayed on the screen, and the fire safety officer will be reminded at the same time.
[0114] In some embodiments, the method further comprises:
[0115] Step b1: if the tracking target is the second target or the third target, sending a second warning message to the tracking target.
[0116] Specifically, if the firefighter is a junior firefighter, an alarm is issued that the junior firefighter has entered the fire scene, the name of the firefighter target is displayed on the screen, and the fire safety officer is reminded at the same time; if the firefighter target is in a tired state, an alarm is issued that a senior firefighter who has consumed his physical strength to the upper limit has entered the fire scene, the name of the firefighter target is displayed on the screen, and the fire safety officer is reminded at the same time.
[0117] In some embodiments, Figure 8 As shown, after determining that the tracking target object is the first target object, the method further includes:
[0118] Step S801, determining the number of times the operation of the tracking target object is completed.
[0119] Specifically, one operation is completed when the tracking target moves from the air call replacement area to the fire area, and then returns from the fire area to the air call replacement area. Figure 6 shown.
[0120] In some embodiments, the completion of a tracking operation of the target object may be determined by:
[0121] When there are several video frames 1, video frame 2, video frame 3, several video frames 4, video frame 5, video frame 6 and several video frames 7 arranged in time sequence, it can be determined that the tracking target has completed a task. The details are as follows:
[0122] There is no tracking target in several video frames 1, and the tracking target in video frame 2 is located in the second area. It can be seen from several video frames 1 and video frames 2 that the tracking target enters the second area from the air call change area. Among them, there is no tracking target in video frame 1, indicating that the tracking target is in a lost state during this period, that is, the tracking target is located in the air call change area.
[0123] The tracking target in video frame 3 is located in the first area, the tracking target does not exist in several video frames 4, and the tracking target in video frame 5 is located in the first area. It can be seen from video frame 3, several video frames 4, and video frame 5 that the tracking target enters the fire area from the first area and returns to the first area from the fire area. Among them, there is no tracking target in video frame 4, indicating that the tracking target is lost during this period, that is, the tracking target is located in the fire area.
[0124] The tracking target in video frame 6 is located in the second area, and the tracking target does not exist in several video frames 7. It can be seen from video frame 6 and several video frames that the tracking target enters the air call replacement area from the second area. Among them, the tracking target does not exist in video frame 7, indicating that the tracking target is in a lost state during this period, that is, the tracking target is located in the air call replacement area.
[0125] It can be seen from the above multiple video frames that the tracking target enters the fire area from the first area, and then returns to the first area from the fire area; then enters the air call change area from the second area, and then returns to the second area from the air call change area, completing an operation.
[0126] Whenever a job of the tracking target object is completed, the number of completed jobs of the tracking target object is set +1.
[0127] Step S802: If the number of times the job is completed is greater than a preset number, the tracking target object is set as the third target object.
[0128] Specifically, the preset number of times can be set according to the physical condition of each tracking target, and is not specifically limited here. If the number of completed operations of the tracking target exceeds the preset number of completed operations, which is max_finish, the number of completed operations of the high-level authority of the firefighter target is weakened.
[0129] In some embodiments, Fig. 9 As shown, the method further includes steps S901-S902:
[0130] Step S901, determining the length of time the third target object stays in the air call replacement area;
[0131] Specifically, if the tracking target is located in the second area in the second video frame, the duration from the second moment to the first moment is determined as the duration of stay in the air call change area.
[0132] Step S902: if the stay time is longer than the preset rest time, the third target object is reset to the first target object.
[0133] In the above steps S901-S902, if the tracking target is converted from the first target to the third target because the number of completed operations is greater than the preset number; when the third target stays in the air call change area for longer than the preset rest time, that is, the shortest rest time min_relax, then the third target can be re-granted advanced permissions and adjusted to the first target.
[0134] The present disclosure also provides an automatic alarm method for assisting fire safety personnel, which specifically includes:
[0135] The first step is to set up a list of all firefighters in the fire station, including a list of senior firefighters and a list of junior firefighters;
[0136] The second step is to set up the camera between the fire scene and the air call replacement area to obtain video images of the monitoring scene in real time;
[0137] The third step is to detect the firefighter target in the monitoring scene video frame by frame;
[0138] S1. Use the paddleOCRv3 algorithm, combined with the text detection + text recognition model, to detect the surveillance scene video and return the text target set detected in the video frame;
[0139] The text target set includes multiple text targets, each of which includes information such as the text box center point position and text content;
[0140] S2. If the text content of a certain text target in the text target set is in the list of all firefighters in the fire station, the firefighter target is initialized according to the text content of the text target and stored in the firefighter target set of the current frame; otherwise, the target is determined to be a common text target;
[0141] The specific process of initializing the firefighter target is as follows:
[0142] Initialize the name of the firefighter target to the text content of the text target;
[0143] Initialize the position of the firefighter target when it was last detected as the center point position of the text target;
[0144] Initialize the time when the firefighter target was last detected as the current time;
[0145] If the firefighter target's name is on the senior firefighter list, the firefighter target is a senior firefighter, otherwise the firefighter target is a junior firefighter;
[0146] Sets whether the firefighter target is exhausted to false;
[0147] The exhaustion mentioned above means that due to a large amount of rescue work in a short period of time, the senior firefighters have consumed their physical strength to the upper limit and are in a state of exhaustion, which temporarily reduces their senior authority. After a period of rest and adjustment, the exhausted firefighters will recover their energy and can be re-granted senior authority.
[0148] Set the number of completed operations for the firefighter target to 0;
[0149] The number of completed operations refers to the complete process from the fire scene area to the air call replacement area experienced by the firefighter, which is counted as one completed operation;
[0150] Set the firefighter target to false if it does not enter the air call replacement area again after entering the fire area;
[0151] Set the time for the firefighter target to enter the fire area to 0;
[0152] Set whether the firefighter target is in the monitoring area to true;
[0153] The fourth step is to use a multi-target tracker to track the firefighter target. The specific steps are as follows:
[0154] S1: Initialize multi-object tracker
[0155] Set thresholds: the maximum loss duration is max_lost; the longest air breathing duration is max_oxygen; the shortest rest duration is min_relax; the maximum number of completed operations is max_finish;
[0156] Initialize the tracker: the target set of tracking firefighters is empty;
[0157] S2, using a multi-target tracking algorithm, matching all firefighter targets in the multi-target tracker with all firefighter targets detected in the current frame according to the firefighter target names;
[0158] S2-1, if a firefighter target in the multi-target tracker does not enter the air call replacement area again after entering the fire area is true, and whether the firefighter target is in the monitoring area is false, then the time the firefighter target enters the fire area is adjusted to the sum of the time the firefighter target originally entered the fire area and the time between the current time and the time when it was last detected, and enter S2-2; otherwise, directly enter S2-2;
[0159] S2-2, if a firefighter target in the multi-target tracker is matched successfully, the firefighter target attribute in the multi-target tracker is updated, and the updating process is as follows:
[0160] Set whether the firefighter is in the monitoring area to true;
[0161] Set the position of the firefighter target when it was last detected to the position of the firefighter target when it was last detected in the current frame;
[0162] Set the time of the firefighter's target to the current time;
[0163] If a firefighter target in the current frame is not matched successfully, the firefighter target is added to the multi-target tracker.
[0164] If a firefighter target in the multi-target tracker is not matched successfully, if the current time is longer than the maximum loss time max_lost from the time when the firefighter target was last detected, the firefighter target is determined to be lost and enter S2-3; otherwise, enter S2;
[0165] S2-3, if the position of the firefighter target when it was last detected is in the right half of the image, it is determined that the firefighter target has entered the fire scene area, and the process goes to S2-4; otherwise, it is determined that the firefighter target has entered the air call replacement area, and the process goes to S2-7;
[0166] S2-4, if the firefighter target is a junior firefighter, an alarm is issued that the junior firefighter has entered the fire scene area, and the name of the firefighter target is displayed on the screen, and the fire safety officer is reminded at the same time; if the firefighter target is in a tired state, an alarm is issued that a senior firefighter who has consumed the upper limit of physical strength has entered the fire scene area, and the name of the firefighter target is displayed on the screen, and the fire safety officer is reminded at the same time; otherwise, the firefighter target is a senior firefighter, and the process goes to S2-5; S2-5, set whether the firefighter target is in the monitoring area to false, and set whether the firefighter has not entered the air call replacement area again after entering the fire scene area to true, and go to S2-6; otherwise, no processing is done, and the process goes directly to S2-6;
[0167] S2-6. If the time between the current time and the time when the firefighter target was last detected plus the time the firefighter target has entered the fire scene area has exceeded the maximum air breathing gas supply time max_oxygen, an alarm that the firefighter has timed out from entering the fire scene area is issued, and the name of the firefighter target is displayed on the screen, and the fire safety officer is reminded at the same time, and the process goes to S2; otherwise, no processing is done and the process goes directly to S2;
[0168] S2-7, if the firefighter target is a senior firefighter, set the time for the firefighter to enter the fire scene area to 0, and enter S2-8; otherwise, the firefighter target is a junior firefighter, no processing is done, and enter S2;
[0169] S2-8, if the current time is longer than the minimum rest time min_relax from the time when the firefighter target was last detected, then adjust the fatigue of the firefighter target to false, and set the number of completed operations of the firefighter target to 0, and enter S2-9; otherwise, do nothing, and enter S2-9;
[0170] S2-9, if the firefighter target has not entered the air call replacement area again after entering the fire scene area is true, then the number of completed operations of the firefighter target is set to be increased by 1, and the process goes to S2-10; otherwise, no processing is performed, and the process goes to S2-10;
[0171] S2-10, if the number of completed operations of the firefighter target exceeds the maximum number of completed operations, which is max_finish, the high-level authority of the firefighter target is weakened, and the number of completed operations of the firefighter target is set to 0, and the process goes to S2-11; otherwise, no processing is performed, and the process goes directly to S2-11;
[0172] S2-11, set whether the firefighter is in the monitoring area to false, whether he does not re-enter the air call replacement area after entering the fire area to false, and enter S2.
[0173] Corresponding to the implementation of the above automatic alarm method, the embodiment of the present disclosure also provides an automatic alarm device for executing the above Figures 1 to 9 The automatic alarm method described in any of the embodiments shown in the figure. Fig.10 As shown, the automatic alarm device comprises:
[0174] A target detection module, used to perform target detection on a current video frame of a monitoring area to obtain at least one target object; the monitoring area is located between the air call replacement area and the fire area;
[0175] A tracking target body judgment module, used for judging whether any tracking target body in a tracking set exists in the at least one target body; the tracking set includes a plurality of tracking target bodies;
[0176] a fire scene entry determination module, configured to determine whether the tracked target object has entered the fire scene area if the tracked target object does not exist in the at least one target object;
[0177] A first target object determination module, used for determining whether the tracked target object is a first target object if the tracked target object enters the fire scene area;
[0178] A first duration determination module, configured to determine a first duration of time that the tracked target object enters the fire scene area if the tracked target object is the first target object;
[0179] A first total duration determination module, for determining, if the tracking target is the first target, a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area;
[0180] The first alarm information generating module is used to send a first alarm information to the tracking target if the first total time is equal to or greater than a preset air-exhalation-supply time.
[0181] Optionally, the fire scene entry determination module is also used to: determine the second duration between the first moment corresponding to the current video frame and the second moment corresponding to the second video frame; the second video frame is a video frame adjacent to the current video frame and containing the tracked target object; if the second duration is greater than or equal to the preset loss duration, then determine whether the tracked target object has entered the fire scene area based on the second video frame.
[0182] Optionally, the fire scene entry determination module is also used to: if the tracking target object is located in the first area in the second video frame, determine that the tracking target object has entered the fire scene area; the first area is connected to the fire scene area; if the tracking target object is located in the second area in the second video frame, determine that the tracking target object has entered the air call change area; the second area is connected to the air call change area.
[0183] Optionally, the device also includes: a second alarm information sending module, which is used to send a second alarm information to the tracking target if the tracking target is the second target or the third target; wherein the second target and the third target have the same authority level to enter the fire area; the authority level of the second target is lower than the authority level of the first target; and the third target is the first target after the authority level is adjusted.
[0184] Optionally, the first duration determination module is also used to: if the tracking target object is located in the first area in the second video frame, determine the duration between the second moment and the first moment as the first duration of the tracking target object entering the fire area.
[0185] Optionally, the first total duration determination module is also used for: if the tracking target body starts from the air call change area and travels back and forth between the monitoring area and the fire area multiple times, then the first duration of each entry of the tracking target body into the fire area is calculated, and the first durations of multiple entries into the fire area are superimposed and summed to determine the first total duration of the multiple entries into the fire area after the tracking target body starts from the air call change area.
[0186] Optionally, the device further comprises:
[0187] The operation completion number determination module is used to determine the operation completion number of the tracking target object; wherein one operation completion refers to the process of the tracking target object moving from the air call change area to the fire area, and then returning from the fire area to the air call change area;
[0188] The third target object setting module is used to set the tracking target object as the third target object if the number of times the job is completed is greater than a preset number.
[0189] Optionally, the device further comprises:
[0190] A stay duration determination module, used to determine the stay duration of the third target object in the air call replacement area;
[0191] The first target object setting module is used to reset the third target object to the first target object if the stay time is longer than the preset rest time.
[0192] The automatic alarm device provided by the above-mentioned embodiment of the present disclosure and the automatic alarm method provided by the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0193] The present disclosure also provides an electronic device to execute the above automatic alarm method. Fig.11 , which shows a schematic diagram of an electronic device provided by some embodiments of the present disclosure. Fig.11 As shown, the electronic device 11 includes: a processor 1100, a memory 1101, a bus 1102 and a communication interface 1103, wherein the processor 1100, the communication interface 1103 and the memory 1101 are connected via the bus 1102; the memory 1101 stores a computer program that can be run on the processor 1100, and the processor 1100 executes the aforementioned Figures 1 to 9 An automatic alarm method is provided by any of the illustrated embodiments.
[0194] The memory 1101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 1103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0195] The bus 1102 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 1101 is used to store programs. After receiving the execution instruction, the processor 1100 executes the program. Figures 1 to 9 The automatic alarm method disclosed in any of the illustrated embodiments may be applied to the processor 1100 or implemented by the processor 1100 .
[0196] The processor 1100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1100 or the instruction in the form of software. The above processor 1100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1101, and the processor 1100 reads the information in the memory 1101 and completes the steps of the above method in combination with its hardware.
[0197] The electronic device provided by the embodiment of the present disclosure and the automatic alarm method provided by the embodiment of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented by them.
[0198] The present disclosure also provides a computer-readable storage medium corresponding to the automatic alarm method provided in the above embodiment. Fig.12 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the automatic alarm method provided by any of the aforementioned embodiments will be executed.
[0199] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0200] The computer-readable storage medium provided by the above-mentioned embodiments of the present disclosure and the automatic alarm method provided by the embodiments of the present disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0201] It should be noted that:
[0202] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.
[0203] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present disclosure, the various features of the present disclosure are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed disclosure requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present disclosure.
[0204] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of this disclosure and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0205] The above is only a preferred specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. An automatic alarm method, characterized in that: The method comprises: Performing target detection on a current video frame of a monitoring area to obtain at least one target object; the monitoring area is located between an air call replacement area and a fire scene area; For any tracking target object in the tracking set, determining whether the tracking target object exists in the at least one target object; the tracking set includes multiple tracking target objects; If the tracking target object does not exist in the at least one target object, determining whether the tracking target object enters the fire scene area; If the tracking target object enters the fire scene area, determining whether the tracking target object is the first target object; If the tracking target object is the first target object, determining a first time length of time that the tracking target object enters the fire scene area; If the tracking target is the first target, determining a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area; If the first total time is equal to or greater than a preset air-exhalation-supply time, a first alarm message is sent to the tracking target.
2. The method according to claim 1, characterized in that The step of determining whether the tracking target object has entered the fire scene area includes: Determine a second duration between a first moment corresponding to the current video frame and a second moment corresponding to a second video frame; the second video frame is a video frame adjacent to the current video frame and containing the tracking target; If the second time duration is greater than or equal to the preset loss time duration, it is determined based on the second video frame whether the tracked target object enters the fire area.
3. The method according to claim 2, characterized in that The determining, based on the second video frame, whether the tracked target object has entered the fire area includes: If the tracking target object is located in the first area in the second video frame, it is determined that the tracking target object enters the fire area; the first area is connected to the fire area; If the tracking target object is located in the second area in the second video frame, it is determined that the tracking target object enters the air call change area; and the second area is connected to the air call change area.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: If the tracked target is the second target or the third target, a second alarm message is sent to the tracked target; wherein, the second target and the third target have the same authority level to enter the fire area; the authority level of the second target is lower than the authority level of the first target; and the third target is the first target after the authority level is adjusted.
5. The method according to claim 3, characterized in that: Determining a first duration of the tracking target object entering the fire scene area includes: If the tracking target object is located in the first area in the second video frame, the duration between the second moment and the first moment is determined as the first duration of the tracking target object entering the fire area.
6. The method according to claim 5, characterized in that After determining that the tracking target object starts from the air call replacement area, the first total time duration of entering the fire scene area multiple times includes: If the tracking target body starts from the air call change area and travels back and forth between the monitoring area and the fire area multiple times, the first duration of the tracking target body entering the fire area each time is calculated, and the first durations of multiple entries into the fire area are superimposed and summed to determine the first total duration of the tracking target body entering the fire area multiple times after starting from the air call change area.
7. The method according to claim 4, characterized in that After determining that the tracking target object is the first target object, the method further includes: Determine the number of times the tracking target object has completed an operation; wherein one operation completion refers to the process in which the tracking target object moves from the air call change area to the fire area, and then returns from the fire area to the air call change area; If the number of times the job is completed is greater than a preset number, the tracking target object is set as the third target object.
8. The method according to claim 7, characterized in that The method further comprises: Determine the length of time the third target object stays in the air call replacement area; If the stay time is longer than the preset rest time, the third target object is reset to the first target object.
9. An automatic alarm device, characterized in that: The device comprises: A target detection module, used to perform target detection on a current video frame of a monitoring area to obtain at least one target object; the monitoring area is located between the air call replacement area and the fire area; A tracking target body judgment module, used for judging whether any tracking target body in a tracking set exists in the at least one target body; the tracking set includes a plurality of tracking target bodies; a fire scene entry determination module, configured to determine whether the tracked target object has entered the fire scene area if the tracked target object does not exist in the at least one target object; A first target object determination module, used for determining whether the tracked target object is a first target object if the tracked target object enters the fire scene area; A first duration determination module, configured to determine a first duration of time that the tracked target object enters the fire scene area if the tracked target object is the first target object; A first total duration determination module, for determining, if the tracking target is the first target, a first total duration of the tracking target entering the fire scene area multiple times after starting from the air call replacement area; The first alarm information generating module is used to send a first alarm information to the tracking target if the first time duration is equal to or greater than a preset air-exhalation-supply time duration.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the automatic alarm method according to any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the automatic alarm method according to any one of claims 1 to 8.
