Method and system for detecting coiling centering deviation
Through visual recognition technology and deep learning model, high-precision centering deviation detection is carried out on the steel coil, which solves the problems of large grating faults and detection errors in the existing technology, and realizes efficient and accurate detection of the rolling of the steel coil.
Patent Information
- Application Number
- CN202411601321.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In the prior art, the centering grating often fails when rolling on the steel coil, which increases the on-site maintenance and has a large detection error, which can easily lead to the rolling phenomenon when rolling on the coil and causing property losses.
The visual recognition method is used to detect the steel coils through lighting equipment and imaging equipment, and the mid-difference detection model is constructed and trained using deep learning models, the pixel deviation value is calculated and converted into the actual offset distance, and whether it exceeds the threshold value and sends out an early warning signal.
High-precision detection of steel coil centering height is realized, avoiding the occurrence of rolling, reducing the labor intensity of operators, replacing the centering grating, and reducing equipment configuration and production and maintenance.
Smart Images

Figure CN119657651A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of steel coil inner ring detection, and specifically relates to a method and system for detecting center deviation of a coil, and more specifically, to a method for detecting center deviation of a coil under oblique viewing conditions. Background Art
[0002] In the production of cold-rolled plates, such as continuous rolling, annealing, coating and finishing, most of the processes require coiling and uncoiling. The center position of the inner ring of the steel coil is abnormal during the production process, resulting in problems when going online. This is usually due to problems with the detection equipment, operating errors, collapse of the inner ring of the steel coil, etc., which makes it impossible for the steel coil to be inserted into the mandrel normally, affecting the normal operation of the production line.
[0003] In order to solve these problems, a series of measures are usually taken on the production line to ensure the quality and standard of the inner ring of the steel coil. This includes strict quality inspection of the inner ring of the steel coil to ensure that its size and shape meet production requirements. At the same time, operators will also receive training to ensure that they can correctly and safely handle the centering height of the inner ring of the steel coil during the production process to avoid abnormalities caused by operational errors.
[0004] At present, in actual production, when rolling up, the steel coil is first lifted to the corresponding height by the rolling trolley according to the size of the steel coil, and then the height is checked by the centering grating through the detection equipment. After confirmation, the steel coil is moved to the reel by the rolling trolley for rolling up. However, the centering grating often fails, which increases the amount of on-site maintenance, and the detection error is large, which easily leads to the phenomenon of rolling up during the centering of the coil, causing property losses. This problem needs to be solved urgently.
[0005] Patent document CN104475463A discloses a steel coil height centering device and method. The device is used for height centering between the steel coil and the uncoiler mandrel when the steel coil is rolled up, and includes a coiling trolley, on which a saddle for placing the steel coil, a lifting device for adjusting the height of the steel coil, a lifting encoder for recording the lifting height of the steel coil by the lifting device, and a limiter for limiting the mechanical zero point are arranged. A column is arranged on both sides of the moving track of the coiling trolley, one side of which is provided with a positioning light source for emitting a concentrated light beam, and the other side of the column is provided with a light receiving device for receiving the light emitted by the positioning light source. The positioning light source and the light receiving device are located at the same height and the connecting line is perpendicular to the moving track. The steel coil height centering method of the above device is used to center the steel coil in the axial direction, and the height difference between the upper edge of the inner diameter and the lower edge of the inner diameter can be directly measured to determine the center of the steel coil. This scheme performs height detection by sending and receiving light sources, which changes the original production configuration, increases the equipment maintenance cost, and cannot avoid the failure problem of the centering grating.
[0006] Patent document CN107344684A discloses a touch-type roll-up positioning device and a roll-up centering method thereof, the device comprises two guide supports, a hydraulic cylinder is fixed between the two guide supports, two guide rods are arranged in parallel on both sides of the hydraulic cylinder, the two guide rods respectively pass through guide sleeves embedded in the two guide supports, the cylinder rod of the hydraulic cylinder passes through one of the guide supports and is fixedly connected to one side of a movable support together with the two guide rods; a rotating shaft and a small shaft are respectively arranged on the upper surface of the movable support, a positioning swing arm is arranged on the rotating shaft, the positioning swing arm is divided into a long arm and a short arm with the rotating shaft as a dividing point, the short arm is connected to the small shaft by a spring, and a sensing plate is arranged at the end of the short arm, and a proximity switch is arranged at a corresponding position of the sensing plate on the movable support; the roll-up centering can be achieved by performing two consecutive operations using the device. This solution uses a mechanical swing arm and a sensor plate to perform height detection, which changes the original production configuration. There is a problem of high maintenance costs for the mechanical swing arm and the sensor plate, and two operations are required to complete, which increases time costs and reduces work efficiency. Summary of the invention
[0007] In view of the defects in the prior art, the object of the present invention is to provide a method and system for detecting the centering deviation of a roll.
[0008] A method for detecting a centering deviation of a roll-up according to the present invention comprises: a lighting device and a camera device; the lighting device is used to illuminate an object to be detected and highlight the contour and surface features of the object to be detected; the camera device is used to collect a front view of the object to be detected;
[0009] Step S1: construct and train a centering deviation detection model; arrange lighting equipment and camera equipment, and collect images at intervals;
[0010] Step S2: inputting the image into the deviation detection model, obtaining the coordinates of the center of the ellipse in the image, and then calculating the pixel deviation value; and obtaining the actual offset distance according to the pixel deviation value;
[0011] Step S3: according to the data obtained in step S2, the trajectory of the ellipse is obtained and drawn on the image;
[0012] Step S4: Determine whether the actual offset distance is greater than or equal to a threshold; if the result is yes, store the current data and issue a warning signal; if the result is no, store the current data.
[0013] Preferably, the step S1 includes:
[0014] Step S1.1: Loading data set function;
[0015] Step S1.2: adjusting parameters based on the data set function;
[0016] Step S1.3: Based on the parameters, construct and train a centering deviation detection model;
[0017] In the step S1.1, preprocessing data;
[0018] The preprocessing includes: labeling pictures, adjusting picture size and data enhancement;
[0019] The dataset function, i.e. torch.utils.data.DataLoader;
[0020] In step S1.2, the parameters include: the dimension of input data, learning rate, number of training iterations and batch size value;
[0021] In step S1.3, the loss function of the deviation detection model is cross entropy; the loss function, the mathematical expression is:
[0022]
[0023] Among them, L(y,y ′ ) is the loss function, y is the true label, y ′ is the model prediction value, and N is the number of samples.
[0024] Preferably, in step S1, after the steel coil reaches the saddle position, pictures are collected every 0.5 seconds;
[0025] In the step S2, it includes:
[0026] Step S2.1: converting the image output by the deviation detection model into a binary image;
[0027] Step S2.2: construct a plane coordinate system, take the middle value between the upper vertex and the lower vertex of the inner circle of the binary image as the y-axis coordinate point of the center of the circle, take the middle value between the left vertex and the right vertex of the inner circle of the binary image as the x-axis coordinate point of the center of the circle, and obtain the coordinates of the center of the circle;
[0028] Step S2.3: Based on the two center points, find the equation of the straight line where the standard center point is located;
[0029] Step S2.4: Substitute the horizontal coordinate of the standard circle center into the equation of the straight line where the standard circle center is located to obtain the vertical coordinate on the straight line corresponding to the horizontal coordinate; subtract the vertical coordinate from the vertical coordinate of the standard circle center to obtain the pixel deviation value;
[0030] Step S2.5: converting the pixel deviation value into a corresponding actual offset distance according to the conversion ratio between the pixel value and the spatial value;
[0031] In step S2.3, the mathematical expression of the equation of the straight line where the center of the circle is located is:
[0032]
[0033] Where y represents the y coordinate of the center of the standard circle; y 2 Represents the y-axis coordinate of the second circle; y 1 Indicates the y-axis coordinate of the first circle; x 1 Indicates the x-axis coordinate of the first circle; x 2 Represents the x-axis coordinate of the second circle; x represents the x-coordinate of the center of the standard circle;
[0034] In step S2.5, the conversion ratio between the pixel value and the spatial value is expressed as follows:
[0035] K=L÷N
[0036] Among them, K represents the conversion ratio of pixel value to space value, L represents the actual width of the steel coil; and N represents the number of width pixels.
[0037] Preferably, in the step S3, an ellipse is fitted by using the cv2.fitEllipse function provided by OpenCV to obtain corresponding ellipse parameters; an ellipse is drawn to the original image, i.e., the image, according to the ellipse parameters to obtain the trajectory of the ellipse;
[0038] The ellipse parameters include: the coordinates of the ellipse center point, the lengths of the major and minor axes, and the tilt angle;
[0039] In step S3, the ellipse parameters are calculated according to the ellipse regression calculation equation, and the trajectory of the ellipse is drawn on the original image;
[0040] The mathematical expression of the elliptic regression calculation equation is:
[0041]
[0042] Among them, k represents the ordinate of the center of the inner circle, a represents the length between the upper vertex and the lower vertex in the inner circle, and b represents the length between the left vertex and the right vertex in the inner circle.
[0043] Preferably, in step S4, it is determined whether the actual offset distance exceeds a threshold value, and if so, an alarm is issued; if not, the image is saved;
[0044] The threshold is set based on the trajectory of the ellipse;
[0045] The threshold is 15.
[0046] A detection system for roll-up centering deviation provided by the present invention comprises: a lighting device and a camera device; the lighting device is used to illuminate the object to be detected and highlight the contour and surface features of the object to be detected; the camera device is used to collect a front view of the object to be detected;
[0047] Module M1: Build and train the centering deviation detection model; arrange lighting equipment and camera equipment, and collect images at intervals;
[0048] Module M2: input the image into the deviation detection model, find the coordinates of the center of the ellipse in the image, and then calculate the pixel deviation value; according to the pixel deviation value, obtain the actual offset distance;
[0049] Module M3: deriving the trajectory of the ellipse according to the data obtained by module M2, and drawing it on the image;
[0050] Module M4: Determine whether the actual offset distance is greater than or equal to a threshold; if the result is yes, store the current data and issue a warning signal; if the result is no, store the current data.
[0051] Preferably, the module M1 includes:
[0052] Module M1.1: Loading data set function;
[0053] Module M1.2: Adjust parameters based on the data set function;
[0054] Module M1.3: Build and train the centering deviation detection model based on parameters;
[0055] In the module M1.1, data is preprocessed;
[0056] The preprocessing includes: labeling pictures, adjusting picture size and data enhancement;
[0057] The dataset function, i.e. torch.utils.data.DataLoader;
[0058] In the module M1.2, the parameters include: the dimension of the input data, the learning rate, the number of training iterations and the batch size value;
[0059] In the module M1.3, the loss function of the deviation detection model is cross entropy; the loss function, the mathematical expression is:
[0060]
[0061] Among them, L(y,y ′ ) is the loss function, y is the true label, y ′is the model prediction value, and N is the number of samples.
[0062] Preferably, in the module M1, after the steel coil reaches the saddle position, pictures are collected every 0.5 seconds;
[0063] The module M2 includes:
[0064] Module M2.1: converting the image output by the deviation detection model into a binary image;
[0065] Module M2.2: Construct a plane coordinate system, take the middle value of the upper vertex and the lower vertex of the inner circle of the binary graph as the y-axis coordinate point of the center of the circle, take the middle value of the left vertex and the right vertex of the inner circle of the binary graph as the x-axis coordinate point of the center of the circle, and obtain the coordinates of the center of the circle;
[0066] Module M2.3: Based on the two centers of the circle, find the equation of the straight line where the center of the standard circle is located;
[0067] Module M2.4: Substituting the horizontal coordinate of the standard circle center into the equation of the straight line where the standard circle center is located, obtaining the vertical coordinate on the straight line corresponding to the horizontal coordinate; subtracting the vertical coordinate from the vertical coordinate of the standard circle center to obtain the pixel deviation value;
[0068] Module M2.5: converting the pixel deviation value into a corresponding actual offset distance according to the conversion ratio between the pixel value and the spatial value;
[0069] In the module M2.3, the mathematical expression of the equation of the straight line where the center of the circle is located is:
[0070]
[0071] Where y represents the y coordinate of the center of the standard circle; y 2 Represents the y-axis coordinate of the second circle; y 1 Indicates the y-axis coordinate of the first circle; x 1 Indicates the x-axis coordinate of the first circle; x 2 Represents the x-axis coordinate of the second circle; x represents the x-coordinate of the center of the standard circle;
[0072] In the module M2.5, the conversion ratio between the pixel value and the spatial value is expressed as follows:
[0073] K=L÷N
[0074] Among them, K represents the conversion ratio of pixel value to space value, L represents the actual width of the steel coil; and N represents the number of width pixels.
[0075] Preferably, in the module M3, an ellipse is fitted by using the cv2.fitEllipse function provided by OpenCV to obtain corresponding ellipse parameters; an ellipse is drawn to the original image, i.e., the image, according to the ellipse parameters to obtain the trajectory of the ellipse;
[0076] The ellipse parameters include: the coordinates of the ellipse center point, the lengths of the major and minor axes, and the tilt angle;
[0077] In the module M3, the ellipse parameters are calculated according to the ellipse regression calculation equation, and the trajectory of the ellipse is drawn on the original image;
[0078] The mathematical expression of the elliptic regression calculation equation is:
[0079]
[0080] Among them, k represents the ordinate of the center of the inner circle, a represents the length between the upper vertex and the lower vertex in the inner circle, and b represents the length between the left vertex and the right vertex in the inner circle.
[0081] Preferably, in the module M4, it is determined whether the actual offset distance exceeds a threshold value, and if so, an alarm is issued; if not, the image is saved;
[0082] The threshold is set based on the trajectory of the ellipse;
[0083] The threshold is 15.
[0084] Compared with the prior art, the present invention has the following beneficial effects:
[0085] 1. The present invention uses visual recognition to detect the centering height of the steel coil with high precision, thus avoiding the occurrence of rollover and reducing the labor intensity of the operator;
[0086] 2. The present invention can replace the centering grating, reducing equipment configuration and production maintenance.
[0087] 3. The present invention has strong applicability and can be used in all cold rolling and coiling processes, thus reducing the development cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0089] Figure 1 A schematic diagram of the segmentation network structure provided by the present invention;
[0090] Figure 2 A schematic diagram of an ellipse used as a reference in the regression calculation provided by the present invention;
[0091] Figure 3 A schematic diagram of measuring the inner diameter width of a steel coil provided by the present invention;
[0092] Figure 4 This is a schematic diagram of the centering extension line of the steel coil core provided by the present invention. DETAILED DESCRIPTION
[0093] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0094] This solution includes: an inner ring segmentation detection model for a steel coil.
[0095] This embodiment is based on the deep learning U2Net model, and additionally adds CBAM, i.e., Convolutional Block Attention Module, to the model structure. It collects data from specific scenarios, then manually annotates the inner circle of the steel coil, and uses the annotated images to perform supervised optimization training on the model to adjust the parameters of the model and optimize the detection effect of the model in specific application scenarios.
[0096] Ellipse regression calculation. Based on the inner circle of the steel coil that can be rolled up correctly, the inner circle is approximated as an ellipse, and the major and minor axis foci of the inner circle ellipse and the ellipse regression equation are calculated. Then, combined with the results of the segmentation detection model, the inner circle edge curve trajectory is calculated using the equation. In the case of insufficient light or poor detection effect of the segmentation model, this solution can greatly improve the accuracy of drawing the edge.
[0097] The conversion calculation method between pixel value and space value. By calibrating the corresponding pixels in the real space and the image, a nonlinear mapping calculation function between the pixel length in the image and the actual length is constructed, so that the pixel length can be converted to the actual length.
[0098] Centering extension line. In the same coiling application scenario, the centers of the inner circles of the correctly coiled steel coils in the captured images are counted to obtain a set of coordinate points. The line segments connected by them are appropriately extended to obtain the extension line of the steel coil centering. The subsequent deviation comparison is based on this for deviation calculation.
[0099] Deviation alarm interlocking system. After the inner circle is detected in the image, the center point of the inner circle is calculated, and its ordinate is compared with the ordinate of the point with the same abscissa on the centering extension line to obtain the pixel deviation value, and then according to the conversion function between pixel value and space value, it is converted into the deviation value in the actual space, and compared with the set threshold value to determine whether an alarm is needed, and the deviation value is sent to the control system for interlocking.
[0100] Embodiment Taking Hunan Hongwang six-row continuous rolling mill as an example, a method for detecting the centering deviation of a coil provided by the present invention comprises:
[0101] Step 1: Manually annotate the inner circle of the steel coil in the collected images pixel by pixel;
[0102] Use labeled data to optimize and train the inner circle segmentation detection algorithm; deploy the trained algorithm on a server with a graphics card installed;
[0103] The step of optimizing the segmentation detection algorithm includes:
[0104] The segmentation detection algorithm is an AI segmentation algorithm based on deep learning
[0105] Step 1.1: Preprocess the labeled data;
[0106] The preprocessing includes: picture resizing, flipping and other data enhancement solutions;
[0107] Step 1.2: Install Python, PyTorch and other training environments on the training server with a graphics card installed;
[0108] Step 1.3: Write a model training script;
[0109] Specifically, in step 1.3, it includes:
[0110] Step 1.3.1: Load the dataset function; the specific function is torch.utils.data.DataLoader;
[0111] Step 1.3.2: Based on the data set function, adjust the parameters; the parameters include: batch size value, which is set to 8 for this model; the dimension of the input data, which is set to 4 for this model; learning rate, which is set to 1×e-5 for this model; and the number of training iterations, which is set to 100 for this model.
[0112] Step 1.3.3: The loss function of the model is cross entropy, and the mathematical formula is:
[0113]
[0114] Among them, y is the true label, y ′ is the model prediction value, and N is the number of samples.
[0115] Step 1.4: Use the trained model to perform inference on the test set to test the training effect of the model;
[0116] Step 2: Arrange the industrial camera and light source diagonally above the roll-up position;
[0117] The industrial camera includes: a dalsa C4030 industrial camera;
[0118] The industrial camera is horizontally installed in front of the inspection station, about 5 meters away from the inspection object, and is used to collect the front view of the inspection object. Its high resolution and high frame rate can clearly capture the details and rapidly changing features of the object, providing high-quality raw data for subsequent image processing and analysis.
[0119] The light source includes: a Yaming 4000W circular LED light source;
[0120] The light source is installed above the camera and illuminates the object to be detected horizontally, providing uniform and stable lighting for the object to be detected, reducing shadows and reflections, thereby highlighting the contours and surface features of the object to be detected, enhancing the contrast and clarity of the image, and helping to improve the accuracy and reliability of detection.
[0121] Step 3: When the steel coil reaches the saddle position, the image is automatically captured every 0.5 seconds;
[0122] Specifically, by connecting an industrial camera to the acquisition server, calling the camera's SDK, and setting acquisition parameters such as frequency, exposure, etc., the acquired images are transmitted to the server via optical fiber for subsequent calling and storage. The camera itself only stores camera parameters, not images.
[0123] Step 4: Input the image captured by the industrial camera into the above segmentation detection algorithm, and then obtain the center coordinates of the inner circle according to the prediction result graph output by the algorithm;
[0124] The steps and process of obtaining the coordinates of the center of the circle include:
[0125] Step 4.1: Convert the segmentation result image into a binary image with a threshold of 0.5, where the background area value is 0 and the inner circle area value is 1.
[0126] Step 4.2: Take the middle value of the uppermost and lowermost points in the inner circle of the binary graph as the y-axis coordinate point of the center of the circle; take the middle value of the leftmost and rightmost points in the inner circle, that is, take the middle value of the left end point and the right end point of the inner circle, as the x-axis coordinate point of the center of the circle, so as to obtain the center 1, that is, the coordinate point of the first center of the circle (x 1 ,y 1);
[0127] Step 4.3: Select another collected image and get the center 2, which is the coordinate point of the second center (x 2 ,y 2 );
[0128] Step 4.4: Based on the coordinates of the two center points, get the equation of the line where the standard center of the circle is located:
[0129]
[0130] Step 5: Obtain the center coordinates C of the image collected in actual production according to the above steps, and calculate the pixel deviation value with the standard straight line equation; the center coordinates C are the standard center coordinates.
[0131] The specific steps for obtaining the pixel deviation value include:
[0132] Step 5.1: Substitute the horizontal coordinate of the center of the circle into the equation of the straight line where the standard center of the circle is located to calculate and obtain the vertical coordinate corresponding to the horizontal coordinate on the straight line;
[0133] Step 5.2: Subtract the calculated vertical coordinate value of the circle center from the vertical coordinate value of the circle center C to obtain the pixel deviation value;
[0134] Step 6: Use the conversion function between pixel value and spatial value to convert the pixel deviation value obtained in the previous step into the corresponding actual offset distance;
[0135] Step 6.1: Select a clear image that has been collected, and according to the actual width of the steel coil and the number of width pixels in the image, obtain the conversion ratio of pixel value to space value by actual width / number of width pixels; the mathematical expression is:
[0136] K=L÷N
[0137] Among them, K represents the conversion ratio of pixel value to space value; the value of K varies due to different coilers and production environments, L represents the actual width of the steel coil; N represents the number of width pixels.
[0138] Step 6.2: Multiply the pixel deviation value obtained in the previous step by the conversion ratio to obtain the corresponding actual pixel offset distance; this is used to determine whether it exceeds the specified error range. If so, an alarm signal will be issued.
[0139] Step 7: Call the ellipse regression calculation equation, the length between the uppermost and lowermost points in the inner circle The length between the uppermost and lowermost points in the inner circle According to the algorithm output result graph obtained in step 4.1, calculate the trajectory of the ellipse, draw it on the original image, and then save the image to the storage server;
[0140] The elliptic regression calculation equation, the mathematical expression is:
[0141]
[0142] Among them, (h, k) represents the center of the inner circle, a represents the length between the uppermost and lowermost points in the inner circle, and b represents the length between the leftmost and rightmost points in the inner circle.
[0143] Step 7.1: Use the cv2.findContours function of the OpenCV package in Python to extract contour data from the input segmentation result image;
[0144] Step 7.2: Call the cv2.fitEllipse function provided by OpenCV to fit the ellipse and get the returned ellipse parameters;
[0145] The ellipse parameters include: the coordinates of the ellipse center point, the lengths of the major and minor axes, and the tilt angle.
[0146] In other words, the cv2.fitEllipse function returns a tuple containing the key parameters of the ellipse, including: the coordinates of the center point of the ellipse, the lengths of the major and minor axes, and the tilt angle.
[0147] Step 7.3: Based on the obtained ellipse parameters, use the cv2.ellipse function provided by OpenCV to draw an ellipse into the original image. Then display the front-end interface. Compared with the output result obtained directly through the segmentation model, its edges are clearer and more complete, and relatively more beautiful.
[0148] Step 8: Compare the actual offset distance with the threshold value to determine whether a warning signal needs to be issued;
[0149] Specifically, if the offset distance is greater than or equal to a threshold, the result is stored in a database and a warning signal is issued;
[0150] If the offset distance is less than the threshold, no alarm signal is sent, and only the result is stored in the database;
[0151] Through tracking and observing the test results and communicating with the demand side, the threshold is set at 15.
[0152] Step 9: Repeat step 3 to achieve 24-hour uninterrupted centering deviation detection.
[0153] The present invention also provides a system for detecting upper roll centering deviation, and the system for detecting upper roll centering deviation can be realized by executing the process steps of the method for detecting upper roll centering deviation, that is, those skilled in the art can understand the method for detecting upper roll centering deviation as a preferred implementation of the system for detecting upper roll centering deviation.
[0154] A detection system for roll-up centering deviation provided by the present invention comprises: a lighting device and a camera device; the lighting device is used to illuminate the object to be detected and highlight the contour and surface features of the object to be detected; the camera device is used to collect a front view of the object to be detected;
[0155] Module M1: Build and train the centering deviation detection model; arrange lighting equipment and camera equipment, and collect images at intervals;
[0156] Module M2: input the image into the deviation detection model, find the coordinates of the center of the ellipse in the image, and then calculate the pixel deviation value; according to the pixel deviation value, obtain the actual offset distance;
[0157] Module M3: deriving the trajectory of the ellipse according to the data obtained by module M2, and drawing it on the image;
[0158] Module M4: Determine whether the actual offset distance is greater than or equal to a threshold; if the result is yes, store the current data and issue a warning signal; if the result is no, store the current data.
[0159] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0160] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0161] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for detecting the centering deviation of a coil, characterized in that: include: Step S1: construct and train a centering deviation detection model and collect images at intervals; Step S2: inputting the image into the deviation detection model, obtaining the coordinates of the center of the ellipse in the image, and then calculating the pixel deviation value; and obtaining the actual offset distance according to the pixel deviation value; Step S3: according to the data obtained in step S2, the trajectory of the ellipse is obtained and drawn on the image; Step S4: determining whether the actual offset distance is greater than or equal to a threshold; If the result is yes, the current data is stored and an early warning signal is issued; If the result is no, the current data is stored.
2. The method for detecting the centering deviation of the coiling according to claim 1, characterized in that: In the step S1, it includes: Step S1.1: Loading data set function; Step S1.2: adjusting parameters based on the data set function; Step S1.3: constructing and training a centering deviation detection model based on the parameters; In the step S1.1, preprocessing data; The preprocessing includes: labeling pictures, adjusting picture size and data enhancement; The dataset function, torch.utils.data.DataLoader In step S1.2, the parameters include: the dimension of input data, learning rate, number of training iterations and batch size value; In step S1.3, the loss function of the deviation detection model is cross entropy; the loss function, the mathematical expression is: Where L(y, y′) is the loss function, y is the true label, y′ is the model prediction value, and N is the number of samples; In the step S1, lighting equipment and camera equipment are arranged to collect images at intervals; the lighting equipment is used to illuminate the object to be detected to highlight the outline and surface features of the object to be detected; the camera equipment is used to collect a front view of the object to be detected.
3. The method for detecting the centering deviation of the coiling according to claim 2, characterized in that: In step S1, after the steel coil reaches the saddle position, pictures are collected every 0.5 seconds; In the step S2, it includes: Step S2.1: converting the image output by the deviation detection model into a binary image; Step S2.2: construct a plane coordinate system, take the middle value between the upper vertex and the lower vertex of the inner circle of the binary image as the y-axis coordinate point of the center of the circle, take the middle value between the left vertex and the right vertex of the inner circle of the binary image as the x-axis coordinate point of the center of the circle, and obtain the coordinates of the center of the circle; Step S2.3: Based on the two center points, find the equation of the straight line where the standard center point is located; Step S2.4: Substitute the horizontal coordinate of the standard circle center into the equation of the straight line where the standard circle center is located to obtain the vertical coordinate on the straight line corresponding to the horizontal coordinate; subtract the vertical coordinate from the vertical coordinate of the standard circle center to obtain the pixel deviation value; Step S2.5: converting the pixel deviation value into a corresponding actual offset distance according to the conversion ratio between the pixel value and the spatial value; In step S2.3, the mathematical expression of the equation of the straight line where the center of the circle is located is: Among them, y represents the y coordinate of the center of the standard circle; y2 represents the y axis coordinate of the second circle; y1 represents the y axis coordinate of the first circle; x1 represents the x axis coordinate of the first circle; x2 represents the x axis coordinate of the second circle; x represents the x coordinate of the center of the standard circle; In step S2.5, the conversion ratio between the pixel value and the spatial value is expressed as follows: K=L÷N Among them, K represents the conversion ratio of pixel value to space value, L represents the actual width of the steel coil; and N represents the number of width pixels.
4. The method for detecting the centering deviation of the coiling according to claim 3, characterized in that: In the step S3, an ellipse is fitted by using the cv2.fitEllipse function provided by OpenCV to obtain corresponding ellipse parameters; an ellipse is drawn to the original image, i.e., the image, according to the ellipse parameters to obtain the trajectory of the ellipse; The ellipse parameters include: the coordinates of the ellipse center point, the lengths of the major and minor axes, and the tilt angle; In step S3, the ellipse parameters are calculated according to the ellipse regression calculation equation, and the trajectory of the ellipse is drawn on the original image; The mathematical expression of the elliptic regression calculation equation is: Among them, k represents the ordinate of the center of the inner circle, a represents the length between the upper vertex and the lower vertex in the inner circle, and b represents the length between the left vertex and the right vertex in the inner circle.
5. The method for detecting the centering deviation of the coiling according to claim 4, characterized in that: In step S4, it is determined whether the actual offset distance exceeds a threshold value, and if so, an alarm is issued; If the result is no, save the image; The threshold is set based on the trajectory of the ellipse; The threshold is 15.
6. A system for detecting the centering deviation of a coil, characterized in that: include: Module M1: Build and train the centering deviation detection model and collect images at intervals; Module M2: input the image into the deviation detection model, find the coordinates of the center of the ellipse in the image, and then calculate the pixel deviation value; according to the pixel deviation value, obtain the actual offset distance; Module M3: deriving the trajectory of the ellipse according to the data obtained by module M2, and drawing it on the image; Module M4: determining whether the actual offset distance is greater than or equal to a threshold; If the result is yes, the current data is stored and an early warning signal is issued; if the result is no, the current data is stored.
7. The detection system for the centering deviation of the coiling according to claim 6 is characterized in that: The module M1 includes: Module M1.1: Loading data set function; Module M1.2: Adjust parameters based on the data set function; Module M1.3: Build and train the centering deviation detection model based on parameters; In the module M1.1, data is preprocessed; The preprocessing includes: labeling pictures, adjusting picture size and data enhancement; The dataset function, i.e. torch.utils.data.DataLoader; In the module M1.2, the parameters include: the dimension of the input data, the learning rate, the number of training iterations and the batch size value; In the module M1.3, the loss function of the deviation detection model is cross entropy; the loss function, the mathematical expression is: Where L(y, y′) is the loss function, y is the true label, y′ is the model prediction value, and N is the number of samples; In the module M1, lighting equipment and camera equipment are arranged to collect images at intervals; the lighting equipment is used to illuminate the object to be detected to highlight the outline and surface features of the object to be detected; the camera equipment is used to collect a front view of the object to be detected.
8. The detection system for the centering deviation of the coiling according to claim 7 is characterized in that: In the module M1, after the steel coil reaches the saddle position, pictures are collected every 0.5 seconds; The module M2 includes: Module M2.1: converting the image output by the deviation detection model into a binary image; Module M2.2: Construct a plane coordinate system, take the middle value of the upper vertex and the lower vertex of the inner circle of the binary graph as the y-axis coordinate point of the center of the circle, take the middle value of the left vertex and the right vertex of the inner circle of the binary graph as the x-axis coordinate point of the center of the circle, and obtain the coordinates of the center of the circle; Module M2.3: Based on the two centers of the circle, find the equation of the straight line where the center of the standard circle is located; Module M2.4: Substituting the horizontal coordinate of the standard circle center into the equation of the straight line where the standard circle center is located, obtaining the vertical coordinate on the straight line corresponding to the horizontal coordinate; subtracting the vertical coordinate from the vertical coordinate of the standard circle center to obtain the pixel deviation value; Module M2.5: converting the pixel deviation value into a corresponding actual offset distance according to the conversion ratio between the pixel value and the spatial value; In the module M2.3, the mathematical expression of the equation of the straight line where the center of the circle is located is: Among them, y represents the y coordinate of the center of the standard circle; y2 represents the y axis coordinate of the second circle; y1 represents the y axis coordinate of the first circle; x1 represents the x axis coordinate of the first circle; x2 represents the x axis coordinate of the second circle; x represents the x coordinate of the center of the standard circle; In the module M2.5, the conversion ratio between the pixel value and the spatial value is expressed as follows: K=L÷N Among them, K represents the conversion ratio of pixel value to space value, L represents the actual width of the steel coil; and N represents the number of width pixels.
9. The detection system for the centering deviation of the coiling according to claim 8, characterized in that: In the module M3, an ellipse is fitted by using the cv2.fitEllipse function provided by OpenCV to obtain corresponding ellipse parameters; an ellipse is drawn to the original image, i.e., the image, according to the ellipse parameters to obtain the trajectory of the ellipse; The ellipse parameters include: the coordinates of the ellipse center point, the lengths of the major and minor axes, and the tilt angle; In the module M3, the ellipse parameters are calculated according to the ellipse regression calculation equation, and the trajectory of the ellipse is drawn on the original image; The mathematical expression of the elliptic regression calculation equation is: Among them, k represents the ordinate of the center of the inner circle, a represents the length between the upper vertex and the lower vertex in the inner circle, and b represents the length between the left vertex and the right vertex in the inner circle.
10. The detection system for coiling centering deviation according to claim 9, characterized in that: In the module M4, it is determined whether the actual offset distance exceeds a threshold value. If yes, an alarm is issued; if no, the image is saved. The threshold is set based on the trajectory of the ellipse; The threshold is 15.
Citation Information
Patent Citations
Steel coil height centering device and method thereof
CN104475463A
Touch-type coil feeding positioning device and coil feeding centering method thereof
CN107344684A
Credibility evaluation method for ellipse detection result of automatic roll-up system
CN112365531A
Steel coil height centering system based on image recognition
CN114638783A
System for detecting deviation of steel plate of roller hearth heat treatment furnace
CN116468664A
Cited By
Heating furnace slab centering detection method, device, equipment and medium
CN120506908A