A waste copper grading method and device, electronic equipment and storage medium

By performing semantic segmentation and computational model processing on images of scrap copper granules, the quality purity and grade of scrap copper granules are automatically determined, solving the problem of low efficiency in manual grading in existing technologies and realizing an efficient and low-cost grading method.

CN116523855BActive Publication Date: 2025-10-24CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310431595.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2025-10-24
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

Existing methods for grading scrap copper granules rely on manual sampling and evaluation, which is inefficient, costly, and makes it difficult to accurately determine the quality and purity of scrap copper granules.

Method used

By performing semantic segmentation on images of scrap copper granules, a semantic segmentation result image is generated. The area purity vector is calculated and the quality purity is determined, thereby evaluating the grade of scrap copper granules. A quality purity detection model is constructed using a semantic segmentation model, a transformation model, and a calculation model for automatic grading.

Benefits of technology

This technology enables efficient determination of the purity and grade of scrap copper without weighing the total mass and volume of scrap copper, reducing operational difficulty and cost, and improving grading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116523855B_ABST
    Figure CN116523855B_ABST
Patent Text Reader

Abstract

The application provides a waste copper rice grading method and device, electronic equipment and storage medium, relates to the technical field of image processing, and is used for evaluating and grading waste copper rice. The method comprises the following steps: collecting an image of the waste copper rice; performing semantic segmentation on the image of the waste copper rice to obtain a semantic segmentation result image, each pixel in the semantic segmentation result image having a material category label; determining an area purity vector according to the semantic segmentation result image, each element in the area purity vector corresponding to a material category label, and the value of the element being determined according to the ratio between the number of pixels with the material category label corresponding to the element in the semantic segmentation result image and the total number of pixels in the semantic segmentation result image; obtaining the quality purity of the waste copper rice according to the area purity vector; and determining the grade of the waste copper rice according to the quality purity of the waste copper rice.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image segmentation, and in particular to a waste copper grain grading method and device, electronic equipment and storage medium. BACKGROUND

[0002] The waste copper recycling industry has a very good development prospect. After decades of development, it has formed an industrial structure mainly using waste copper directly and refining copper as an auxiliary. From recycling, importing and disassembling to processing and utilization, a complete industrial chain has been formed. Among them, in the recycling process of waste copper, the price difference of waste copper of different quality and purity is obvious when recycling, so how to grade waste copper is crucial when recycling.

[0003] Waste copper grain is a main category of waste copper, which mainly mixes other colloids, plastics, iron and other metals and non-metals in copper grain. The main pricing method in the industry is to have experienced personnel evaluate and grade after sampling the waste copper grain. Such a grading method needs to calculate the total volume and total mass of the waste copper grain, as well as the volume and mass of various impurities, which is high in grading cost and low in efficiency. SUMMARY

[0004] The present application provides a waste copper grain grading method, device, electronic equipment and storage medium for evaluating and grading waste copper grain. The technical solution of the present application is as follows:

[0005] In a first aspect, the present application provides a waste copper grain grading method, which comprises:

[0006] Collecting an image of the waste copper grain;

[0007] Performing semantic segmentation on the image of the waste copper grain to obtain a semantic segmentation result image, each pixel in the semantic segmentation result image having a material category label;

[0008] According to the semantic segmentation result image, an area purity vector is determined, each element in the area purity vector corresponding to a material category label, and the value of the element being determined according to the ratio between the number of pixels in the semantic segmentation result image having the material category label corresponding to the element and the total number of pixels in the semantic segmentation result image;

[0009] According to the area purity vector, the mass purity of the waste copper grain is obtained;

[0010] According to the mass purity of the waste copper grain, the grade of the waste copper grain is determined.

[0011] The technical scheme provided by the present application at least brings the following beneficial effects: the present application obtains a semantic segmentation result image by performing semantic segmentation on the image of the waste copper grains, and each pixel in the semantic segmentation result image has a material category label. Then, by calculating the ratio between the number of pixels in the semantic segmentation result image that have the material category label corresponding to the element and the total number of pixels in the semantic segmentation result image, the area purity vector of the waste copper grains is obtained. In this way, based on the area purity vector of the waste copper grains, the mass purity of the waste copper grains can be determined, and the waste copper grains can be evaluated and graded. Compared with the prior art, the total mass and total volume of the waste copper grains do not need to be weighed during the grading process, which reduces the operation difficulty and improves the grading efficiency of the waste copper grains.

[0012] In a possible implementation, the image of the waste copper grains is input into a semantic segmentation model to identify the material category label corresponding to each pixel in the image of the waste copper grains through the semantic segmentation model, and obtain a semantic segmentation result image output by the semantic segmentation model.

[0013] Based on the possible implementation, the material category label corresponding to each pixel in the image of the waste copper grains is identified through the semantic segmentation model, and then different materials in the waste copper grains are distinguished and clustered to obtain a semantic segmentation result image corresponding to the waste copper grains, so as to subsequently determine the area purity vector of the waste copper grains.

[0014] In another possible implementation, the semantic segmentation result image is input into a conversion model to obtain an area purity vector output by the conversion model.

[0015] Based on the possible implementation, the semantic segmentation result image shows the distribution information of the pixels corresponding to different materials, and the conversion model can obtain the area purity vector of the waste copper grains according to the distribution information of the pixels corresponding to different materials. Without understanding the specific material information corresponding to each pixel in the semantic segmentation result image, the grading efficiency of the waste copper grains is improved.

[0016] In another possible implementation, the area purity vector is input into a calculation model to obtain the mass purity of the waste copper grains output by the calculation model.

[0017] Based on the possible implementation, the mass purity of the waste copper grains can be determined according to the area purity vector of the waste copper grains, avoiding the measurement of the mass and volume of the waste copper grains, reducing the cost and improving the grading efficiency.

[0018] In another possible implementation, the semantic segmentation model, the conversion model, and the calculation model are sequentially connected to constitute a mass purity detection model; the input of the mass purity detection model is the image of the waste copper grains, and the output of the mass purity detection model is the mass purity of the waste copper grains.

[0019] The mass purity detection model is obtained by training in the following manner:

[0020] obtain a training sample set, the training sample set comprising samples carrying labels, the samples being scrap copper sample images, and the labels being used to indicate quality purity corresponding to the scrap copper sample images;

[0021] train the initial quality purity detection model according to the training sample set to obtain a trained quality purity detection model.

[0022] According to the possible implementation, only the quality purity corresponding to the scrap copper sample images in the training sample set needs to be labeled, and the labeling workload of the quality purity is smaller than that of the area purity.

[0023] In a second aspect, the present application provides a scrap copper grading device, which comprises:

[0024] a collection module configured to collect an image of the scrap copper;

[0025] a segmentation module configured to perform semantic segmentation on the image of the scrap copper to obtain a semantic segmentation result image, each pixel in the semantic segmentation result image having a material category label;

[0026] a processing module configured to determine an area purity vector according to the semantic segmentation result image, each element in the area purity vector corresponding to a material category label, and the value of the element being determined according to a ratio between the number of pixels having the material category label corresponding to the element in the semantic segmentation result image and the total number of pixels in the semantic segmentation result image;

[0027] The processing module is further configured to obtain the quality purity of the scrap copper according to the area purity vector.

[0028] The processing module is further configured to determine the grade of the scrap copper according to the quality purity of the scrap copper.

[0029] In a possible implementation, the segmentation module is specifically configured to input the image of the scrap copper into a semantic segmentation model to identify the material category label corresponding to each pixel in the image of the scrap copper through the semantic segmentation model, and obtain a semantic segmentation result image output by the semantic segmentation model.

[0030] In another possible implementation, the processing module is specifically configured to input the semantic segmentation result image into a conversion model to obtain an area purity vector output by the conversion model.

[0031] In another possible implementation, the processing module is specifically configured to input the area purity vector into a calculation model to obtain the quality purity of the scrap copper output by the calculation model.

[0032] In another possible implementation manner, the semantic segmentation model, the conversion model, and the calculation model are sequentially connected to constitute the quality purity detection model; an input of the quality purity detection model is an image of the copper mill scrap, and an output of the quality purity detection model is quality purity of the copper mill scrap.

[0033] The quality purity detection model is obtained through the following manner:

[0034] A training sample set is obtained, the training sample set includes samples carrying labels, the samples are sample images of the copper mill scrap, and the labels are used to indicate quality purity corresponding to the sample images of the copper mill scrap.

[0035] According to the training sample set, the initial quality purity detection model is trained to obtain the trained quality purity detection model.

[0036] In a third aspect, the present application further provides an electronic device, including a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions, so that the electronic device executes the copper mill scrap grading method according to the first aspect and any possible implementation manner thereof.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium, and the computer-readable storage medium stores computer instructions, when the computer instructions run on the electronic device, the electronic device executes the copper mill scrap grading method according to the first aspect and any possible implementation manner thereof. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 A structural schematic diagram of a copper mill scrap grading system provided by an embodiment of the present application is shown in the figure;

[0039] Figure 2 A flowchart of a copper mill scrap grading method provided by an embodiment of the present application is shown in the figure;

[0040] Figure 3 A structural schematic diagram of a quality purity detection model provided by an embodiment of the present application is shown in the figure;

[0041] Figure 4 A structural schematic diagram of a copper mill scrap grading device provided by an embodiment of the present application is shown in the figure;

[0042] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0043] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0044] It should be noted that in the present application, the words such as "exemplary" or "for example" are used to represent an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "exemplary" or "for example" are intended to present the relevant concept in a specific manner.

[0045] The waste copper rice is a main category of waste copper, which is mainly mixed with other colloids, plastics, iron and various metals and non-metals. In the recycling of waste copper rice, the main pricing method in the industry is that experienced personnel evaluate and grade the waste copper rice after sampling, and determine the recycling price of the waste copper rice according to the grading result.

[0046] There are three main deficiencies in the process of manually grading waste copper rice: first, when manually estimating the purity of copper rice, only a very small amount of sample can be sampled, and the sampling quantity will directly affect the accuracy of grading and the labor cost; second, when manually estimating, a conclusion needs to be given according to past experience, which requires very experienced professional personnel; third, the grading result given by the evaluation personnel directly determines the recycling price of the waste copper rice, so this process is easy to produce complex interest relationship.

[0047] Exemplarily, Figure 1 Fig. 1 is a structural schematic diagram of a waste copper rice grading system provided by an embodiment of the present application. The waste copper rice grading system comprises an image acquisition device 101 and a waste copper rice grading device 102.

[0048] The image acquisition device 101 is any kind of industrial camera, and the waste copper rice grading device 102 can be any kind of electronic device with computing power such as a computer terminal. The image acquisition device 101 and the waste copper rice grading device 102 interact information.

[0049] Further, the waste copper rice grading system can further comprise a horizontally arranged conveying belt 103 and a material collecting device 104. Specifically, as shown in Figure 1 The material collecting device 104 is arranged at the end of the conveying direction of the conveying belt 103, and is used to recycle the waste copper rice to be graded on the conveying belt 103. The image acquisition device 101 is arranged directly above the conveying belt 103, and is used to acquire images of the waste copper rice, and the acquisition range is as shown by the dotted line part. Figure 1

[0050] ​The waste copper concentrate grading device 102 is configured to receive an image of waste copper concentrate to be graded, and determine a quality purity of the waste copper concentrate to be graded according to the image of the waste copper concentrate, so that a grade of the waste copper concentrate is determined according to the quality purity of the waste copper concentrate.

[0051] The waste copper concentrate grading method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0052] Figure 2 A flowchart of the single processing method provided by the embodiments of the present application is shown in FIG. 1. Figure 2 The method includes the following steps:

[0053] S101, collecting an image of waste copper concentrate.

[0054] In some embodiments, the waste copper concentrate to be graded is laid flat on the surface of the conveyor belt, where the flat state is that the surface of the conveyor belt does not have stacked waste copper concentrate. After the waste copper concentrate is laid flat, a terminal device in communication with the image collection device can send a photographing command to the image collection device to make the image collection device take a picture, thereby obtaining an image of the waste copper concentrate.

[0055] S102, performing semantic segmentation on the image of the waste copper concentrate to obtain a semantic segmentation result image.

[0056] The semantic segmentation is a way of classifying each pixel point in the original image according to semantics. After the semantic segmentation of the original image, the semantic categories of each pixel point in the image can be obtained.

[0057] For example, if the image of the waste copper concentrate presents zinc elements and iron elements, after the semantic segmentation of the image of the waste copper concentrate, the zinc element region and the iron element region can be determined. Different semantic categories can be identified using different pixel values. For example, the semantic category of each pixel point corresponding to the iron element in the waste copper concentrate can be identified using the pixel value corresponding to blue (such as RGB(0, 0, 255)); the semantic category of each pixel point corresponding to the zinc element in the waste copper concentrate can be identified using the pixel value corresponding to green (such as RGB(0, 255, 0)). Thus, an image in which each pixel point is identified with a new pixel value can be obtained. This image is the semantic segmentation result image.

[0058] S103, determining an area purity vector according to the semantic segmentation result image.

[0059] In some embodiments, according to the semantic segmentation result image, the number of pixels corresponding to each type of substance label in the semantic segmentation result image and the total number of pixels in the semantic segmentation result image are determined; and according to the number of pixels corresponding to each type of substance label and the total number of pixels in the semantic segmentation result image, the area purity vector is determined.

[0060] In some embodiments, each element in the area purity vector corresponds to a material category label, and the value of the element is determined according to a ratio between a number of pixels in the semantic segmentation result image having the material category label corresponding to the element and a total number of pixels in the semantic segmentation result image.

[0061] In some embodiments, when the material categories corresponding to the semantic segmentation result image are N, the dimension of the determined area purity vector is N, i.e., the area purity vector contains N elements, where N is a positive integer. It can be understood that N can be different for different semantic segmentation result images.

[0062] In some embodiments, when the area purity vector is N-dimensional, the N-dimensional area purity vector is mapped to a K-dimensional area purity vector. K is a positive integer greater than or equal to N. According to the K-dimensional area purity vector, the mass purity of the scrap copper grain is obtained. In this way, the dimensions of the area purity vector are unified, which facilitates ensuring the accuracy of input and output and improving efficiency when the data volume is huge.

[0063] In some embodiments, the value of K is a preset total number of material categories contained in the scrap copper grain. For example, it is preset that the scrap copper grain contains 9 materials, which are copper, zinc, iron, tin, lead, cobalt, nickel, silver, and gold, and the value of K is 9. It can be understood that the number N of material categories identified in the semantic segmentation result image is less than or equal to K.

[0064] For example, when the material categories corresponding to the semantic segmentation result image are 5, the determined area purity vector of dimension 5 is (1 / 10, 2 / 10, 2 / 10, 1 / 3, 1 / 6), and the elements in the area purity vector of dimension 5 from left to right correspond to the ratios between the numbers of pixels of copper, zinc, iron, lead, and cobalt and the total number of pixels in the semantic segmentation result image. The area purity vector of dimension 5 is mapped to an area purity vector of dimension 9, and the elements in the area purity vector of dimension 9 from left to right correspond to the ratios between the numbers of pixels of copper, zinc, iron, tin, lead, cobalt, nickel, silver, and gold and the total number of pixels in the semantic segmentation result image, i.e., the obtained area purity vector of dimension 9 is (1 / 10, 2 / 10, 2 / 10, 0, 1 / 3, 1 / 6, 0, 0, 0).

[0065] S104, according to the area purity vector, obtaining the mass purity of the scrap copper grain.

[0066] In some embodiments, the area purity vector is input into a calculation model to obtain the mass purity of the scrap copper grain. The calculation model can be composed of a three-layer fully connected network. The three-layer fully connected network includes an input layer, a hidden layer, and an output layer. The hidden layer is used to calculate the area purity vector from the input layer to determine the mass purity of the scrap copper grain. The output layer is used to output the mass purity of the scrap copper grain.

[0067] S105, determining the grade of the scrap copper pieces according to the mass purity of the scrap copper pieces.

[0068] In some embodiments, a predefined mapping table is used to determine the grade of the scrap copper pieces according to the mass purity of the scrap copper pieces. The mapping table shows the correspondence between the mass purity and the grade of the scrap copper pieces. Since the scrap copper pieces contain various impurities with different contents, the higher the mass purity of the scrap copper pieces, the higher the grade of the scrap copper pieces, and the higher the unit price of the scrap copper pieces. The unit price of the scrap copper pieces can be directly determined according to the grade of the scrap copper pieces.

[0069] In some embodiments, when the mass purity of the scrap copper pieces is greater than a first preset value, the grade of the scrap copper pieces is determined to be first grade; when the mass purity of the scrap copper pieces is greater than a second preset value and less than the first preset value, the grade of the scrap copper pieces is determined to be second grade; and when the mass purity of the scrap copper pieces is less than the second preset value, the grade of the scrap copper pieces is determined to be third grade. The grades are arranged in descending order as first grade, second grade, and third grade. The higher the grade, the higher the mass purity of the scrap copper pieces, and the higher the pricing of the scrap copper pieces.

[0070] Based on this, in the grading process, the total mass and total volume of the scrap copper pieces do not need to be weighed, only the image of the scrap copper pieces needs to be obtained, and an area purity vector is determined by segmenting the image of the scrap copper pieces. According to the area purity vector, the mass purity of the scrap copper pieces is determined, and the scrap copper pieces are evaluated and graded. The operation difficulty is reduced, and the grading efficiency of the scrap copper pieces is improved.

[0071] To support the implementation of the above-mentioned scrap copper piece grading method, an embodiment of the present application also provides a mass purity detection model, the input of the mass purity detection model is an image of a scrap copper piece, and the output of the mass purity detection model is the mass purity of the scrap copper piece. In this way, the above-mentioned scrap copper piece grading method can be implemented as follows: obtaining an image of a scrap copper piece; inputting the image of the scrap copper piece into the mass purity detection model to obtain the mass purity of the scrap copper piece; and determining the grade of the scrap copper piece according to the mass purity of the scrap copper piece.

[0072] As an example, the mass purity detection model can be an end-to-end model constructed based on a self-supervised semantic segmentation network.

[0073] Exemplarily, Figure 3 A mass purity calculation model structure diagram provided by an embodiment of the present application is shown in FIG. 5. The mass purity calculation model is composed of a semantic segmentation model, a conversion model, and a calculation model connected in sequence.

[0074] The semantic segmentation model is a model for converting the image of the waste copper grains into a semantic segmentation result image. The semantic segmentation model can be trained based on a machine learning method, such as a self-supervised learning method. Based on this, the above step S102 can be specifically implemented as: inputting the image of the waste copper grains into the semantic segmentation model to identify the material category label corresponding to each pixel in the image of the waste copper grains through the semantic segmentation model, and obtaining the semantic segmentation result image output by the semantic segmentation model.

[0075] In some embodiments, the semantic segmentation model includes a self-supervised transformer, a segmentation head, clustering, and a conditional random field. For example, the semantic segmentation model first extracts image features of the waste copper grains using the self-supervised transformer, then performs segmentation on the image of the waste copper grains based on the image features through the segmentation head using a fully connected network to obtain a segmentation result. Finally, the segmentation result is post-processed using clustering and a conditional random field to obtain a semantic segmentation result image. The copper and various impurities in the image of the waste copper grains are distinguished and clustered.

[0076] The conversion model is used to calculate the area proportion of copper and various impurities based on the semantic segmentation result image, and convert the semantic segmentation result image into an area purity vector. Based on this, the above step S103 can be specifically implemented as: inputting the semantic segmentation result image into the conversion model to obtain the area purity vector output by the conversion model.

[0077] In some embodiments, the semantic segmentation result image is input into the conversion model to obtain the area purity vector output by the conversion model.

[0078] In some embodiments, the conversion model is composed of a pure calculation network without parameters and a mapping network without training parameters.

[0079] In some embodiments, the pure calculation network is used to calculate the N-dimensional area purity vector by counting the number of pixels with element labels in the semantic segmentation result image and the total number of pixels in the semantic segmentation result image.

[0080] In some embodiments, the mapping network is used to map the N-dimensional area purity vector to a K-dimensional area purity vector. K is a positive integer greater than or equal to N. In this way, the dimensions of the area purity vector are unified, which facilitates ensuring the accuracy of input and output and improving efficiency when the data volume is large.

[0081] In some embodiments, the value of K is a preset value, for example, the value of K is 99.

[0082] The calculation model is configured to calculate the mass purity of the copper scrap according to the area purity vector. Based on this, the step S104 can be specifically implemented as: inputting the area purity vector into the calculation model to obtain the mass purity of the copper scrap output by the calculation model.

[0083] In some embodiments, the calculation model is composed of a three-layer fully connected network, which includes an input layer, a hidden layer, and an output layer. The hidden layer is configured to calculate the area purity vector from the input layer to determine the mass purity of the copper scrap. The output layer is configured to output the mass purity of the copper scrap.

[0084] In some embodiments, the mass purity detection model is obtained by training in the following manner: obtaining a training sample set, the training sample set including samples carrying labels, the samples being copper scrap sample images, and the labels being used to indicate the mass purity corresponding to the copper scrap sample images; training the initial mass purity detection model according to the training sample set to obtain the trained mass purity detection model.

[0085] In some embodiments, the training sample set can include commonly used data sets for training semantic segmentation models, such as the COCO (Common Objects in COntext) data set, etc.

[0086] For example, a copper scrap sample image is obtained. The copper scrap sample image is input into an untrained deep learning DeepLab network, and the mass purity of the copper scrap corresponding to the input copper scrap sample image is output by the DeepLab network. The DeepLab network is trained using a machine learning method (such as a self-supervised learning method) to obtain a mass purity detection model.

[0087] During the training process, the copper scrap sample image can be input into the DeepLab network one by one to obtain the mass purity of the copper scrap output by the DeepLab network. Then, based on the output mass purity of the copper scrap and the mass purity of the copper scrap corresponding to the input copper scrap sample image, a loss value can be determined. The loss value can be used to represent the difference between the output mass purity of the copper scrap and the mass purity of the copper scrap corresponding to the copper scrap sample image. The greater the loss value, the greater the difference. The loss value can be determined based on the Euclidean distance, etc. Then, the loss value can be used to update the parameters of the DeepLab network. Thus, for each input copper scrap sample image, the parameters of the DeepLab network can be updated once based on the mass purity of the copper scrap corresponding to the copper scrap sample image.

[0088] In some embodiments, the quality purity detection model can determine whether the training is completed in multiple ways. As an example, when the error between the quality purity of the copper scrap rice output by the quality purity detection model and the quality purity of the corresponding copper scrap rice sample image is less than a preset value (for example, 0.01), it can be determined that the training is completed. As another example, if the number of times of training of the DeepLab network is equal to a preset number of times, it can be determined that the training is completed. Here, when it is determined that the training is completed, the trained DeepLab network can be determined as the quality purity detection model.

[0089] It can be understood that the above method can be implemented by the copper scrap rice grading device. In order to implement the above functions, the copper scrap rice grading device comprises a hardware structure or a software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.

[0090] The embodiments of the present application can divide the functional modules of the above-mentioned copper scrap rice grading device and the like according to the above-mentioned method examples, for example, each functional module can be divided according to each function. The above-mentioned integrated modules can be realized in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical functional division. When actually implemented, there can be another division method.

[0091] In the case of dividing each functional module according to each function, Figure 4 A possible structure schematic diagram of the copper scrap rice grading device involved in the above-mentioned embodiments is shown. As shown in Figure 4 The copper scrap rice grading device 40 comprises a collection module 41, a segmentation module 42 and a processing module 43.

[0092] The collection module 41 is used for collecting images of copper scrap rice;

[0093] The segmentation module 42 is used for performing semantic segmentation on the images of copper scrap rice to obtain a semantic segmentation result image, each pixel in the semantic segmentation result image having a material category label;

[0094] The processing module 43 is configured to determine an area purity vector according to the semantic segmentation result image, each element in the area purity vector corresponding to a material category label, and a value of the element being determined according to a ratio between a number of pixels with the material category label corresponding to the element in the semantic segmentation result image and a total number of pixels in the semantic segmentation result image.

[0095] The processing module 43 is further configured to obtain the mass purity of the copper scrap according to the area purity vector.

[0096] The processing module 43 is further configured to determine the grade of the copper scrap according to the mass purity of the copper scrap.

[0097] In some embodiments, the segmentation module 42 is specifically configured to input the image of the copper scrap into the semantic segmentation model to identify a material category label corresponding to each pixel in the image of the copper scrap by the semantic segmentation model, and obtain a semantic segmentation result image output by the semantic segmentation model.

[0098] In some embodiments, the processing module 43 is specifically configured to input the semantic segmentation result image into the conversion model to obtain an area purity vector output by the conversion model.

[0099] In some embodiments, the processing module 43 is specifically configured to input the area purity vector into the calculation model to obtain the mass purity of the copper scrap output by the calculation model.

[0100] In some embodiments, the semantic segmentation model, the conversion model and the calculation model are sequentially connected to constitute a mass purity detection model, an input of the mass purity detection model is the image of the copper scrap, and an output of the mass purity detection model is the mass purity of the copper scrap.

[0101] The mass purity detection model is obtained by training in the following manner:

[0102] A training sample set is obtained, the training sample set includes a sample carrying a label, the sample is a copper scrap sample image, and the label is used to indicate the mass purity corresponding to the copper scrap sample image; the initial mass purity detection model is trained according to the training sample set to obtain the trained mass purity detection model.

[0103] Of course, the copper scrap grading device 40 includes but is not limited to the above-mentioned enumerated unit modules. Moreover, the specific functions that can be implemented by the above-mentioned functional units also include but are not limited to the functions corresponding to the method steps of the above-mentioned examples, and the detailed description of other modules of the copper scrap grading device 40 can refer to the detailed description of the method steps corresponding thereto, and the present embodiment will not be described here.

[0104] In the case of using integrated units, Figure 5A possible structural diagram of the electronic device involved in the above embodiments is shown. The electronic device 500 can include a processor 501 and a memory 502. The memory 502 is used to store the memory of the processor 501 executable instructions. The processor 501 is configured to execute the instructions so that the electronic device performs various functions or steps in the above method embodiments.

[0105] Specifically, the processor 501 is configured to control and manage the actions of the electronic device. The memory 502 is configured to store the program code and data of the electronic device, such as the copper scrap grading method, the preset weight, the preset value range, etc.

[0106] Further, the electronic device 500 can also include a communication module. The communication module is configured to support the communication between the electronic device and other network entities, so as to realize the functions of data interaction, etc. For example, the communication module supports the communication between the electronic device and the background server, so as to realize the function of data interaction.

[0107] The processor 501 can include one or more processing cores, such as a 4-core processor, a 5-core processor, etc. The processor 501 can include an attached processor (AP), a modem processor, a graphic processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc.

[0108] The memory 502 can include one or more computer-readable storage media, which can be non-transitory. The memory 502 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 502 is used to store at least one instruction for being executed by the processor 501 to implement the copper scrap grading method provided by the embodiments of the present application.

[0109] The embodiment of the present application further provides a computer readable storage medium comprising computer instructions, when the computer instructions are executed on the electronic device, the electronic device is caused to perform each function or step in the method embodiment. For example, the computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0110] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0111] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiment described above is only schematic, for example, the division of the module or unit is only a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0112] The unit described as a separate component can or can not be physically separated, and the component shown as a unit can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0113] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0114] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the present application method. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various storage program codes.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed by the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of grading scrap copper millings, characterized by, The method comprises: collecting an image of the waste copper grains; inputting the image of the waste copper grains into a semantic segmentation model to identify a material category label corresponding to each pixel in the image of the waste copper grains through the semantic segmentation model, and obtain a semantic segmentation result image output by the semantic segmentation model, each pixel in the semantic segmentation result image having a material category label, the semantic segmentation model being trained based on self-supervised learning; determining an area purity vector according to the semantic segmentation result image, each element in the area purity vector corresponding to a material category label, and the value of the element being determined according to a ratio between a number of pixels having the material category label corresponding to the element in the semantic segmentation result image and a total number of pixels in the semantic segmentation result image; obtaining a mass purity of the waste copper grains according to the area purity vector; determining a grade of the waste copper grains according to the mass purity of the waste copper grains.

2. The method of claim 1, wherein, The determining of the area purity vector according to the semantic segmentation result image comprises: inputting the semantic segmentation result image into a conversion model to obtain the area purity vector output by the conversion model.

3. The method of claim 2, wherein, The obtaining of the mass purity of the waste copper grains according to the area purity vector comprises: inputting the area purity vector into a calculation model to obtain the mass purity of the waste copper grains output by the calculation model.

4. The method of claim 3, wherein, The semantic segmentation model, the conversion model and the calculation model are sequentially connected to constitute a mass purity detection model, an input of the mass purity detection model is the image of the waste copper grains, and an output of the mass purity detection model is the mass purity of the waste copper grains. The mass purity detection model is trained in the following manner: obtaining a training sample set, the training sample set comprising samples carrying labels, the samples being waste copper grain sample images, and the labels being used to indicate mass purities corresponding to the waste copper grain sample images; training an initial mass purity detection model according to the training sample set to obtain a trained mass purity detection model.

5. A scrap copper grading device characterized by, The device comprises: a collection module configured to collect an image of the waste copper grains; a segmentation module configured to input the image of the waste copper grains into a semantic segmentation model to identify a material category label corresponding to each pixel in the image of the waste copper grains through the semantic segmentation model, and obtain a semantic segmentation result image output by the semantic segmentation model, each pixel in the semantic segmentation result image having a material category label, the semantic segmentation model being trained based on self-supervised learning; a processing module configured to determine an area purity vector according to the semantic segmentation result image, each element in the area purity vector corresponding to a material category label, and the value of the element being determined according to a ratio between a number of pixels having the material category label corresponding to the element in the semantic segmentation result image and a total number of pixels in the semantic segmentation result image; the processing module is further configured to obtain a mass purity of the waste copper grains according to the area purity vector; the processing module is further configured to determine a grade of the waste copper grains according to the mass purity of the waste copper grains.

6. The device according to claim 5, wherein The processing module is specifically configured to: input the semantic segmentation result image into a conversion model to obtain an area purity vector output by the conversion model.

7. The apparatus of claim 6, wherein, The processing module is specifically configured to: input the area purity vector into a calculation model to obtain a mass purity of the copper scrap rice output by the calculation model.

8. The apparatus of claim 7, wherein, The semantic segmentation model, the conversion model, and the calculation model are sequentially connected to constitute a mass purity detection model; an input of the mass purity detection model is an image of the copper scrap rice, and an output of the mass purity detection model is a mass purity of the copper scrap rice; The mass purity detection model is obtained through the following manner: obtain a training sample set, the training sample set including samples carrying labels, the samples being copper scrap rice sample images, and the labels being used to indicate mass purities corresponding to the copper scrap rice sample images; train an initial mass purity detection model according to the training sample set to obtain a trained mass purity detection model.

9. An electronic device, comprising: The electronic device includes a processor and a memory for storing instructions executable by the processor; The processor is configured to execute the instructions, so that the electronic device performs the copper scrap rice grading method according to any one of claims 1-4.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and when the computer instructions run on the electronic device, the electronic device executes the copper scrap rice grading method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Waste copper grain grading method and system based on machine vision

    CN115375650A