A method for identifying gas hazards and related devices
By constructing the correlation between gas devices and a neural network model, and combining the device location information, the problem of inaccurate identification of safety hazards in gas devices in the existing technology is solved, and more accurate judgment of safety hazards in gas devices is achieved.
Patent Information
- Application Number
- CN202311838862.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-28
AI Technical Summary
In existing technologies, the identification of safety hazards in gas appliances is based solely on the extent of appliance damage, without considering the mutual influence between appliances, leading to inaccurate identification results.
By constructing a pre-defined relationship between multiple gas devices and combining the location information of the devices in the image, a neural network model is used to identify the attributes of the gas devices and their mutual influences, thereby determining whether there are any safety hazards in the gas devices.
It improves the accuracy of identifying safety hazards in gas appliances and enables a more accurate assessment of the impact of interactions between appliances on safety hazards.
Smart Images

Figure CN117765475B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and related apparatus for identifying gas hazard. Background Technology
[0002] In places where gas appliances are used, regular safety inspections should be conducted on the gas appliances, and any appliances with potential safety hazards should be addressed promptly. In existing technologies, users can periodically upload photos containing images of gas appliances, and then image classification or segmentation techniques can be used to identify safety hazards for each gas appliance in the images.
[0003] However, the current method only identifies whether a gas appliance has a safety hazard by checking for damage, without considering other factors that may affect the safety of the gas appliance. This makes the results of determining whether a gas appliance has a safety hazard inaccurate. Therefore, a gas hazard identification method is needed to improve the accuracy of judging whether a gas appliance has a safety hazard. Summary of the Invention
[0004] This application provides a method and related apparatus for identifying gas hazard, which can improve the accuracy of determining whether a gas appliance has a safety hazard.
[0005] In a first aspect, embodiments of this application provide a method for identifying gas hazard, the method comprising:
[0006] Acquire the image to be processed; the image to be processed is obtained by the image acquisition device from the area where the gas device is installed;
[0007] Determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed;
[0008] If the image to be processed includes multiple gas devices, then it is determined whether the image to be processed includes at least one group of gas devices that conform to the first preset association relationship; the first preset association relationship indicates that when at least two types of gas devices appear individually in the first space, each gas device does not pose a gas hazard, and when the types of at least two gas devices appear simultaneously in the first space, both of the at least two gas devices pose a gas hazard.
[0009] If the image to be processed includes at least one group of gas devices that conform to the first preset association relationship, then for any group of gas devices, based on the respective positions of each gas device in the image to be processed, it is determined whether each gas device has a gas hazard.
[0010] Compared to existing technologies, this application constructs a first pre-defined correlation between multiple gas devices and their interactions to identify potential gas hazards. This divides the gas devices in the image to be processed, ensuring that determining whether a gas device poses a gas hazard considers not only whether the device is damaged but also the interaction between that device and other gas devices. Furthermore, by combining the positions of each gas device in the image within any group of gas devices that conforms to the first pre-defined correlation, the presence of potential gas hazards in each device can be determined more accurately.
[0011] In one possible implementation, the method further includes:
[0012] If the image to be processed includes multiple gas devices, then it is determined whether the image to be processed includes at least one group of gas devices that conform to the second preset association relationship; the second preset association relationship indicates that when the types of the at least two gas devices appear separately in the first space, the at least two gas devices both pose a gas hazard, and when the types of the at least two gas devices appear simultaneously in the first space, each gas device does not pose a gas hazard.
[0013] If the image to be processed includes at least one group of gas devices that conform to the second preset association relationship, then for any group of gas devices, based on the respective positions of each gas device in the image to be processed, it is determined whether each gas device has a gas hazard.
[0014] Similarly, this application constructs a second pre-defined correlation between multiple gas devices and their interactions to identify potential gas hazards. This divides the gas devices in the image to be processed, ensuring that determining whether a gas device poses a gas hazard considers not only whether the device is damaged but also the interaction between that device and other gas devices. Furthermore, by combining the positions of each gas device in the image to be processed within any group of gas devices that conforms to the second pre-defined correlation, the presence of potential gas hazards in each gas device can be determined more accurately.
[0015] In one possible implementation, the method further includes:
[0016] If the image to be processed includes at least one exhaust gas device that does not conform to the first preset association relationship and does not conform to the second preset association relationship, for each of the at least one exhaust gas device, based on the respective positions of the exhaust gas device and the target facility corresponding to the exhaust gas device in the environment in which the exhaust gas device is located in the image to be processed, it is determined whether the exhaust gas device has a gas hazard.
[0017] This application constructs a correlation between flue gas exhaust devices and target facilities to identify potential gas hazards. It then categorizes the gas devices in the image to be processed, ensuring that determining whether a flue gas exhaust device poses a gas hazard considers not only whether the device is damaged but also the mutual influence between the device and the target facility. Furthermore, by combining the positions of any flue gas exhaust device that conforms to the correlation and its corresponding target facility in the image, the presence of a gas hazard in each device can be determined more accurately.
[0018] In one possible implementation, for any group of gas devices that conforms to a first preset association relationship, determining whether each gas device in the image to be processed has a gas hazard based on its respective position in the image includes:
[0019] If the position difference between the first gas device included in any group of gas devices and the second gas device included in any group of gas devices (excluding the first gas device) in the image to be processed is less than a first threshold, then it is determined that both the first gas device and the second gas device pose a gas hazard.
[0020] This application further accurately determines whether there is a potential gas hazard between different gas devices by setting the positional difference of different gas devices in the image to be processed, and thus determines whether there is a potential gas hazard in each gas device.
[0021] In one possible implementation, determining whether the exhaust gas device poses a gas hazard based on the respective locations of the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed includes:
[0022] If the difference between the location of the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed is less than the second threshold, then it is determined that the exhaust gas device does not pose a gas hazard.
[0023] This application, by setting the positional difference between the exhaust gas device and the target facility in the image to be processed, further accurately determines whether there is a potential gas hazard between the target facility and the exhaust gas device, and thus determines whether there is a potential gas hazard in the exhaust gas device.
[0024] In one possible implementation, the method further includes:
[0025] If the number of gas devices included in the image to be processed is one, then based on the respective positions of the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed, it is determined whether the gas device poses a gas hazard.
[0026] This application takes into account factors other than the inherent hazards of the gas device itself, constructs a correlation between the gas device and the target facility regarding gas hazards, and further utilizes the positional relationship between the gas device and the target facility in the image to be processed to accurately determine whether the gas device has any gas hazards.
[0027] In one possible implementation, determining the properties of at least one gas device included in the image to be processed includes:
[0028] The image to be processed is processed using a pre-trained neural network model to determine the properties of at least one gas device included in the image to be processed.
[0029] This application pre-trains a neural network model to perform image processing on the image to be processed, thereby making the properties of each gas device in the resulting image more accurate.
[0030] Secondly, one embodiment of this application provides a device for identifying gas hazard, the device comprising:
[0031] The image acquisition module is used to acquire an image to be processed; the image to be processed is obtained by the image acquisition device from the area where the gas device is installed.
[0032] An attribute determination module is used to determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed;
[0033] The first relationship determination module is used to determine whether the image to be processed includes at least one group of gas devices that meet the first preset association relationship if the number of gas devices included in the image to be processed is multiple. The first preset association relationship indicates that when the types of at least two gas devices appear individually in the first space, each gas device does not pose a gas hazard, and when the types of at least two gas devices appear simultaneously in the first space, both of the at least two gas devices pose a gas hazard.
[0034] The first gas hazard determination module is used to determine whether there is a gas hazard for any gas device if the image to be processed includes at least one group of gas devices that meet the first preset association relationship, based on the respective positions of each gas device in the image to be processed.
[0035] In one possible implementation, the device further includes:
[0036] The second relationship determination module is used to determine whether the image to be processed includes at least one group of gas devices that meet the second preset association relationship if the number of gas devices included in the image to be processed is multiple. The second preset association relationship indicates that when the types of the at least two gas devices appear separately in the first space, the at least two gas devices have gas hazards, and when the types of the at least two gas devices appear simultaneously in the first space, each gas device does not have a gas hazard.
[0037] The second gas hazard determination module is used to determine whether there is a gas hazard for any gas device if the image to be processed includes at least one group of gas devices that meet the second preset association relationship, based on the respective positions of each gas device in the image to be processed.
[0038] In one possible implementation, the device further includes:
[0039] The third gas hazard determination module is used to determine whether a gas hazard exists in the image to be processed if the image to be processed includes at least one exhaust gas device that does not conform to the first preset correlation relationship and does not conform to the second preset correlation relationship. For each of the at least one exhaust gas device, the module determines whether the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located exist in the image to be processed.
[0040] In one possible implementation, for any group of gas devices that conform to the first preset association relationship, the first gas hazard determination module is specifically used for:
[0041] If the position difference between the first gas device included in any group of gas devices and the second gas device included in any group of gas devices (excluding the first gas device) in the image to be processed is less than a first threshold, then it is determined that both the first gas device and the second gas device pose a gas hazard.
[0042] In one possible implementation, the third gas hazard determination module is specifically used for:
[0043] If the position difference between the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed is less than the second threshold, then it is determined that the exhaust gas device does not pose a gas hazard.
[0044] In one possible implementation, the device further includes:
[0045] The fourth gas hazard determination module is used to determine whether there is a gas hazard in the gas device if the number of gas devices included in the image to be processed is one, based on the respective positions of the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed.
[0046] In one possible implementation, the attribute determination module is specifically used for:
[0047] The image to be processed is processed using a pre-trained neural network model to determine the properties of at least one gas device included in the image to be processed.
[0048] Thirdly, embodiments of this application also provide an electronic device, which includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method described in any of the preceding claims.
[0049] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0050] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a schematic flowchart of a gas hazard identification method provided in an embodiment of this application;
[0053] Figure 2 This is a schematic flowchart of a gas hazard identification method provided in an embodiment of this application;
[0054] Figure 3 A schematic diagram of the structure of a gas hazard identification device provided in an embodiment of this application;
[0055] Figure 4 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0056] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0057] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data used can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0058] In places where gas appliances are used, regular safety inspections should be conducted on the gas appliances, and any appliances with potential safety hazards should be addressed promptly. In existing technologies, users can periodically upload photos containing images of gas appliances, and then image classification or segmentation techniques can be used to identify safety hazards for each gas appliance in the images.
[0059] However, the current method only identifies whether a gas appliance has a safety hazard by checking for damage, without considering other factors that may affect the safety of the gas appliance, making the results of determining whether the gas appliance has a safety hazard inaccurate.
[0060] Therefore, this application provides a method and related apparatus for identifying gas hazard. By establishing a first preset correlation relationship between multiple gas devices and their mutual influence on gas hazard, the gas devices in the image to be processed are divided. This ensures that when determining whether a gas device poses a gas hazard, it is not only based on whether the gas device is damaged, but also on the mutual influence factors between the gas device and other gas devices. Furthermore, by combining the positions of each gas device in the image to be processed within any group of gas devices that conform to the first preset correlation relationship after division, the presence of gas hazard in each gas device can be determined more accurately.
[0061] After introducing the design concept of the embodiments of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-creative labor. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application.
[0062] like Figure 1 As shown in the figure, this application provides a flowchart of a method for identifying gas hazard, including the following steps:
[0063] S101, Obtain the image to be processed.
[0064] For example, the image to be processed can be obtained by an image acquisition device capturing an area where gas appliances are installed. Here, the gas appliances can be installed indoors or outdoors; the installation location of the gas appliances is not limited. The gas appliances included in the image to be processed can be one or more of the following: gas stove, ignition device, flame failure device, cooktop, water heater, and public flue. Different gas appliances have different levels of gas hazard; for example, the gas hazard level of an aging rubber hose is lower than that of a flame failure device.
[0065] After acquiring the image to be processed, proceed to step S102 to determine the attributes of at least one gas device included in the image to be processed, wherein the attributes include the type of gas device and the location of the gas device in the image to be processed.
[0066] For example, a pre-trained neural network model can be used to process an image to determine the attributes of at least one gas appliance included in the image. Assuming the image includes gas appliance 1, gas appliance 2, gas appliance 3, and gas appliance 4, the image is input into the pre-trained neural network model, and the output of the model is: Gas appliance 1 - Gas stove - Position 1, Gas appliance 2 - Ignition device - Position 2, Gas appliance 3 - Flameout protection device - Position 3, Gas appliance 4 - Water heater - Position 4.
[0067] During the training of a neural network model, when acquiring sample images including those of gas devices, Mosaic data augmentation can be used to scale, crop, and rearrange the acquired sample images to obtain more sample images. For example, by scaling, cropping, and rearranging four acquired sample images, and then stitching the processed images together, 16 new sample images can be added.
[0068] After data augmentation of the sample images, the computer vision algorithm YOLO (You Only LookOnce) can be used to perform target detection on each sample image to determine the type of each device in each sample image and its position in the sample image. For example, for a sample image containing a flame failure device, an ignition device, and a gas stove, the output result after using YOLO for target detection is ['Flame failure device-0.8-x1-y1-w1-h1', 'Ignition device-0.9-x2-y2-w2-h2', 'Gas stove-0.93-x3-y3-w3-h3'].
[0069] Where x1, y1, w1, and h1 represent the spatial coordinates of the flameout protection device in the sample image, and 0.8 represents the probability that the flameout protection device is located at spatial positions x1, y1, w1, and h1 in the sample image; x2, y2, w2, and h2 represent the spatial coordinates of the ignition device in the sample image, and 0.9 represents the probability that the ignition device is located at spatial positions x2, y2, w2, and h2 in the sample image; x3, y3, w3, and h3 represent the spatial coordinates of the gas stove in the sample image, and 0.93 represents the probability that the gas stove is located at spatial positions x3, y3, w3, and h3 in the sample image.
[0070] Furthermore, a Path Aggregation Network (PANet) can be used to extract semantic features of the detected target at different scales, obtaining features such as the shape, texture, and color of the gas appliance. For example, for a water heater, features are extracted using its original size and half-size; for a flameout protection device, features are extracted using its original size and half-size, quarter-size, and eighth-size. After feature extraction, bottom-up path aggregation and top-down path enhancement are used to fuse the extracted features, yielding the final feature extraction result. By extracting features from the original size of the gas appliance, global information about its environment can be obtained, such as the overall shape and orientation of the gas stove. By extracting features from smaller dimensions of the gas appliance, local information about the appliance can be obtained, such as the texture of the gas stove.
[0071] After performing PANet feature extraction on each gas appliance in the sample image, the extraction results include not only global and local information about the environment of each gas appliance, but also spatial information about each appliance within the sample image, such as the positional relationship between the flameout protection device and the gas stove. To save resources, a visual transformer sliding window can be used to further process the feature extraction results, enriching the contextual information of the gas appliances within the sample image. This approach ensures the integrity of the sample image information while conserving resources and improving processing efficiency.
[0072] For example, the feature extraction result image can be divided into small blocks of different sizes (represented by patches). For instance, a water heater can be divided into 14x14 patches, and a flameout protection device into 8x8 patches. Each patch is an input sequence element of a transformer. Each patch is input into the transformer, and each self-attention layer in the transformer performs self-attention operations on each input patch, thereby determining the dependencies between multiple patches. For example, one patch might contain the gas stove's inlet hose, and another might contain a hose clamp. The transformer, through self-attention operations, determines that the hose clamp belongs to the inlet hose.
[0073] By pre-training the neural network model, image processing of the images to be processed can be performed, making the attributes of each gas device in the resulting images more accurate. This application improves the recognition accuracy of the neural network model from 70% to 84% by setting the feature extraction dimensions corresponding to different gas devices, reduces the recognition speed of gas devices in the processed images from 0.8 seconds per image to 0.3 seconds per image, and increases the number of gas device types that can be identified from 4 to 8.
[0074] After determining the attributes of at least one gas device included in the image to be processed, step S103 is continued. If the number of gas devices included in the image to be processed is multiple, it is determined whether the image to be processed includes at least one group of gas devices that conform to the first preset association relationship.
[0075] Optionally, the first preset association relationship indicates that when at least two types of gas appliances appear individually in the first space, each gas appliance poses no gas hazard; when at least two types of gas appliances appear simultaneously in the first space, both gas appliances pose a gas hazard. For example, when the at least two gas appliances are a water heater and a shower head, when the water heater and shower head appear individually in the bathroom environment, neither the water heater nor the shower head poses a gas hazard; when the water heater and shower head appear simultaneously in the bathroom environment, both the water heater and the shower head pose a gas hazard.
[0076] If the image to be processed includes at least one group of gas devices that meet the first preset association relationship, then step S104 is executed to determine whether there is a gas hazard for any group of gas devices based on the respective positions of each gas device in the image to be processed.
[0077] In one possible embodiment, if the positional difference between the first gas appliance in any group of gas appliances and the second gas appliance (excluding the first gas appliance) in any group of gas appliances in the image to be processed is less than a first threshold, then it is determined that both the first and second gas appliances pose a gas hazard. For example, if the first gas appliance is a water heater and the second gas appliance is a shower head, and both the water heater and the shower head are located in a bathroom environment, and the positional difference between the water heater and the shower head is less than the first threshold, then both the water heater and the shower head pose a gas hazard.
[0078] If the image to be processed does not include at least one group of gas devices that meet the first preset association relationship, then continue to execute step S105 to determine whether the image to be processed includes at least one group of gas devices that meet the second preset association relationship.
[0079] Optionally, the second preset association relationship indicates that when at least two types of gas appliances appear individually in the first space, at least two gas appliances pose a gas hazard, and when at least two types of gas appliances appear simultaneously in the first space, each gas appliance does not pose a gas hazard.
[0080] For example, if at least two gas appliances are a gas stove, a gas hose, and a hose clamp, and both the gas stove and the gas hose are present in a kitchen environment, but the hose clamp is not, then the gas stove and the gas hose pose a gas hazard. However, if all three appliances are present in the same kitchen environment, then there is no gas hazard. Similarly, if at least two gas appliances are a gas stove, an ignition device, and a flame failure device, and both the gas stove and the ignition device are present in a kitchen environment, but the flame failure device is not, then there is a gas hazard. However, if all three appliances are present in the same kitchen environment, then there is no gas hazard.
[0081] If the image to be processed includes at least one group of gas devices that meet the second preset association relationship, then step S106 is executed. For any group of gas devices, based on the respective positions of each gas device in the image to be processed, it is determined whether each gas device has a gas hazard.
[0082] In one possible embodiment, if the positional difference between the third gas device included in any group of gas appliances and the fourth gas device (excluding the third gas device) in the image to be processed is less than a third threshold, then it is determined that neither the third nor the fourth gas device poses a gas hazard. For example, if the third gas device is an ignition device and the fourth gas device is a flameout protection device, and both the ignition device and the flameout protection device are located in a kitchen environment, and the positional difference between the ignition device and the flameout protection device is less than the third threshold, then neither the ignition device nor the flameout protection device poses a gas hazard.
[0083] If the image to be processed includes at least one exhaust gas device that does not conform to the first preset association relationship and does not conform to the second preset association relationship, then step S107 is executed. For each of the at least one exhaust gas device, the location of the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located is determined in the image to be processed to determine whether there is a gas hazard.
[0084] For example, if the difference in position between the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed is less than a second threshold, then it is determined that the exhaust gas device does not pose a gas hazard. For instance, if the exhaust gas device is a water heater with an exhaust pipe, and the corresponding target facility in the environment where the exhaust gas device is located is a window, then when the difference in spatial position between the water heater and the window in the image to be processed is less than the second threshold, the water heater does not pose a gas hazard.
[0085] Furthermore, if the target facility in the environment where the exhaust gas device is located is a wall, then if the difference between the spatial position of the water heater and the spatial position of the wall in the image to be processed is less than a second threshold, the water heater poses a gas hazard. This is merely an example, and this application does not limit the specific exhaust gas device and target facility.
[0086] In one embodiment of this application, if the number of gas devices included in the image to be processed is one, then the presence or absence of a gas hazard is determined based on the respective positions of the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed.
[0087] Similarly, if the difference in position between the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed is less than the third threshold, it is determined that there is no gas hazard in the gas device.
[0088] like Figure 2 As shown in the figure, this application provides a method for identifying gas hazard, including the following steps:
[0089] S201, Acquire the image to be processed; the image to be processed is obtained by the image acquisition device from the area where the gas device is installed.
[0090] S202, determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed.
[0091] S203, if the image to be processed includes multiple gas devices, then determine whether the image to be processed includes at least one group of gas devices that conform to the first preset association relationship; the first preset association relationship indicates that when at least two types of gas devices appear separately in the first space, each gas device does not pose a gas hazard, and when at least two types of gas devices appear simultaneously in the first space, at least two gas devices pose a gas hazard.
[0092] S204, if the image to be processed includes at least one group of gas devices that conform to the first preset association relationship, then for any group of gas devices, based on the respective positions of each gas device in the image to be processed, determine whether each gas device has a gas hazard.
[0093] like Figure 3 As shown, one embodiment of this application provides a device for identifying gas hazard, the device comprising:
[0094] Image acquisition module 301 is used to acquire an image to be processed; the image to be processed is acquired by the image acquisition device from an area where a gas device is installed;
[0095] The attribute determination module 302 is used to determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed;
[0096] The first relationship determination module 303 is used to determine whether the image to be processed includes at least one group of gas devices that meet the first preset association relationship if the number of gas devices included in the image to be processed is multiple. The first preset association relationship indicates that when the types of at least two gas devices appear individually in the first space, each gas device does not pose a gas hazard, and when the types of at least two gas devices appear simultaneously in the first space, both of the at least two gas devices pose a gas hazard.
[0097] The first gas hazard determination module 304 is used to determine whether there is a gas hazard for any gas device if the image to be processed includes at least one group of gas devices that meet the first preset association relationship, based on the respective positions of each gas device in the image to be processed.
[0098] In one possible implementation, the device further includes:
[0099] The second relationship determination module is used to determine whether the image to be processed includes at least one group of gas devices that meet the second preset association relationship if the number of gas devices included in the image to be processed is multiple. The second preset association relationship indicates that when the types of the at least two gas devices appear separately in the first space, the at least two gas devices have gas hazards, and when the types of the at least two gas devices appear simultaneously in the first space, each gas device does not have a gas hazard.
[0100] The second gas hazard determination module is used to determine whether there is a gas hazard for any gas device if the image to be processed includes at least one group of gas devices that meet the second preset association relationship, based on the respective positions of each gas device in the image to be processed.
[0101] In one possible implementation, the device further includes:
[0102] The third gas hazard determination module is used to determine whether a gas hazard exists in the image to be processed if the image to be processed includes at least one exhaust gas device that does not conform to the first preset correlation relationship and does not conform to the second preset correlation relationship. For each of the at least one exhaust gas device, the module determines whether the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located exist in the image to be processed.
[0103] In one possible implementation, for any group of gas devices that conform to the first preset association relationship, the first gas hazard determination module 304 is specifically used for:
[0104] If the position difference between the first gas device included in any group of gas devices and the second gas device included in any group of gas devices (excluding the first gas device) in the image to be processed is less than a first threshold, then it is determined that both the first gas device and the second gas device pose a gas hazard.
[0105] In one possible implementation, the third gas hazard determination module is specifically used for:
[0106] If the position difference between the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed is less than the second threshold, then it is determined that the exhaust gas device does not pose a gas hazard.
[0107] In one possible implementation, the device further includes:
[0108] The fourth gas hazard determination module is used to determine whether there is a gas hazard in the gas device if the number of gas devices included in the image to be processed is one, based on the respective positions of the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed.
[0109] In one possible implementation, the attribute determination module 302 is specifically used for:
[0110] The image to be processed is processed using a pre-trained neural network model to determine the properties of at least one gas device included in the image to be processed.
[0111] After introducing the gas hazard identification method and apparatus according to exemplary embodiments of this application, the electronic device according to another exemplary embodiment of this application will be introduced next.
[0112] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0113] In some possible implementations, the electronic device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the gas hazard identification method according to the various exemplary embodiments of this application described above. For example, the processor may perform steps such as those in the gas hazard identification method.
[0114] The following reference Figure 4 To describe an electronic device 40 according to this embodiment of the present application. Figure 4 The electronic device 40 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0115] like Figure 4 As shown, the electronic device 40 is presented in the form of a general-purpose electronic device. The components of the electronic device 40 may include, but are not limited to: at least one processor 41, at least one memory 42, and a bus 43 connecting different system components (including memory 42 and processor 41).
[0116] Bus 43 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or a local bus using any of the multiple bus structures.
[0117] The memory 42 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 421 and / or cache memory 422, and may further include read-only memory (ROM) 423.
[0118] The memory 42 may also include a program / utility 425 having a set (at least one) of program modules 424, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0119] Electronic device 40 can also communicate with one or more external devices 44 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 40, and / or with any device that enables electronic device 40 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 45. Furthermore, electronic device 40 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 46. As shown, network adapter 46 communicates with other modules used in electronic device 40 via bus 43. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0120] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 42 including instructions, which can be executed by a processor 41 to perform the above-described method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0121] In an exemplary embodiment, a computer program product is also provided, including a computer program / instructions that, when executed by a processor 41, implement any of the methods for identifying gas hazard as provided in this application.
[0122] In an exemplary embodiment, various aspects of the gas hazard identification method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps of the gas hazard identification method according to the various exemplary embodiments of this application described above.
[0123] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0124] The program product for gas hazard identification according to the embodiments of this application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device. However, the program product of this application is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0125] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0126] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.
[0127] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0128] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0129] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0130] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0131] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable electronic device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0132] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable electronic device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0133] These computer program instructions may also be loaded onto a computer or other programmable electronic device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0134] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0135] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for identifying gas hazard risks, characterized in that, The method includes: Acquire the image to be processed; the image to be processed is obtained by the image acquisition device from the area where the gas device is installed; Determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed; If the image to be processed includes multiple gas devices, then it is determined whether the image to be processed includes at least one group of gas devices that conform to the first preset association relationship; the first preset association relationship indicates that when at least two types of gas devices appear individually in the first space, each gas device does not pose a gas hazard, and when the types of at least two gas devices appear simultaneously in the first space, both of the at least two gas devices pose a gas hazard. If the image to be processed includes at least one group of gas devices that conform to the first preset association relationship, then for any group of gas devices, based on the respective positions of each gas device in the image to be processed, it is determined whether each gas device has a gas hazard.
2. The method according to claim 1, characterized in that, The method further includes: If the image to be processed includes multiple gas devices, then it is determined whether the image to be processed includes at least one group of gas devices that conform to the second preset association relationship; the second preset association relationship indicates that when the types of the at least two gas devices appear separately in the first space, the at least two gas devices both pose a gas hazard, and when the types of the at least two gas devices appear simultaneously in the first space, each gas device does not pose a gas hazard. If the image to be processed includes at least one group of gas devices that conform to the second preset association relationship, then for any group of gas devices, based on the respective positions of each gas device in the image to be processed, it is determined whether each gas device has a gas hazard.
3. The method according to claim 2, characterized in that, The method further includes: If the image to be processed includes at least one exhaust gas device that does not conform to the first preset association relationship and does not conform to the second preset association relationship, for each of the at least one exhaust gas device, based on the respective positions of the exhaust gas device and the target facility corresponding to the exhaust gas device in the environment in which the exhaust gas device is located in the image to be processed, it is determined whether the exhaust gas device has a gas hazard.
4. The method according to claim 1, characterized in that, For any group of gas devices that conforms to a first preset association relationship, determining whether each gas device in the image to be processed has a gas hazard, based on the respective positions of each gas device in the image to be processed, includes: If the position difference between the first gas device included in any group of gas devices and the second gas device included in any group of gas devices (excluding the first gas device) in the image to be processed is less than a first threshold, then it is determined that both the first gas device and the second gas device pose a gas hazard.
5. The method according to claim 3, characterized in that, The step of determining whether the exhaust gas device poses a gas hazard based on the respective locations of the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed includes: If the position difference between the exhaust gas device and the corresponding target facility in the environment where the exhaust gas device is located in the image to be processed is less than the second threshold, then it is determined that the exhaust gas device does not pose a gas hazard.
6. The method according to claim 1, characterized in that, The method further includes: If the number of gas devices included in the image to be processed is one, then based on the respective positions of the gas device and the corresponding target facility in the environment where the gas device is located in the image to be processed, it is determined whether the gas device poses a gas hazard.
7. The method according to any one of claims 1 to 6, characterized in that, Determining the attributes of at least one gas device included in the image to be processed includes: The image to be processed is processed using a pre-trained neural network model to determine the properties of at least one gas device included in the image to be processed.
8. A device for identifying gas hazard, characterized in that, The device includes: The image acquisition module is used to acquire an image to be processed; the image to be processed is obtained by the image acquisition device from the area where the gas device is installed. An attribute determination module is used to determine the attributes of at least one gas device included in the image to be processed; the attributes include the type of gas device and the location of the gas device in the image to be processed; The relationship determination module is used to determine whether the image to be processed includes at least one group of gas devices that meet the first preset association relationship if the number of gas devices included in the image to be processed is multiple. The first preset association relationship indicates that when the types of at least two gas devices appear individually in the first space, each gas device does not pose a gas hazard, and when the types of at least two gas devices appear simultaneously in the first space, both of the at least two gas devices pose a gas hazard. A gas hazard determination module is used to determine whether there is a gas hazard for any gas device if the image to be processed includes at least one group of gas devices that meet a first preset association relationship, based on the respective positions of each gas device in the image to be processed.
9. An electronic device, characterized in that, The electronic device includes at least a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for detecting potential safety hazard of gas equipment
CN115205265A
Method and device for identifying potential safety hazards
CN115376120A
