Image processing method and computer equipment for intelligently identifying garbage stations
Through intelligent identification of the image processing method of garbage stations, the problem of inaccurate identification and classification of garbage stations has been solved, and the accuracy and processing efficiency of garbage distribution are improved.
Patent Information
- Application Number
- CN202410274480.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-03-11
AI Technical Summary
In the prior art, there are errors in the identification and classification of garbage stations, resulting in inaccurate garbage disposal and affecting processing efficiency.
The image processing method of intelligent identification of garbage stations is adopted to achieve accurate identification and classification of garbage stations by obtaining garbage station label sets, semantic classification, training identification models and identification images.
It improves the accuracy of the classification of garbage stations, facilitates the accurate throwing garbage to the corresponding garbage station, and improves the efficiency of garbage treatment.
Smart Images

Figure CN118135308B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the computer field, and in particular to an image processing method and a computer device for intelligently identifying a garbage station. Background Art
[0002] With the gradual popularization of garbage classification, the distinction between garbage stations has become a difficult problem that troubles people. At present, the methods usually used to identify and classify garbage stations are: manual identification or identification and classification using signboards. However, the identification and classification using the above methods usually have the following technical problems: manual identification and classification of garbage stations have errors, which can easily lead to inaccurate classification of garbage stations; when using signboards to identify and classify garbage stations, inaccurate identification is often caused by the small size of the signboards or being blocked. In addition, when garbage is placed in a garbage station, the types of garbage are often not clearly distinguished, resulting in inaccurate garbage placement and affecting the efficiency of subsequent garbage disposal. Summary of the invention
[0003] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0004] Some embodiments of the present disclosure propose an image processing method, a computer device, and a computer-readable storage medium for intelligently identifying garbage stations to solve the technical problems mentioned in the above background technology section.
[0005] In a first aspect, some embodiments of the present disclosure provide an image processing method for intelligently identifying garbage dumps, the method comprising: obtaining a garbage dump label set; performing semantic classification on the above-mentioned garbage dump label set to obtain a garbage dump label group set; for each garbage dump label group in the above-mentioned garbage dump label group set, assigning the above-mentioned garbage dump label group to a corresponding data processing end, so that the above-mentioned data processing end generates a garbage dump training image sample set corresponding to the above-mentioned garbage dump label group; performing model training on an initial garbage dump recognition model according to each garbage dump training image sample set to obtain a garbage dump recognition model; obtaining a garbage dump image of each target garbage dump in the target garbage dump group to obtain a garbage dump image group; inputting the above-mentioned garbage dump image group into the above-mentioned garbage dump recognition model to obtain a garbage dump recognition result group, wherein one garbage dump image corresponds to one garbage dump recognition result; according to the above-mentioned garbage dump recognition result group, at least one garbage to be processed is placed in the corresponding garbage dump.
[0006] In a second aspect, the present disclosure further provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the method described in any implementation of the first aspect is implemented.
[0007] In a third aspect, the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0008] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the image processing method for intelligently identifying garbage stations in some embodiments of the present disclosure, the accuracy of garbage station classification is improved, and garbage is accurately placed in the garbage station. First, a garbage station label set is obtained. Secondly, the above-mentioned garbage station label set is semantically classified to obtain a garbage station label group set. Thirdly, for each garbage station label group in the above-mentioned garbage station label group set, the above-mentioned garbage station label group is assigned to a corresponding data processing end, so that the above-mentioned data processing end generates a garbage station training image sample set corresponding to the above-mentioned garbage station label group. In this way, it is convenient to process the garbage station image, thereby shortening the sample preparation time and facilitating model training. Then, according to each garbage station training image sample set, the initial garbage station recognition model is model trained to obtain a garbage station recognition model. In this way, the garbage station can be classified and recognized by the trained garbage station recognition model. Then, the garbage station image of each target garbage station in the target garbage station group is obtained to obtain a garbage station image group. In this way, it is convenient to identify and classify the garbage station. Afterwards, the above-mentioned garbage station image group is input into the above-mentioned garbage station recognition model to obtain a garbage station recognition result group. Among them, one garbage station image corresponds to one garbage station recognition result. Thus, the category of each garbage station can be identified. Finally, according to the above garbage station recognition result group, at least one garbage to be processed is placed in the corresponding garbage station. Thus, according to the recognized garbage station recognition results, the garbage can be classified and placed. The accuracy of garbage station classification is improved, which facilitates accurate placement of garbage in the garbage station. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0010] Figure 1 is a flow chart of some embodiments of an image processing method for intelligently identifying a garbage station according to the present disclosure;
[0011] Figure 2 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0012] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0013] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0014] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0015] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0016] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0017] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0018] Figure 1 1 is a flowchart of some embodiments of the image processing method for intelligently identifying garbage dumps according to the present disclosure. 100 of some embodiments of the image processing method for intelligently identifying garbage dumps according to the present disclosure is shown. The image processing method for intelligently identifying garbage dumps comprises the following steps:
[0019] Step 101, obtaining a garbage station tag set.
[0020] In some embodiments, the execution subject (such as a computing device) of the image processing for intelligently identifying a garbage station can obtain a garbage station label set through a wired or wireless connection. Among them, the garbage station label in the garbage station label set can be a label for the corresponding garbage station training image sample set to be generated. The sample label corresponding to the garbage station training image sample set is the corresponding garbage station label. The garbage station label can indicate the location, category, and maximum loading capacity of the garbage station. For example, garbage stations can be divided into: underground recyclable garbage stations (No. 1, XX Road, with a loading capacity of 9 tons), vertical recyclable garbage stations (No. 1, XA Road, with a loading capacity of 8 tons), mobile non-recyclable garbage stations (No. 1, AX Road, with a loading capacity of 9 tons) and split non-recyclable garbage stations (No. 1, YY Road, with a loading capacity of 8 tons).
[0021] Step 102: semantically classify the garbage dump tag set to obtain a garbage dump tag group set.
[0022] In some embodiments, the execution subject may perform semantic classification on the garbage station tag set to obtain a garbage station tag group set. First, the execution subject may input the garbage station tags in the garbage station tag set into a word embedding model to output a tag vector to obtain a tag vector set. Then, vector clustering is performed on the tag vector set to obtain a tag vector group set. Finally, a garbage station tag group set for the tag vector group set is determined. Among them, one tag vector group corresponds to one garbage station tag group.
[0023] Step 103: for each garbage dump label group in the garbage dump label group set, assign the garbage dump label group to a corresponding data processing end, so that the data processing end generates a garbage dump training image sample set corresponding to the garbage dump label group.
[0024] In some embodiments, the execution subject may assign the garbage dump tag group to a corresponding data processing terminal for each garbage dump tag group in the garbage dump tag group set, so that the data processing terminal generates a garbage dump training image sample set corresponding to the garbage dump tag group. The data processing terminal may be a computing terminal that performs tag processing on the garbage dump training images. For example, the data processing terminal may be a computing terminal for a technician to perform tag processing on the garbage dump training images. The garbage dump training image samples in the garbage dump training image sample set have corresponding tags. One garbage dump tag group is assigned to one data processing terminal.
[0025] Step 104 , performing model training on the initial garbage dump identification model according to each garbage dump training image sample set to obtain a garbage dump identification model.
[0026] In some embodiments, the execution subject performs model training on the initial garbage dump identification model according to each garbage dump training image sample set to obtain the garbage dump identification model. The initial garbage dump identification model includes: a first attention mechanism encoding network and a second attention mechanism decoding network. Among them, the initial garbage dump identification model can be an untrained garbage dump classification identification model. The garbage dump classification identification model can be a neural network model that generates the garbage dump category to which the image content corresponding to the garbage dump image belongs. For example, the garbage dump classification identification model can be a multi-layer serially connected convolutional neural network (CNN) model.
[0027] In an actual application scenario, the execution subject may select a garbage dump image sample from the above garbage dump training image sample sets as a target garbage dump image sample and perform the following training steps:
[0028] First, the image included in the target garbage dump image sample is input into the image feature extraction network to obtain the garbage dump image features. The image feature extraction network may be an untrained image feature extraction network. The image feature extraction network may be a trained neural network model. The image feature extraction network may be a model for extracting content feature information corresponding to the target garbage dump image. The subsequent image feature extraction network is trained and updated together with the initial garbage dump recognition model. For example, the image feature extraction model may be a residual neural network model with multiple layers of serial connections. The garbage dump image features may characterize the image content features of the garbage dump image included in the target garbage dump image sample.
[0029] Second, using the above-mentioned initial garbage station identification model, generate a label feature group corresponding to each garbage station label group in the above-mentioned garbage station label group set to obtain a label feature group set. For example, each garbage station label in the above-mentioned garbage station label group can be input into the above-mentioned encoding network based on the first attention mechanism to obtain a label feature group. Among them, the first attention mechanism encoding network can be an untrained encoding model. The above-mentioned encoding model can learn the semantic relationship between the semantics corresponding to each garbage station label in the garbage station label group. Therefore, through the encoding model, a more accurate label feature that characterizes the content feature information of the corresponding label content of the classification label can be generated. The label features in the label feature group correspond one-to-one to the classification labels in the garbage station label group. For example, the above-mentioned first attention mechanism encoding network can be a Transformer encoding model. The first attention mechanism can be a multi-head attention mechanism.
[0030] Third, using the initial garbage dump identification model, classification loss information is generated according to the label feature set and the garbage dump image features. The classification loss information can represent the difference between the predicted label corresponding to the garbage dump image feature and the real label of the target garbage dump image sample corresponding to the image.
[0031] Among them, classification loss information can be generated through the following sub-steps:
[0032] Sub-step 1, input the above-mentioned label feature set and the above-mentioned garbage station image features into the above-mentioned second attention mechanism decoding network to obtain classification results corresponding to each label category. Among them, the second attention mechanism decoding network is an untrained decoding network. The above-mentioned decoding network can be a semantic relationship between each garbage station label in the garbage station label set, and can also learn the semantic relationship between each garbage station label group. For example, the second attention mechanism decoding network can be a Transformer decoding model. The second attention mechanism can be a multi-head attention mechanism. The above-mentioned each label category can be each label category corresponding to the garbage station label set. The above-mentioned classification result can be the label content of the label corresponding to the image content of the target garbage station image sample.
[0033] Sub-step 2: Generate classification loss information according to the label category included in the target garbage dump image sample and the classification result. The label category and the classification result may be input into a binary cross entropy loss function to generate classification loss information.
[0034] Fourth, in response to determining that the classification loss information satisfies a preset loss condition, the initial garbage dump identification model is determined as a garbage dump identification model. The preset loss condition may be: the value represented by the classification loss information is less than or equal to a preset value.
[0035] Optionally, in response to determining that the classification loss information does not satisfy the preset loss condition, a target garbage dump image sample is reselected from each of the garbage dump image sample sets, and the training step is performed again.
[0036] In some embodiments, the execution subject may, in response to determining that the classification loss information does not satisfy the preset loss condition, reselect target garbage dump image samples from the various garbage dump image sample sets and perform the training step again.
[0037] Step 105 , obtaining a garbage dump image of each target garbage dump in the target garbage dump group, and obtaining a garbage dump image group.
[0038] In some embodiments, the execution subject may obtain the garbage station image of each target garbage station in the target garbage station group by wired connection or wireless connection to obtain the garbage station image group. The target garbage station may refer to the garbage station whose category is to be identified. The garbage station image may represent the overall picture of the target garbage station.
[0039] Step 106: input the garbage dump image group into the garbage dump recognition model to obtain a garbage dump recognition result group.
[0040] In some embodiments, the execution subject may input the garbage dump image group into the garbage dump recognition model to obtain a garbage dump recognition result group, wherein one garbage dump image corresponds to one garbage dump recognition result, and the garbage dump recognition result may indicate the category of the recognized garbage dump.
[0041] Step 107: according to the above garbage station identification result group, at least one garbage to be processed is placed in a corresponding garbage station.
[0042] In some embodiments, the execution entity may place at least one piece of waste to be processed into a corresponding garbage station according to the garbage station identification result group.
[0043] In an actual application scenario, the execution subject may perform the following processing steps for each of the at least one waste to be processed:
[0044] First, collect the garbage images of the above-mentioned garbage to be processed. The garbage images can show specific garbage items in the garbage to be processed. That is, a garbage image can show multiple garbage items.
[0045] Second, the garbage image is input into the input layer of the pre-trained garbage classification model to obtain an input vector matrix. The garbage classification model may be a neural network model that takes the garbage image as input and takes the garbage classification result as output. The garbage classification model may include an input layer, an encoding layer, and a decoding layer. The encoding layer may include multiple encoders. The decoding layer may include multiple decoders. The basic structure of the garbage classification model may refer to Transformer. The input layer may convert the garbage image into a vector matrix. For example, the encoding layer may include an encoder. The encoder may include a linear layer, a pooling layer, a multi-head attention layer, a feedforward network, and two residual connections & layer normalization layers. The linear layer may generate a query matrix, a key matrix, and a key value matrix based on the input vector matrix. The pooling layer may compress the key matrix and the key value matrix into a compressed key matrix and a compressed key value matrix. The multi-head attention layer may generate a pooled attention value based on the input query matrix, compressed key matrix, and compressed key value matrix as the input of the downstream residual connection & layer normalization layer.
[0046] Third, based on the above input vector matrix, generate the query matrix, key matrix and key value matrix.
[0047] Among them, the query matrix, key matrix and key value matrix can be generated through the following sub-steps:
[0048] Sub-step 1, determining a pre-set mapping matrix corresponding to the above garbage classification model.
[0049] Sub-step 2, based on the above-mentioned input vector matrix and the above-mentioned mapping matrix, generate a query matrix, a key matrix and a key value matrix. Among them, the above-mentioned mapping matrix includes: a key mapping matrix, a key value mapping matrix, and a query mapping matrix. First, the product of the above-mentioned input vector matrix and the above-mentioned query mapping matrix is determined as the query matrix. Then, the product of the above-mentioned input vector matrix and the above-mentioned key mapping matrix is determined as the key mapping matrix. Finally, the product of the above-mentioned input vector matrix and the above-mentioned key value mapping matrix is determined as the key value mapping matrix.
[0050] Fourth, the key matrix and the key value matrix are compressed to obtain a compressed key matrix and a compressed key value matrix, wherein the dimensions of the compressed key matrix and the compressed key value matrix are smaller than the dimensions of the key matrix and the key value matrix.
[0051] Fifth, the query matrix, the compressed key matrix and the compressed key value matrix are input into the self-attention layer of the garbage classification model to obtain the garbage classification result. The garbage classification result can represent the category of the garbage to be processed. Among them, the self-attention layer can generate the pooled self-attention value of each item garbage according to the input query matrix, compressed key matrix and compressed key value matrix. For example, the garbage classification result can be: kitchen garbage, non-recyclable garbage. For example, for each item garbage, the pooled self-attention value can be generated by the following formula:
[0052]
[0053] in, Represents the pooled self-attention value of the i-th item garbage. α represents a constant. Represents the vector corresponding to the i-th item garbage in the above query matrix. Represents the vector corresponding to the i-th item garbage in the above compressed key matrix. Represents the vector of garbage corresponding to the i-th item in the above compressed key-value matrix.
[0054] Sixth, determine the garbage station identification result corresponding to the above garbage classification result. For example, the garbage station identification result with the same garbage type as indicated by the garbage classification result can be determined.
[0055] Seventh, the waste to be processed is placed in a waste station corresponding to the waste station identification result. For example, the waste to be processed can be placed in a waste station corresponding to the waste station identification result.
[0056] Regarding the problem mentioned in the background technology that "when garbage is put into the garbage station, the types of garbage are often not clearly distinguished, resulting in inaccurate garbage placement and affecting the efficiency of subsequent garbage processing." This can be solved by the following steps: First, collect the garbage image of the above-mentioned garbage to be processed. Secondly, input the above-mentioned garbage image into the input layer of the pre-trained garbage classification model to obtain an input vector matrix. Then, based on the above-mentioned input vector matrix, generate a query matrix, a key matrix and a key value matrix. Thus, the input vector matrix can be converted into a query matrix, a key matrix and a key value matrix respectively in advance. Then, the above-mentioned key matrix and the above-mentioned key value matrix are compressed to obtain a compressed key matrix and a compressed key value matrix. Thus, the key matrix and the key value matrix can be compressed respectively, so that the dimensions of the vectors in the compressed key matrix and the key value matrix can be reduced. Afterwards, the above-mentioned query matrix, the above-mentioned compressed key matrix and the above-mentioned compressed key value matrix are input into the self-attention layer of the above-mentioned garbage classification model to obtain the garbage classification result; determine the garbage station recognition result corresponding to the above-mentioned garbage classification result. Thus, the self-attention layer of the garbage classification model can generate a pooled self-attention value according to the query matrix, the compressed key matrix and the compressed key value matrix. After the self-attention value is input to the downstream, the garbage classification result can be finally obtained. Finally, the above-mentioned garbage to be processed is placed in the garbage station corresponding to the above-mentioned garbage station identification result. Thus, the redundant information and noise information introduced are reduced, and the accuracy of the garbage classification results is improved. Thus, the accuracy of the garbage classification results is improved, and the garbage disposal efficiency is improved.
[0057] Figure 2 A schematic block diagram of the structure of a computer device provided in an embodiment of the present disclosure. The computer device may be a terminal.
[0058] like Figure 2 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0059] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any image processing method for intelligently identifying garbage stations.
[0060] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0061] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any image processing method for intelligently identifying garbage stations.
[0062] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0063] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0064] In one embodiment, the processor is used to run a computer program stored in a memory to implement the following steps: obtaining a garbage station label set; performing semantic classification on the garbage station label set to obtain a garbage station label group set; for each garbage station label group in the garbage station label group set, assigning the garbage station label group to a corresponding data processing end so that the data processing end generates a garbage station training image sample set corresponding to the garbage station label group; performing model training on an initial garbage station recognition model based on each garbage station training image sample set to obtain a garbage station recognition model; obtaining a garbage station image of each target garbage station in the target garbage station group to obtain a garbage station image group; inputting the garbage station image group into the garbage station recognition model to obtain a garbage station recognition result group, wherein one garbage station image corresponds to one garbage station recognition result; and according to the garbage station recognition result group, placing at least one garbage to be processed into a corresponding garbage station.
[0065] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the image processing method for intelligently identifying garbage stations disclosed in the present disclosure.
[0066] The computer-readable storage medium may be an internal storage unit of the computer device in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., provided on the computer device.
[0067] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0068] The serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. An image processing method for intelligently identifying garbage stations, characterized in that: The method comprises: Get the dump station tag set; Performing semantic classification on the garbage station tag set to obtain a garbage station tag group set; For each garbage dump label group in the garbage dump label group set, assigning the garbage dump label group to a corresponding data processing end, so that the data processing end generates a garbage dump training image sample set corresponding to the garbage dump label group, wherein the data processing end is a computing terminal that performs label processing on the garbage dump training images, and one garbage dump label group is assigned to one data processing end; According to each garbage station training image sample set, the initial garbage station recognition model is trained to obtain the garbage station recognition model, wherein the initial garbage station recognition model includes: a first attention mechanism encoding network and a second attention mechanism decoding network, the first attention mechanism encoding network is an untrained encoding model, the encoding model is used to learn the semantic relationship between the semantics corresponding to each garbage station label in the garbage station label group, the second attention mechanism decoding network is an untrained decoding network, the decoding network is used to learn the semantic relationship between each garbage station label in the garbage station label group set, and also learns the semantic relationship between each garbage station label group; Obtaining a garbage station image of each target garbage station in the target garbage station group to obtain a garbage station image group; Inputting the garbage dump image group into the garbage dump recognition model to obtain a garbage dump recognition result group, wherein one garbage dump image corresponds to one garbage dump recognition result; According to the garbage station identification result group, at least one garbage to be processed is placed in a corresponding garbage station; The method of training the initial garbage dump identification model according to each garbage dump training image sample set to obtain the garbage dump identification model includes: A garbage dump image sample is selected from each garbage dump training image sample set as a target garbage dump image sample, and the following training steps are performed: Inputting the image included in the target garbage dump image sample into an image feature extraction network to obtain garbage dump image features; Using the initial garbage dump identification model, generating a label feature group corresponding to each garbage dump label group in the garbage dump label group set to obtain a label feature group set; Using the initial garbage dump identification model, generating classification loss information according to the label feature set and the garbage dump image features; In response to determining that the classified loss information satisfies a preset loss condition, determining the initial garbage dump identification model as a garbage dump identification model; The step of generating a tag feature group corresponding to each garbage dump tag group in the garbage dump tag group set includes: Input each garbage station label in the garbage station label group into the first attention mechanism based encoding network to obtain a label feature group; The method comprises: using the initial garbage dump identification model, generating classification loss information according to the label feature set and the garbage dump image features, and inputting the label feature set and the garbage dump image features into the second attention mechanism decoding network to obtain classification results corresponding to each label category, wherein each label category is each label category corresponding to the garbage dump label set; Classification loss information is generated according to the label category included in the target garbage dump image sample and the classification result.
2. The method according to claim 1, characterized in that The method further comprises: In response to determining that the classification loss information does not satisfy the preset loss condition, reselecting target garbage dump image samples from the respective garbage dump image sample sets, and performing the training step again.
3. A computer device, wherein: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 2 are implemented.
4. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Garbage identification and classification method and device, electronic equipment and storage medium
CN115082736A
Article classification result generation method and device, equipment, medium and program product
CN117112869A