A method and device for detecting smoke and fire in an elevator
By processing and continuously verifying the real-time image set in the elevator, the problems of low detection accuracy and large error in the elevator in the prior art are solved, and higher detection accuracy and lower false alarm rate are achieved.
Patent Information
- Application Number
- CN202210363060.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2042-04-07
AI Technical Summary
When detecting fireworks in elevators, the prior art has problems with low detection accuracy and large errors, mainly due to changes in reflection and brightness in the elevator car.
By obtaining the real-time image set in the elevator, the images are processed to obtain the set of pyrotechnic images containing only the pyrotechnic areas, and continuously verify these images until the verification results of the continuous preset times are all values representing the pyrotechnic category. Fireworks exist in the elevator.
It improves the accuracy of firework detection, reduces the false alarm rate, ensures that the detected fireworks are continuous, and avoids the influence of light changes and reflective interference factors.
Smart Images

Figure CN114743161B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of elevator monitoring, and in particular, relates to a method and device for detecting smoke and fire in an elevator. Background Art
[0002] While elevators bring convenience to people's daily lives, they also bring many risks. Once a fire occurs in a common elevator in daily life, it will pose a serious threat to people's lives due to problems such as small space, difficult evacuation, and high smoke density after the fire. Some existing technologies directly use traditional computer vision algorithms, while others use deep learning to extract high-dimensional features of images for classification. Although these technologies can also detect fireworks, due to objective factors such as reflections in the elevator car and large brightness changes, there are still problems such as low detection accuracy and large errors.
[0003] In view of this, the present invention is proposed. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a method and device for detecting fireworks in an elevator which can improve detection accuracy and reduce false detection rate.
[0005] In order to solve the above technical problems, the basic concept of the technical solution adopted by the present invention is:
[0006] In a first aspect, the present invention provides a method for detecting smoke and fire in an elevator, comprising:
[0007] S1. Obtain a real-time image set in the elevator;
[0008] S2, processing the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area;
[0009] S3. Verify the fireworks images in the fireworks image set in sequence until the verification results for a preset number of consecutive times are all the first values for indicating the fireworks category, then determine that there are fireworks in the elevator.
[0010] Optionally, step S2 includes:
[0011] S21, for each frame of the image in the real-time image set, inputting the frame of the image into an image segmentation model to obtain a fireworks image containing only the fireworks area;
[0012] S22: Generate the fireworks image set containing only the fireworks area according to all the fireworks images.
[0013] Optionally, step S21 includes:
[0014] S211, for each frame of image in the real-time image set, input the frame of image into the image segmentation model to obtain coordinate information of the fireworks area in the frame of image;
[0015] S212: for each frame of the real-time image set, generate the fireworks image containing only the fireworks area according to the coordinate information.
[0016] Optionally, step S3 includes:
[0017] S31. Input the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; based on the previous verification result, input the next frame of fireworks image in the fireworks image set into the image classification model to obtain this verification result; the next frame of fireworks image is a fireworks image other than the fireworks images that have been verified in the fireworks image set.
[0018] Optionally, the next frame of fireworks image is determined from the fireworks image set according to a preset arrangement order.
[0019] Optionally, after step S3, the following steps are further included:
[0020] S4. When it is determined that there is smoke or fire in the elevator, a smoke or fire alarm is generated, so that the elevator server controls the elevator to stop at a safe floor after receiving the smoke or fire alarm.
[0021] In a second aspect, the present invention provides a device for detecting smoke and fire in an elevator, comprising:
[0022] An acquisition module, used to acquire a real-time image set in the elevator;
[0023] A generation module processes the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area;
[0024] The determination module verifies the fireworks images in the fireworks image set in sequence until the verification results for a preset number of consecutive times are all the first values for indicating the fireworks category, and then determines that there are fireworks in the elevator.
[0025] Optionally, the generating module includes:
[0026] A first generating unit is used for inputting each frame of the image in the real-time image set into an image segmentation model to obtain a fireworks image containing only the fireworks area;
[0027] The second generating unit is used to generate the fireworks image set containing only the fireworks area according to all the fireworks images.
[0028] Optionally, the first generating unit further includes:
[0029] A third generating unit is used for inputting each frame of image in the real-time image set into the image segmentation model to obtain coordinate information of the fireworks area in the frame of image;
[0030] The fourth generating unit is used to generate the fireworks image containing only the fireworks area according to the coordinate information for each frame of the image in the real-time image set.
[0031] Optionally, the determining module includes:
[0032] A determination unit is used to input the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; based on the previous verification result, the next frame of fireworks image in the fireworks image set is input into the image classification model to obtain this verification result; the next frame of fireworks image is a fireworks image other than the fireworks images that have been verified in the fireworks image set.
[0033] Optionally, the next frame of fireworks image is determined from the fireworks image set according to a preset arrangement order.
[0034] Optionally, the device further comprises:
[0035] The processing module is used to generate a smoke and fire alarm when it is determined that there is smoke and fire in the elevator, so that the server controls the elevator to stop at a safe floor after receiving the smoke and fire alarm.
[0036] The method for detecting fireworks in an elevator provided by an embodiment of the present invention obtains a real-time image set in the elevator through the above three steps; the images in the real-time image set are processed in sequence to obtain a fireworks image set that only contains fireworks areas; finally, the fireworks images in the fireworks image set are verified in sequence until the first numerical value used to represent the fireworks category is obtained in the verification results for a preset number of consecutive times, and then it is determined that there are fireworks in the elevator, thereby ensuring that the detected fireworks are continuous, avoiding false detection due to light changes and interference factors such as reflective lights in the car when relying on the detection network to detect a single frame of images, thereby improving the accuracy of fireworks detection and reducing the false alarm rate of fireworks detection.
[0037] The specific implementation modes of the present invention are further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are part of the present invention and are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but do not constitute an improper limitation of the present invention. Obviously, the drawings described below are only some embodiments. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the accompanying drawings:
[0039] Figure 1 It is a flow chart of a method for detecting smoke and fire in an elevator provided by an embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of a frame of image provided by an embodiment of the present invention;
[0041] Figure 3 The present invention is a flowchart of a device for detecting smoke and fire in an elevator provided by an embodiment of the present invention.
[0042] In the figure: A, B, C are the coordinate information of the fireworks area; D is a frame image in the real-time image set.
[0043] It should be noted that these drawings and textual descriptions are not intended to limit the conceptual scope of the present invention in any way, but are intended to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The following embodiments are used to illustrate the present invention but are not used to limit the scope of the present invention.
[0045] In the description of the present invention, it should be noted that the directions or positional relationships indicated by terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “vertical”, “inside” and “outside” are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention.
[0046] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0047] In a first aspect, an embodiment of the present invention provides a method for detecting smoke and fire in an elevator, such as Figure 1 As shown, the following steps are included:
[0048] S1. Obtain a real-time image set in the elevator;
[0049] S2, processing the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area;
[0050] S3. Verify the fireworks images in the fireworks image set in sequence until the verification results for a preset number of consecutive times are all the first values for indicating the fireworks category, then determine that there are fireworks in the elevator.
[0051] In the above step S1, the images in the real-time image set are color images, and each frame of the image in the real-time image set contains a fireworks area and a non-fireworks area with other interfering backgrounds.
[0052] Specifically, first, the server obtains the video stream collected by the camera, exports the video stream into a real-time RGB color image, and generates a real-time image set.
[0053] In the above step S2, specifically, each frame of the fireworks image set is processed in sequence, and a fireworks image set containing only the fireworks area is obtained from all the above images.
[0054] For example, if the fireworks image set includes n frames of images, the n frames of images are processed in sequence to obtain a set of x fireworks images that only include the fireworks area.
[0055] In the above step S3, the fireworks category represents the verification result obtained after verifying each fireworks image in the fireworks image set. Each verification result includes a first value for indicating the fireworks category or a second value for indicating the non-fireworks category.
[0056] Specifically, each frame of the fireworks image in the fireworks image set is verified in sequence until the verification results of the images of consecutive preset frames are all the first numerical values used to represent the fireworks category, then it is determined that there are fireworks in the elevator. The consecutive preset frames can be 5 consecutive frames or 6 consecutive frames, which is not limited by the present invention.
[0057] The method for detecting fireworks in an elevator provided by an embodiment of the present invention obtains a real-time image set in the elevator through the above three steps; the images in the real-time image set are processed in sequence to obtain a fireworks image set that only contains fireworks areas; finally, the fireworks images in the fireworks image set are verified in sequence until the first numerical value used to represent the fireworks category is obtained in the verification results for a preset number of consecutive times, and then it is determined that there are fireworks in the elevator, thereby ensuring that the detected fireworks are continuous, avoiding false detection due to light changes and interference factors such as reflective lights in the car when relying on the detection network to detect a single frame of images, thereby improving the accuracy of fireworks detection and reducing the false alarm rate of fireworks detection.
[0058] In order to understand in more detail the images in the real-time image set are processed sequentially to obtain a fireworks image set containing only the fireworks area, step S2 includes:
[0059] Step S21, for each frame of the image in the real-time image set, input the frame of the image into an image segmentation model to obtain a fireworks image containing only the fireworks area;
[0060] Step S22: generating the fireworks image set containing only the fireworks area according to all the fireworks images.
[0061] In the above step S21, for each frame of the image in the real-time image set, each frame of the image is input into the image segmentation model to obtain a fireworks image containing only the fireworks area.
[0062] The image segmentation model is trained through the following steps:
[0063] Step 1, obtaining an image training sample set, wherein the image training sample set includes at least one frame of image training samples, and the image training sample set includes a training image and coordinate information of a fireworks area in the training image;
[0064] Step 2: for each frame of the image training sample, input the training image as a positive sample into the image segmentation model to be trained, and input the training image with the fireworks area label as a negative sample into the image segmentation model to train the image segmentation model to be trained.
[0065] In the above steps 1 and 2, the present invention is also provided with a database, which stores image training samples for training the image segmentation model, and a plurality of image training samples together constitute an image training sample set, and the above image training sample set usually includes at least 200 frames of image training samples, and can also be 300 frames, or 500 frames, etc., which are not limited by the present invention. When the image segmentation model to be trained is trained, the training image is input into the image segmentation model to be trained, and the image segmentation module to be trained will output a recognition result containing only the coordinate information of the fireworks area, and the recognition result is compared with the coordinate information of the fireworks area in the training image. If the comparison difference is large, the image segmentation model to be trained needs to be adjusted. If the comparison result difference is small, it means that the training accuracy of the image segmentation model to be trained is getting higher and higher. When the comparison result reaches the preset test requirement, that is, when the difference is less than a certain threshold, the training of the image segmentation model to be trained is terminated. If the test accuracy is controlled to be above 95% in the present invention, that is, when the difference is less than 5%, the training of the image segmentation model to be trained is terminated.
[0066] In the above step S22, specifically, all the fireworks images are taken as a fireworks image set that only contains the fireworks area.
[0067] For example, when the fireworks image is b frames, then the b frames of fireworks images together constitute a fireworks image set that only contains the fireworks area.
[0068] In order to understand each frame of the real-time image set in more detail, the frame of the image is input into the image segmentation model to obtain a fireworks image containing only the fireworks area, step S21 includes:
[0069] S211, for each frame of image in the real-time image set, input the frame of image into the image segmentation model to obtain coordinate information of the fireworks area in the frame of image;
[0070] S212: for each frame of the real-time image set, generate the fireworks image containing only the fireworks area according to the coordinate information.
[0071] In the above step S211, if Figure 2 As shown, for each frame of image in the real-time image set, the frame of image is input into the image segmentation model to obtain the coordinate information of the fireworks area in the frame of image.
[0072] In the above step S212, for each frame of the real-time image set, the non-fireworks area with background interference of the frame of the image is segmented according to the coordinate information to obtain a fireworks image containing only the fireworks area.
[0073] In order to understand in more detail that the fireworks images in the fireworks image set are verified sequentially, step S3 includes:
[0074] S31, input the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; based on the previous verification result, input the next frame of fireworks image in the fireworks image set into the image classification model to obtain this verification result; the next frame of fireworks image is a fireworks image other than the fireworks images that have been verified in the fireworks image set.
[0075] Specifically, the first frame of fireworks image in the fireworks image set is input into the image classification model to obtain the first verification result; based on the previous verification result, the next frame of fireworks image in the fireworks image set is input into the image classification model to obtain this verification result.
[0076] For example, if there are three frames of fireworks images in the fireworks image set, the first frame of fireworks image in the fireworks image set is input into the image classification model to obtain the first verification result, that is, whether the fireworks image is a fireworks category is verified. If it is a fireworks category, the first verification result is a first value for indicating the fireworks category, such as 1; if it is not a fireworks category, the first verification result is a second value for indicating the non-fireworks category, such as 0. Based on the first verification result, the second frame of fireworks image in the fireworks image set is input into the image classification model to obtain the verification result of the second frame of fireworks image, and the current verification result is obtained based on the first verification result and the verification result of the second frame of fireworks image; then, based on the second verification result, the third frame of fireworks image in the fireworks image set is input into the image classification model to obtain the verification result of the third frame of fireworks image, and the third verification result is obtained based on the second verification result and the verification result of the third frame of fireworks image. After each frame of fireworks image in the fireworks image set is input into the image classification model, the backbone network in the image classification model extracts the target high-dimensional features such as the contour, color, gradient information, and texture information of each frame of fireworks image. In order to effectively improve the network convergence speed and accuracy, the backbone network of the present invention usually selects the resnet50 network, and other networks can also be selected, which is not limited by the present invention.
[0077] The image classification model is trained through the following steps:
[0078] Step 3, obtaining a fireworks image training sample set, wherein the fireworks image training sample set includes at least one frame of fireworks image training sample, and the fireworks image training sample set includes training images and category labels of the training images;
[0079] Step 4: for each frame of the fireworks image training sample, input the training image as a positive sample into the image classification model to be trained, input the analogy label of the training image as a negative sample into the image classification model to train the image classification model to be trained.
[0080] In the above steps 3 and 4, the database of the present invention also stores fireworks image training samples for training image classification models. Multiple fireworks image training samples together constitute a fireworks image training sample set. The above fireworks image training sample set usually includes at least 200 frames of fireworks image training samples, and can also be 300 frames, or 500 frames, etc., which are not limited by the present invention. When training the image classification model to be trained, the training image is input into the image classification model to be trained. The image classification module to be trained will output a recognition result of the category label of the training image. The recognition result is compared with the category label of the training image. If the comparison difference is large, it is necessary to adjust the parameters of the image classification model to be trained. If the comparison result difference is small, it means that the training accuracy of the image classification model to be trained is getting higher and higher. When the comparison result reaches the preset test requirement, that is, when the difference is less than a certain threshold, the training of the image classification model to be trained is completed, and the optimal network classification model is finally obtained.
[0081] In order to facilitate the distinction of fireworks images in a fireworks image set, each frame of fireworks image can be distinguished, and the next frame of fireworks image is determined from the fireworks image set according to a preset arrangement order. The preset arrangement order can be sorted from small to large according to the label of each frame of fireworks image, or it can be other arrangement orders, which are not limited by the present invention.
[0082] When determining that there is fireworks in the elevator, the present invention sequentially verifies the fireworks images in the fireworks image set until the verification results for a preset number of consecutive times are all the first values used to represent the fireworks category, then it is determined that there is fireworks in the elevator, step S3, and then further includes:
[0083] S4. When it is determined that there is smoke or fire in the elevator, a smoke or fire alarm is generated, so that the elevator server controls the elevator to stop at a safe floor after receiving the smoke or fire alarm.
[0084] In the above step S4, the fire alarm is used to notify the staff and passengers to take shelter when fire occurs in the elevator.
[0085] The present invention also provides an elevator server, which also includes an elevator control unit. When it is determined that there is smoke and fire in the elevator, the server generates a smoke and fire alarm, and the server sends the smoke and fire alarm to the elevator server, so that after receiving the smoke and fire alarm, the elevator server generates a stop signal and sends the stop signal to the elevator control unit. After receiving the stop signal, the elevator control unit controls the elevator to stop at a safe floor so that the server controls the elevator to stop at a safe floor after receiving the smoke and fire alarm, so that passengers can escape from the elevator in time, and when property security personnel and fire management personnel receive the smoke and fire alarm, it is also convenient to deal with the elevator fire at the first time.
[0086] In the present invention, the fire and smoke detection algorithm is integrated into the intelligent AI camera development board, and no third-party equipment such as smoke sensors, infrared sensors or temperature sensors is required, which reduces the hardware cost. In addition, the algorithm and control logic in the present invention can be processed directly on the terminal, abandoning the cloud processing step, which can get rid of the dependence on the network in the short term and ensure the real-time output information.
[0087] In a second aspect, an embodiment of the present invention provides a device for detecting smoke and fire in an elevator, such as Figure 3 As shown, it includes: an acquisition module 301, a generation module 302, and a determination module 303:
[0088] An acquisition module 301 is used to acquire a real-time image set in the elevator;
[0089] A generating module 302 processes the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area;
[0090] The determination module 303 verifies the fireworks images in the fireworks image set in sequence until the verification results for a preset number of consecutive times are all the first values for indicating the fireworks category, and then determines that there are fireworks in the elevator.
[0091] Optionally, the generating module includes:
[0092] A first generating unit is used for inputting each frame of the image in the real-time image set into an image segmentation model to obtain a fireworks image containing only the fireworks area;
[0093] The second generating unit is used to generate the fireworks image set containing only the fireworks area according to all the fireworks images.
[0094] Optionally, the first generating unit further includes:
[0095] A third generating unit is used for inputting each frame of image in the real-time image set into the image segmentation model to obtain coordinate information of the fireworks area in the frame of image;
[0096] The fourth generating unit is used to generate the fireworks image containing only the fireworks area according to the coordinate information for each frame of the image in the real-time image set.
[0097] Optionally, the determining module includes:
[0098] A determination unit is used to input the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; based on the previous verification result, the next frame of fireworks image in the fireworks image set is input into the image classification model to obtain this verification result; the next frame of fireworks image is a fireworks image other than the fireworks images that have been verified in the fireworks image set.
[0099] Optionally, the next frame of fireworks image is determined from the fireworks image set according to a preset arrangement order.
[0100] Optionally, the device further comprises:
[0101] The processing module is used to generate a smoke and fire alarm when it is determined that there is smoke and fire in the elevator, so that the elevator server controls the elevator to stop at a safe floor after receiving the smoke and fire alarm.
[0102] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as above in the preferred embodiment, it is not used to limit the present invention. Any technician familiar with this patent can make some changes or modifications to equivalent embodiments of equivalent changes by using the technical content suggested above without departing from the scope of the technical solution of the present invention. The implementation scheme in the above embodiment can also be further combined or replaced. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the solution of the present invention.
Claims
1. A method for detecting fireworks in an elevator, characterized in that: The following steps are included: S1. Obtain a real-time image set in the elevator; S2, processing the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area; S21, for each frame of the image in the real-time image set, inputting the frame of the image into an image segmentation model to obtain a fireworks image containing only the fireworks area; S22, generating the fireworks image set containing only the fireworks area according to all the fireworks images; S3, verifying the fireworks images in the fireworks image set in sequence until the verification results for a preset number of consecutive times are all the first values for indicating the fireworks category, then determining that there are fireworks in the elevator; Step S3 includes: S31, inputting the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; Based on the previous verification result, the next frame of fireworks image in the fireworks image set is input into the image classification model to obtain the current verification result; the next frame of fireworks image is a fireworks image other than the fireworks image that has been verified in the fireworks image set; The image classification model is specifically trained through the following steps: Step 3, obtaining a fireworks image training sample set, wherein the fireworks image training sample set includes at least one frame of fireworks image training sample, and the fireworks image training sample set includes training images and category labels of the training images; Step 4: for each frame of the fireworks image training sample, input the training image as a positive sample into the image classification model to be trained, input the analogy label of the training image as a negative sample into the image classification model to train the image classification model to be trained.
2. The method according to claim 1, characterized in that Step S21 includes: S211, for each frame of image in the real-time image set, input the frame of image into the image segmentation model to obtain coordinate information of the fireworks area in the frame of image; S212: for each frame of the real-time image set, generate the fireworks image containing only the fireworks area according to the coordinate information.
3. The method according to claim 1, characterized in that The next frame of fireworks image is determined from the fireworks image set according to a preset arrangement order.
4. The method according to claim 1, characterized in that: After step S3, the following steps are also included: S4. When it is determined that there is smoke or fire in the elevator, a smoke or fire alarm is generated, so that the elevator server controls the elevator to stop at a safe floor after receiving the smoke or fire alarm.
5. A device for detecting smoke and fire in an elevator, characterized in that: The device comprises: An acquisition module, used to acquire a real-time image set in the elevator; A generation module processes the images in the real-time image set in sequence to obtain a fireworks image set containing only the fireworks area; A first generating unit is used for inputting each frame of the image in the real-time image set into an image segmentation model to obtain a fireworks image containing only the fireworks area; A second generating unit, configured to generate the fireworks image set containing only the fireworks area according to all the fireworks images; a determination module, which verifies the fireworks images in the fireworks image set in sequence until the first value used to indicate the fireworks category is obtained in the verification results for a preset number of consecutive times, and then determines that fireworks exist in the elevator; A determination unit is used to input the first frame of fireworks image in the fireworks image set into the image classification model to obtain a verification result; based on the previous verification result, the next frame of fireworks image in the fireworks image set is input into the image classification model to obtain this verification result; the next frame of fireworks image is a fireworks image other than the fireworks images that have been verified in the fireworks image set.
6. The device according to claim 5, characterized in that Also includes processing modules: The processing module is used to generate a smoke and fire alarm when it is determined that there is smoke and fire in the elevator, so that the elevator server controls the elevator to stop at a safe floor after receiving the smoke and fire alarm.
Citation Information
Patent Citations
Smoke and fire detection method
CN113449588A
Non-inductive elevator button and mobile phone interaction method and system
CN113998555A
In-car fire monitoring system and elevator
CN215924078U