Fire fighting access occupation detection method and device, electronic equipment and storage medium
By performing object detection and in-depth data analysis on the video stream of the fire passage, the problem of inaccurate fire passage occupation detection in traditional methods is solved, and efficient and accurate occupation detection and early warning is achieved.
Patent Information
- Application Number
- CN202510537136.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The traditional fire passage occupation detection method is based on two-dimensional planes and cannot effectively deal with complex situations in three-dimensional space, resulting in mis-checking and missed inspections, posing safety hazards.
By acquiring image frames in the video stream, object detection is performed and depth data is determined, area occupancy detection results are determined in combination with the first depth data and the second depth data, and early warning information is generated when the duration of continuous occupation meets the warning conditions.
Improve the accuracy of fire passage occupation detection, avoid false alarms, and ensure that early warnings are generated in a timely manner when fire passages are occupied.
Smart Images

Figure CN120431508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic detection technology, and in particular to a fire passage occupancy detection method, device, electronic equipment and storage medium. Background Art
[0002] Fire escape occupancy detection technology is crucial for factory safety, residential and public space monitoring, and other areas. If fire escapes are blocked by debris, vehicles, or other objects, they can pose a significant threat to life and property.
[0003] Traditional fire lane occupancy detection methods are mostly based on two-dimensional plane boundary demarcation and cannot effectively handle complex situations in three-dimensional space, such as passing vehicles and approaching piles of debris. Current fire lane occupancy detection algorithms are based on two-dimensional image detection models, which cannot accurately detect fire lane occupancy, are prone to false detection and missed detection, and pose safety risks. Summary of the Invention
[0004] The present invention provides a fire passage occupancy detection method, device, electronic equipment and storage medium to solve the problem of inaccurate detection of fire passage occupancy.
[0005] According to one aspect of the present invention, a method for detecting fire passage occupancy is provided, comprising:
[0006] Acquire a first image frame in the video stream, where the first image frame includes a target detection area, where the target detection area is an area where a fire passage is located;
[0007] Performing target detection on the first image frame to obtain a target detection result;
[0008] When the target detection result indicates that the detection object exists, determining first depth data corresponding to the detection object in the first image frame;
[0009] Acquire second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state;
[0010] When the area occupancy detection result is occupied, the continuous occupation time of the target detection area by the detection object is determined, and an early warning message is generated when the continuous occupation time meets the early warning condition, and an early warning operation is performed based on the early warning message.
[0011] Optionally, target detection is performed on the first image frame to obtain a target detection result, including: calling a pre-trained target detection model, performing target detection on the first image frame through the pre-trained target detection model, and obtaining a target recognition result, wherein the target recognition result includes a target object type; obtaining a preset detection object type, and matching the preset detection object types based on the target object type to obtain a matching result corresponding to the target object type; if the matching result is a successful match, determining that the target detection result is that the detection object exists in the target detection area; if the matching result is a failed match, determining that the target detection result is that the detection object does not exist in the target detection area.
[0012] Optionally, determining the first depth data of the detection object in the first image frame includes: calling a pre-trained monocular depth estimation model, processing the first image frame based on the pre-trained monocular depth estimation model to obtain depth data corresponding to the first image frame; and extracting the first depth data of the detection object from the depth data corresponding to the first image frame.
[0013] Optionally, determining the area occupancy detection result of the target detection area based on the first depth data and the second depth data includes: traversing the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area, comparing the first depth data and the second depth data of the same position point, and determining the depth difference corresponding to each position point; when the depth difference of any position point in the target detection area is less than a preset depth difference threshold, determining that the position point is in an occupied state; determining the number of position points in the target detection area that are in an occupied state, and if the number is greater than or equal to the preset number threshold, determining that the area occupancy detection result corresponding to the target detection area is occupied.
[0014] Optionally, determining an area occupancy detection result of the target detection area based on the first depth data and the second depth data includes: determining an overlapping area between the detection object and the target detection area based on the first depth data and the second depth data, determining a first average depth value based on the first depth data corresponding to the overlapping area, and determining a second average depth value based on the second depth value corresponding to the overlapping area; determining an average depth difference based on the first average depth value and the second average depth value; when the average depth difference is greater than or equal to a preset depth difference threshold, determining that the area occupancy detection result of the target detection area is occupied.
[0015] Optionally, determining the continuous occupation time of the target detection area by the detection object includes: obtaining a second image frame in the video stream, the second image frame being located after the first image frame; obtaining a first detection frame corresponding to the detection object in the target detection result corresponding to the first image frame; performing target detection on the second image frame, and determining a second detection frame of the detection object in the second image frame; determining an intersection-and-union ratio (IoU) of the first detection frame and the second detection frame; if the IoU is greater than or equal to a preset IoU threshold, updating the continuous occupation time based on the time interval between the second image frame and the first image frame; if the IoU is less than the preset IoU threshold, resetting the continuous occupation time.
[0016] Optionally, the method also includes: obtaining a capture scene of the video stream, and obtaining second depth data of the target detection area in the capture scene; the video stream capture conditions are different in different capture scenes; wherein, a method for determining the second depth data of the target detection area in different capture scenes includes: obtaining a third image frame of the target detection area in different capture scenes, wherein the target detection area is in an unoccupied state in the third image frame; processing the third image frame based on a pre-trained monocular depth estimation model to obtain the second depth data of the target detection area in different capture scenes.
[0017] According to another aspect of the present invention, there is provided a fire passage occupancy detection device, comprising:
[0018] An image frame acquisition module is used to acquire a first image frame in a video stream, where the first image frame includes a target detection area, where the target detection area is an area where a fire passage is located;
[0019] A target detection result determination module is used to perform target detection on the first image frame to obtain a target detection result;
[0020] A first depth data determining module is configured to determine first depth data corresponding to the detection object in the first image frame when the target detection result indicates that the detection object exists;
[0021] an area occupancy detection result determination module, configured to obtain second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state;
[0022] The early warning processing module is used to determine the continuous occupation time of the target detection area by the detection object when the area occupancy detection result is occupied, generate early warning information when the continuous occupation time meets the early warning conditions, and perform early warning operations based on the early warning information.
[0023] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0024] at least one processor; and
[0025] a memory communicatively connected to at least one processor; wherein,
[0026] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the fire passage occupancy detection method of any embodiment of the present invention.
[0027] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the fire passage occupancy detection method of any embodiment of the present invention when executed.
[0028] The technical solution of the embodiment of the present invention is as follows: by acquiring a first image frame in a video stream, the first image frame includes a target detection area, and the target detection area is the area where the fire passage is located; performing target detection on the first image frame to obtain a target detection result, thereby realizing extracting image frames from the video stream and performing target detection, thereby obtaining a target detection result, and providing a data basis for subsequently determining an area occupancy detection result; when the target detection result is that a detection object exists, determining the first depth data corresponding to the detection object in the first image frame, realizing that when the target detection result is that a detection object exists, the first depth data is determined again, thereby avoiding depth information extraction for image frames where no detection object exists, and avoiding waste of computing resources; obtaining second depth data corresponding to the target detection area, and determining an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is the calibrated depth data of the target detection area in an unoccupied state, thereby realizing determining the area occupancy detection result of the target detection area based on the two depth data, which helps to improve the accuracy of the area occupancy detection result;
[0029] When the area occupancy detection result is occupied, the continuous occupation time of the target detection area by the detection object is determined, and warning information is generated when the continuous occupation time meets the warning conditions. The warning operation is performed based on the warning information. In the case where the area occupancy detection result is occupied, the occupation time is further determined, and warning information is generated according to the occupation time. This can effectively avoid the problem of false alarms of detection objects passing through the target detection area, solve the problems of inaccurate and false alarms in fire passage occupancy detection, and improve the accuracy of fire passage occupancy detection.
[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 This is a flow chart of a fire passage occupancy detection method provided in Example 1 of the present invention;
[0033] Figure 2 This is a flow chart of a fire passage occupancy detection method provided in Example 2 of the present invention;
[0034] Figure 3 This is a flow chart of a fire passage occupancy detection method provided in Example 3 of the present invention;
[0035] Figure 4 This is a structural diagram of a fire passage occupancy detection device provided in a fourth embodiment of the present invention;
[0036] Figure 5 It is a structural diagram of an electronic device for implementing the fire passage occupancy detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] Example 1
[0040] Figure 1 This is a flow chart of a fire passage occupancy detection method provided by the first embodiment of the present invention. This embodiment is applicable to the case of fire passage occupancy detection. The method can be executed by a fire passage occupancy detection device. The fire passage occupancy detection device can be implemented in the form of hardware and / or software. The fire passage occupancy detection device can be configured in electronic devices such as computers and servers. Figure 1 As shown, the method includes:
[0041] S110: Acquire a first image frame in a video stream, where the first image frame includes a target detection area, and the target detection area is an area where a fire passage is located.
[0042] The video stream specifically refers to video data obtained by capturing the fire escape area to be inspected using a camera. In this embodiment, the camera may be a monocular camera. The first image frame may be understood as a single image frame extracted from the video stream. The target detection area may be understood as the area where occupancy detection is required. In this embodiment, the target detection area is the fire escape area.
[0043] Specifically, a monocular camera can be installed near the fire escape area to monitor the fire escape area in real time and obtain a video stream corresponding to the fire escape area. The video stream can be sampled at a preset sampling frequency, and the image frame corresponding to the sampled timestamp closest to the current moment is determined as the first image frame. The first image frame includes the target detection area, i.e., the area where the fire escape is located.
[0044] S120: Perform target detection on the first image frame to obtain a target detection result.
[0045] Among them, the target detection result can be specifically understood as the result output by identifying and locating a specific target object in an image, which usually includes the detected object category and location information. The location information can be the bounding box coordinates. The image content can be analyzed by the target detection algorithm to determine the existence of the target object in the image and its precise location in the scene, and finally present the result in the form of structured data. In this embodiment, the target detection result specifically refers to the information whether there is a target object in the target detection area. If there is a target object, the target detection result includes the object category and location information of the target object. If there is no target object, the target detection result is empty.
[0046] Specifically, a target detection algorithm is called, and the first image frame is analyzed and processed by the target detection algorithm to detect whether the first image frame includes a target object. When a target object is detected, a target detection frame and a target category corresponding to the target object can be output, and the target detection frame and the target category corresponding to the detected target object are used as target detection results and output.
[0047] Optionally, performing target detection on the first image frame to obtain a target detection result includes: calling a pre-trained target detection model, performing target detection on the first image frame using the pre-trained target detection model, and obtaining a target recognition result. The target recognition result includes a target object type; obtaining a preset detection object type, and matching the target object type among the preset detection object types based on the target object type to obtain a matching result corresponding to the target object type; if the matching result is a successful match, determining that the target detection result indicates that the detection object exists in the target detection area; and if the matching result is a failed match, determining that the target detection result indicates that the detection object does not exist in the target detection area.
[0048] Specifically, a pre-trained target detection model is called, and the first image frame is input into the pre-trained target detection model. After being processed by the target detection model, the target object type of the target object is output when the target object is detected. When the target object type of the target object is detected, the preset detection object type is obtained from the preset storage space. It should be noted that the preset detection object type corresponding to different scenes will be different and is specifically set according to the actual detection scene. The target object type is then matched with the preset detection object type. If the match is successful, the target detection result is determined to be that the detection object exists in the target detection area. If the match fails, the target detection result is determined to be that the detection object does not exist in the target detection area. The target object identified in the image frame can be removed from the target detection area, such as trees, signboards, and buildings next to the fire passage area. Only the target objects that appear in the target detection area are detected, which helps to improve the accuracy of the fire passage occupancy detection results and reduce the problem of false alarms.
[0049] S130 : When the target detection result indicates that a detection object exists, determine first depth data corresponding to the detection object in the first image frame.
[0050] Among them, the first depth data can be specifically understood as the distance data representing each point in the image relative to the camera. The image can be processed by a depth estimation algorithm to obtain the depth data corresponding to the image. Among them, the depth estimation algorithm can be a depth estimation model based on deep learning. The depth estimation model is trained with a large amount of image data to learn the mapping relationship between image features and depth information, so that it can output a depth map corresponding to the monocular image. The value of each pixel in the map represents the depth information of the point in the scene, and different depths are visualized in the form of grayscale values or color coding.
[0051] Specifically, when the target detection result is that there is a detection object, the depth estimation algorithm is called, the first image frame is processed by the depth estimation algorithm, and the depth data of each pixel in the first image frame is estimated, thereby obtaining the first depth data corresponding to the detection object in the first image frame.
[0052] Optionally, determining the first depth data of the detection object in the first image frame includes: calling a pre-trained monocular depth estimation model, processing the first image frame based on the pre-trained monocular depth estimation model, and obtaining depth data corresponding to the first image frame; extracting the first depth data of the detection object from the depth data corresponding to the first image frame.
[0053] Specifically, a pre-trained monocular depth estimation model is called, and the first image frame is input into the monocular depth estimation model. The first image frame is processed by the monocular depth estimation model, and various features in the first image frame are automatically extracted. Based on the mapping relationship between the learned features and the depth, the depth value of each pixel in the first image frame is predicted, and finally a depth map of the same size as the input first image frame is output, wherein the value of each pixel represents the depth information of the point relative to the camera in the actual scene, thereby realizing the conversion from monocular image to depth data. Furthermore, according to the position data corresponding to the detection object in the target detection result, the depth data corresponding to the first image frame is matched to obtain the first depth data of the detection object.
[0054] In this embodiment, the image is processed by a depth estimation model to determine the depth data corresponding to the image. There is no need to use complex and expensive depth perception equipment. The cost is low, the method is highly flexible, and it can be widely used in various scenarios. It is not restricted by special environmental conditions. With the help of advanced deep learning algorithms, depth data can be quickly generated to meet application scenarios with high real-time requirements, which helps to improve the efficiency and accuracy of determining the occupancy detection results of fire passages.
[0055] S140 : Acquire second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data.
[0056] The second depth data is the calibrated depth data of the target detection area when it is unoccupied. A corresponding image can be captured when the target detection area is unoccupied by any person or object, and depth estimation processing can be performed on the image to obtain the second depth data corresponding to the target detection area. The obtained second depth data can be stored in a preset storage space. When occupancy detection is required for the target detection area, matching can be performed based on the target detection area to obtain the second depth data corresponding to the target detection area.
[0057] Specifically, a match is performed in a preset storage space according to the location information or name identifier corresponding to the target detection area to obtain second depth data corresponding to the target detection area. The first depth data and the second depth data can be compared to determine the overlapping area. The area occupancy detection result of the target detection area can be determined based on the depth difference of the overlapping area. For example, it can be set that if the depth difference exceeds a preset threshold, the area occupancy detection result of the target detection area is determined to be occupied; if the depth difference does not exceed the preset threshold, the area occupancy detection result of the target detection area is determined to be unoccupied.
[0058] In this embodiment, the area occupancy detection result of the target detection area is determined in combination with the first depth data and the second depth data, and the second depth data is the calibrated depth data of the target detection area in an unoccupied state, which can effectively remove the detection objects that are not in the fire passage, thereby helping to improve the accuracy of the area occupancy detection results and reduce the problem of false alarms.
[0059] S150: When the area occupancy detection result is occupied, determine the continuous occupation time of the target detection area by the detection object, generate warning information when the continuous occupation time meets the warning condition, and perform a warning operation based on the warning information.
[0060] It should be noted that objects that briefly pass through the target detection area need to be identified to reduce false alarms. This can be done by calculating the duration of continuous occupancy of the target detection area by the detected object, and then further verifying the occupancy detection results of the target detection area based on the continuous occupancy duration. The warning condition specifically represents the condition set to determine whether the duration of occupancy of the target detection area by the detected object meets the requirements for warning. It can be set according to the occupancy detection situation in the actual scenario and is not limited here.
[0061] Specifically, when the area occupancy detection result is occupied, the continuous occupation duration calculation method is called to determine the continuous occupation duration of the target detection area by the detection object, and then the continuous occupation duration is compared with the preset duration threshold corresponding to the warning condition. If the continuous occupation duration is greater than the preset duration threshold, it is determined that the continuous occupation duration meets the warning condition. If the continuous occupation duration is less than or equal to the preset duration threshold, it is determined that the continuous occupation duration does not meet the warning condition. When the continuous occupation duration meets the warning condition, the corresponding warning information is generated according to the warning information template, and the corresponding warning operation is performed according to the warning information. For example, the warning information can be broadcasted or uploaded to the management platform, and the relevant personnel will determine whether the relevant staff need to arrive at the scene to clear the obstacles based on the warning information.
[0062] Optionally, determining the continuous occupation time of the target detection area by the detection object includes: obtaining a second image frame in the video stream, the second image frame being located after the first image frame; obtaining a first detection frame corresponding to the detection object in the target detection result corresponding to the first image frame; performing target detection on the second image frame, and determining a second detection frame of the detection object in the second image frame; determining an intersection-and-union ratio (IoU) of the first detection frame and the second detection frame; if the IoU is greater than or equal to a preset IoU threshold, updating the continuous occupation time based on the time interval between the second image frame and the first image frame; if the IoU is less than the preset IoU threshold, resetting the continuous occupation time.
[0063] Specifically, when an occupancy detection result of an object detection area determined based on a first image frame indicates that the object is occupied, a second image frame immediately adjacent to the first image frame in the video stream is obtained, wherein the second image frame is located after the first image frame in time sequence. It should be noted that the second image frame may include multiple image frames. A first detection frame of the detected object is obtained from the object detection result of the first image frame, and object detection processing is performed on the next image frame immediately adjacent to the first image frame to obtain a second detection frame of the detected object in the image frame. An intersection-and-union (IoU) of the first detection frame and the second detection frame is calculated, and it is determined whether the IoU determined this time is greater than or equal to a preset IoU threshold. If the IoU is greater than or equal to the preset IoU threshold, the continuous occupancy duration is updated based on the time interval between the second image frame and the first image frame, i.e., the time interval and the continuous occupancy duration are summed, and the resulting sum is assigned to the continuous occupancy duration. If the IoU is less than the preset IoU threshold, the continuous occupancy duration is reset. It should be noted that after the continuous occupancy time is updated, a second image frame may be acquired to further determine the IoU, and to determine whether the current IoU is greater than or equal to a preset IoU threshold. If so, the continuous occupancy time is updated again. Preferably, after each update of the continuous occupancy time, it is determined whether the updated continuous occupancy time satisfies a warning condition. If so, a warning message is generated, and a warning operation is executed based on the warning message.
[0064] Based on the above embodiments, the method also includes: obtaining the acquisition scene of the video stream, and obtaining the second depth data of the target detection area in the acquisition scene; the video stream acquisition conditions are different in different acquisition scenes; wherein, the method for determining the second depth data of the target detection area in different acquisition scenes includes: obtaining a third image frame of the target detection area in different acquisition scenes, and the target detection area in the third image frame is in an unoccupied state; processing the third image frame based on a pre-trained monocular depth estimation model to obtain the second depth data of the target detection area in different acquisition scenes.
[0065] The video stream acquisition scenario refers to the comprehensive environmental context in which the camera captures video data. To better detect whether a fire escape is occupied, it is necessary to acquire video stream data from a scenario in which the fire escape is unoccupied, thereby determining the corresponding depth data and providing accurate reference data for detecting fire escape occupancy. In this embodiment, the video stream acquisition scenario is a scenario in which the target detection area is free of any obstacles, vehicles, or other detection objects. The corresponding video stream acquisition condition is also set to ensure that the target detection area is unoccupied. The third image frame specifically refers to an image frame extracted from a video stream acquired in a scenario in which the target detection area is unoccupied.
[0066] Specifically, according to the requirements of fire lane occupancy detection, a scene in which the fire lane is not occupied is first set, and the corresponding video stream acquisition conditions are set. In the scene in which the fire lane is not occupied, a video stream that meets the set video stream acquisition conditions is obtained, and the second depth data of the current acquisition scene is determined based on at least one image frame in the video stream, and the corresponding depth data is stored in a preset storage space. When fire lane occupancy detection is required, it can be directly called to improve detection efficiency. Among them, the method for determining the second depth data of the target detection area in different acquisition scenes is specifically as follows: an image frame is obtained from the video stream of the target detection area in the current acquisition scene, and the corresponding image frame is determined as a third image frame. It can be understood that there is no object occupying the fire lane in the third image frame currently obtained, that is, the target detection area in the third image frame is in an unoccupied state; and then a pre-trained monocular depth estimation model is called to process the third image frame to obtain the second depth data of the target detection area in different acquisition scenes. Preferably, the third image frame can also be processed by a pre-trained monocular depth estimation model to obtain multiple depth data, and the average depth data of the multiple depth data is obtained, and the average depth data is determined as the second depth data.
[0067] In this embodiment, by determining the depth data of the target detection area that is not in an occupied state, it can be used to assist in determining the area occupancy detection result of the target detection area, and the occupancy status of the target detection area can be determined more quickly and accurately. At the same time, it can also avoid the influence of interference factors near the target detection area, thereby improving the accuracy of the detection results.
[0068] The technical solution of this embodiment is to obtain a first image frame in a video stream, where the first image frame includes a target detection area, and the target detection area is the area where the fire passage is located; perform target detection on the first image frame to obtain a target detection result; when the target detection result is that a detection object exists, determine first depth data corresponding to the detection object in the first image frame; obtain second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state; when the area occupancy detection result is occupied, determine the continuous occupation time of the target detection area by the detection object, generate warning information when the continuous occupation time meets the warning condition, and perform a warning operation based on the warning information. This solution obtains target detection results by extracting image frames from the video stream and performing target detection. It is set that when the target detection result is that the detection object exists, the first depth data is determined, and then the second depth data is obtained, which is used to determine the area occupancy detection result of the target detection area in combination with the first depth data. When the area occupancy detection result is occupied, the continuous occupation duration is further determined. When the continuous occupation duration meets the warning condition, a warning message is generated. This effectively avoids the problem of false alarms of detection objects passing through the target detection area, solves the problems of inaccurate and false alarms in fire passage occupancy detection, and improves the accuracy of fire passage occupancy detection.
[0069] Example 2
[0070] Figure 2 This is a flow chart of a fire passage occupancy detection method provided in the second embodiment of the present invention. The method of this embodiment is a further optimization of the method of the above embodiment. Optionally, the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area are traversed, and the first depth data and the second depth data of the same position point are compared to determine the depth difference corresponding to each position point; when the depth difference of any position point in the target detection area is less than the preset depth difference threshold, the position point is determined to be in an occupied state; the number of position points in the target detection area that are in an occupied state is determined, and if the number is greater than or equal to the preset number threshold, the area occupancy detection result corresponding to the target detection area is determined to be occupied. Figure 2 As shown, the method includes:
[0071] S210: Acquire a first image frame in a video stream, where the first image frame includes a target detection area, and the target detection area is an area where a fire passage is located.
[0072] S220: Perform target detection on the first image frame to obtain a target detection result.
[0073] S230: When the target detection result indicates that a detection object exists, determine first depth data corresponding to the detection object in the first image frame.
[0074] S240: Acquire second depth data corresponding to the target detection area.
[0075] S250 , traversing the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area, comparing the first depth data and the second depth data of the same position point, and determining the depth difference corresponding to each position point.
[0076] Specifically, the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area are traversed, and the first depth data of the detection object and the second depth data of the target detection area are spatially aligned by cross-validating the depth information from two different sources point by point to ensure that the two correspond to the same physical position point in the same coordinate system. By comparing the values of the two depth data point by point, the depth difference of each position point is calculated, that is, the absolute value or relative error of the second depth data minus the first depth data, to quantify the accuracy difference of different depth data at the same position point, thereby evaluating the reliability of the depth data or providing a calibration basis for subsequent detection results. The determination of the depth difference helps to improve the accuracy of the area occupancy detection results of the target detection area.
[0077] S260: When the depth difference value of any position point in the target detection area is less than a preset depth difference threshold, determine that the position point is in an occupied state.
[0078] S270: Determine the number of location points in the target detection area that are in an occupied state. If the number is greater than or equal to a preset number threshold, determine that the area occupancy detection result corresponding to the target detection area is occupied.
[0079] Specifically, when the depth difference value of each position point in the target detection area is obtained, the depth difference of each position point is compared with a preset depth difference threshold. If the depth difference value of the position point is greater than the preset depth difference threshold, the position point is determined to be in an occupied state. If the depth difference value of the position point is less than or equal to the preset depth difference threshold, the position point is determined to be unoccupied. When determining the occupancy state of each position point, the number of position points in an occupied state is calculated to obtain the number of position points in an occupied state in the target detection area. The number is compared with a preset number threshold. If the number is greater than or equal to the preset number threshold, the area occupancy detection result corresponding to the target detection area is determined to be occupied. If the number is less than the preset number threshold, the area occupancy detection result corresponding to the target detection area is determined to be unoccupied.
[0080] S280: When the area occupancy detection result is occupied, determine the continuous occupation time of the target detection area by the detection object, generate warning information when the continuous occupation time meets the warning condition, and perform a warning operation based on the warning information.
[0081] The technical solution of this embodiment extracts image frames from the video stream, determines the target detection results based on the image frames, and sets the target detection result as the presence of the detection object to determine the first depth data and obtain the second depth data, compares the depth data of the same position point in the first depth data and the second depth data, determines the depth difference of each position point, determines the number of occupied position points based on the depth difference of each position point, and then determines the area occupancy detection result of the target detection area based on the number of occupied position points. This realizes the determination of the area occupancy detection result through multi-dimensional depth data, improves the accuracy of the area occupancy detection result, and further determines the continuous occupation duration and generates early warning information when the area occupancy detection result is occupied, effectively avoiding the problem of false alarm of the detection object passing through the target detection area, solving the problems of inaccurate and false alarm of fire passage occupancy detection, and improving the accuracy of fire passage occupancy detection.
[0082] Example 3
[0083] Figure 3 This is a flow chart of a fire passage occupancy detection method provided by the third embodiment of the present invention. The method of this embodiment is a further optimization of the method of the above embodiment. Optionally, the overlapping area between the detection object and the target detection area is determined based on the first depth data and the second depth data; the first average depth value is determined based on the first depth data corresponding to the overlapping area, and the second average depth value is determined based on the second depth value corresponding to the overlapping area; the average depth difference is determined based on the first average depth value and the second average depth value; when the average depth difference is greater than or equal to the preset depth difference threshold, the area occupancy detection result of the target detection area is determined to be occupied. Figure 3 As shown, the method includes:
[0084] S310: Acquire a first image frame in a video stream, where the first image frame includes a target detection area, and the target detection area is an area where a fire passage is located.
[0085] S320: Perform target detection on the first image frame to obtain a target detection result.
[0086] S330: When the target detection result indicates that a detection object exists, determine first depth data corresponding to the detection object in the first image frame.
[0087] S340: Acquire second depth data corresponding to the target detection area.
[0088] S350. Determine an overlapping area between the detection object and the target detection area based on the first depth data and the second depth data, determine a first average depth value based on the first depth data corresponding to the overlapping area, and determine a second average depth value based on the second depth value corresponding to the overlapping area.
[0089] Specifically, a spatial alignment method can be used to map the first depth data of the detection object and the second depth data of the target detection area to a unified coordinate system. A pixel-by-pixel or point-by-point comparison can be performed to determine the geometric intersection of the two, i.e., the overlap area. For all positions within the overlap area, the corresponding first and second depth data are extracted, and the arithmetic average is calculated to obtain the first and second average depth values, respectively. This quantifies the numerical distribution characteristics of the two depth datasets in the commonly covered area, effectively evaluating the consistency of different depth acquisition methods in the overlap area.
[0090] S360: Determine an average depth difference based on the first average depth value and the second average depth value.
[0091] S370: When the average depth difference is greater than or equal to the preset depth difference threshold, determine that the area occupancy detection result of the target detection area is occupied.
[0092] Specifically, when a first average depth value and a second average depth value corresponding to the overlapping area are obtained, the difference between the first average depth value and the second average depth value is calculated to obtain an average depth difference. Further, the average depth difference is compared with a preset depth difference threshold. If the average depth difference is less than the preset depth difference threshold, it indicates that the depth data of the detection object of the target detection area in the first depth data and the corresponding position point in the target detection area in the second depth data are similar, and the area occupancy detection result of the target detection area can be determined to be unoccupied. If the average depth difference is greater than or equal to the preset depth difference threshold, it indicates that the depth data of the detection object of the target detection area in the first depth data and the corresponding position point in the target detection area in the second depth data are significantly different, and the area occupancy detection result of the target detection area can be determined to be occupied.
[0093] In this embodiment, the first depth data and the second depth data are compared to determine the overlapping area, wherein the overlapping area is specifically the fire passage area, and then the depth data difference of each position point in the overlapping area is judged, and the degree of difference between the depth data of the target detection area in the first depth data and the target detection area in the second depth data is determined according to the depth difference, and then the occupancy status of the target detection area is evaluated according to the quantitative data of the average depth difference, thereby realizing cross-validation and statistical analysis of depth data, providing a more reliable decision-making basis for area occupancy detection, and helping to improve the accuracy of area occupancy detection results.
[0094] S380: When the area occupancy detection result is occupied, determine the continuous occupation time of the target detection area by the detection object, generate warning information when the continuous occupation time meets the warning condition, and perform a warning operation based on the warning information.
[0095] The technical solution of this embodiment extracts image frames from a video stream, determines target detection results based on the image frames, and sets the target detection result to be the presence of a detection object, determines first depth data, and obtains second depth data, determines an overlapping area between the detection object and the target detection area based on the first depth data and the second depth data, determines a first average depth value based on the first depth data corresponding to the overlapping area, and determines a second average depth value based on the second depth value corresponding to the overlapping area; then determines an average depth difference based on the first average depth value and the second average depth value; and determines that the area occupancy detection result of the target detection area is occupied when the average depth difference is greater than or equal to a preset depth difference threshold. This realizes the determination of the area occupancy detection result through multi-dimensional depth data, improves the accuracy of the area occupancy detection result, and further determines the continuous occupancy duration and generates warning information when the area occupancy detection result is occupied, effectively avoiding the problem of false alarms of detection objects passing through the target detection area, solving the problems of inaccurate and false alarms in fire lane occupancy detection, and improving the accuracy of fire lane occupancy detection.
[0096] Implementation Four
[0097] Figure 4 This is a structural diagram of a fire passage occupancy detection device provided by the fourth embodiment of the present invention. Figure 4 As shown, the device includes:
[0098] An image frame acquisition module 410 is configured to acquire a first image frame in a video stream, wherein the first image frame includes a target detection area, and the target detection area is an area where a fire passage is located;
[0099] The target detection result determination module 420 is configured to perform target detection on the first image frame to obtain a target detection result;
[0100] A first depth data determining module 430 is configured to determine first depth data corresponding to the detected object in the first image frame when the target detection result indicates that the detected object exists;
[0101] an area occupancy detection result determination module 440, configured to obtain second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state;
[0102] The warning processing module 450 is used to determine the continuous occupation time of the target detection area by the detection object when the area occupancy detection result is occupied, generate warning information when the continuous occupation time meets the warning condition, and perform warning operations based on the warning information.
[0103] The technical solution of this embodiment is to obtain a first image frame in a video stream through an image frame acquisition module, where the first image frame includes a target detection area, and the target detection area is the area where the fire passage is located; the target detection result determination module performs target detection on the first image frame to obtain a target detection result; the first depth data determination module determines the first depth data corresponding to the detection object in the first image frame when the target detection result is that the detection object exists; the area occupancy detection result determination module obtains the second depth data corresponding to the target detection area, and determines the area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is the calibrated depth data of the target detection area in an unoccupied state; the early warning processing module determines the continuous occupation time of the target detection area by the detection object when the area occupancy detection result is occupied, generates early warning information when the continuous occupation time meets the early warning condition, and performs an early warning operation based on the early warning information. This solution obtains target detection results by extracting image frames from the video stream and performing target detection. It is set that when the target detection result is that the detection object exists, the first depth data is determined, and then the second depth data is obtained, which is used to determine the area occupancy detection result of the target detection area in combination with the first depth data. When the area occupancy detection result is occupied, the continuous occupation duration is further determined. When the continuous occupation duration meets the warning condition, a warning message is generated. This effectively avoids the problem of false alarms of detection objects passing through the target detection area, solves the problems of inaccurate and false alarms in fire passage occupancy detection, and improves the accuracy of fire passage occupancy detection.
[0104] On the basis of the above embodiment, optionally, the target detection result determination module 420 is specifically used to call a pre-trained target detection model, perform target detection on the first image frame through the pre-trained target detection model, and obtain a target recognition result, wherein the target recognition result includes the target object type; obtain a preset detection object type, and perform matching in the preset detection object type based on the target object type to obtain a matching result corresponding to the target object type; if the matching result is a successful match, it is determined that the target detection result is that the detection object exists in the target detection area; if the matching result is a failed match, it is determined that the target detection result is that the detection object does not exist in the target detection area.
[0105] Optionally, the first depth data determination module 430 is specifically used to call a pre-trained monocular depth estimation model, process the first image frame based on the pre-trained monocular depth estimation model, and obtain depth data corresponding to the first image frame; extract the first depth data of the detection object from the depth data corresponding to the first image frame.
[0106] Optionally, the area occupancy detection result determination module 440 is specifically used to traverse the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area, compare the first depth data and the second depth data of the same position point, and determine the depth difference corresponding to each position point; when the depth difference of any position point in the target detection area is less than a preset depth difference threshold, determine that the position point is in an occupied state; determine the number of position points in the target detection area that are in an occupied state, and if the number is greater than or equal to the preset number threshold, determine that the area occupancy detection result corresponding to the target detection area is occupied.
[0107] Optionally, the area occupancy detection result determination module 440 is further specifically used to determine the overlapping area between the detection object and the target detection area based on the first depth data and the second depth data, determine a first average depth value based on the first depth data corresponding to the overlapping area, and determine a second average depth value based on the second depth value corresponding to the overlapping area; determine an average depth difference based on the first average depth value and the second average depth value; and when the average depth difference is greater than or equal to a preset depth difference threshold, determine that the area occupancy detection result of the target detection area is occupied.
[0108] Optionally, the early warning processing module 450 includes a continuous occupancy time determination unit; the continuous occupancy time determination unit is used to obtain a second image frame in the video stream, where the second image frame is located after the first image frame; obtain a first detection frame corresponding to the detection object in the target detection result corresponding to the first image frame; perform target detection on the second image frame, and determine a second detection frame of the detection object in the second image frame; determine the intersection-and-union ratio of the first detection frame and the second detection frame; if the intersection-and-union ratio is greater than or equal to a preset intersection-and-union ratio threshold, update the continuous occupancy time based on the time interval between the second image frame and the first image frame; if the intersection-and-union ratio is less than the preset intersection-and-union ratio threshold, reset the continuous occupancy time.
[0109] Optionally, the device is also used to obtain the acquisition scene of the video stream and obtain the second depth data of the target detection area in the acquisition scene; the video stream acquisition conditions are different in different acquisition scenes; wherein, the method for determining the second depth data of the target detection area in different acquisition scenes includes: obtaining a third image frame of the target detection area in different acquisition scenes, and the target detection area in the third image frame is in an unoccupied state; processing the third image frame based on a pre-trained monocular depth estimation model to obtain the second depth data of the target detection area in different acquisition scenes.
[0110] The fire passage occupancy detection device provided in the embodiment of the present invention can execute the fire passage occupancy detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0111] Example 5
[0112] Figure 5 1 is a structural diagram of an electronic device provided in Example 5 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0113] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0114] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0115] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the fire escape occupancy detection method.
[0116] In some embodiments, the fire escape occupancy detection method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the fire escape occupancy detection method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the fire escape occupancy detection method by any other appropriate means (e.g., by means of firmware).
[0117] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] The computer programs for implementing the fire escape occupancy detection method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs implement the functions / operations specified in the flowcharts and / or block diagrams. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0119] Example 6
[0120] Embodiment 6 of the present invention further provides a computer-readable storage medium storing computer instructions, the computer instructions being used to cause a processor to execute a fire escape occupancy detection method, the method comprising:
[0121] Acquire a first image frame in the video stream, where the first image frame includes a target detection area, where the target detection area is an area where a fire passage is located;
[0122] Performing target detection on the first image frame to obtain a target detection result;
[0123] When the target detection result indicates that the detection object exists, determining first depth data corresponding to the detection object in the first image frame;
[0124] Acquire second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state;
[0125] When the area occupancy detection result is occupied, the continuous occupation time of the target detection area by the detection object is determined, and an early warning message is generated when the continuous occupation time meets the early warning condition, and an early warning operation is performed based on the early warning message.
[0126] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0130] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0131] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A fire passage occupancy detection method, characterized in that: include: Acquire a first image frame in a video stream, where the first image frame includes a target detection area, where the target detection area is an area where a fire passage is located; Performing target detection on the first image frame to obtain a target detection result; When the target detection result indicates that a detection object exists, determining first depth data corresponding to the detection object in the first image frame; Acquire second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state; When the area occupancy detection result is occupied, determine the continuous occupation time of the target detection area by the detection object, generate warning information when the continuous occupation time meets the warning condition, and perform a warning operation based on the warning information.
2. The method according to claim 1, characterized in that The performing target detection on the first image frame to obtain a target detection result includes: Calling a pre-trained target detection model, performing target detection on the first image frame using the pre-trained target detection model, and obtaining a target recognition result, wherein the target recognition result includes a target object type; Obtaining a preset detection object type, and matching the target object type among the preset detection object types to obtain a matching result corresponding to the target object type; If the matching result is a successful match, the target detection result is determined to be that the detection object exists in the target detection area; if the matching result is a failed match, the target detection result is determined to be that the detection object does not exist in the target detection area.
3. The method according to claim 1, characterized in that The determining first depth data of the detected object in the first image frame includes: Calling a pre-trained monocular depth estimation model, and processing the first image frame based on the pre-trained monocular depth estimation model to obtain depth data corresponding to the first image frame; First depth data of the detection object is extracted from the depth data corresponding to the first image frame.
4. The method according to claim 1, wherein The determining the area occupancy detection result of the target detection area based on the first depth data and the second depth data includes: Traversing the first depth data corresponding to the detection object and the second depth data corresponding to the target detection area, comparing the first depth data and the second depth data of the same position point, and determining the depth difference corresponding to each of the position points; If the depth difference of any of the position points in the target detection area is less than a preset depth difference threshold, determining that the position point is in an occupied state; The number of position points in the target detection area that are in the occupied state is determined, and if the number is greater than or equal to a preset number threshold, the area occupancy detection result corresponding to the target detection area is determined to be occupied.
5. The method according to claim 1, wherein The determining the area occupancy detection result of the target detection area based on the first depth data and the second depth data includes: determining an overlapping area between the detection object and the target detection area based on the first depth data and the second depth data, determining a first average depth value based on the first depth data corresponding to the overlapping area, and determining a second average depth value based on the second depth value corresponding to the overlapping area; determining an average depth difference based on the first average depth value and the second average depth value; When the average depth difference is greater than or equal to the preset depth difference threshold, it is determined that the area occupancy detection result of the target detection area is occupied.
6. The method according to claim 1, characterized in that Determining the duration of continuous occupation of the target detection area by the detection object includes: Acquire a second image frame in the video stream, where the second image frame is located after the first image frame; Obtaining a first detection frame corresponding to the detected object in the target detection result corresponding to the first image frame; performing target detection on the second image frame, and determining a second detection frame of the detection object in the second image frame; Determining an intersection-over-union (IoU) ratio of the first detection frame and the second detection frame; If the IoU is greater than or equal to a preset IoU threshold, the continuous occupancy time is updated based on the time interval between the second image frame and the first image frame; if the IoU is less than the preset IoU threshold, the continuous occupancy time is reset.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining a capture scene of the video stream, and obtaining second depth data of the target detection area in the capture scene; different capture scenes have different video stream capture conditions; The method for determining the second depth data of the target detection area in different acquisition scenarios includes: Acquire a third image frame of the target detection area under different acquisition scenarios, wherein the target detection area is in an unoccupied state in the third image frame; The third image frame is processed based on a pre-trained monocular depth estimation model to obtain second depth data of the target detection area under different acquisition scenarios.
8. A fire passage occupancy detection device, characterized in that: include: An image frame acquisition module is used to acquire a first image frame in a video stream, where the first image frame includes a target detection area, where the target detection area is an area where a fire passage is located; a target detection result determination module, configured to perform target detection on the first image frame to obtain a target detection result; a first depth data determining module, configured to determine first depth data corresponding to the detection object in the first image frame when the target detection result indicates that the detection object exists; an area occupancy detection result determination module, configured to obtain second depth data corresponding to the target detection area, and determine an area occupancy detection result of the target detection area based on the first depth data and the second depth data, wherein the second depth data is calibrated depth data of the target detection area in an unoccupied state; The early warning processing module is used to determine the continuous occupation time of the target detection area by the detection object when the area occupancy detection result is occupied, generate early warning information when the continuous occupation time meets the early warning condition, and perform early warning operations based on the early warning information.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the fire passage occupancy detection method according to any one of claims 1 to 7.
10. 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 processor to implement the fire passage occupancy detection method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Elevator congestion degree detection method, device and equipment and storage medium
CN111986253A
Fire fighting access occupation identification method and device based on artificial intelligence technology
CN114743140A
Vehicle illegal parking detection method and system and computer storage medium
CN114743146A
Fire fighting access occupation detection method and device based on deep learning
CN114782887A
Stereoscopic vision identification method for structural inner wall field strain under extremely close-distance dark light condition
CN115953350A
Cited By
Fire fighting access and fire hydrant layout method and system for traditional block
CN121525532A
A fire-fighting passage and hydrant layout method and system for traditional blocks
CN121525532B