A dangerous chemical inspection method, system and device and storage medium

By combining image acquisition terminals and AI recognition algorithms, intelligent inspection of hazardous chemicals has been achieved, solving the problem of low efficiency in existing technologies, improving inspection efficiency and reducing costs.

CN119445220BActive Publication Date: 2026-03-17GUDONG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies for the inspection of hazardous chemicals are inefficient, rely on manual review which consumes a lot of manpower and resources, and have time delays, leading to increased costs for the storage of hazardous chemicals.

Method used

Image acquisition terminals are used to collect image data of hazardous chemicals. The AI ​​recognition algorithm on the server side generates a label image to be tested, which is then matched with a standard label image for intelligent classification, reducing the manual review process.

Benefits of technology

It improves the efficiency of hazardous chemical inspection, ensures the safety of inspection personnel, reduces manual intervention, and lowers operating and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445220B_ABST
    Figure CN119445220B_ABST
Patent Text Reader

Abstract

This application relates to a method, system, apparatus, and storage medium for inspecting hazardous chemicals, belonging to the field of image recognition technology for hazardous chemicals. The method includes: an image acquisition terminal acquiring image data of the hazardous chemicals; a server generating a test label image based on the image data, the test label image being a local area image of the hazardous chemical; the server also obtaining a target label image based on the test label image and a standard label image, the standard label image being a pre-trained label image based on a pictograph of the hazardous chemical, and the target label image being a label image used to indicate the category of the hazardous chemical. This application acquires image data of hazardous chemicals through an image acquisition terminal, and then the server intelligently checks the category of the hazardous chemicals based on the image data, reducing the manual review process and improving the efficiency of hazardous chemical inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology for hazardous chemicals, and in particular to a method, system, device and storage medium for inspecting hazardous chemicals. Background Technology

[0002] Hazardous chemicals, also known as hazardous chemicals, refer to chemicals that possess properties such as explosiveness, corrosiveness, toxicity, flammability, and oxidizing properties, posing certain hazards to human health, equipment, and the environment. Therefore, the United Nations established the Globally Harmonized Classification and Labelling System for Chemicals (GHS) to enable companies to correctly classify hazardous chemicals and affix GHS labels when producing, handling, and importing or exporting them. This allows customs authorities to verify the compliance of hazardous chemicals through the company's declaration information and the GHS labels on the chemicals.

[0003] Currently, the identification of hazardous chemicals at both the customs and enterprise levels still relies on manual review, with few or no cases of using deep learning models for intelligent verification. Furthermore, manual review of imported and exported hazardous chemicals is extremely time-consuming and resource-intensive. For example, customs officials need to manually verify whether the GHS labels affixed to the hazardous chemicals match the GHS labels declared by the enterprise, based on the enterprise's application documents. The larger the quantity of hazardous chemicals, the longer the inspection takes. This low efficiency and time lag result in hazardous chemicals remaining at the enterprise, incurring higher storage costs. Summary of the Invention

[0004] To address the problem of low efficiency in the inspection of hazardous chemicals, this application provides a method, system, apparatus, and storage medium for the inspection of hazardous chemicals.

[0005] In a first aspect of this application, a method for inspecting hazardous chemicals is provided. The method includes:

[0006] Image acquisition terminals collect image data of hazardous chemicals;

[0007] The server generates a test label image based on the image data, and the test label image is a local area image of the hazardous chemical.

[0008] The server also obtains a target label image based on the label image to be tested and the standard label image. The standard label image is a label image pre-trained based on the pictogram of the hazardous chemical, and the target label image is a label image used to indicate the category to which the hazardous chemical belongs.

[0009] By adopting the above technical solution, firstly, inspection personnel use image acquisition terminals to collect image data of hazardous chemicals, freeing their hands while ensuring their personal safety. Then, the server receives the image data, intelligently detects the local area containing the hazardous chemicals within the image data, and obtains a label image to be tested. Based on the obtained label image, it matches the corresponding standard label image to achieve intelligent classification of hazardous chemicals, reducing the manual review process and thus improving the efficiency of hazardous chemical inspection.

[0010] In one possible implementation: the server further obtains a target label map based on the label map to be tested and the standard label map, including:

[0011] Identify the features to be tested in the label image to be tested, the features being used to reflect the category to which the label image to be tested belongs;

[0012] Based on the features to be tested, the similarity between the label image to be tested and the standard label image is calculated;

[0013] The standard label image with the highest similarity to the label image to be tested is selected as the target label image.

[0014] In one possible implementation: the feature to be tested is located within an identifier box;

[0015] The step of calculating the similarity between the label image to be tested and the standard label image based on the features to be tested includes:

[0016] Calculate the confidence level between the feature to be tested and the standard feature within each of the labeled boxes, wherein the standard feature is used to reflect the category to which the standard label image belongs;

[0017] Select the standard feature with the highest confidence level relative to the feature to be tested as the target feature of the bounding box;

[0018] The number of target features contained in the standard label image is proportional to the similarity between the label image to be tested and the standard label image.

[0019] In one possible implementation: the features to be tested include text, color, outline, texture, and shape.

[0020] By adopting the above technical solution, multiple features such as text, color, outline, texture, and shape in the label image to be tested are used as the basis for selecting the target label image, thereby ensuring the accuracy of the selected target label image and thus ensuring the accuracy of the category to which the analyzed label image belongs.

[0021] In one possible implementation, the method further includes:

[0022] When multiple standard label images contain the same number of target features:

[0023] Calculate the confidence score of each of the multiple standard label images. The confidence score is the sum of the confidence scores between the feature to be tested and the target feature corresponding to the feature to be tested within each of the labeled boxes on the label image to be tested.

[0024] The standard label image with the highest confidence score is used as the target label image.

[0025] By adopting the above technical solution, when multiple standard label images contain the same number of target features, that is, when the similarity between the label image to be tested and multiple standard label images is the same, the standard label image with the highest confidence value is selected as the target label image. This ensures that the selected target label image not only contains the most features that are the same as the label image to be tested, but also that the same features are the closest, further guaranteeing the accuracy of the selected target label image.

[0026] In one possible implementation: the server generates a label image to be tested based on the image data, including:

[0027] Use the local area where the hazardous chemicals are located in the image data as the intermediate label image;

[0028] The aspect ratio of the intermediate label image is adjusted to a preset ratio, and high-temperature thinning and background suppression models are used to suppress interference information in the intermediate label image to obtain the label image to be tested.

[0029] By adopting the above technical solution, firstly, an image of the local area where the hazardous chemicals are located is extracted as an intermediate label image to reduce the interference of other area images on the inspection results. Simultaneously, the aspect ratio of the intermediate label image is adjusted and interference information is suppressed to further reduce the interference of other information on the inspection results, ensuring the accuracy of the inspection results.

[0030] In one possible implementation: before the server generates the label image to be tested based on the image data, the method further includes:

[0031] Collect pictographic images of various hazardous chemicals to create training samples;

[0032] The AI ​​recognition algorithm is trained using the aforementioned training samples;

[0033] The trained AI recognition algorithm generates a label image to be tested based on the image data.

[0034] By adopting the above technical solution, this application creates training samples based on pictographic images of various hazardous chemicals, and then uses these training samples to train the AI ​​recognition algorithm, ensuring the accuracy of the AI ​​recognition algorithm. Based on the trained AI recognition algorithm, the algorithm intelligently analyzes the image data to determine the category of the hazardous chemical, reducing the manual review process and thus improving the efficiency of hazardous chemical inspection.

[0035] In a second aspect of this application, a hazardous chemical inspection system is provided. The system includes:

[0036] Image acquisition terminal, used to acquire image data of hazardous chemicals;

[0037] The server includes a data generation module and a data determination module;

[0038] The data generation module is used by the server to generate a test label image based on the image data, wherein the test label image is an image of a local area where the hazardous chemical is located.

[0039] The data determination module is used to obtain a target label image based on the label image to be tested and the standard label image. The standard label image is a label image obtained in advance based on the pictogram of the hazardous chemical, and the target label image is a label image used to indicate the category to which the hazardous chemical belongs.

[0040] In a third aspect of this application, a hazardous chemical inspection device is provided. The device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement any of the aforementioned hazardous chemical inspection methods.

[0041] In a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements any of the above-described hazardous chemical inspection methods.

[0042] In summary, this application includes at least one of the following beneficial technical effects:

[0043] First, inspection personnel use image acquisition terminals to collect image data of hazardous chemicals, freeing their hands while ensuring their personal safety. Then, the server receives the image data and retrieves a pre-trained AI recognition algorithm. This algorithm intelligently detects the local area containing the hazardous chemicals in the image data, thus obtaining a test label image. The resulting test label image is then matched against a corresponding standard label image. Specifically, during matching, multiple features in the test label image, such as text, color, outline, texture, and shape, are used as the basis for selecting the target label image, ensuring the accuracy of the selected target label image and consequently the accuracy of the category assigned to the analyzed test label image. Because this matching process is intelligently analyzed by the AI ​​recognition algorithm, manual review is reduced, thereby improving the efficiency of hazardous chemical inspection. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of an exemplary operating environment of an embodiment of this application.

[0045] Figure 2 This is a flowchart of a hazardous chemical inspection method according to an embodiment of this application.

[0046] Figure 3 This is an example diagram of a pictogram of a hazardous chemical in an embodiment of the method of this application.

[0047] Figure 4 This is an example image of a pre-set label image in the method embodiments of this application.

[0048] Figure 5 This is a block diagram of a hazardous chemical inspection system according to an embodiment of this application.

[0049] Explanation of reference numerals in the attached diagram: 10, image acquisition terminal; 20, server; 21, data generation module; 22, data determination module. Detailed Implementation

[0050] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] Figure 1 A schematic diagram of an exemplary operating environment in which embodiments of the present application can be implemented is shown. The operating environment includes an image acquisition terminal 10 and a server 20. The image acquisition terminal 10 and the server 20 communicate with each other via a wired connection or a wireless connection. The wired connection can be a cable connection, and the wireless connection can be a Wi-Fi, Bluetooth, 4G, or 5G network.

[0053] Image acquisition terminal 10 can be any terminal device with image acquisition and uploading functions, such as AR glasses, mobile phones, tablets, or cameras. In this example, AR glasses are used. AR glasses are commonly used smart glasses on the market that can support shooting or recording through voice, blinking, and button pressing. In addition to recording and shooting functions, AR glasses can also quickly locate the position of hazardous chemicals from a first-person perspective and provide a first-person perspective for non-persons to observe the inspection site of hazardous chemicals, freeing up the hands of customs and enterprise inspection personnel and ensuring their personal safety.

[0054] Server 20 can be integrated with image acquisition terminal 10, in which case server 20 is a micro-server. Server 20 can also be set up independently outside of image acquisition terminal 10 to receive images or videos uploaded by image acquisition terminal 10. Specifically, server 20 is CPU-based, supporting the execution of AI recognition algorithms, which are deep learning-based object detection algorithms, such as the YOLOv5 network model or Faster R-CNN from the YOLO series. YOLOv5 uses CSPDarknet53 as its backbone network and introduces an adaptive training strategy, which can automatically adjust the parameters of the network model according to the hardware resources of server 20, improving the generalization ability of the network model. Faster R-CNN achieves high efficiency by sharing convolutional features with the detection network through a fully convolutional network (region proposal network, RPN). Specifically, RPN can simultaneously predict bounding boxes and the score of each bounding box. Bounding boxes are used to label feature information in the image, thereby achieving the goal of efficiently selecting high-quality regions within the bounding boxes.

[0055] It should be noted that, Figure 1 The operating environment shown is illustrative only and is not intended to limit the application or use of the embodiments of this application. For example, the operating environment may include multiple image acquisition terminals 10 and multiple servers 20, each server 20 being used to interact with one or more image acquisition terminals 10.

[0056] Figure 2A flowchart of a hazardous chemical inspection method according to an embodiment of this application is shown. The main process of the method is described below.

[0057] Step S100: Image acquisition terminal 10 acquires image data of hazardous chemicals.

[0058] In scenarios requiring the inspection of hazardous chemicals, inspectors wear AR glasses. After observing the location of the hazardous chemicals, they control the AR glasses to image the hazardous chemicals or record their location to obtain video data via voice, blinking, or pressing a button. Finally, the AR glasses upload the captured images or recorded video data to server 20.

[0059] In step S200, server 20 generates a test label image based on image data. The test label image is an image of a local area where the hazardous chemical is located.

[0060] As can be seen from the embodiment of the operating environment, the server 20 is equipped with an AI recognition algorithm, which is one of the YOLOv5 network model and Faster RCNN. This example uses the YOLOv5 network model as an example for illustration.

[0061] Before using the YOLOv5 network model, you need to train the YOLOv5 network model. The training process is as follows.

[0062] First, collect pictograms to create training samples. Start by collecting pictograms of hazardous chemicals from the internet or expert databases. Currently, there are nine commonly used pictogram types: explosives, flammable substances, compressed gases, corrosive substances, toxic substances, health hazards, irritants, and environmental hazards. Figure 3 As shown, the pictograms for the nine hazardous chemicals all have diamond-shaped borders and a white background. Then, the collected pictograms are inserted into pre-set label images. In a specific example, the label image format is as follows: Figure 4As shown, the label image includes the product name, a corresponding pictogram, a product identifier, signal words, supplier identification, hazard statements, and precautions. The product name refers to the name of the hazardous chemical. The pictogram corresponding to the product name is determined based on the chemical properties of the hazardous chemical; for example, liquid ammonia is toxic, so the corresponding pictogram is a toxicity pictogram. The product identifier is a general term for various statements and instructions used to indicate the hazardous chemical. The product identifier mainly includes the place of origin, the name and address of the manufacturer, the main ingredients, specifications, etc. This product identifier can be marked on the hazardous chemical or its packaging. Signal words are keywords related to the hazardous chemical. The supplier identification is the identification of the manufacturer of the hazardous chemical or the source of the hazardous chemical. Hazard statements and precautions are used to explain the precautions for using or storing the hazardous chemical. Of course, the label image can be customized to add hazardous chemical-related information as needed, such as adding a shelf life or deleting signal words.

[0063] To increase the richness of the training samples, and because hazardous chemicals may have multiple chemical properties, various pictograms are combined. These combined pictograms are then inserted into the label image, allowing one product name to correspond to multiple pictograms. For example, the flammability pictogram and the irritant pictogram are combined into a single image, and this image set is then inserted into the pictogram frame of the label image, with each pictogram occupying one frame. Another example is that after combining the flammability and irritant pictograms into a single image, a pictogram from the explosives pictogram, compressed gas pictogram, corrosive pictogram, toxicity pictogram, health hazard pictogram, and environmental hazard pictogram is selected and recombinated with this image set, resulting in a new image composed of three pictograms. Finally, this new image set is inserted into the label image.

[0064] For the labeled pictograms, the LabelImg tool is used for data annotation, creating a file containing nine labels in the format classes.txt. The nine labels are represented by baozhaowu, huoyan, yanghuaji, yasuoqiti, fushiwu, duxing, weihaijiankang, cijixing, and huanjing, respectively. Finally, training samples of pictograms with labeled labels are obtained.

[0065] Then, the YOLOV5 network model is trained using training samples, and the number of iterations or loss function is set. When the number of training iterations reaches the set number or the output value of the loss function meets the set value, the YOLOV5 network model completes training.

[0066] Based on the pre-trained YOLOV5 network model, when the server 20 receives the image data uploaded by the image acquisition terminal 10, it calls the YOLOV5 network model and generates the test label map based on the image data. The specific processing flow is shown in steps S210 to S220.

[0067] Step S210: Extract the area containing hazardous chemicals from the image data as an intermediate label image.

[0068] First, the image data needs to be parsed. Since image data can be either images or videos, it is necessary to parse the image data after obtaining it.

[0069] Then, it is determined whether the image data is an image. If it is an image, the local area containing the hazardous chemical is used as the intermediate label image, and other areas are considered invalid and deleted. If the image data contains video, the most representative video frame from the video stream is extracted as the image of the hazardous chemical, and the local area containing the hazardous chemical is used as the intermediate label image, while other areas are considered invalid and deleted. Image recognition technology is used to identify the local area containing the hazardous chemical, which is pre-built and integrated into the YOLOv5 network model. Similarly, selecting the most representative video frame from the video stream is also pre-built and integrated into the YOLOv5 network model. For example, YOLOv5 is first used to identify the video frame with the most information, and then frame filtering technology is used to remove other video frames, retaining only the video frame with the most information.

[0070] Step S220: Preprocess the intermediate label image to obtain the label image to be tested.

[0071] First, the aspect ratio of the intermediate label image is adjusted to a preset ratio. Then, a high-temperature thinning and background suppression model is used to suppress interference information in the intermediate label image to obtain the label image to be tested. The high-temperature thinning and background suppression model consists of a high-temperature thinning sub-model and a background suppression sub-model. The high-temperature thinning sub-model allows the model to learn an appropriate feature scale and improve the representation ability of various features, while the background suppression sub-model uses classification confidence to divide the intermediate label image into foreground and background and suppresses features in low-confidence regions, thereby improving the model's discrimination ability and achieving the effect of suppressing interference information in the intermediate label image.

[0072] In addition to the above-mentioned preprocessing steps, the preprocessing process may also include normalizing the pixels on the intermediate label image to the same measurement range, or performing data augmentation operations such as random enhancement, random flipping, or rotation on the intermediate label image to improve the quality of the obtained label image to be tested.

[0073] In step S300, server 20 also obtains a target label image based on the label image to be tested and the standard label image. The standard label image is a label image that has been trained in advance based on the pictograph of the hazardous chemical, and the target label image is a label image used to indicate the category to which the hazardous chemical belongs.

[0074] First, the YOLOv5 network model identifies the features to be tested in the label image. These features reflect the category to which the label image belongs. Since the label image is a local area containing hazardous chemicals, its category is also the category to which the hazardous chemicals belong. In a specific example, the features to be tested include text, color, outline, texture, and shape information in the label image. After identifying the features, the YOLOv5 network model marks each feature with bounding boxes. That is, it draws a bounding box around each feature. Therefore, the more features contained in the label image, the more bounding boxes are generated.

[0075] Next, retrieve the standard label image. The standard label image is obtained by pre-training the YOLOv5 network model and then reviewing and correcting it through experts in the relevant field. The standard label image includes standard features such as product name, pictogram corresponding to the product name, product identifier, signal words, supplier identification, hazard statement and preventive measures, etc. Other standard features can also be customized and added according to actual needs.

[0076] The similarity between the test label image and the standard label image is calculated. Specifically, the confidence score between the test feature and the standard feature within each bounding box is calculated. Taking text as the test feature, the higher the confidence score, the more semantically similar the text within the bounding box is to the text in the standard label image. The standard feature with the highest confidence score with the test feature is then selected as the target feature for that bounding box, while other standard features are discarded to reduce false detections. Simultaneously, the coordinates of the bounding boxes with identified target features are output. These bounding boxes are decrypted and converted into their actual coordinates on the test label image to bind the bounding boxes with identified target features to the target feature, preventing duplicate calculations. Therefore, each bounding box corresponds to a target feature, and the more target features the standard label image contains, the higher the similarity to the test label image. Conversely, when the standard label image contains zero target features, the similarity between the standard label image and the test label image is considered zero.

[0077] Finally, the standard label image with the highest similarity to the label image to be tested is selected as the target label image. The product name on the target label image is the name of the hazardous chemical, and the pictograph on the target label image represents the chemical properties of the hazardous chemical, which also represents the category to which the hazardous chemical belongs. It should be noted that when multiple standard label images contain the same number of target features, that is, when the label image to be tested and multiple standard label images have the same similarity, the confidence score of each of the multiple standard label images with the same similarity is calculated. Here, the confidence score is the sum of the confidence scores between the feature to be tested within each bounding box on the label image to be tested and the target feature corresponding to the feature to be tested. The standard label image with the highest confidence score is then selected as the target label image.

[0078] Server 20 combines the obtained target label image, the confidence scores of the target label image and the label image to be tested, and the location coordinates of the label image to be tested into inspection result data, and saves the inspection result data to the storage. Simultaneously, the inspection result data is returned to the AR glasses. The AR glasses, based on the location of the label image to be tested, retrieve the target label image and overlay it onto the real-world scene. This facilitates quick verification by inspection personnel to confirm whether the hazardous chemicals match the hazardous chemicals declared by the enterprise, thereby shortening the time for manual inspection of hazardous chemicals by customs, reducing the clearance time for imported and exported hazardous chemicals, and significantly reducing the manpower inspection costs for customs personnel. Furthermore, the shortened clearance time reduces the storage costs for enterprises when hazardous chemicals are detained, significantly reducing the operating costs for enterprises and lowering the management risks of hazardous chemicals at the enterprise level.

[0079] In addition, after receiving the inspection result data, the AR glasses can also retrieve the corresponding identifiers to the target label image. The identifiers are one or more of the above-mentioned items such as baozhaowu, huoyan, yanghuaji, yasuoqiti, fushiwu, duxing, weihaijiankang, cijixing, and huanjing, which makes it easier for inspectors to know the identifiers of the hazardous chemicals they are inspecting.

[0080] In summary, the implementation principle of the hazardous chemical inspection method according to this application embodiment is as follows: First, AR glasses are used to collect image data of hazardous chemicals for inspectors, freeing their hands while ensuring their personal safety. Then, the server 20 receives the image data and, by retrieving a pre-trained AI recognition algorithm, intelligently detects the local area image where the hazardous chemicals are located in the image data, and matches the corresponding standard label image to that area image to achieve intelligent classification of hazardous chemicals, thereby improving the inspection efficiency of hazardous chemicals.

[0081] Figure 5A block diagram of a hazardous chemical inspection system according to an embodiment of this application is shown. The system includes the aforementioned AR glasses and server 20, and server 20 can be further divided into a data generation module 21 and a data determination module 22.

[0082] The data generation module 21 is used to generate a test label image based on the image data. The test label image is an image of a local area where the hazardous chemical is located.

[0083] The data determination module 22 is used by the server 20 to obtain a target label image based on the label image to be tested and the standard label image. The standard label image is a label image that has been trained in advance based on the pictograph of the hazardous chemical, and the target label image is a label image used to indicate the category to which the hazardous chemical belongs.

[0084] The modules described in the embodiments of this application can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor may be described as including a data generation module 21 and a data determination module 22. The names of these modules do not necessarily limit the module itself; for example, the data generation module 21 may also be described as "a module for generating a label image to be tested based on image data."

[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0086] To better execute the above-described method, this application also provides a hazardous chemical inspection device, which includes a memory and a processor.

[0087] The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing the aforementioned hazardous chemical inspection methods, etc.; the data storage area may store data involved in the aforementioned hazardous chemical inspection methods, etc.

[0088] A processor may include one or more processing cores. The processor executes instructions, programs, code sets, or instruction sets stored in memory, and calls data stored in memory to perform various functions and process data as described in this application. The processor may be at least one of a specific application-specific integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field-programmable gate array, a central processing unit, a controller, a microcontroller, and a microprocessor. It is understood that, for different devices, the electronic devices used to implement the above-described processor functions may also be other types, and the embodiments of this application do not specifically limit the specific implementation.

[0089] This application also provides a computer-readable storage medium, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code. This computer-readable storage medium stores a computer program that can be loaded by a processor and executed using the aforementioned hazardous chemical inspection method.

[0090] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A dangerous chemical inspection method, characterized in that, The method comprises the following steps: An image acquisition terminal (10) acquires image data of a hazardous chemical; A server (20) generates a to-be-tested label map according to the image data, the to-be-tested label map being an image of a local area where the hazardous chemical is located; The server (20) further obtains a target label map according to the to-be-tested label map and a standard label map, the standard label map being a label map obtained by training in advance according to a pictograph of the hazardous chemical, and the target label map being a label map used for indicating a category to which the hazardous chemical belongs; The server (20) further obtains a target label map according to the to-be-tested label map and a standard label map, comprising: identifying a to-be-tested feature in the to-be-tested label map, the to-be-tested feature being used for reflecting a category to which the to-be-tested label map belongs, the to-be-tested label map being an image of a local area where the hazardous chemical is located, and the category to which the to-be-tested label map belongs being a category to which the hazardous chemical belongs; calculating a similarity between the to-be-tested label map and the standard label map according to the to-be-tested feature; selecting a standard label map with the highest similarity to the to-be-tested label map as the target label map; the to-be-tested feature is located in a bounding box; the calculating a similarity between the to-be-tested label map and the standard label map according to the to-be-tested feature comprises: calculating a confidence between the to-be-tested feature and a standard feature in each of the bounding boxes, the standard feature being used for reflecting a category to which the standard label map belongs; selecting a standard feature with the highest confidence to the to-be-tested feature as a target feature of the bounding box; a number of target features contained in the standard label map is proportional to the similarity between the to-be-tested label map and the standard label map; when the number of target features contained in a plurality of the standard label maps is the same: calculating a confidence value of each of the plurality of the standard label maps, the confidence value being a sum of the confidence between the to-be-tested feature in each of the bounding boxes of the to-be-tested label map and the target feature corresponding to the to-be-tested feature; selecting a standard label map with the largest confidence value as the target label map; the server (20) generates a to-be-tested label map according to the image data, comprising: taking a local area image of the hazardous chemical in the image data as an intermediate label map; adjusting a width-height ratio of the intermediate label map to a preset ratio, and suppressing interference information in the intermediate label map by using a high-temperature refinement and background suppression model to obtain the to-be-tested label map.

2. The dangerous chemical inspection method according to claim 1, characterized by, The to-be-tested feature comprises a character, a color, an outline, a texture, and a shape.

3. The dangerous chemical inspection method according to claim 1, characterized by, Before the server (20) generates the to-be-tested label map according to the image data, the method further comprises: collecting pictographs of a plurality of hazardous chemicals to make training samples; training an AI recognition algorithm by using the training samples; generating the to-be-tested label map according to the image data by using the trained AI recognition algorithm.

4. A dangerous chemical inspection system characterized by, The method comprises the following steps: An image acquisition terminal (10) acquires image data of a hazardous chemical; A server (20) comprises a data generation module (21) and a data determination module (22). The data generation module (21) is configured to generate, by the server (20), a to-be-tested label map from the image data, the to-be-tested label map being a local area image in which the hazardous chemical is located; The data determination module (22) is configured to obtain a target label map from the to-be-tested label map and a standard label map, the standard label map being a label map trained in advance from a pictograph of the hazardous chemical, and the target label map being a label map used to indicate a category to which the hazardous chemical belongs. The server (20) further obtains the target label map from the to-be-tested label map and the standard label map, and the method comprises the following steps: identifying a to-be-tested feature in the to-be-tested label map, the to-be-tested feature being used to reflect a category to which the to-be-tested label map belongs, the to-be-tested label map being a local area image in which the hazardous chemical is located, and the category to which the to-be-tested label map belongs being a category to which the hazardous chemical belongs; calculating a similarity between the to-be-tested label map and the standard label map according to the to-be-tested feature; selecting a standard label map with the highest similarity to the to-be-tested label map as the target label map; the to-be-tested feature is located in a bounding box; the calculating of the similarity between the to-be-tested label map and the standard label map according to the to-be-tested feature comprises the following steps: calculating a confidence between the to-be-tested feature and a standard feature in each of the bounding boxes, the standard feature being used to reflect a category to which the standard label map belongs; selecting a standard feature with the highest confidence to the to-be-tested feature as a target feature of the bounding box; a number of target features contained in the standard label map is proportional to the similarity between the to-be-tested label map and the standard label map; when the number of target features contained in a plurality of the standard label maps is the same: calculating a confidence value of each of the standard label maps in the plurality of the standard label maps, the confidence value being a sum of the confidence between the to-be-tested feature in each of the bounding boxes of the to-be-tested label map and the target feature corresponding to the to-be-tested feature; selecting a standard label map with the largest confidence value as the target label map; The server (20) generates the to-be-tested label map from the image data, and the method comprises the following steps: taking a local area image in which the hazardous chemical is located in the image data as an intermediate label map; adjusting a width-height ratio of the intermediate label map to a preset ratio, and suppressing interference information in the intermediate label map by using a high-temperature refinement and background suppression model to obtain the to-be-tested label map.

5. A hazardous chemical inspection device, characterized by, The server (20) comprises a memory and a processor, the memory stores a computer program, and the processor executes the program to implement the method of any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer program is stored on the memory and is executed by the processor to implement the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Video data processing method and device, computer and readable storage medium

    CN111950424A