Identification method and identification device of hazardous article identifier, electronic equipment and storage medium
By using the YOLOV8 model and the dangerous product logo detection model of the dangerous product of the poly head, identify the dangerous goods logo of the item, solve the problem of leaking dangerous goods identification due to vision fatigue, and reduced safety risks.
Patent Information
- Application Number
- CN202310920141.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, users can see whether there are dangerous goods marks on the surface of the article through their eyes, which can easily miss the appearance due to visual fatigue, resulting in mistakenly considering ordinary items and increasing safety risks.
The dangerous product logo detection model, including the YOLOV8 model and multi -header attention module. By obtaining items and input to the detection model, the test information is obtained to identify the items to identify items.
The dangerous goods logo of automatic identification of items is realized to avoid leaks due to eye fatigue, reducing hazardous accidents and safety risks caused by mistakes that ordinary items are considered.
Smart Images

Figure CN119380345A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a method for identifying hazardous goods labels, an identification device, an electronic device and a storage medium. Background Art
[0002] Dangerous goods refer to items that have dangerous properties such as explosion, flammability, poison, infection, corrosion, radioactivity, etc., which are easy to cause personal injury, property damage or environmental pollution during transportation, storage, production, operation, use and disposal, and require special protection. Dangerous goods signs are used to indicate the physical and chemical properties of dangerous goods, as well as the degree of danger. It can remind people to handle them according to the corresponding dangerous goods handling regulations during transportation, storage, custody, handling and other activities. Therefore, it is particularly important to identify the dangerous goods signs of items during transportation, storage, custody, handling and other processes.
[0003] At present, the identification of hazardous materials labels on items is mainly carried out by observing the surface of the items with the user's eyes, and determining whether the items are marked with hazardous materials labels based on whether the hazardous materials labels are observed by the human eye.
[0004] However, when users experience visual fatigue, they may easily miss the hazardous materials markings on the surface of items. Items without hazardous materials markings may be mistaken for ordinary items. If the items are not handled in accordance with the corresponding hazardous materials handling specifications, dangerous accidents may easily occur, leading to increased safety risks in handling the items. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a method, an identification device, an electronic device and a storage medium for identifying a hazardous goods mark, so as to overcome or at least partially solve the above problems of the prior art.
[0006] In the first aspect, an embodiment of the present application provides a method for identifying hazardous goods labels, including: obtaining an image of an object; inputting the image of the object into a hazardous goods label detection model to obtain corresponding detection information, the hazardous goods label detection model includes at least a yolov8 model and a multi-head attention module, and the detection information is object coordinate information or hazardous goods label information.
[0007] In the second aspect, the embodiment of the present application provides a device for identifying dangerous goods labels, including an acquisition module and an item image input module. The acquisition module is used to acquire an item image; the item image input module is used to input the item image into a dangerous goods label detection model to obtain corresponding detection information, the dangerous goods label detection model at least includes a yolov8 model and a multi-head attention module, and the detection information is item coordinate information or dangerous goods label information.
[0008] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory; one or more processors coupled to the memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method for identifying dangerous goods identification as provided in the first aspect above.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute a method for identifying dangerous goods markings as provided in the first aspect above.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the method for identifying dangerous goods identification as provided in the first aspect above.
[0011] The solution provided by the present application obtains corresponding detection information by acquiring an image of an object and inputting the image of the object into a hazardous goods identification detection model. The hazardous goods identification detection model includes at least a yolov8 model and a multi-head attention module. The detection information is object coordinate information or hazardous goods identification information. The hazardous goods identification of the object is identified based on the hazardous goods identification detection model. This can avoid mistaking the object for an ordinary object due to missing the hazardous goods identification of the object due to eye fatigue, and preventing the object from being handled in accordance with the corresponding hazardous goods handling specifications, which may lead to dangerous accidents. This reduces the safety risks of handling the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or exemplary technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A schematic diagram of a scenario of a dangerous goods identification system provided in an embodiment of the present application is shown.
[0014] Figure 2 A schematic flow chart of a method for identifying dangerous goods markings provided in an embodiment of the present application is shown.
[0015] Figure 3 Another flow chart of the method for identifying dangerous goods labels provided in an embodiment of the present application is shown.
[0016] Figure 4A structural schematic diagram of a dangerous goods mark detection model in the dangerous goods mark recognition method provided in an embodiment of the present application is shown.
[0017] Figure 5 Another flow chart of the method for identifying dangerous goods labels provided in an embodiment of the present application is shown.
[0018] Figure 6 A structural block diagram of a dangerous goods identification device provided in an embodiment of the present application is shown.
[0019] Figure 7 A functional block diagram of an electronic device provided in an embodiment of the present application is shown.
[0020] Figure 8 A computer-readable storage medium provided in an embodiment of the present application for storing or carrying a program code for implementing a method for identifying a hazardous goods mark provided in an embodiment of the present application is shown.
[0021] Fig. 9 A computer program product provided in an embodiment of the present application and used to store or carry program codes for implementing a method for identifying dangerous goods identification provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0024] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates other working conditions.
[0025] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0026] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0027] Dangerous goods refer to items that have dangerous properties such as explosion, flammability, poison, infection, corrosion, radioactivity, etc., which are easy to cause personal injury, property damage or environmental pollution during transportation, storage, production, operation, use and disposal, and require special protection. Dangerous goods signs are used to indicate the physical and chemical properties of dangerous goods, as well as the degree of danger. It can remind people to handle them according to the corresponding dangerous goods handling regulations during transportation, storage, custody, handling and other activities. Therefore, it is particularly important to identify the dangerous goods signs of items during transportation, storage, custody, handling and other processes.
[0028] At present, the identification of hazardous materials labels on items is mainly carried out by observing the surface of the items with the user's eyes, and determining whether the items are marked with hazardous materials labels based on whether the hazardous materials labels are observed by the human eye.
[0029] However, when users experience visual fatigue, they may easily miss the hazardous materials markings on the surface of items. Items without hazardous materials markings may be mistaken for ordinary items. If the items are not handled in accordance with the corresponding hazardous materials handling specifications, dangerous accidents may easily occur, leading to increased safety risks in handling the items.
[0030] In response to the above problems, the embodiments of the present application provide a method for identifying hazardous goods labels, an identification device, an electronic device and a storage medium. By acquiring an image of an object and inputting the image of the object into a hazardous goods label detection model, corresponding detection information is obtained. The hazardous goods label detection model includes at least a yolov8 model and a multi-head attention module. The detection information is object coordinate information or hazardous goods label information. The hazardous goods label of an object is identified based on the hazardous goods label detection model. This can avoid mistaking the object for an ordinary object due to eye fatigue and missing the hazardous goods label. The object is not handled in accordance with the corresponding hazardous goods handling specifications, which may lead to dangerous accidents. This reduces the safety risks of handling the object.
[0031] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0032] See also Figure 1, which shows a schematic diagram of an application scenario of the dangerous goods identification system provided in an embodiment of the present application, which may include a processing device 100 and an object 200. The processing device 100 can be used to obtain an object image of the object 200 and perform dangerous goods identification on the object 200 based on the object image.
[0033] The processing device 100 may be a terminal device or a server, etc. The type of the processing device 100 is not limited here and may be specifically configured according to actual needs.
[0034] The terminal device can be a mobile terminal device (for example, any one of a mobile phone, a personal digital assistant (PDA), a tablet personal computer (Tablet PC), a laptop computer, a smart watch, a smart bracelet or a wearable device, etc.), or a fixed terminal device (desktop computer, smart panel, etc.), etc.
[0035] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or any one of the cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data or artificial intelligence platforms, etc.
[0036] Article 200 may be an ordinary article or a dangerous article, etc. Ordinary articles are not marked with a dangerous article label, while dangerous articles may include flammable articles, explosive articles, corrosive articles, toxic articles, and radioactive articles, etc., and dangerous articles are marked with a corresponding dangerous article label.
[0037] See also Figure 2 , which shows a flow chart of a method for identifying a dangerous goods mark provided by an embodiment of the present application. In a specific embodiment, the method for identifying a dangerous goods mark can be applied to Figure 1 The processing device 100 in the identification system of dangerous goods identification is shown in FIG. Figure 2 The process shown is described in detail, and the method for identifying a dangerous goods mark may include the following steps S110 to S130.
[0038] Step 110: Acquire an object image.
[0039] In an embodiment of the present application, when a user needs to identify a dangerous goods mark on an item, an identification instruction can be sent to a processing device, and the processing device receives and responds to the identification instruction to obtain an item image of the item.
[0040] In some embodiments, the processing device may be provided with a camera. When a user needs to identify a dangerous goods label on an item, an identification instruction may be sent to the processing device. The processing device receives and responds to the identification instruction, controls the camera to capture an image of the item, and obtains a corresponding item image.
[0041] Among them, the camera can be any one of a white light camera, an infrared camera, a laser camera, etc. The type of camera is not limited here and can be set according to actual needs.
[0042] In some embodiments, the hazardous goods identification system may further include a six-sided scanning device, which is connected to the processing device via a network and exchanges data with the processing device via the network.
[0043] When the user needs to identify the dangerous goods label of an item, an identification instruction can be sent to the processing device. The processing device receives and responds to the identification instruction, and sends an image acquisition instruction to the six-sided scanning device via the network. The six-sided scanning device receives and responds to the image acquisition instruction, scans the six sides of the item, obtains the corresponding item image, and sends the item image to the processing device via the network. The processing device receives the item image returned by the six-sided scanning device.
[0044] Among them, the network can be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN) or a Wireless Personal Area Network (WPAN), etc. The type of network is not limited here and can be set according to actual needs.
[0045] In some embodiments, the processing device may include an input panel. When a user needs to identify a dangerous goods mark on an item, the user may input an identification instruction on the input panel of the processing device, and the processing device receives the identification instruction through the input panel.
[0046] In some embodiments, the processing device may include a voice recognition module. When a user needs to identify a dangerous goods mark on an item, a voice message carrying a recognition instruction can be sent within the voice collection range of the voice recognition module. The processing device collects the voice information through the voice recognition module, performs voice recognition on the voice information, and obtains the recognition instruction.
[0047] In some embodiments, the system for identifying dangerous goods labels may further include a client, which is connected to the processing device via a network and exchanges data with the processing device via the network.
[0048] When a user needs to identify a dangerous goods item, an identification instruction can be sent to the client. The client receives and responds to the identification instruction and forwards the identification instruction to the processing device through the network. The processing device receives the identification instruction forwarded by the client.
[0049] Among them, the client can be any one of a mobile client (for example, a mobile phone client, a personal digital assistant (PDA) client, a tablet computer (Tablet Personal Computer, Tablet PC) client, a laptop computer client, a smart watch client, a smart bracelet client or a wearable client, etc.) or a fixed client (for example, a desktop computer client, a smart panel client, etc.). The type of client is not limited here and can be set according to actual needs.
[0050] Step 130: Input the object image into the dangerous goods identification detection model to obtain corresponding detection information.
[0051] In an embodiment of the present application, after acquiring the image of the object, the processing device can input the image of the object into a hazardous goods identification detection model. The hazardous goods identification detection model receives and responds to the image of the object, identifies the hazardous goods identification of the object according to the image of the object, obtains corresponding detection information, and outputs the detection information to the processing device. The processing device receives the detection information output by the hazardous goods identification detection model. The hazardous goods identification detection model can include at least a yolov8 model and a multi-head attention module. The detection information is object coordinate information or hazardous goods identification information. The hazardous goods identification of the object is identified based on the hazardous goods identification detection model. This can avoid mistaking the object for an ordinary object due to eye fatigue and missing the hazardous goods identification of the object. When the object is not handled in accordance with the corresponding hazardous goods handling specifications, dangerous accidents may occur, thereby reducing the safety risks of handling the object.
[0052] Among them, when the detection information is the item coordinate information, it means that the hazardous goods identification detection model has not detected the hazardous goods identification of the item; when the detection information is the hazardous goods identification information, it means that the hazardous goods identification detection model has detected the hazardous goods identification of the item, and the hazardous goods identification information may include the identification type and identification coordinates, etc.
[0053] The yolov8 model is a deep learning target detection model. The yolov8 model can be used to detect the location and category of multiple targets in an image. The yolov8 model can include a backbone network module, a top-down module, a bottom-up module, and a network output layer module connected in sequence.
[0054] The multi-head attention module can be connected between the backbone module and the top-down module of the yolov8 model. The multi-head attention module can be used to mine the feature relationship of the backbone module and output the feature relationship to the top-down module. By adding the multi-head attention module, the expression ability of the hazardous goods identification detection model can be enhanced, and the recognition accuracy of hazardous goods identification of objects can be improved.
[0055] In some embodiments, since image distortion may exist during the image acquisition process, after acquiring the image of the object, the processing device may perform image enhancement processing on the image of the object based on a multi-scale retinal enhancement (Multi-Scale Retinex with Color Restoration, MSRCR) algorithm to obtain a corresponding enhanced image, and input the enhanced image into a hazardous goods identification detection model. The hazardous goods identification detection model receives and responds to the enhanced image, performs hazardous goods identification on the object according to the enhanced image, obtains corresponding detection information, and outputs the detection information to the processing device. The processing device receives the detection information output by the hazardous goods identification detection model, implements image enhancement processing on the image of the object according to the MSRCR algorithm, ensures that the obtained enhanced image has a high image fidelity, and performs image recognition on the enhanced image based on the hazardous goods identification detection model, thereby improving the recognition accuracy of hazardous goods identification of the object.
[0056] In some embodiments, after acquiring the object image, the processing device can input the object image into a hazardous goods identification detection model. The hazardous goods identification detection model receives and responds to the object image, performs hazardous goods identification on the object based on the object image, obtains corresponding object coordinate information, and outputs the object coordinate information to the processing device. The processing device receives the object coordinate information output by the hazardous goods identification detection model.
[0057] When the processing device receives the object coordinate information output by the hazardous goods identification detection model, it crops the object image according to the object coordinate information to obtain the corresponding object area image, and inputs the object area image into the hazardous goods identification detection model. The hazardous goods identification detection model receives and responds to the object area image, performs hazardous goods identification on the object according to the object area image, obtains the corresponding detection result, and outputs the detection result to the processing device. The processing device receives the detection result output by the hazardous goods identification detection model, and realizes that when the hazardous goods identification of the object is not detected according to the object image, the object area image is cropped from the object image according to the object coordinate information, and a second hazardous goods identification is performed on the object according to the object area image, thereby ensuring that a smaller hazardous goods identification has a larger pixel area ratio relative to the object area image during the second hazardous goods identification, thereby ensuring that a smaller hazardous goods identification is easier to be identified, thereby improving the recognition success rate of hazardous goods identification on the object.
[0058] The detection result may include a first detection result used to characterize that the object region image does not contain the hazardous goods identification information, and a second detection result used to characterize that the object region image contains the hazardous goods identification information.
[0059] The solution provided in this embodiment obtains corresponding detection information by acquiring an image of the object and inputting the image of the object into a hazardous goods identification detection model. The hazardous goods identification detection model includes at least a yolov8 model and a multi-head attention module. The detection information is the object coordinate information or the hazardous goods identification information. The hazardous goods identification of the object is identified based on the hazardous goods identification detection model. This can avoid mistaking the object for an ordinary object due to missing the hazardous goods identification of the object due to eye fatigue, and preventing the object from being handled in accordance with the corresponding hazardous goods handling specifications, thereby reducing the safety risks of handling the object.
[0060] See also Figure 3 , which shows a flow chart of a method for identifying a dangerous goods mark provided by another embodiment of the present application. In a specific embodiment, the method for identifying a dangerous goods mark can be applied to Figure 1 The processing device 100 in the identification system of dangerous goods identification is shown in FIG. Figure 3 The process shown is described in detail, and the method for identifying dangerous goods labels may include the following steps S210 to S290.
[0061] Step S210: Acquire an object image.
[0062] Step S230: performing image enhancement processing on the object image based on a multi-scale retinal enhancement algorithm to obtain a corresponding enhanced image.
[0063] In this embodiment, step S210 and step S230 may refer to the contents of the corresponding steps in the aforementioned embodiments, which will not be described in detail here.
[0064] Step S250: Build and train a dangerous goods identification detection model based on the yolov8 model and the multi-head attention module.
[0065] In this embodiment, the processing device can construct a corresponding hazardous goods identification detection model based on the yolov8 model and the multi-head attention module, obtain historical hazardous goods identification images, and annotate the historical hazardous goods identification images to obtain corresponding annotated images, and divide the annotated images according to preset division rules to obtain corresponding training sets and test sets, and input the training sets into the hazardous goods identification detection model for training.
[0066] When the processing device annotates the historical hazardous goods identification image, it mainly annotates the identification type and identification coordinates in the historical hazardous goods identification image. For example, the identification type in the historical hazardous goods identification image is annotated with an annotation box, and the corner coordinates of the annotation box are annotated.
[0067] The preset division rule is an artificial division rule. For example, the preset division rule may be an artificial division rule of training set: test set = 9:7. When the number of historical hazardous goods identification images is 16,000, the training set is 9,000 and the test set is 7,000. The preset division rule may be an artificial division rule of training set: test set = 1:1. When the number of historical hazardous goods identification images is 30,000, the training set is 15,000 and the test set is 15,000. The division method of the preset division rule is not limited here and can be set according to actual needs.
[0068] Specifically, the processing device can integrate the backbone module, top-down module and multi-head attention module of the yolov8 model to obtain the corresponding hazardous goods identification detection model, obtain historical hazardous goods identification images, and annotate the historical hazardous goods identification images to obtain corresponding annotated images, and divide the annotated images according to preset division rules to obtain corresponding training sets and test sets, and input the training sets to the hazardous goods identification detection model for training.
[0069] Step S270: Determine whether the dangerous goods identification detection model has converged.
[0070] In this embodiment, after constructing and training the hazardous goods sign detection model according to the yolov8 model and the multi-head attention module, the processing device can determine whether the hazardous goods sign detection model converges.
[0071] Specifically, after the processing device constructs and trains the hazardous goods identification detection model according to the yolov8 model and the multi-head attention module, the test set can be input into the hazardous goods identification detection model. The hazardous goods identification detection model receives and responds to the test set, tests the test set, obtains the corresponding test results, and determines the test accuracy corresponding to the test results based on the test results and the test set, and determines whether the hazardous goods identification detection model has converged based on the test accuracy.
[0072] When the test accuracy is greater than or equal to the preset accuracy threshold, it is determined that the dangerous goods identification detection model has converged; when the test accuracy is less than the preset accuracy threshold, it is determined that the dangerous goods identification detection model has not converged.
[0073] Among them, the preset accuracy threshold can be used to characterize the minimum accuracy corresponding to the convergence of the hazardous goods identification detection model. The preset accuracy threshold can be an accuracy pre-set by the user, or it can be an accuracy automatically generated by the processing equipment according to the process of multiple hazardous goods identification of items, etc. The setting method of the preset accuracy threshold is not limited here, and it can be set according to actual needs.
[0074] Step S290: When it is determined that the dangerous goods mark detection model has converged, the enhanced image is input into the dangerous goods mark detection model to obtain corresponding detection information.
[0075] In this embodiment, when the processing device determines that the hazardous goods marking detection model has converged, an enhanced image can be input into the hazardous goods marking detection model. The hazardous goods marking detection model receives and responds to the enhanced image, performs hazardous goods marking identification on the item based on the enhanced image, obtains corresponding detection information, and outputs the detection information to the processing device. The processing device receives the detection information output by the hazardous goods marking detection model, and realizes hazardous goods marking identification of the item based on the hazardous goods marking detection model when it is determined that the hazardous goods marking detection model has converged, thereby ensuring the stability of the hazardous goods marking detection model and improving the recognition credibility of hazardous goods marking on the item.
[0076] In some embodiments, the hazardous materials identification detection model may further include an adaptive spatial feature fusion (ASFF) module. The ASFF module may be connected between the bottom-up module and the network output layer module of the yolov8 model. The ASFF module may be used to fuse features of different levels in the bottom-up module to obtain corresponding fused features, and output the fused features to the network output layer module.
[0077] The processing equipment can construct a corresponding hazardous goods identification detection model according to the yolov8 model, the multi-head attention module and the ASFF module, obtain historical hazardous goods identification images, and annotate the historical hazardous goods identification images to obtain corresponding annotated images, and divide the annotated images according to preset division rules to obtain corresponding training sets and test sets, and input the training sets to the hazardous goods identification detection model for training. By adding the multi-head attention module and the ASFF module to the yolov8 module, the expression ability of the hazardous goods identification detection model is enhanced, and the learning ability of the hazardous goods identification detection model is improved, thereby further improving the recognition accuracy of hazardous goods identification of objects.
[0078] In one application scenario, such as Figure 4 As shown, the dangerous goods identification detection model can include a backbone module, a multi-head attention module, a top-down module, a bottom-up module, an ASFF module, and a network output layer module connected in sequence. Among them, the top-down module and the bottom-up module form a feature pyramid network (FPN).
[0079] The backbone module includes a first backbone network layer C2, a second backbone network layer C3, a third backbone network layer C4 and a fourth backbone network layer C5 connected in sequence; the multi-head attention module includes a first attention module A1, a second attention module A2, a third attention module A3 and a fourth attention module A4; the top-down module includes a first feature layer P2, a second feature layer P3, a third feature layer P4 and a fourth feature layer P5 connected in sequence; the bottom-up module includes a fifth feature layer H2, a sixth feature layer H3, a seventh feature layer H4 and an eighth feature layer H5 connected in sequence; the network output layer module may include a first output layer, a second output layer, a third output layer and a fourth output layer.
[0080] The first attention module A1 is connected between the first backbone network layer C2 and the first feature layer P2. The first attention module A1 is used to mine the first feature relationship of the first backbone network layer C2 and output the first feature relationship to the first feature layer P2.
[0081] The second attention module A2 is connected between the second backbone network layer C3 and the second feature layer P3. The second attention module A2 is used to mine the second feature relationship of the second backbone network layer C3 and output the second feature relationship to the second feature layer P3.
[0082] The third attention module A3 is connected between the third backbone network layer C4 and the third feature layer P4. The third attention module A3 is used to mine the third feature relationship of the third backbone network layer C4 and output the third feature relationship to the third feature layer P4.
[0083] The fourth attention module A4 is connected between the fourth backbone network layer C5 and the fourth feature layer P5. The fourth attention module A4 is used to mine the fourth feature relationship of the fourth backbone network layer C5 and output the fourth feature relationship to the fourth feature layer P5.
[0084] The ASFF module is connected between the fifth feature layer H2, the sixth feature layer H3, the seventh feature layer H4, the eighth feature layer H5, the first output layer, the second output layer, the third output layer and the fourth output layer, and is used to fuse the features of the fifth feature layer H2, the sixth feature layer H3, the seventh feature layer H4 and the eighth feature layer H5 to obtain corresponding fused features, and output the fused features to the first output layer, the second output layer, the third output layer and the fourth output layer respectively.
[0085] Among them, the first output layer, the second output layer, the third output layer and the fourth output layer can be used to output the dangerous goods identification information corresponding to different downsampling ratios. For example, the first output layer can be used to output the dangerous goods identification information corresponding to the 4-fold downsampling ratio, the second output layer can be used to output the dangerous goods identification information corresponding to the 8-fold downsampling ratio, the third output layer can be used to output the dangerous goods identification information corresponding to the 16-fold downsampling ratio, and the fourth output layer can be used to output the dangerous goods identification information corresponding to the 32-fold downsampling ratio.
[0086] The solution provided in this embodiment obtains an image of an object and performs image enhancement processing on the image of the object based on a multi-scale retinal enhancement algorithm to obtain a corresponding enhanced image, and constructs and trains a hazardous goods mark detection model based on the yolov8 model and the multi-head attention module, and determines whether the hazardous goods mark detection model converges. When it is determined that the hazardous goods mark detection model converges, the enhanced image is input into the hazardous goods mark detection model to obtain corresponding detection information, thereby realizing hazardous goods mark recognition of the object based on the hazardous goods mark detection model when it is determined that the hazardous goods mark detection model converges, ensuring the stability of the hazardous goods mark detection model and improving the recognition credibility of hazardous goods mark recognition of the object.
[0087] See also Figure 5 , which shows a flow chart of a method for identifying a dangerous goods mark provided by another embodiment of the present application. In a specific embodiment, the method for identifying a dangerous goods mark can be applied to Figure 1 The processing device 100 in the identification system of dangerous goods identification is shown in FIG. Figure 5 The process shown is described in detail, and the method for identifying a dangerous goods mark may include the following steps S310 to S390.
[0088] Step 310: Acquire an object image.
[0089] Step 330: Input the object image to the dangerous goods identification detection model to obtain corresponding detection information.
[0090] Step S350: when the object coordinate information output by the dangerous goods identification detection model is received, the object image is cropped according to the object coordinate information to obtain a corresponding object area image.
[0091] Step S370: Input the article area image to the dangerous goods identification detection model to obtain the corresponding detection result.
[0092] In this embodiment, step S310, step S330, step S350 and step S370 may refer to the contents of the corresponding steps in the aforementioned embodiments, which will not be described in detail here.
[0093] Step S390: When the second detection result output by the dangerous goods identification detection model is received, corresponding interception prompt information is generated.
[0094] In this embodiment, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding interception prompt information. The interception prompt information can be used to prompt the user to intercept the items corresponding to the second detection result, thereby avoiding confusion between dangerous goods and ordinary items, which may increase safety hazards and reduce safety hazards.
[0095] Among them, the interception prompt information can be at least any one of text interception prompt information, sound interception prompt information or light interception prompt information, etc. The type of interception prompt information is not limited here and can be set according to actual needs.
[0096] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding text interception prompt information.
[0097] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding sound interception prompt information.
[0098] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding light interception prompt information.
[0099] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding text interception prompt information and sound interception prompt information.
[0100] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding text interception prompt information and light interception prompt information.
[0101] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding sound interception prompt information and light interception prompt information.
[0102] In some embodiments, when the processing device receives the second detection result output by the dangerous goods identification detection model, it can generate corresponding text interception prompt information, sound interception prompt information, and light interception prompt information.
[0103] The solution provided in this embodiment obtains an image of an object and inputs the image of the object into a hazardous goods identification detection model to obtain corresponding detection information. When the object coordinate information output by the hazardous goods identification detection model is received, the object image is cropped according to the object coordinate information to obtain a corresponding object area image, and the object area image is input into the hazardous goods identification detection model to obtain a corresponding detection result. When a second detection result output by the hazardous goods identification detection model is received, corresponding interception prompt information is generated, thereby realizing secondary recognition of the hazardous goods identification of the object. When the hazardous goods identification information is recognized, interception prompt information is generated to prompt the user to intercept the object, thereby avoiding confusion between hazardous goods and ordinary items, which may increase safety hazards and reduce safety hazards.
[0104] See also Figure 6 , which shows a dangerous goods identification device 400 provided by an embodiment of the present application. The dangerous goods identification device 400 can be applied to Figure 1 The processing device 100 in the identification system of dangerous goods identification is shown in FIG. Figure 6 The device 400 for identifying a dangerous goods mark is described in detail. The device 400 for identifying a dangerous goods mark may include an acquisition module 410 and an object image input module 430 .
[0105] The acquisition module 410 can be used to acquire the object image; the object image input module 430 can be used to input the object image into the hazardous goods identification detection model to obtain corresponding detection information. The hazardous goods identification detection model can include at least the yolov8 model and the multi-head attention module. The detection information can be the object coordinate information or the hazardous goods identification information.
[0106] In some embodiments, the device 400 for identifying dangerous goods labels may further include a processing module.
[0107] The processing module can be used for the object image input module 430 to input the object image to the dangerous goods identification detection model, and before obtaining the corresponding detection information, the object image is enhanced based on the multi-scale retinal enhancement algorithm to obtain the corresponding enhanced image.
[0108] In some implementations, the item image input module 430 may include an input unit.
[0109] The input unit can be used to input the enhanced image into the dangerous goods identification detection model to obtain corresponding detection information.
[0110] In some implementations, the apparatus 400 for identifying dangerous goods labels may further include a construction module and a determination module.
[0111] The construction module can be used to input the enhanced image into the hazardous goods sign detection model through the input unit. Before obtaining the corresponding detection information, the hazardous goods sign detection model is constructed and trained according to the yolov8 model and the multi-head attention module; the determination module can be used to determine whether the hazardous goods sign detection model converges.
[0112] In some embodiments, the input unit may include an input sub-unit.
[0113] The input subunit may be used to input the enhanced image into the dangerous goods sign detection model to obtain corresponding detection information when it is determined that the dangerous goods sign detection model has converged.
[0114] In some embodiments, the hazardous goods identification detection model may further include an adaptive spatial fusion module, and the construction module may include a construction unit.
[0115] The construction unit can be used to build and train a dangerous goods identification detection model based on the yolov8 model, the multi-head attention module, and the adaptive spatial fusion module.
[0116] In some embodiments, the adaptive spatial feature fusion module can be connected between the bottom-up module and the network output layer module of the yolov8 model; the adaptive spatial feature fusion module can be used to fuse features of different levels in the bottom-up module to obtain corresponding fused features, and output the fused features to the network output layer module.
[0117] In some embodiments, the apparatus 400 for identifying dangerous goods labels may further include a cropping module and an object area image input module.
[0118] The cropping module can be used to crop the object image according to the object coordinate information output by the hazardous goods identification detection model to obtain the corresponding object area image when the object coordinate information is received; the object area image input module can be used to input the object area image into the hazardous goods identification detection model to obtain the corresponding detection result, which may include a first detection result used to characterize that the object area image does not contain the hazardous goods identification information, and a second detection result used to characterize that the object area image contains the hazardous goods identification information.
[0119] In some embodiments, the multi-head attention module can be connected between the backbone network module and the top-down module of the yolov8 model; the multi-head attention module can be used to mine the feature relationship of the backbone network module and output the feature relationship to the top-down module.
[0120] In some implementations, the acquisition module 410 may include a sending unit and a receiving unit.
[0121] The sending unit can be used to send an image acquisition instruction to the six-sided scanning device, and the image acquisition instruction can be used to instruct the six-sided scanning device to scan the six sides of the object, obtain the corresponding object image, and return the object image; the receiving unit can be used to receive the object image returned by the six-sided scanning device.
[0122] The solution provided in this embodiment obtains corresponding detection information by acquiring an image of the object and inputting the image of the object into a hazardous goods identification detection model. The hazardous goods identification detection model includes at least a yolov8 model and a multi-head attention module. The detection information is the object coordinate information or the hazardous goods identification information. The hazardous goods identification of the object is identified based on the hazardous goods identification detection model. This can avoid mistaking the object for an ordinary object due to missing the hazardous goods identification of the object due to eye fatigue, and preventing the object from being handled in accordance with the corresponding hazardous goods handling specifications, thereby reducing the safety risks of handling the object.
[0123] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be repeated one by one in the device embodiment.
[0124] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0125] See also Figure 7 , which shows a functional block diagram of an electronic device 500 provided by an embodiment of the present application, and the electronic device 500 may include one or more of the following components: a memory 510, a processor 530, and one or more applications, wherein the one or more applications may be stored in the memory 510 and configured to be executed by the one or more processors 530, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0126] The memory 510 may include a random access memory (RAM) or a read-only memory (ROM). The memory 510 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 510 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as obtaining an image of an object, inputting an image of an object, obtaining detection information, image enhancement processing, obtaining an enhanced image, inputting an enhanced image, building a dangerous goods identification detection model, training a dangerous goods identification detection model, determining whether the dangerous goods identification detection model converges, determining whether the dangerous goods identification detection model converges, fusing features, obtaining fused features, outputting fused features, receiving object coordinate information, outputting object coordinate information, clipping an object image, obtaining an object region image, inputting an object region image, obtaining a detection result, mining a feature relationship, outputting a feature relationship, sending an image acquisition instruction, six-sided scanning, obtaining an object image, returning an object image, and receiving an object image, etc.), instructions for implementing the following various method embodiments, etc. The data storage area can also store data created by the electronic device 500 during use (such as object images, dangerous goods identification detection models, detection information, yolov8 models, multi-head attention modules, object coordinate information, dangerous goods identification information, multi-scale retinal enhancement algorithms, enhanced images, adaptive spatial fusion modules, bottom-up modules, network output layer modules, fusion features, object area images, detection results, first detection results, second detection results, backbone network modules, top-down modules, feature relationships, image acquisition instructions, six-sided scanning devices, and objects), etc.
[0127] The processor 530 may include one or more processing cores. The processor 530 uses various interfaces and lines to connect various parts of the entire electronic device 500, and executes various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 510, and calling data stored in the memory 510. Optionally, the processor 530 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 530 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 530, but may be implemented separately through a communication chip.
[0128] Please refer to Figure 8 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 600 stores a program code 610, which can be called by a processor to execute the method described in the above method embodiment.
[0129] The computer readable storage medium 600 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 610 can be compressed, for example, in an appropriate form.
[0130] Please refer to Fig. 9, which shows a structural block diagram of a computer program product 700 provided in an embodiment of the present application. The computer program product 700 includes a computer program / instruction 710, and the computer program / instruction 710 is stored in a computer-readable storage medium of a computer device. When the computer program product 700 is run on a computer device, a processor of the computer device reads the computer program / instruction 710 from the computer-readable storage medium, and the processor executes the computer program / instruction 710, so that the computer device executes the method described in the above method embodiment.
[0131] The solution provided in this embodiment obtains corresponding detection information by acquiring an image of the object and inputting the image of the object into a hazardous goods identification detection model. The hazardous goods identification detection model includes at least a yolov8 model and a multi-head attention module. The detection information is the object coordinate information or the hazardous goods identification information. The hazardous goods identification of the object is identified based on the hazardous goods identification detection model. This can avoid mistaking the object for an ordinary object due to missing the hazardous goods identification of the object due to eye fatigue, and preventing the object from being handled in accordance with the corresponding hazardous goods handling specifications, thereby reducing the safety risks of handling the object.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for identifying dangerous goods labels, characterized in that: include: Get the item image; Input the object image into the dangerous goods identification detection model to obtain corresponding detection information, the dangerous goods identification detection model at least includes the yolov8 model and the multi-head attention module, and the detection information is the object coordinate information or the dangerous goods identification information.
2. The method for identifying dangerous goods labels according to claim 1, characterized in that: Before inputting the article image into the dangerous goods mark detection model to obtain corresponding detection information, the dangerous goods mark recognition method further includes: Performing image enhancement processing on the object image based on a multi-scale retinal enhancement algorithm to obtain a corresponding enhanced image; The inputting the article image into the dangerous goods identification detection model to obtain corresponding detection information includes: The enhanced image is input into the dangerous goods identification detection model to obtain corresponding detection information.
3. The method for identifying dangerous goods labels according to claim 2, characterized in that: Before inputting the enhanced image into the dangerous goods sign detection model to obtain corresponding detection information, the dangerous goods sign recognition method further includes: Based on the yolov8 model and multi-head attention module, a dangerous goods identification detection model is built and trained; Determining whether the dangerous goods identification detection model has converged; The step of inputting the enhanced image into the dangerous goods identification detection model to obtain corresponding detection information includes: When it is determined that the dangerous goods mark detection model has converged, the enhanced image is input into the dangerous goods mark detection model to obtain corresponding detection information.
4. The method for identifying dangerous goods labels according to claim 3, characterized in that: The hazardous goods sign detection model also includes an adaptive spatial fusion module. The hazardous goods sign detection model is constructed and trained based on the yolov8 model and the multi-head attention module, including: According to the yolov8 model, the multi-head attention module and the adaptive spatial fusion module, a dangerous goods sign detection model is constructed and trained.
5. The method for identifying dangerous goods labels according to claim 4, characterized in that: The adaptive spatial feature fusion module is connected between the bottom-up module and the network output layer module of the yolov8 model; The adaptive spatial feature fusion module is used to fuse the features of different levels in the bottom-up module to obtain corresponding fused features, and output the fused features to the network output layer module.
6. The method for identifying dangerous goods labels according to claim 1, characterized in that: Also includes: When receiving the object coordinate information output by the dangerous goods identification detection model, cropping the object image according to the object coordinate information to obtain a corresponding object area image; The object area image is input into the hazardous goods identification detection model to obtain a corresponding detection result, wherein the detection result includes a first detection result used to characterize that the object area image does not contain the hazardous goods identification information, and a second detection result used to characterize that the object area image contains the hazardous goods identification information.
7. The method for identifying dangerous goods labels according to claim 1, characterized in that: The multi-head attention module is connected between the backbone network module and the top-down module of the yolov8 model; The multi-head attention module is used to mine the feature relationship of the backbone network module and output the feature relationship to the top-down module.
8. The method for identifying dangerous goods markings according to any one of claims 1 to 7, characterized in that: The obtaining of the object image comprises: Sending an image acquisition instruction to the six-side scanning device, wherein the image acquisition instruction is used to instruct the six-side scanning device to scan the six sides of the object, obtain the corresponding object image, and return the object image; Receive the object image returned by the six-side scanning device.
9. A device for identifying dangerous goods, characterized in that: include: An acquisition module, used to acquire an image of an object; The object image input module is used to input the object image into the dangerous goods identification detection model to obtain corresponding detection information. The dangerous goods identification detection model includes at least a yolov8 model and a multi-head attention module. The detection information is object coordinate information or dangerous goods identification information.
10. An electronic device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by one or more processors, and the one or more applications are configured to execute the method for identifying dangerous goods signs as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method for identifying dangerous goods markings as described in any one of claims 1 to 8.