A nickel-cobalt-manganese positive electrode material metal foreign matter identification method based on a neural network
By acquiring images from multiple angles and correcting brightness to form aligned image groups, and combining this with a geometrically guided dual-branch neural network model, the problem of stable identification of metallic foreign objects in nickel-cobalt-manganese cathode materials was solved, achieving efficient detection under complex lighting conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU INST OF TECH
- Filing Date
- 2026-01-16
- Publication Date
- 2026-06-05
AI Technical Summary
Existing industrial neural network detection technology has difficulty in stably identifying metallic foreign objects in nickel-cobalt-manganese cathode materials under multi-angle imaging conditions. It is affected by uneven illumination, local reflection and complex grain texture, resulting in frequent false detections and false negatives, and lacks a compensation mechanism under low confidence conditions.
Images are acquired through multi-angle illumination, and brightness and position corrections are performed to form aligned image groups. Brightness variation maps, edge clarity maps, and polarization distribution maps are generated. A dual-branch neural network model with geometric guidance structure is constructed, and feature modulation is performed by combining geometric feature branches and appearance feature branches. Local supplementary angle illumination acquisition and re-inference are performed at low confidence levels.
It improves the accuracy and stability of metal foreign object identification, ensures continuous judgment of suspicious areas under complex lighting conditions, enhances the reliability and accuracy of detection, and meets the stability requirements of the production line.
Smart Images

Figure CN122156713A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of neural network industrial detection technology, and in particular to a method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks. Background Technology
[0002] With the widespread application of nickel-cobalt-manganese cathode materials in power and energy storage batteries, the requirements for material purity in their production process are gradually increasing. The intrusion of metallic foreign matter is a key risk factor in cathode material production, potentially causing scratches, powder shedding, and short circuits during subsequent electrode compaction, rolling, or coating processes, thus affecting battery consistency and safety. Currently, multi-angle illumination industrial vision inspection methods are commonly used on production lines to image the material surface. However, due to factors such as strong surface reflection, high-brightness area obstruction, and complex grain textures, traditional methods based on threshold segmentation, edge detection, or feature template matching are prone to false positives and false negatives in real-world scenarios, making it difficult to meet the stability requirements of high-nickel ternary material processing.
[0003] In recent years, neural networks have seen rapid development in the field of visual recognition. However, when directly applying general network structures to the detection of highly reflective powder surfaces, the networks are susceptible to interference from uneven illumination, localized reflections, and differences in particle morphology. Their feature extraction process fails to adequately utilize geometric cues and reflectance information, making it difficult to reliably distinguish between metallic foreign objects and normal crystalline regions. Furthermore, localized overexposure in highly reflective areas disrupts the contrast relationship between pixels, causing instability in the network's response at critical boundary regions. Existing methods also lack compensation mechanisms under low-confidence conditions, failing to maintain continuous judgment of suspicious areas under complex lighting conditions. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks. This solves the problems of inconsistent brightness response, easy interference of boundary structures by reflection, and difficulty in distinguishing between specular and diffuse reflection under multi-angle imaging conditions in existing industrial neural network detection technologies, which lead to unstable identification of candidate regions for metallic foreign objects.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks, comprising: performing multi-angle illumination acquisition on the surface of the material on a nickel-cobalt-manganese cathode material production line to acquire multiple frames of original images, and performing brightness correction and position correction on the original images based on a field-of-view reference film to obtain an aligned image group.
[0008] Based on the aligned image set, a brightness variation map, an edge clarity map, and a polarization distribution map are calculated to form a multi-feature input set aligned under the same field of view;
[0009] The multi-feature input set is input into a dual-branch neural network model with a geometrically guided structure, and the pixel-level candidate probability map of metallic foreign objects and the initial discrimination result are output. Based on the candidate probability map and the initial discrimination result, the fusion confidence of the initial inference is determined.
[0010] Candidate regions are determined based on candidate probability maps. When the fusion confidence is lower than a preset trigger threshold, local supplementary angle illumination acquisition is triggered within the candidate region. The supplementary frame image is incorporated into the multi-feature input set and re-inferred in the dual-branch neural network model to obtain the final discrimination result. Based on the final discrimination result, the sorting device is controlled to remove materials containing metal foreign objects.
[0011] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks described in this invention, the method for obtaining the aligned image group includes acquiring at least three frames of original images after brightness correction and position correction processing in a preset illumination angle order.
[0012] The brightness correction is based on a unified brightness reference established by the field of view reference film, and the position correction registers each frame of the original image to a unified spatial coordinate relationship, forming an aligned image group with a one-to-one pixel relationship under the same field of view.
[0013] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks described in this invention, the method for forming a multi-feature input set includes, under the unified brightness benchmark, comparing the brightness response pixel by pixel in the aligned image group according to a preset illumination angle order and using the corresponding pixel positions in the same field of view as a reference, to generate a brightness change map.
[0014] Based on the aligned image group, with the one-to-one corresponding pixel positions in the same field of view as a reference, the boundary information under multiple angles is fused to suppress the false boundary caused by strong reflection and generate a clear edge image.
[0015] Based on the aligned image group, with the one-to-one corresponding pixel positions in the same field of view as a reference, the reflection information is separated according to the reflection differences under different illumination angles, and the contribution of specular reflection and diffuse reflection to brightness is distinguished to generate a polarization distribution map; then the brightness change map, edge clarity map and polarization distribution map are normalized and combined under the same field of view to form a multi-feature input set.
[0016] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks according to the present invention, the dual-branch neural network model includes a geometric feature branch and an appearance feature branch. The geometric feature branch generates a spatial attention field and a deformation sampling offset field. The appearance feature branch performs weighted modulation of the convolution output based on the spatial attention field and the deformation sampling offset field in each convolutional layer based on the attention mechanism.
[0017] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks described in this invention, the specific process of the geometric feature branch includes: taking the aligned image group as input, performing local convolution and normalization in the pixel neighborhood of the brightness change map to generate a spatial attention field;
[0018] Calculate the horizontal and vertical gradient vectors at the corresponding pixel positions in the edge-clear image, and form the offset of the convolution sampling position based on the gradient vector through convolution mapping. Set a maximum allowable offset range for the offset, and attenuate the offset range by a fixed ratio between adjacent convolution layers to form a deformation sampling offset field. The maximum allowable offset range is set based on the receptive field size of the convolution kernel and the pixel spacing.
[0019] Statistical analysis and convergence are performed in local regions of the polarization distribution map, and channel attention weights are generated through nonlinear transformation. When the local brightness is lower than the uniform brightness reference, the channel attention weight is set to 1.
[0020] The appearance feature branches include:
[0021] In each convolutional layer, the sampling position of the convolutional kernel is adjusted according to the deformation sampling offset field, and the sampling features are obtained by interpolation at non-integer coordinates.
[0022] The convolutional output is multiplied with the spatial attention field in the pixel dimension, and the multiplication result is multiplied with the channel attention weight in the channel dimension to obtain a feature map modulated by geometric guidance.
[0023] Pixel-level candidate probability maps are generated based on multi-layer modulated feature maps, and then converted into binary mask maps according to the set pixel confidence threshold.
[0024] In the binary mask image, connected regions are determined based on pixel connectivity. Within each connected region, mask averaging is performed on the candidate probability map to form the region pixel confidence. Mask averaging pooling is then performed on the high-level feature map of the appearance feature branch to form the region classification confidence.
[0025] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks according to the present invention, wherein: during the training process of the dual-branch neural network model, a composite loss function including pixel-level supervision loss, region classification loss and structural consistency constraint is adopted;
[0026] The pixel-level supervision loss is used to correct the pixel prediction accuracy of the candidate probability map, the region classification loss is used to correct the category judgment result of the candidate region, and the structural consistency constraint uses the structural features of the brightness change map, edge clarity map and polarization distribution map to synchronously align the brightness distribution, boundary contour and reflection distribution of the candidate probability map, and combines them into a consistency loss according to a preset weight.
[0027] As a preferred embodiment of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks described in this invention, the final output judgment result includes a fusion confidence score for initial inference formed by a weighted combination of regional classification confidence score and regional pixel confidence score.
[0028] When the fusion confidence of any candidate region is lower than the preset trigger threshold, local supplementary angle illumination acquisition is triggered within the candidate region. After performing brightness correction and position correction on the supplementary frame image, a brightness change map, an edge clarity map and a polarization distribution map are regenerated in the corresponding region. The updated image is incorporated into the multi-feature input set and re-inferred in the dual-branch neural network model to obtain the re-inference result and the re-inference confidence.
[0029] The fused confidence and the re-inference confidence are weighted and fused according to a preset weight to form the final confidence. The sorting device is then controlled to complete the rejection based on the re-inference result and the final confidence.
[0030] Secondly, the present invention provides a neural network-based system for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials, comprising: an image acquisition unit for acquiring original images from multiple angles; an image processing unit for performing brightness correction and position correction and generating aligned image sets and multi-feature input sets; a neural network inference unit for outputting candidate probability maps, fusion confidence, and discrimination results based on a dual-branch neural network model with geometric guidance structure; a supplementary angle acquisition unit for acquiring supplementary frame images when the fusion confidence is lower than a trigger threshold and processing them by the image processing unit; and a sorting control unit for controlling a sorting device to remove materials containing metallic foreign objects based on the final discrimination result.
[0031] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in the first aspect of the present invention.
[0032] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in the first aspect of the present invention.
[0033] The beneficial effects of this invention are as follows: By forming aligned image groups through multi-angle illumination acquisition, brightness correction, and position correction, reflection information from different angles achieves a one-to-one correspondence within the same field of view, avoiding feature misalignment problems caused by illumination changes and field of view shifts, and providing stable input for subsequent feature generation. Based on this, a brightness change map is generated through pixel-by-pixel comparison, a clear edge map is generated through multi-angle boundary fusion, and a polarization distribution map is generated through reflection separation. This ensures that the three key features—brightness change, boundary morphology, and reflection attributes—are expressed with a unified field of view, providing a reliable geometric basis for the network. This invention constructs a dual-branch neural network model with a geometrically guided structure. The geometric feature branch generates a spatial attention field, a deformation sampling offset field, and channel attention weights, guiding the appearance feature branch to perform collaborative modulation at the sampling position, pixel weight, and channel weight levels. This ensures that the candidate probability map maintains a stable response in high-reflectivity, low-texture, and blurred boundary regions, improving the localization accuracy of candidate regions. Based on the candidate probability map and the classification output, a fusion confidence score is obtained. For areas with low confidence scores, local supplementary angle illumination acquisition is performed and inference is performed again to ensure that hard-to-detect areas can obtain more sufficient information, thereby improving the reliability of the final discrimination result and ensuring the stability and accuracy of the metal foreign object removal process. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of a method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks.
[0036] Figure 2 This is a schematic diagram of a dual-branch neural network model for a method of identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks.
[0037] Figure 3 This is a diagram of a computer device for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks. Detailed Implementation
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0040] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0041] Reference Figure 1 This is one embodiment of the present invention, which provides a method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks, comprising the following steps:
[0042] S1: On the nickel-cobalt-manganese cathode material production line, multi-angle illumination acquisition is performed on the material surface to obtain multiple frames of original images; the brightness and position of the original images are corrected based on the field of view reference film to obtain an aligned image group.
[0043] On the nickel-cobalt-manganese cathode material production line, at least three different illumination angles are set based on the reflective properties of the material surface, including left-side oblique illumination, frontal illumination, and right-side oblique illumination. The sequence of illumination angles is set to a fixed order by the control system before data acquisition to ensure that the illumination sequence and exposure timing are consistent in each detection cycle.
[0044] Each set of illumination angles corresponds to one frame of original image. When the material passes through the detection area, the acquisition system illuminates the corresponding light source in sequence according to the preset illumination angle order, and simultaneously triggers the imaging device to acquire the original image, forming a sequence of original images arranged in angular order.
[0045] A polarization control component is incorporated into the optical path of the imaging device to acquire original images with different polarization states within the same field of view. The polarization control component can be a polarizer with a fixed polarization direction or a polarization module with switchable polarization angles. During the imaging process corresponding to each illumination angle, the control system acquires at least two frames of original images with different polarization states in a preset polarization angle sequence, where the polarization angles are orthogonal to each other.
[0046] Brightness correction and position correction are performed on the original images acquired under different polarization states to ensure that the images under different polarization states and different illumination angles maintain a one-to-one pixel relationship in the same field of view, thereby forming an aligned image group containing polarization information.
[0047] A brightness-stable field-of-view reference plate is placed within the acquisition field of view. The reference plate is made of high-reflectivity ceramic or coated glass, whose reflectivity remains stable within the detection band and whose brightness response changes negligibly under different illumination angles. This reference plate serves as a brightness correction benchmark, remaining at the same field-of-view position under all illumination angles to provide a uniform brightness standard.
[0048] The acquisition system simultaneously records image data of the reference area during each imaging process and uses this data as reference data for subsequent brightness correction. By calculating the average brightness value of the reference area in each frame of the original image and comparing this average brightness value with a pre-established unified brightness benchmark, the brightness deviation is obtained, providing a basis for brightness correction.
[0049] Brightness correction is performed on each frame of the original image. Based on the brightness deviation of the field-of-view reference image, the image brightness under different illumination angles is uniformly adjusted. This process is completed automatically by software: the system corrects the brightness scale of the entire frame image according to the brightness response differences of the reference image area under different illumination angles, so that each frame image has a consistent grayscale response range under a unified brightness benchmark.
[0050] After brightness correction, the original images from different lighting angles maintain a consistent overall brightness distribution, providing uniform lighting conditions for subsequent spatial registration.
[0051] Position correction is performed on each frame of the original image after brightness correction. The acquisition system utilizes fixed marker points or field-of-view boundary features in the image—features whose spatial positions remain stable under different illumination angles—to determine the spatial deviation between each frame of the original image. By comparing the relative positions of the same feature points at different angles, the deviation is calculated, and the spatial position of each frame of the image is automatically adjusted to align all images in the same coordinate system.
[0052] This position correction step ensures that images taken under different lighting angles maintain a consistent spatial coordinate relationship at the pixel level, thus ensuring that the material surface at the same location corresponds one-to-one in each frame of the image.
[0053] Once brightness and position corrections are complete, the system combines the processed frames in the order they were acquired to form an aligned image group. This aligned image group contains multi-angle images formed under the same field of view, based on a unified brightness benchmark and a unified spatial coordinate relationship, which can realistically reflect the reflective characteristics of the material surface under different illumination angles.
[0054] The aligned image group is passed as data input to subsequent steps to calculate the brightness variation map, edge clarity map, and polarization distribution map, providing standardized input for neural network recognition.
[0055] S2: Calculate the brightness change map, edge clarity map and polarization distribution map based on the aligned image group to form a multi-feature input set.
[0056] Under the unified brightness benchmark, the brightness response of corresponding pixel positions in the same field of view in the aligned image group is compared according to the preset illumination angle order.
[0057] The system calculates the brightness difference of the same pixel under different lighting angles to reflect the magnitude of the change in the reflective intensity of the material surface with the angle.
[0058] When a local pixel brightness change exceeds a set threshold, the area is identified as a potential high-reflectivity area, and a brightness change map reflecting the reflective properties of the material is generated through smoothing and anomaly suppression processing.
[0059] The brightness variation map serves as a weight reference for subsequent feature fusion, providing angle-related information for the generation of the edge-clear map.
[0060] Based on the brightness variation map, boundary information under the same field of view is extracted from the aligned image group, and weighted fusion is performed between multi-angle images.
[0061] During the fusion process, the system uses the brightness variation map as a weight reference to suppress false boundary information in high-reflectivity areas and enhance the structural boundaries in low-reflectivity areas, making edge extraction more stable.
[0062] Through multi-angle consistency analysis, a clear edge map reflecting the true texture and structural contour of the material surface is obtained.
[0063] The edge clarity map is used to stabilize the reflection distribution calculation in subsequent steps and prevent feature errors caused by reflection.
[0064] Based on the image groups aligned with different polarization states obtained in S1, and using the one-to-one corresponding pixel positions in the same field of view as a reference, the brightness response of the same pixel under different polarization states is compared and analyzed.
[0065] The system compares the response differences between images of different polarization states in high-reflectivity and low-reflectivity regions, separates the relative contributions of specular reflection and diffuse reflection to the total brightness response, and generates a polarization distribution map that reflects the spatial distribution of specular reflection proportion.
[0066] In the process of generating polarization distribution maps, brightness variation maps and edge clarity maps serve as spatial constraints and stability references to suppress polarization characteristic fluctuations caused by strong reflections or boundary discontinuities, thereby improving the spatial consistency and reliability of polarization distribution results.
[0067] The polarization distribution map, while maintaining geometric consistency, highlights the difference in reflective properties between metallic foreign objects and normal particles, providing physical prior features for subsequent neural network recognition.
[0068] The brightness variation map, edge clarity map, and polarization distribution map are uniformly processed according to a one-to-one pixel relationship under the same field of view.
[0069] The system performs standardization and normalization operations on the three types of feature maps to ensure that the brightness, edge and polarization features are consistent on the numerical scale and to achieve unified registration in space.
[0070] The multi-feature input set formed by combining the three types of feature maps simultaneously includes brightness variation features, edge structure features, and reflection distribution features, providing unified input data for a dual-branch neural network model with geometrically guided structure.
[0071] S3: Input the multi-feature input set into a dual-branch neural network model with a geometrically guided structure, output a pixel-level candidate probability map of metallic foreign objects and an initial discrimination result, and determine the fusion confidence of the initial inference based on the candidate probability map and the initial discrimination result.
[0072] The brightness variation map B, edge clarity map E, and polarization distribution map P (size H×W, range normalized to [0, 1]) from S2 are stacked by channel as a multi-feature input set X=[B, E, P].
[0073] Perform zero-mean-unit variance standardization on X channel by channel; record the unified brightness benchmark established by S1 to perform neutral control in the low-brightness region of P.
[0074] The geometric feature branch specifically includes: on B, calculating the local mean and deviation of each pixel using a fixed window (e.g., 7×7) to obtain a local contrast map; normalizing and lightly smoothing the local contrast map (e.g., using a Gaussian kernel) to output a spatial attention field S (H×W, values [0, 1]). S is then downsampled using a scale pyramid to obtain S / 2 and S / 4, which are used for subsequent multi-layer feature alignment. Here, H represents the height and W represents the width.
[0075] Gradient magnitudes are calculated in the local pixel neighborhood of the edge-clear image, and a uniform threshold is determined based on the statistical distribution of gradient magnitudes across the entire image. Pixels with magnitudes above this threshold are classified as high-magnitude regions, and pixels with magnitudes below or equal to this threshold are classified as low-magnitude regions. The horizontal and vertical gradients are calculated on E to obtain a gradient magnitude map and a gradient direction field. The direction and magnitude are mapped to a two-dimensional offset of each sampling point of the convolution kernel: at each sampling point, the magnitude of the offset is proportional to the gradient magnitude at that point. For gradient magnitudes exceeding a set upper threshold... At that time, the offset range is set to Pixels; and for gradient magnitudes less than a set lower threshold At that time, the offset range is set to Pixel. When gradient magnitude At that time, the offset range is set to Pixel.
[0076] The offset vector for each pixel is cropped by magnitude (e.g., not exceeding a radius of a certain number of pixels), and in deeper layers, a maximum allowable offset range is set based on the receptive field size of the convolutional kernel and the pixel spacing to ensure that the offset is within a reasonable range and avoid oversampling. Between each convolutional layer, the offset range is simultaneously attenuated layer by layer using a fixed ratio (e.g., 0.8) to form a constrained deformation sampling offset field O.
[0077] Generate O, O / 2, and O / 4 (bilinear interpolation to the corresponding scale) that match the feature resolution of each layer.
[0078] P is statistically analyzed in local blocks (e.g., 16×16 blocks) and then globally aggregated (average and maximum values) to obtain a descriptive quantity reflecting the specular reflection distribution. Through two layers of small fully connected mapping and nonlinear transformation, the channel attention weight vector C for each feature channel is obtained (layer by layer). If the brightness of a local region is lower than the unified brightness benchmark established by S1, the channel weight corresponding to that region is replaced with a neutral value of 1 (keeping the channel weight unchanged). Corresponding values are prepared for features at different scales. , , .in, , , These represent the channel attention weights corresponding to feature maps at different scales, which are used to modulate the channel dimensions of the convolution output at each scale, so that feature maps of different resolutions maintain a consistent expression in terms of channel importance.
[0079] A three-stage convolutional model (Stage 1 / 2 / 3) is employed, with resolutions of H×W, H / 2×W / 2, and H / 4×W / 4 respectively (achieved through stride or downsampling layers). Each stage contains several deformable convolutional blocks. The feature maps of each layer... (l is the floor number) Perform the following sequential actions:
[0080] Step 1: Use the O provided by the geometry branch to adjust the position of the convolution kernel sampling coordinates at the current resolution; when the sampling coordinates fall at non-integer positions, use bilinear interpolation to obtain the values.
[0081] Step 2: Multiply the convolution output pixel by pixel with S.
[0082] Step 3: Combine the results of Step 2 with the channel dimension. Multiply each channel.
[0083] Step 4: Perform standard normalization and nonlinear activation; add residual connections for stable training as needed.
[0084] After multi-layer stacking, the output is a fused feature map modulated by geometry. .
[0085] exist The pixel-level probability map of metallic foreign objects is obtained by convolution with 1×1. (H / 4×W / 4), upsampled to H×W.
[0086] in, This represents the channel attention weight vector of the l-th convolutional network.
[0087] Using pixel confidence threshold Binarize the image into a binary mask M; perform pixel connectivity scanning to obtain a set of candidate regions and the bounding rectangle of each region.
[0088] exist The above method performs mask averaging on each candidate region to obtain the pixel confidence score of the numerical region. .
[0089] On the high-level feature map of the appearance branch, masked average pooling is performed using candidate region masks to obtain region feature vectors, which are then output by the classification head to determine the region classification confidence. .
[0090] Fusion confidence: Based on preset weights and Perform a weighted combination to obtain the fusion confidence level. .
[0091] During the training process of the dual-branch neural network model, a composite loss function is used, which includes pixel-level supervision loss, region classification loss, and structural consistency constraint. The formula is expressed as:
[0092]
[0093] The pixel-level supervision loss The formula used to correct the pixel prediction accuracy of the candidate probability map is expressed as:
[0094]
[0095] The region classification loss The formula used to correct the category determination results of candidate regions is expressed as follows:
[0096]
[0097] The structural consistency constraint synchronizes the brightness distribution, boundary contour, and reflection distribution of the candidate probability map using structural features from the brightness variation map, edge clarity map, and polarization distribution map, and combines them into a consistency loss according to preset weights. The formula is expressed as:
[0098]
[0099] in, Indicates the pixel index; Indicates the pixel position The actual labeled value at the location; Indicates the pixel position At this location, the candidate probability map output is the predicted probability of the metallic foreign object; k represents the candidate region index; Indicates the first True category labeling of each candidate region; Indicates the classification head pair of the first The predicted probability value of each candidate region corresponding to the true category; This represents a non-negative coefficient used to control the weighting of the brightness structure consistency loss; This represents the brightness consistency loss constructed based on the brightness structure relationship between the brightness variation map and the candidate probability map; This represents the boundary consistency loss constructed based on the boundary structure relationship between the edge clarity map and the candidate probability map; This represents a non-negative coefficient used to control the weighting of the reflection structure consistency loss; This represents the reflection consistency loss constructed based on the reflection structure relationship between the polarization distribution map and the candidate probability map; The weighting coefficients represent the boundary consistency loss.
[0100] During the training phase, updates are performed backward using the composite loss; during the inference phase, only forward computation is performed, and the output is... Candidate regions, initial discrimination results, and fusion confidence.
[0101] In industrial inspection scenarios, metallic foreign objects on the surface of nickel-cobalt-manganese cathode materials typically exhibit significant reflective heterogeneity, meaning that the same location shows different brightness distributions and boundary structures under different illumination angles. If a single convolutional feature is used directly for identification, the convolutional kernel captures a mixed representation of local textures, making it difficult to distinguish between edge variations caused by the true structure and pseudo-boundaries generated by specular reflection. Based on this characteristic, this step employs independent geometric feature branches and appearance feature branches for parallel modeling, processing geometric prior information extracted from brightness variation maps, edge clarity maps, and polarization distribution maps, as well as appearance texture information from a multi-feature input set, respectively. This structure can express "geometric constraints" and "texture appearance" separately in the network, and maintain their registration through layer-by-layer modulation. This allows the convolutional kernel to respond differently to boundaries, brightness, and reflectivity properties at different locations, ensuring a consistent representation of the differences between metallic foreign objects and normal particles in the feature layers.
[0102] Industrial environments are characterized by factors such as reflective interference, particle overlap, and local occlusion, making it difficult for traditional convolutional algorithms to accurately capture boundary positions in areas with significant illumination variations. This step generates a spatial attention field using a brightness variation map, reducing the response intensity of convolution in areas heavily affected by reflection and increasing structural sensitivity in areas with stable brightness. A deformable sampling offset field is formed using a clear edge pattern, allowing the convolutional kernel to adjust its position along the boundary direction in high-gradient regions, thereby enhancing the network's ability to resolve real boundaries. Channel attention weights are formed using a polarization distribution map, suppressing feature channels related to specular reflection while strengthening channels related to diffuse reflection. All three types of guidance information originate from the physical prior features of S2, thus providing structurally consistent multidimensional constraints within the network, enabling interpretable geometric modulation capabilities at each convolutional stage. This mechanism effectively reduces boundary drift caused by illumination variations and improves the stability of recognizing real metallic foreign object reflective structures, something that traditional convolutional or single attention mechanisms cannot achieve.
[0103] When detecting nickel-cobalt-manganese cathode materials, metallic foreign objects typically exhibit characteristics such as localized high reflectivity, small area, and inconsistent morphology, making it difficult to reliably determine their category using only pixel-level candidate probabilities. In this step, the candidate probability map provides the response intensity at the pixel level. By averaging through a mask, a region's pixel confidence score is formed, reflecting the overall optical consistency within the region. Simultaneously, mask pooling is performed on each candidate region in the high-level feature map of the appearance feature branch to extract the region's structural appearance features, forming a region classification confidence score through a classification head. These two types of confidence scores provide information from the dimensions of "pixel statistical consistency" and "regional structural expression," respectively. After weighted fusion, a more robust fused confidence score is obtained, which helps improve the stability of region-level judgments in complex scenarios such as small foreign objects, asymmetric reflection, and particle stacking. Compared with existing detection methods that rely solely on a single confidence branch, this confidence system significantly reduces false positives and stably triggers supplementary angle illumination acquisition, ensuring reliable activation conditions for the subsequent S4 supplementary inference mechanism, thereby improving the stability of the entire detection process under production line cycle time.
[0104] S4: When the fusion confidence is lower than the preset trigger threshold, local supplementary angle illumination acquisition is triggered within the candidate region. The supplementary frame image is incorporated into the multi-feature input set and re-inferred in the dual-branch neural network model to obtain the final discrimination result. Based on the final discrimination result, the sorting device is controlled to remove materials containing metal foreign objects.
[0105] After obtaining the candidate region, region pixel confidence, region classification confidence, and fusion confidence obtained by weighted combination of the two in S3, each candidate region is judged according to a preset trigger threshold. When the fusion confidence of any candidate region is lower than the trigger threshold (e.g., 0.7, the trigger threshold can be adjusted according to actual system requirements), the bounding rectangle of the candidate region is used as the trigger range. In the lighting mechanism corresponding to the detection position, a single lighting unit is controlled to switch to the supplementary angle light source, so that the range obtains a supplementary frame image under the new lighting angle. The supplementary angle light source shares the same optical path and trigger circuit with the original multi-angle lighting system, so timely frame supplementation can be achieved on the moving production line without affecting the material conveying rhythm.
[0106] The patched image undergoes brightness and position correction according to the process in S1. Brightness correction uses the brightness distribution of the reference image region as the basis for correction, while position correction achieves spatial alignment by fixing calibration points. After correction, brightness variation maps, edge sharpness maps, and polarization distribution maps are regenerated in the corresponding regions of the patched image, and these maps are incorporated into the multi-feature input set in the original channel order to form an updated multi-feature input set. This allows the network to directly reuse existing convolutional kernels and attention structures without changing the model structure.
[0107] The updated multi-feature input set is input into the dual-branch neural network model for re-inference, yielding the re-inference result and corresponding re-inference confidence. The fused confidence obtained in the initial inference stage is weighted and fused with the re-inference confidence according to preset weights to form the final confidence of the candidate region. Based on the re-inference result and the final confidence, the candidate region is finally judged. When the final confidence is not lower than the rejection threshold, the airflow nozzles or paddles of the sorting mechanism are triggered by the control device to perform a rejection action, causing the material containing metallic foreign objects to be rejected on the conveyor belt.
[0108] To maintain system stability, the supplementary angle illumination acquisition, image correction, and update inference are all performed within the same frame processing cycle. The supplementary frame image is generated only in the corresponding candidate region, eliminating the need for secondary shooting of the entire field of view. This allows the supplementary inference process to be completed within a single detection cycle, thus meeting the real-time requirements of industrial production lines.
[0109] When the fusion confidence score is lower than the trigger threshold, local supplementary angle illumination acquisition is activated on the production line using the bounding rectangle of the candidate region. This allows the system to re-image only the local areas with uncertainties, without performing repeated imaging of the entire field of view, thus ensuring that the detection cycle is stably completed within the production cycle. After brightness and position correction, the supplementary frame image regenerates the brightness change map, edge clarity map, and polarization distribution map, and combines them with the original features in channel order. This allows the dual-branch neural network to perform secondary inference based on updated features while maintaining the original parameter structure. The supplementary area is subject to new lighting conditions, thus obtaining supplementary information from different angles even when reflections, shadows, or particle overlap are significant. The fusion confidence score of the initial inference and the confidence score of the re-inference are weighted and fused to form the final confidence score, ensuring that the decision-making process simultaneously includes "structural information of the original angle" and "supplementary information of the supplementary angle." This combination of local frame interpolation and secondary inference can improve discrimination stability without changing the network structure, enabling sorting actions to be performed based on more reliable final discrimination results, and making the trigger threshold adjustable in long-term operation. This is beneficial for the system to maintain consistent detection accuracy under different batches of materials and varying lighting conditions.
[0110] This embodiment also provides a neural network-based system for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials, comprising: an image acquisition unit for acquiring original images from multiple angles; an image processing unit for performing brightness correction and position correction and generating aligned image sets and multi-feature input sets; a neural network inference unit for outputting candidate probability maps, fusion confidence, and discrimination results based on a dual-branch neural network model with geometric guidance structure; a supplementary angle acquisition unit for acquiring supplementary frame images when the fusion confidence is lower than a trigger threshold and processing them by the image processing unit; and a sorting control unit for controlling a sorting device to remove materials containing metallic foreign objects based on the final discrimination result.
[0111] This embodiment also provides a computer device applicable to the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as proposed in the above embodiment.
[0112] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0113] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks, as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0114] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks, characterized in that, include: On the nickel-cobalt-manganese cathode material production line, multi-angle illumination acquisition is performed on the material surface to obtain multiple frames of original images. Based on the field of view reference film, the brightness and position of the original images are corrected to obtain an aligned image group. Based on the aligned image set, a brightness variation map, an edge clarity map, and a polarization distribution map are calculated to form a multi-feature input set aligned under the same field of view; The multi-feature input set is input into a dual-branch neural network model with a geometrically guided structure, and the pixel-level candidate probability map of metallic foreign objects and the initial discrimination result are output. Based on the candidate probability map and the initial discrimination result, the fusion confidence of the initial inference is determined. Candidate regions are determined based on candidate probability maps. When the fusion confidence is lower than a preset trigger threshold, local supplementary angle illumination acquisition is triggered within the candidate region. The supplementary frame image is incorporated into the multi-feature input set and re-inferred in the dual-branch neural network model to obtain the final discrimination result. Based on the final discrimination result, the sorting device is controlled to remove materials containing metal foreign objects.
2. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 1, characterized in that: The obtained aligned image group includes acquiring at least three original images after brightness correction and position correction processing, in a preset lighting angle order. The brightness correction is based on a unified brightness reference established by the field of view reference film, and the position correction registers each frame of the original image to a unified spatial coordinate relationship, forming an aligned image group with a one-to-one pixel relationship under the same field of view.
3. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 2, characterized in that: The process of forming a multi-feature input set includes, under the unified brightness benchmark, comparing the brightness response pixel by pixel in the aligned image group according to a preset illumination angle order and with reference to the one-to-one corresponding pixel positions in the same field of view, to generate a brightness change map. Based on the aligned image group, with the one-to-one corresponding pixel positions in the same field of view as a reference, the boundary information under multiple angles is fused to suppress the false boundary caused by strong reflection and generate a clear edge image. Based on the aligned image group, with the one-to-one corresponding pixel positions in the same field of view as a reference, and according to the reflection differences under different illumination angles, the reflection information is separated, the contribution of specular reflection and diffuse reflection to brightness is distinguished, and a polarization distribution map is generated. The brightness variation map, edge clarity map, and polarization distribution map are then normalized and combined under the same field of view to form a multi-feature input set.
4. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 3, characterized in that: The dual-branch neural network model includes a geometric feature branch and an appearance feature branch. The geometric feature branch generates a spatial attention field and a deformation sampling offset field. The appearance feature branch performs weighted modulation of the convolutional output based on the spatial attention field and the deformation sampling offset field in each convolutional layer, using an attention mechanism.
5. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 4, characterized in that: The specific process of the geometric feature branch includes: taking the aligned image group as input, performing local convolution and normalization in the pixel neighborhood of the brightness variation map to generate a spatial attention field; Calculate the horizontal and vertical gradient vectors at the corresponding pixel positions in the edge-clear image, and form the offset of the convolution sampling position based on the gradient vector through convolution mapping. Set a maximum allowable offset range for the offset, and attenuate the offset range by a fixed ratio between adjacent convolution layers to form a deformation sampling offset field. The maximum allowable offset range is set based on the receptive field size of the convolution kernel and the pixel spacing. Statistical analysis and convergence are performed in local regions of the polarization distribution map, and channel attention weights are generated through nonlinear transformation. When the local brightness is lower than the uniform brightness reference, the channel attention weight is set to 1. The appearance feature branches include: In each convolutional layer, the sampling position of the convolutional kernel is adjusted according to the deformation sampling offset field, and the sampling features are obtained by interpolation at non-integer coordinates. The convolutional output is multiplied with the spatial attention field in the pixel dimension, and the multiplication result is multiplied with the channel attention weight in the channel dimension to obtain a feature map modulated by geometric guidance. Pixel-level candidate probability maps are generated based on multi-layer modulated feature maps, and then converted into binary mask maps according to the set pixel confidence threshold. In the binary mask image, connected regions are determined based on pixel connectivity. Within each connected region, mask averaging is performed on the candidate probability map to form the region pixel confidence. Mask averaging pooling is then performed on the high-level feature map of the appearance feature branch to form the region classification confidence.
6. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 5, characterized in that: During the training process of the dual-branch neural network model, a composite loss function including pixel-level supervision loss, region classification loss, and structural consistency constraint is used. The pixel-level supervision loss is used to correct the pixel prediction accuracy of the candidate probability map, the region classification loss is used to correct the category judgment result of the candidate region, and the structural consistency constraint uses the structural features of the brightness change map, edge clarity map and polarization distribution map to synchronously align the brightness distribution, boundary contour and reflection distribution of the candidate probability map, and combines them into a consistency loss according to a preset weight.
7. The method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in claim 6, characterized in that: The final output judgment result includes a fusion confidence score for the initial inference, which is formed by a weighted combination of the region classification confidence score and the region pixel confidence score. When the fusion confidence of any candidate region is lower than the preset trigger threshold, local supplementary angle illumination acquisition is triggered within the candidate region. After performing brightness correction and position correction on the supplementary frame image, a brightness change map, an edge clarity map and a polarization distribution map are regenerated in the corresponding region. The updated image is incorporated into the multi-feature input set and re-inferred in the dual-branch neural network model to obtain the re-inference result and the re-inference confidence. The fused confidence and the re-inference confidence are weighted and fused according to a preset weight to form the final confidence. The sorting device is then controlled to complete the rejection based on the re-inference result and the final confidence.
8. A neural network-based metal foreign object identification system for nickel-cobalt-manganese cathode materials, based on the neural network-based metal foreign object identification method for nickel-cobalt-manganese cathode materials according to any one of claims 1 to 7, characterized in that: The image acquisition unit is used to acquire original images from multiple angles; the image processing unit is used to perform brightness correction and position correction and generate aligned image groups and multi-feature input sets; the neural network inference unit is used to output candidate probability maps, fusion confidence and discrimination results based on a two-branch neural network model with geometric guidance structure. The supplementary angle acquisition unit is used to acquire supplementary frame images when the fusion confidence is lower than the trigger threshold and then hand them over to the image processing unit for processing. The sorting control unit is used to control the sorting device to remove materials containing metallic foreign objects based on the final judgment result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for identifying metallic foreign objects in nickel-cobalt-manganese cathode materials based on neural networks as described in any one of claims 1 to 7.