A power grid material warehouse cargo anomaly detection method and system

CN121482356BActive Publication Date: 2026-05-29STATE GRID JIANGXI ELECTRIC POWER CO LTD MATERIAL SUPPLY BRANCH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610003011.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-05-29
Estimated Expiration
2046-01-05

Smart Images

  • Figure CN121482356B_ABST
    Figure CN121482356B_ABST
Patent Text Reader

Abstract

The application provides a power grid material warehouse cargo anomaly detection method and system, and relates to the technical field of warehouse cargo management. The method comprises the following steps: collecting a to-be-detected image about cargo storage in a power grid material warehouse, constructing a frequency spectrum feature image of the to-be-detected image and determining a plurality of period vectors, dividing the to-be-detected image into a plurality of unit cells, performing affine transformation analysis on any two adjacent unit cells to generate an affine transformation matrix, constructing a sequence-changing affine path of each sliding window region, extracting sequence-changing affine residuals and regional closed-loop errors from the sequence-changing affine path of the sliding window region and determining a plurality of cargo anomaly regions, performing anomaly positioning on the plurality of cargo anomaly regions to identify a plurality of anomaly units, extracting structural anomaly information of each anomaly unit according to the plurality of affine transformation matrices, and generating a cargo storage anomaly detection result. The application improves the anomaly state recognition accuracy of power grid cargo stacking storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of warehouse cargo management technology, and in particular to a method and system for detecting abnormalities in cargo in a power grid material warehouse. Background Technology

[0002] With the continuous expansion of power system construction, power grid material warehouses need to store and manage large quantities of goods for extended periods, including cable reels, corrugated boxes, woven bags, and various packaging materials. These materials are typically stacked or piled together for efficient space utilization and rapid inbound / outbound management. However, during warehousing and transportation, improper loading and unloading, uneven stress, changes in environmental humidity, or prolonged compression can easily cause abnormalities in the goods' appearance, such as bulging, collapse, tilting, or flattening. These abnormalities not only affect the neatness and safety of the warehouse but may also indicate potential problems such as internal damage, packaging breakage, or structural fatigue. Therefore, automated anomaly detection for the stacking status of goods is of great significance.

[0003] For anomaly detection in warehousing scenarios, the industry primarily employs manual inspection or image recognition-based appearance inspection methods. Manual inspection relies on experience-based judgment, resulting in low efficiency and a high risk of missed detections and false positives. While image recognition-based detection methods can achieve a degree of automation, they largely depend on template comparison or contour detection. These methods focus on identifying differences in surface features and struggle to accurately reflect whether the stacked structure of goods has undergone deformation or compression. Furthermore, complex lighting conditions in the warehouse environment, along with factors such as surface reflections and changing orientations of materials, often interfere with and destabilize the detection results, leading to false alarms. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes a method and system for detecting abnormalities in goods in a power grid material warehouse. This system can reliably analyze the stability and placement of goods stacking structures in complex storage environments, accurately reflecting abnormal structural changes in the stacking state of goods.

[0005] As one aspect of the present invention, a method for detecting abnormalities in goods in a power grid material warehouse is provided, comprising:

[0006] Image data of goods in the power grid material warehouse is collected using image acquisition equipment to obtain images of the goods stored in the power grid material warehouse that need to be detected.

[0007] Construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors;

[0008] Perform affine transformation analysis on any two adjacent cells to generate the affine transformation matrix between any two adjacent cells, and perform sliding window processing on the image to be detected to construct the transposed affine path of each sliding window region.

[0009] Based on the affine path of the sliding window region, the affine residual and the region closed-loop error are extracted, and multiple cargo abnormal regions are determined based on the affine residual and the region closed-loop error.

[0010] Anomalies are located in multiple cargo anomaly areas, multiple abnormal units in the image to be detected are identified, and structural anomaly information of each abnormal unit is extracted based on multiple affine transformation matrices to generate cargo storage anomaly detection results.

[0011] Preferably, the transposition affine residual and regional closed-loop error are extracted based on the transposition affine path of the sliding window region. Multiple cargo anomaly regions are determined based on the transposition affine residual and regional closed-loop error, including:

[0012] Determine the multiple affine transformation matrices contained in each transposed affine path, fuse the multiple affine transformation matrices to generate the path transformation matrix of the transposed affine path, and calculate the transposed affine residual of the sliding window region based on the multiple path transformation matrices of the sliding window region.

[0013] A circular concatenation of multiple affine transformation matrices contained in multiple cells within a sliding window region is performed to generate a closed-loop transformation matrix for the sliding window region. The regional closed-loop error of the sliding window region is then calculated based on the closed-loop transformation matrix.

[0014] The affine residual of the sliding window region and the regional loop closure error are fused to obtain the regional anomaly heat parameter. Based on the regional anomaly heat parameter, the sliding window region is marked as anomaly to identify multiple cargo anomaly regions in the image to be detected.

[0015] Preferably, the anomaly localization of multiple abnormal cargo areas and the identification of multiple abnormal units in the image to be detected include:

[0016] Extract multiple normal neighborhoods for each abnormal cargo region in the image to be detected, and generate a local template affine matrix for the abnormal cargo region based on the multiple normal neighborhoods;

[0017] Determine the multiple affine transformation matrices associated with each cell in the cargo anomaly area, and reconstruct the affine features of each cell based on the local template affine matrix to obtain the reconstruction matrix set corresponding to each cell;

[0018] The reconstruction anomaly heat parameter of each cell is calculated based on the reconstruction matrix set, and the anomaly heat decay index of each cell is determined based on the reconstruction anomaly heat parameter.

[0019] Construct a backfill anomaly heat set for each cell in the cargo anomaly area, determine the anomaly response weight for each cell based on the backfill anomaly heat set, and generate a global anomaly decay index by correcting the anomaly heat decay index of the cell through the anomaly response weight. Identify the abnormal units in the cargo anomaly area based on the global anomaly decay index.

[0020] Preferably, extracting structural anomaly information for each anomalous unit based on multiple affine transformation matrices includes:

[0021] Construct a neighborhood set for each anomalous unit, extract the linear transformation matrix between the anomalous unit and each cell in the neighborhood set, perform geometric structure difference identification on the anomalous unit based on multiple linear transformation matrices, calculate the geometric structure difference parameters of the anomalous unit, perform texture continuity identification between the anomalous unit and each cell in the neighborhood set, calculate the texture continuity parameters of the anomalous unit, and obtain the structural anomalous information of the anomalous unit.

[0022] Preferably, constructing a spectral feature image of the image to be detected, performing autocorrelation processing on the spectral feature image, and determining multiple periodic vectors of the spectral feature image include:

[0023] The grayscale image is obtained by extracting grayscale features from the image to be detected. A two-dimensional fast Fourier transform is performed on the grayscale image and the amplitude spectrum is extracted to generate the spectral feature image of the image to be detected.

[0024] The autocorrelation coefficients of the spectral feature image with itself under multiple translations are calculated, and the autocorrelation energy map of the spectral feature image is constructed. Based on the center point of the autocorrelation energy map, the autocorrelation energy map is sliced ​​horizontally and vertically to obtain the horizontal periodic vector and vertical periodic vector of the spectral feature image.

[0025] Preferably, for the geometric structure difference parameter, it further includes:

[0026] The mean matrix is ​​obtained by calculating the mean of multiple linear transformation matrices corresponding to each cell in the anomalous cell and the neighborhood set. The deviation between each linear transformation matrix and the mean matrix is ​​calculated to obtain the deviation matrix of each linear transformation matrix. Based on the multiple deviation matrices, the geometric structure difference parameters of the anomalous cell are calculated.

[0027] As another aspect of the present invention, a power grid material warehouse cargo anomaly detection system is provided to implement the above-mentioned power grid material warehouse cargo anomaly detection method, comprising:

[0028] The cargo image acquisition module is used to acquire image data of cargo in the power grid material warehouse based on image acquisition equipment, and obtain the image to be detected of the cargo storage in the power grid material warehouse;

[0029] The cargo image segmentation module is used to construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors;

[0030] The transposition affine analysis module is used to perform affine transformation analysis on any two adjacent cells, generate the affine transformation matrix between any two adjacent cells, and perform sliding window processing on the image to be detected to construct the transposition affine path of each sliding window region.

[0031] The abnormal area identification module is used to extract the transposition affine residual and the area closure error based on the transposition affine path of the sliding window area, and to determine multiple abnormal cargo areas based on the transposition affine residual and the area closure error.

[0032] The anomaly result generation module is used to locate anomalies in multiple cargo anomaly areas, identify multiple anomaly units in the image to be detected, extract the structural anomaly information of each anomaly unit based on multiple affine transformation matrices, and generate cargo storage anomaly detection results.

[0033] The present invention has the following beneficial effects:

[0034] This invention constructs a geometric consistency model of cargo stacking through spectrum segmentation and affine path closed-loop analysis. It combines transposition residuals and regional closed-loop errors to locate abnormal regions and achieves precise screening of unit-level anomalies based on the reconstruction matrix set and anomaly heat decay mechanism. Furthermore, it integrates geometric structure differences and texture continuity parameters to distinguish between structural deformation and apparent interference, enabling early and accurate detection of potential stability hazards in power grid cargo stacking under complex warehousing environments. This significantly improves the accuracy of anomaly identification and the level of intelligent warehousing safety management. Attached Figure Description

[0035] Figure 1 This is a flowchart illustrating a method for detecting abnormalities in goods in a power grid material warehouse, as one aspect of an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram of the structure of a power grid material warehouse cargo anomaly detection system provided as one aspect of an embodiment of the present invention. Detailed Implementation

[0037] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.

[0038] like Figure 1As shown, one aspect of the present invention provides a method for detecting abnormalities in goods in a power grid material warehouse, comprising:

[0039] Step S1: Collect image data of goods in the power grid material warehouse using image acquisition equipment to obtain the image to be detected regarding the storage of goods in the power grid material warehouse.

[0040] It is worth noting that this embodiment uses the anomaly detection of stacked goods in a power grid material warehouse as an example. Warehouses typically store packaged goods such as corrugated boxes, woven bags, cable reels, and metal components, which are mostly stacked in regular arrays on shelves or the ground. During long-term storage, loading, unloading, or handling, some goods may develop structural abnormalities such as bulging, collapse, or tilting due to uneven stress, packaging aging, or collisions. Therefore, a detection method is needed that can automatically analyze the stacking status and identify abnormal conditions in abnormal goods.

[0041] In this embodiment, depending on the size of the warehouse and the way the goods are arranged, the image acquisition device can be a fixed industrial camera, a ground mobile inspection vehicle, or a drone inspection device, used to collect and record the overall arrangement and surface features of the goods. The acquisition resolution can be adjusted according to the size of the goods and the requirements for detection accuracy, and finally form a dataset of images to be detected, including images of the goods to be monitored corresponding to the goods stored on different shelves or stacks in the warehouse.

[0042] Step S2: Construct the spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors.

[0043] In this embodiment, frequency domain analysis is performed on the acquired image to be detected. Since warehouse goods stacking images generally have obvious repetitive structures, this periodic texture forms a clear main frequency peak in the frequency domain in the grayscale image. By extracting grayscale features from the image to be detected to obtain a grayscale image, performing a two-dimensional fast Fourier transform on the grayscale image and extracting the amplitude spectrum, a spectral feature image of the image to be detected is generated, representing the intensity of the periodicity of the image in different directions.

[0044] Autocorrelation analysis is used to identify the periodicity intervals in spectral feature images. This process involves calculating the autocorrelation coefficients of the spectral feature image with itself under multiple translation amounts, constructing an autocorrelation energy map of the spectral feature image. This autocorrelation energy map is the same size as the image to be detected, and each pixel represents the autocorrelation coefficient of the spectral feature with the original image under the translation amount corresponding to that pixel's coordinates. For example, the center point of the autocorrelation energy map is denoted as... This refers to the point in an image that completely overlaps with itself, representing the highest similarity (pixel count). The autocorrelation coefficients between the spectral feature image and the original spectral feature image after shifting the spectral feature image by one unit pixel to the right and upward, respectively.

[0045] After constructing the autocorrelation energy map, horizontal and vertical slices are performed based on the center point of the autocorrelation energy map to obtain the horizontal and vertical periodic vectors of the spectral feature image. A peak appears at fixed intervals in the periodic vectors, corresponding to the horizontal and vertical periods of the stacked goods. The horizontal and vertical periodic vectors represent how many pixels are repeated horizontally and vertically. Multiple peak nodes can be determined based on the horizontal and vertical periodic vectors. The image to be detected is then segmented based on these peak nodes, generating multiple cells in the image to be detected. Each cell represents one stacked item or packaging unit, forming structured location data for subsequent structural analysis.

[0046] Step S3: Perform affine transformation analysis on any two adjacent cells to generate the affine transformation matrix between any two adjacent cells, and perform sliding window processing on the image to be detected to construct the transposed affine path for each sliding window region.

[0047] In this embodiment, local geometric matching is performed on the image content of any two adjacent cells, and the affine transformation relationship between them is calculated. For example, for two cells that are vertically or horizontally adjacent, salient feature points and their local descriptive information are extracted from their respective image regions, for example, using the Scale Invariant Feature Transform (SIFT) algorithm to extract feature point sets. By comparing the feature descriptive information between the two cells, matching feature point pairs are determined. Using the spatial coordinate relationship of these matching point pairs, an affine transformation model is fitted to solve for the affine transformation matrix between adjacent cells. Affine transformation analysis is a well-known technique in this art and will not be elaborated upon in this embodiment. The final constructed two-dimensional affine transformation matrix reflects the relative geometric relationship between adjacent cargo units on the image plane, including information such as translation, rotation, scaling, and shearing.

[0048] Based on multiple affine transformation matrices, the entire image to be detected is traversed using a sliding window approach. Within each sliding window, a local affine path sequence is constructed, recording the relative displacement and transformation direction between cells. The size of the sliding window can be 2×2, 3×3, etc., and can be reasonably selected based on factors such as the resolution of the acquired image. For example, for four cells in a 2×2 sliding window, with the top-left cell as the path start point and the bottom-right cell as the path end point, two reversed affine paths are constructed in the sliding window, one from the start point (right-to-bottom) and the other from the bottom-to-right, to reach the end point. These paths are used to further analyze the overall coordination and geometric consistency of the stacked structure in the local area.

[0049] Step S4: Extract the transposed affine residual and the region closed-loop error based on the transposed affine path of the sliding window region, and determine multiple cargo abnormal regions based on the transposed affine residual and the region closed-loop error.

[0050] In this embodiment, a consistency analysis is performed on the transformation relationship within each sliding window region based on the aforementioned constructed transposed affine path. The transposed affine residual, representing the transformation deviation after the path order change, and the overall closed-loop error, reflecting the degree of deviation in the geometric closed loop formed by the path, are calculated for each different transposed affine path within the window. By analyzing the magnitude information of the transposed affine residual and the regional closed-loop error, abnormal localities in the stacked structure, such as bulges, collapses, or tilting phenomena, are identified, and multiple abnormal cargo regions that may be contained in the image to be detected are identified.

[0051] In one implementation, the identification of abnormal areas in the cargo includes:

[0052] This involves extracting the transposed affine residual, determining the multiple affine transformation matrices contained in each transposed affine path, and fusing these multiple affine transformation matrices to generate the path transformation matrix of the transposed affine path. In this implementation, the multiple affine transformation matrices contained in the transposed affine path are concatenated and fused. Specifically, the product of these affine transformation matrices is calculated as the path transformation matrix, representing the overall affine transformation from the path start point to the path end point in the transposed affine path. That is, the cell at the path start point is affinely transformed into the cell represented by the path end point after passing through the path transformation matrix.

[0053] The transposition affine residual of the sliding window region is calculated based on multiple path transformation matrices within the region. It's worth noting that, ideally, when all goods are flat and aligned, the path transformation matrices of multiple transposition affine paths should be identical. However, in real-world scenarios, if a cell in the middle experiences bulging, compression, or slight misalignment, the corresponding affine transformation matrices will differ, leading to deviations in the overall affine relationship after fusion. In this embodiment, the norm of the difference between two path transformation matrices within the sliding window region is taken as the transposition affine residual of the sliding window region to quantify inconsistencies in local structures.

[0054] To extract the regional loop closure error, multiple affine transformation matrices contained in multiple cells within the sliding window region are circularly concatenated. This involves affine transformation from the starting point along one path to the ending point, and then affine back from the ending point along another path to the starting point. Specifically, in the aforementioned affine transformation analysis of any two adjacent cells, if the affine transformation matrices are constructed following a left-to-right and top-to-bottom order, the affine transformation matrix along the path from the ending point back to the starting point is inverted during the circular concatenation process. Then, multiple affine transformation matrices are multiplied and fused to generate the closed-loop transformation matrix for the sliding window region. The deviation between the closed-loop transformation matrix and the unit affine matrix is ​​calculated. For example, the norm is calculated by subtracting the closed-loop transformation matrix from the unit affine moment. The unit affine matrix is ​​a matrix in its untransformed state; the position of any coordinate point remains unchanged after multiplying it with the unit affine matrix. Finally, the regional loop closure error of the sliding window region is calculated.

[0055] After calculating the transposed affine residual and the regional closed-loop error of the sliding window region, the transposed affine residual and the regional closed-loop error are fused. For example, a weighted fusion method can be used. The fusion weights corresponding to the transposed affine residual and the regional closed-loop error can be determined based on empirical knowledge. Since the regional closed-loop error is more robust, its corresponding fusion weight is usually greater than that of the transposed affine residual. Those skilled in the art can set reasonable fusion weights based on the actual situation.

[0056] The regional anomaly heat parameter is obtained by weighted fusion of the transposition affine residual and the regional closed-loop error, comprehensively reflecting the combined influence of local geometric misalignment and global closed-loop deviation. When the regional anomaly heat parameter exceeds the set anomaly threshold, the corresponding sliding window region is determined to be an anomaly region. Based on the spatial distribution of the anomaly region in the entire image, anomaly marking is performed on the image to be detected, ultimately identifying some abnormal regions of goods in the stacked goods of the power grid material warehouse.

[0057] Step S5: Locate multiple abnormal areas of goods, identify multiple abnormal units in the image to be detected, extract the structural abnormal information of each abnormal unit according to multiple affine transformation matrices, and generate abnormal goods storage detection results.

[0058] In this embodiment, multiple identified abnormal cargo areas are further located and analyzed. For each of the multiple cells contained therein, the key cells causing local structural anomalies are identified and marked as abnormal units. For the located abnormal units, structural anomaly information is extracted based on the variation characteristics of the linear parts in their adjacent affine matrices, such as direction, scale, and shearing degree. This allows for the determination of whether the anomaly type belongs to structural deformations such as bulging, collapse, or local compression. This avoids misidentifying anomalies caused by factors such as reversed orientation, misaligned labeling, light reflection, and noise as structural anomalies. Structural anomalies need to be checked and corrected in a timely manner to ensure that the cargo is in good storage condition. Finally, cargo storage anomaly detection results are generated, realizing automated anomaly detection and identification of cargo stacking status in warehousing scenarios.

[0059] In one implementation, the identification of abnormal units includes:

[0060] Multiple normal neighborhoods are extracted for each cargo anomaly region in the image to be detected. Specifically, for multiple sliding window regions adjacent to a cargo anomaly region, the sliding window regions that do not belong to the cargo anomaly region are recorded as normal neighborhoods. If multiple sliding window regions adjacent to a cargo anomaly region all belong to the cargo anomaly region, then the cargo anomaly region and its multiple adjacent cargo anomaly regions are treated as a whole and the adjacent sliding window regions are re-extracted to avoid the situation where a cargo anomaly region has no normal neighborhoods.

[0061] A local template affine matrix for the cargo anomaly region is constructed based on multiple identified normal neighborhoods. This local template affine matrix includes horizontal and vertical local template affine matrices. Specifically, multiple affine transformation matrices affine from left to right are selected from the multiple normal neighborhoods, and their mean is calculated to obtain the horizontal local template affine matrix. Similarly, multiple affine transformation matrices affine from top to bottom are selected, their mean is calculated, and this mean is used as the vertical local template affine matrix.

[0062] Determine the multiple affine transformation matrices associated with each cell in the cargo anomaly region. Specifically, for a 2×2 cargo anomaly region, each cell is associated with two adjacent cells, corresponding to an affine transformation matrix under the horizontal and vertical affine relationships, respectively. Replace the two affine transformation matrices associated with the cell using a local template affine matrix, that is, replace the two affine transformation matrices associated with the cell with the corresponding local template affine matrix, to obtain the reconstructed matrix set based on that cell.

[0063] Based on the aforementioned method for calculating regional anomaly heat parameters, and using the reconstruction matrix set as a foundation, the reconstruction anomaly heat parameter of the cell within the reconstruction matrix set is calculated. The difference between this reconstruction anomaly heat parameter and the regional anomaly heat parameter of the cargo anomaly area is then calculated to obtain the anomaly heat decay index of the cell. Specifically, this process involves replacing the affine relationship present in the cargo anomaly area with data from normal samples. If a significant decrease in anomaly level occurs after the replacement, it indicates that the cell is the dominant factor in the cargo anomaly area, meaning that its potential structural anomaly may have caused the high regional anomaly heat parameter in the sliding window area. After replacement with normal affine features, the regional anomaly heat parameter rapidly decreases. A larger anomaly heat decay index indicates a higher probability of structural anomalies in the cell.

[0064] Based on the anomaly heat decay index, a backfill anomaly heat set for each cell in the cargo anomaly area is further constructed. It's worth noting that during the process of traversing the image to be detected using a sliding window, each cell participates in multiple closed-loop regions. That is, it acts as one cell within multiple sliding window regions. When traversing the image using a 2×2 sliding window with a step size of 1, each cell participates in four sliding window regions after moving one cell to the right or down to form a new sliding window region. Therefore, for any cell in the cargo anomaly area, the multiple sliding window regions to which that cell belongs constitute the backfill anomaly heat set.

[0065] For cells with abnormal structural states, the regional anomaly heat parameters corresponding to multiple sliding window regions involved in the cell are all relatively large. Conversely, for cells with normal structural states, only the regional anomaly heat parameter corresponding to the sliding window region containing the abnormal cell is relatively large, while the regional anomaly heat parameters corresponding to other sliding window regions are relatively small. In this embodiment, the average regional anomaly heat parameter of multiple sliding window regions within the backfill anomaly heat set is calculated to obtain the cell's anomaly response weight. This anomaly response weight is then used to correct the cell's anomaly heat decay index, generating a global anomaly decay index. This achieves consistent correction of anomaly cells across multiple scales and neighborhoods, and the global anomaly decay index can better quantify the degree of structural anomaly in different cells. Finally, anomaly cells in the cargo anomaly region are identified based on the global anomaly decay index. For example, cells in the cargo anomaly region with a global anomaly decay index greater than a preset decay threshold are marked as anomaly cells.

[0066] In one implementation, extracting structural anomaly information for each anomalous unit based on multiple affine transformation matrices includes:

[0067] Construct a neighborhood set for each anomalous cell, where the neighborhood set is constructed from cells that do not belong to the anomalous cell within the cross-shaped neighborhood centered on the anomalous cell. Similarly, if all cells are anomalous cells, further determine the cross-shaped neighborhood of each anomalous cell until at least one cell that does not belong to the anomalous cell is selected.

[0068] After constructing the neighborhood set of the abnormal unit, the linear transformation matrix of the abnormal unit and each cell in the neighborhood set is extracted. In the two-dimensional affine transformation matrix, the first two columns belong to the linear part, representing morphological changes such as rotation, scaling, and shearing, while the last column belongs to the translation part, representing the overall displacement of the object on the image plane. The purpose of geometric structure difference recognition is to measure whether the local shape is consistent. Taking the stacking of corrugated boxes as an example, boxes A and B may have slight translation due to different stacking positions. However, as long as their orientation, proportion, and angle are consistent, it means that the geometric structure has not changed. If the translation characteristics are also considered, even boxes in good condition may be identified as inconsistent if the shooting angle is slightly different or the placement is slightly shifted.

[0069] In this scenario, a linear transformation matrix is ​​extracted from the affine transformation matrix. Based on multiple linear transformation matrices, geometric structural differences of anomalous units are identified, and geometric structural difference parameters of the anomalous units are calculated. During this process, the mean matrix of multiple linear transformation matrices can be calculated, and the deviation between each linear transformation matrix and the mean matrix can be calculated. The overall strength of these deviations can be calculated. For example, the deviation matrix can be obtained by subtracting the linear transformation matrix from the mean matrix. The Frobenius norm of multiple deviation matrices can be calculated and averaged to obtain the geometric structural difference parameters of the anomalous units.

[0070] Furthermore, texture continuity is identified between the anomalous unit and each cell in the neighborhood set, and the texture continuity parameter of the anomalous unit is calculated. Specifically, the texture similarity between the anomalous unit and each cell in the neighborhood set is calculated, and the average of multiple texture similarities is calculated to obtain the texture continuity parameter of the anomalous unit. It is worth noting that for a corrugated box, if one surface is slightly bulging (structural anomaly), but the printed markings and stripes on the box surface are still complete and continuous, local surface deformation has occurred geometrically. However, from the camera's perspective, the texture grayscale and direction are still smooth, and the texture similarity is high. That is to say, structural anomalies such as bulges, collapses, and warping cause changes in pixel geometric mapping, rather than directly causing texture breaks. For non-structural anomalies such as lighting shadows or reversed orientation, the texture similarity will be low. That is, structural anomalies usually maintain local texture continuity, only the geometric coordinates are misaligned; while visual texture breaks are mostly non-structural problems. Finally, the geometric structure difference parameter and the texture continuity parameter are used as the structural anomaly information of the anomalous unit, comprehensively reflecting the geometric deformation characteristics and surface consistency status of the anomalous unit.

[0071] For generating anomaly detection results for cargo storage, the ratio of geometric structural difference parameters to texture continuity parameters in the structural anomaly information can be used to quantify the degree of anomaly. A larger geometric structural difference parameter and a smaller texture continuity parameter indicate a greater risk of structural anomalies in the corresponding cargo, such as bulges, collapses, or warping. Conversely, for cargo in a normal state, with only slight displacement, changes in the acquisition angle, or reversed placement, a smaller geometric structural difference parameter and a larger texture continuity parameter indicate a lower probability of structural anomalies. Based on this information, and by setting appropriate thresholds, the location of cargo requiring inspection and maintenance is determined, generating anomaly detection results for the power grid material warehouse. This provides a direct reflection of the health status of the cargo stacking structure, identifying not only obvious deformities and collapses but also potential stress imbalances or stacking instability risks at an early stage. Compared with traditional detection methods that rely on template matching, this solution analyzes both geometric structural differences and texture continuity, effectively distinguishing between structural anomalies and apparent disturbances, improving the accuracy and reliability of detection results, and significantly enhancing the robustness and practicality of cargo anomaly detection in complex power grid material storage environments.

[0072] like Figure 2 As shown, another aspect of the present invention also provides a power grid material warehouse cargo anomaly detection system for implementing the above-described power grid material warehouse cargo anomaly detection method, comprising:

[0073] The cargo image acquisition module is used to acquire image data of cargo in the power grid material warehouse based on image acquisition equipment, and obtain the image to be detected of the cargo storage in the power grid material warehouse;

[0074] The cargo image segmentation module is used to construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors;

[0075] The transposition affine analysis module is used to perform affine transformation analysis on any two adjacent cells, generate the affine transformation matrix between any two adjacent cells, and perform sliding window processing on the image to be detected to construct the transposition affine path of each sliding window region.

[0076] The abnormal area identification module is used to extract the transposition affine residual and the area closure error based on the transposition affine path of the sliding window area, and to determine multiple abnormal cargo areas based on the transposition affine residual and the area closure error.

[0077] The anomaly result generation module is used to locate anomalies in multiple cargo anomaly areas, identify multiple anomaly units in the image to be detected, extract the structural anomaly information of each anomaly unit based on multiple affine transformation matrices, and generate cargo storage anomaly detection results.

[0078] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art. Parts not described in detail in this specification are prior art known to those skilled in the art.

Claims

1. A method for detecting anomalies in goods in a power grid material warehouse, characterized in that, include: Image data of goods in the power grid material warehouse is collected using image acquisition equipment to obtain images of the goods stored in the power grid material warehouse that need to be detected. Construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors; Perform affine transformation analysis on any two adjacent cells to generate an affine transformation matrix between any two adjacent cells. Perform sliding window processing on the image to be detected to construct a transposed affine path for each sliding window region. For any sliding window region in the image to be detected, take the upper left cell of the sliding window region as the path start point and the lower right cell as the path end point to construct two transposed affine paths from the path start point to the path end point in an affine order of first right then down and first down then right. Determine the multiple affine transformation matrices contained in each transposed affine path, fuse the multiple affine transformation matrices to generate the path transformation matrix of the transposed affine path, and calculate the transposed affine residual of the sliding window region based on the multiple path transformation matrices of the sliding window region. A circular concatenation of multiple affine transformation matrices contained in multiple cells within a sliding window region is performed to generate a closed-loop transformation matrix for the sliding window region. The regional closed-loop error of the sliding window region is then calculated based on the closed-loop transformation matrix. The affine recursion residual and the loop closure error of the sliding window region are fused to obtain the regional anomaly heat parameter. Based on the regional anomaly heat parameter, the sliding window region is marked as anomaly to identify multiple cargo anomaly regions in the image to be detected. Anomalies are located in multiple cargo anomaly areas, multiple abnormal units in the image to be detected are identified, and structural anomaly information of each abnormal unit is extracted based on multiple affine transformation matrices to generate cargo storage anomaly detection results.

2. The method for detecting abnormalities in goods in a power grid material warehouse according to claim 1, characterized in that, Anomaly localization is performed on multiple abnormal areas of goods, and multiple abnormal units in the image to be detected are identified, including: Extract multiple normal neighborhoods for each abnormal cargo region in the image to be detected, and generate a local template affine matrix for the abnormal cargo region based on the multiple normal neighborhoods; Determine the multiple affine transformation matrices associated with each cell in the cargo anomaly area, and reconstruct the affine features of each cell based on the local template affine matrix to obtain the reconstruction matrix set corresponding to each cell; The reconstruction anomaly heat parameter of each cell is calculated based on the reconstruction matrix set. The difference between the reconstruction anomaly heat parameter and the regional anomaly heat parameter of the cargo anomaly area is calculated to obtain the cell's anomaly heat decay index. During the sliding window processing of the image to be detected, the multiple sliding window regions to which each cell belongs are determined. Based on the multiple sliding window regions to which the cell belongs, a backfilling anomaly heat set for each cell in the cargo anomaly region is constructed. By calculating the mean of the regional anomaly heat parameters of multiple sliding window regions in the backfilling anomaly heat set, the anomaly response weight of the cell is obtained. The anomaly heat decay index of the cell is corrected by the anomaly response weight to generate a global anomaly decay index. Based on the global anomaly decay index, the abnormal units in the cargo anomaly region are identified.

3. The method for detecting abnormalities in goods in a power grid material warehouse according to claim 2, characterized in that, The structural anomaly information of each anomalous unit is extracted based on multiple affine transformation matrices, including: Construct a neighborhood set for each anomalous unit, extract the linear transformation matrix of the anomalous unit and each cell in the neighborhood set, perform geometric structure difference identification on the anomalous unit based on multiple linear transformation matrices, calculate the geometric structure difference parameters of the anomalous unit, perform texture continuity identification on the anomalous unit and each cell in the neighborhood set respectively, calculate the texture continuity parameters of the anomalous unit, and use the geometric structure difference parameters and texture continuity parameters as the structural anomalous information of the anomalous unit.

4. The method for detecting abnormalities in goods in a power grid material warehouse according to claim 1, characterized in that, Construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image, and determine multiple periodic vectors of the spectral feature image, including: The grayscale image is obtained by extracting grayscale features from the image to be detected. A two-dimensional fast Fourier transform is performed on the grayscale image and the amplitude spectrum is extracted to generate the spectral feature image of the image to be detected. The autocorrelation coefficients of the spectral feature image with itself under multiple translations are calculated, and the autocorrelation energy map of the spectral feature image is constructed. Based on the center point of the autocorrelation energy map, the autocorrelation energy map is sliced ​​horizontally and vertically to obtain the horizontal periodic vector and vertical periodic vector of the spectral feature image.

5. The method for detecting abnormalities in goods in a power grid material warehouse according to claim 3, characterized in that, For geometric structure difference parameters, the following are also included: The mean matrix is ​​obtained by calculating the mean of multiple linear transformation matrices corresponding to each cell in the anomalous cell and the neighborhood set. The deviation between each linear transformation matrix and the mean matrix is ​​calculated to obtain the deviation matrix of each linear transformation matrix. Based on the multiple deviation matrices, the geometric structure difference parameters of the anomalous cell are calculated.

6. A system for detecting abnormal goods in a power grid material warehouse, characterized in that, The system is used to implement the method for detecting abnormal goods in a power grid material warehouse as described in any one of claims 1-5, including: The cargo image acquisition module is used to acquire image data of cargo in the power grid material warehouse based on image acquisition equipment, and obtain the image to be detected of the cargo storage in the power grid material warehouse; The cargo image segmentation module is used to construct a spectral feature image of the image to be detected, perform autocorrelation processing on the spectral feature image to determine multiple period vectors of the spectral feature image, and segment the image to be detected into multiple cells based on the multiple period vectors; The transposition affine analysis module is used to perform affine transformation analysis on any two adjacent cells, generate the affine transformation matrix between any two adjacent cells, and perform sliding window processing on the image to be detected to construct the transposition affine path of each sliding window region. The abnormal area identification module is used to extract the transposition affine residual and the area closure error based on the transposition affine path of the sliding window area, and to determine multiple abnormal cargo areas based on the transposition affine residual and the area closure error. The anomaly result generation module is used to locate anomalies in multiple cargo anomaly areas, identify multiple anomaly units in the image to be detected, extract the structural anomaly information of each anomaly unit based on multiple affine transformation matrices, and generate cargo storage anomaly detection results.

Citation Information

Patent Citations

  • Warehouse abnormity intelligent early warning method and system based on machine learning

    CN118840039A

  • Non-supervision surface defect detection method for piezoresistor

    CN121053097A