A method for identifying a type of a steel plate bloom
By preprocessing images and fusing feature maps, the problem of insufficient feature fusion in steel code recognition in existing technologies is solved, achieving higher recognition accuracy and model adaptability, and is applicable to the model recognition of steel billets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV OF SCI & TECH
- Filing Date
- 2023-07-01
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies cannot effectively integrate features at different levels in steel code recognition, resulting in fewer recognition features, a higher likelihood of recognition errors, and a lower recognition accuracy.
Before recognition, the images are preprocessed to ensure they are of uniform size. The YOLOv7-tiny model is used to extract feature maps at different levels, and the TS-FAN module is used to fuse adjacent feature maps to retain more feature information. Recognition is then performed using multi-level, multi-scale, and multi-channel information.
It improves the accuracy of steel billet model identification, enabling accurate identification of steel billet models under different lighting conditions and shooting angles, and enhances the model's feature extraction and generalization capabilities.
Smart Images

Figure CN116630985B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for identifying steel materials, specifically a method for identifying the type of steel billet. Background Technology
[0002] Image recognition technology, also known as visual recognition technology, refers to the use of computers to process and analyze images, identify the category of objects, and make judgments. An image recognition system generally consists of three parts: preprocessing, analysis, and recognition. Preprocessing includes image segmentation, image enhancement, image restoration, image reconstruction, and image thinning, among other things. Image analysis mainly refers to extracting features from the preprocessed image. Finally, a classifier matches and classifies the image based on the extracted features to make a recognition.
[0003] Chinese patent application number 202010274297.6, published on June 30, 2020, discloses a steel code recognition method, a steel code recognition system, and its training method. The method involves real-time acquisition of images to be recognized using an image acquisition device, and processing each frame of the acquired images separately. When an object to be recognized is detected within a defined area of the current frame of the image, the object and its number are identified using an object recognition model. The direction of the number in the image is obtained, and based on this direction, an image of the number oriented towards a reference direction is obtained. Based on this image, a character extraction image of the number oriented towards the recognition direction is obtained. The character corresponding to the number is extracted from the character extraction image. However, this recognition method cannot fuse features at different levels, resulting in fewer recognized features. A limited number of recognized features can easily lead to recognition errors, resulting in inaccurate recognition. Summary of the Invention
[0004] This invention provides a method for identifying the type of steel billet. Before feature fusion, the image is preprocessed to improve the accuracy of image recognition and to keep the size of the image to be recognized consistent. Feature maps at different levels of the image are extracted and then superimposed and fused to retain features at different levels. As a result, more features can be identified during recognition, thus improving the recognition accuracy.
[0005] To achieve the above objectives, the technical solution of the present invention is: a method for identifying the type of steel plate billet, comprising the following steps:
[0006] S1. Pre-store image data of steel billet of different models. The data of each model of steel billet includes images taken from different shooting angles under different lighting conditions.
[0007] S2. Preset the size of the standard image; scale the image so that the image to be recognized in the image is the same size as the standard image.
[0008] S3. Divide the image data into an evenly distributed training set; the training set contains image data of different types of steel billets.
[0009] S4. Input the training set data into the YOLOv7-tiny model; the YOLOv7-tiny model first processes the image data of a steel billet of a certain type.
[0010] The S5 and YOLOv7-tiny models include an input terminal, a backbone section, a TS-FAN module, and an output terminal. The input terminal is used to receive data, and the output terminal is used to output data. The backbone section extracts features from each image of a steel billet of the same model.
[0011] The S6 and Backbone sections perform convolution operations on the extracted features to obtain four feature maps at different levels.
[0012] The S7 and TS-FAN modules fuse adjacent feature maps from different levels to obtain the first feature map, the second feature map, and the third feature map.
[0013] The output of the S8 and YOLOv7-tiny models sends the first, second, and third feature images corresponding to each image to different cameras for recognition; the model of the steel billet is identified through the first, second, and third feature images.
[0014] S9. Repeat S4-S8 to identify the image data of different types of steel billets in the training set.
[0015] The above method scales the images before recognition to ensure that the size of the images to be recognized remains consistent across different images; reduces the influence of information other than the images to be recognized on the recognition results; improves the accuracy of image recognition; extracts feature maps at different levels by performing convolution operations on the features in the backbone part; thus obtaining feature information at different levels; and then fuses adjacent feature maps at different levels through the TS-FAN module; thereby retaining more feature information in the first, second, and third feature maps; enabling the capture of more feature information during the recognition process and improving the accuracy of image recognition.
[0016] Meanwhile, the image data includes pictures taken from different angles under different lighting conditions, allowing the identification of steel billet models from pictures taken from different angles and under different lighting conditions; thus, training is performed to facilitate the identification process.
[0017] Furthermore, in S3, the image data is evenly divided into training set, validation set, optimization set, and test set; the training set, validation set, optimization set, and test set all contain image data of different types of steel billets.
[0018] In S9, after the training set data is identified, proceed to S10.
[0019] S10, Preset the accuracy threshold of the recognition results.
[0020] S11. Use the validation set data to test the recognition accuracy; determine whether the recognition accuracy of the validation set reaches the accuracy threshold; if not, optimize the recognition results and proceed to S12.
[0021] S12. Repeat S4-S7, input the image data of a steel billet of a certain type from the optimized set into the YOLOv7-tiny model; generate the first feature map, the second feature map and the third feature map.
[0022] S13. Control the YOLOv7-tiny model to output the current first feature map, second feature map, and third feature map; identify the model of the steel billet from the current first feature map, second feature map, and third feature map.
[0023] S14. Repeat S12-S13 to identify the image data of different types of steel billets in the optimization set; after all the data in the optimization set has been identified, proceed to S15.
[0024] S15. Use the test set data to test the recognition accuracy.
[0025] The above method uses a training set for training and a validation set for testing. The validation set data is unique to the training set data and can accurately detect the recognition accuracy of steel billet models. When the threshold is not reached, it indicates that the recognition accuracy is not up to standard. The YOLOv7-tiny model is manually controlled to output images that are easy to identify steel billet models, so as to accurately identify the steel billet models in the current image and optimize the recognition. At the same time, the optimized camera is tested again using test set data to detect the recognition accuracy.
[0026] Furthermore, in S7, fusing adjacent feature maps at different levels involves superimposing adjacent feature maps at different levels.
[0027] The above methods, through superposition and fusion, preserve features at different levels.
[0028] Furthermore, the Backbone component includes a first extraction module, a second extraction module, a third extraction module, and a fourth extraction module; the first extraction module includes a first CBS module and a first C3 module; the second extraction module includes a second CBS module and a second C3 module; the third extraction module includes a third CBS module and a third C3 module; the fourth extraction module includes a fourth CBS module and a fourth C3 module; the first C3 module and the second C3 module are C3-1 modules; the third C3 module and the fourth C3 module are C3-3 modules.
[0029] The above methods use different extraction modules to extract feature maps at different levels.
[0030] Furthermore, S6 specifically includes the following steps:
[0031] S6.1 First, the first extraction module extracts the features of the image and performs a convolution operation to obtain a first-level feature map.
[0032] S6.2. The second extraction module extracts features from the feature map of the first level and performs convolution operation to obtain the feature map of the second level.
[0033] S6.3. The third extraction module extracts features from the feature map of another level and performs convolution operation to obtain a feature map of yet another level.
[0034] S6.4. The features in the feature map of the next level are extracted by the fourth extraction module and convolution operation is performed to obtain the feature map of the next level.
[0035] The above method involves the first extraction module performing a convolution operation on the image to extract a first-level feature map; then the second extraction module performing a convolution operation on the first-level feature map to extract another level of feature map; then the third extraction module performing a convolution operation on the second-level feature map to extract yet another level of feature map; and then the fourth extraction module performing a convolution operation on yet another level of feature map to extract yet yet another level of feature map. The first, second, third, and fourth extraction modules sequentially extract features from the feature maps at different levels, thereby obtaining a higher-level feature map.
[0036] Furthermore, the TS-FAN module includes both top-down and bottom-up paths.
[0037] In S7, the TS-FAN module fuses feature maps from adjacent different levels, including the following steps:
[0038] S7.1, Overlay feature maps of one level and another level; S7.2, Overlay feature maps of one level, another level, and yet another level; S7.3, Overlay feature maps of another level, yet another level, and yet another level. S7.4.
[0039] S7.2. By using a top-down path, the spatial resolution of the high-level feature map is expanded, and the features in the high-level features are fused into the low-level feature map; thus, the first feature map is obtained.
[0040] S7.3. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the second feature map.
[0041] S7.4. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the third feature map.
[0042] The above methods simultaneously perform top-down and bottom-up path fusion; merge feature information from different levels, scales, and channels to obtain richer and more accurate feature representations; improve feature representation capabilities; utilize multi-level, multi-scale, and multi-channel information in images to reduce feature loss; and enhance the model's feature extraction and generalization capabilities, thereby making the model more adaptable to different tasks and data.
[0043] Furthermore, the C3-3 module includes three residual modules, two CONV modules with a kernel size of 3*3 and a stride of 1, two CBS modules with a kernel size of 3*3 and a stride of 2, and a concat module.
[0044] Furthermore, the C3-1 module includes a residual module, two CONV modules with a kernel size of 3*3 and a stride of 1, two CBS modules with a kernel size of 3*3 and a stride of 2, and a concat module. Attached Figure Description
[0045] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0046] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0047] like Figure 1 As shown, a method for identifying the type of steel plate billet includes the following steps:
[0048] S1. Pre-store image data of steel billet of different models. The data of each model of steel billet includes images taken from different shooting angles under different lighting conditions.
[0049] S2. Preset the size of the standard image; scale the image so that the image to be recognized in the image is the same size as the standard image.
[0050] S3. Divide the image data evenly into the training set, validation set, optimization set, and test set; the training set, validation set, optimization set, and test set all contain image data of different types of steel billets.
[0051] S4. Input the training set data into the YOLOv7-tiny model; the YOLOv7-tiny model first processes the image data of a steel billet of a certain type.
[0052] The S5 and YOLOv7-tiny models include an input terminal, a backbone section, a TS-FAN module, and an output terminal. The input terminal is used to receive data, and the output terminal is used to output data. The backbone section extracts features from each image of a steel billet of the same model.
[0053] The Backbone section includes a first extraction module, a second extraction module, a third extraction module, and a fourth extraction module. The first extraction module includes a first CBS module and a first C3 module. The second extraction module includes a second CBS module and a second C3 module. The third extraction module includes a third CBS module and a third C3 module. The fourth extraction module includes a fourth CBS module and a fourth C3 module. The first C3 module and the second C3 module are C3-1 modules. The third C3 module and the fourth C3 module are C3-3 modules.
[0054] S6, the Backbone part performs convolution operations on the extracted features to obtain four feature maps at different levels. These are feature maps at one level, another level, yet another level, and yet another level; each feature map at a different level contains feature information from a different level.
[0055] The S7 and TS-FAN modules fuse adjacent feature maps from different levels to obtain the first feature map, the second feature map, and the third feature map.
[0056] The output of the S8 and YOLOv7-tiny models sends the first, second, and third feature images corresponding to each image to different cameras for recognition. The model of the steel billet is identified using these first, second, and third feature images. The camera randomly identifies the model of the steel billet from the first, second, and third feature images of any given image. In this embodiment, the model of the steel billet is determined by comparing the first, second, and third feature images with a preset standard feature image corresponding to the model of the steel billet.
[0057] S9. Repeat S4-S8 to identify the image data of different types of steel billets in the training set; after the data in the training set has been identified, proceed to S10.
[0058] S10, Preset the accuracy threshold of the recognition results.
[0059] S11. Use the validation set data to test the recognition accuracy of the camera; determine whether the recognition accuracy of the validation set reaches the accuracy threshold; if not, optimize the recognition result of the camera and proceed to S12; if yes, exit directly.
[0060] S12. Repeat S4-S7, input the image data of a steel billet of a certain type from the optimized set into the YOLOv7-tiny model; generate the first feature map, the second feature map and the third feature map.
[0061] S13. Manually control the YOLOv7-tiny model to output the current first feature map, second feature map, and third feature map; identify the model of the steel billet from the current first feature map, second feature map, and third feature map.
[0062] S14. Repeat S12-S13 to identify the image data of different types of steel billets in the optimization set; after all the data in the optimization set has been identified, proceed to S15.
[0063] S15. Use the test set data to test the recognition accuracy of the camera.
[0064] The above method uses a training set for training and a validation set for testing. The validation set data is unique to the training set data and can accurately detect the recognition accuracy of steel billet models. When the threshold is not reached, it indicates that the recognition accuracy is not up to standard. The YOLOv7-tiny model is manually controlled to output images that easily identify steel billet models, so that the camera can accurately identify the steel billet model in the current image, thus optimizing the camera's recognition. At the same time, the optimized camera is tested again using test set data to detect the recognition accuracy of the optimized camera.
[0065] Before recognition, the images are scaled to ensure that the size of the images to be recognized remains consistent across different images, thus improving the accuracy of image recognition. Convolutional operations are performed on the features in the backbone to extract feature maps at different levels, thereby obtaining feature information at different levels. Then, the TS-FAN module fuses adjacent feature maps from different levels, retaining more feature information in the first, second, and third feature maps. This allows for the capture of more feature information during the recognition process, improving the accuracy of image recognition.
[0066] Meanwhile, the image data includes pictures taken from different angles under different lighting conditions, allowing the identification of steel billet models from pictures taken from different angles and under different lighting conditions; thus, the camera's recognition process is trained.
[0067] The above S6 specifically includes the following steps:
[0068] S6.1 First, the first extraction module extracts the features of the image and performs a convolution operation to obtain a first-level feature map.
[0069] S6.2. The second extraction module extracts features from the feature map of the first level and performs convolution operation to obtain the feature map of the second level.
[0070] S6.3. The third extraction module extracts features from the feature map of another level and performs convolution operation to obtain a feature map of yet another level.
[0071] S6.4. The features in the feature map of the next level are extracted by the fourth extraction module and convolution operation is performed to obtain the feature map of the next level.
[0072] The above method involves the first extraction module performing a convolution operation on the image to extract a first-level feature map; then the second extraction module performing a convolution operation on the first-level feature map to extract another level of feature map; then the third extraction module performing a convolution operation on the second-level feature map to extract yet another level of feature map; and finally the fourth extraction module performing a convolution operation on yet another level of feature map to extract an even higher level of feature map. The first, second, third, and fourth extraction modules sequentially extract features from the feature maps at different levels, thereby obtaining higher-level feature maps.
[0073] In S7 above, the TS-FAN module includes a top-down path and a bottom-up path.
[0074] The TS-FAN module fuses feature maps from adjacent different levels, including the following steps:
[0075] S7.1, Overlay feature maps of one level and another level; S7.2, Overlay feature maps of one level, another level, and yet another level; S7.3, Overlay feature maps of another level, yet another level, and yet another level. S7.4.
[0076] S7.2. By using a top-down path, the spatial resolution of the high-level feature map is expanded, and the features in the high-level features are fused into the low-level feature map; thus, the first feature map is obtained.
[0077] S7.3. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the second feature map.
[0078] S7.4. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the third feature map.
[0079] Since the feature maps at different levels contain different feature information, the first, second, and third feature maps formed by superimposing these feature maps contain different feature information; thus, the model of the steel plate billet is determined by multiple feature information.
[0080] In this embodiment, the spatial resolution of the feature map at the next level is smaller than that of the feature map at the next level; the spatial resolution of the feature map at the next level is smaller than that of the feature map at another level; and the spatial resolution of the feature map at another level is smaller than that of the feature map at the first level. In S7.2, the first feature map is obtained by reducing the spatial resolution of the feature map at another level and merging it with the feature map at the first level; thus, the spatial resolution of the first feature map is the same as that of the feature map at the first level.
[0081] In S7.3, a second feature map is obtained by expanding the spatial resolution of the feature map at another level, reducing the spatial resolution of the feature map at one level, and merging it with the feature map at another level; thus, the spatial resolution of the first feature map is the same as that of the feature map at another level.
[0082] In S7.4, a third feature map is obtained by expanding the spatial resolution of a feature map at one level, reducing the spatial resolution of a feature map at another level, and merging it with a feature map at yet another level; thus, the spatial resolution of the third feature map is the same as that of the feature map at the next level.
[0083] Thus, the spatial resolution of the first feature map is greater than that of the second feature map, and the spatial resolution of the second feature map is greater than that of the third feature map. In this embodiment, three cameras are provided, each with a different spatial resolution. By using different cameras to identify feature maps with different spatial resolutions, the feature information in the feature maps is accurately identified, thereby accurately determining the model of the steel plate billet.
[0084] By simultaneously performing top-down and bottom-up path fusion, feature information from different levels, scales, and channels is merged to obtain richer and more accurate feature representations, thereby improving feature representation capabilities. Utilizing multi-level, multi-scale, and multi-channel information in the image reduces feature loss, enhancing the model's feature extraction and generalization abilities, thus making the model more adaptable to different tasks and data. Furthermore, by changing the spatial resolution of feature maps at different levels, feature maps from different levels can be superimposed.
Claims
1. A method for identifying the type of steel plate billet, characterized in that: Includes the following steps: S1. Pre-store image data of steel billet of different models. The data of each model of steel billet includes images taken from different shooting angles under different lighting conditions. S2. Preset the size of the standard image; scale the image so that the image to be recognized in the image is the same size as the standard image; S3. Divide the image data into an evenly distributed training set; the training set contains image data of different types of steel billets. S4. Input the training set data into the YOLOv7-tiny model; the YOLOv7-tiny model first processes the image data of a steel billet of a certain type; The S5 and YOLOv7-tiny models consist of an input terminal, a backbone, a TS-FAN module, and an output terminal. The input terminal receives data, and the output terminal outputs data. The backbone extracts features from each image of a steel billet of the same type. S6 and Backbone perform convolution operations on the extracted features to obtain four feature maps at different levels. S7. The TS-FAN module fuses adjacent feature maps from different levels, including the following steps: S7.
1. Superimposing feature maps from one level to another; S7.
2. Superimposing feature maps from one level to another, and then to yet another level; S7.
3. Superimposing feature maps from another level to another, and then to yet another level; S7.
4. S7.
2. Through a top-down path, the spatial resolution of higher-level feature maps is expanded, and features from higher-level features are fused into lower-level feature maps. The first feature map is obtained; S7.
3. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the second feature map. S7.
4. By using a top-down path, the spatial resolution of the high-level feature map is expanded, while by using a bottom-up path, the spatial resolution of the low-level feature map is reduced, so that the resolutions of the high-level feature map, the mid-level feature map, and the low-high-level feature map are consistent. The high-level feature map, the mid-level feature map, and the low-high-level feature map are then superimposed to obtain the third feature map. The output of the S8 and YOLOv7-tiny models sends the first, second, and third feature images corresponding to each image to different cameras for recognition; the model of the steel billet is identified through the first, second, and third feature images to be recognized. S9. Repeat S4-S8 to identify the image data of different types of steel billets in the training set.
2. The method for identifying the type of steel plate billet according to claim 1, characterized in that: In S3, the image data is evenly divided into training set, validation set, optimization set and test set; the training set, validation set, optimization set and test set all contain image data of different types of steel billets; In S9, after the data in the training set is identified, proceed to S10. S10, Preset the accuracy threshold of the recognition results; S11. Test the recognition accuracy using the validation set data; determine whether the recognition accuracy of the validation set reaches the accuracy threshold; if not, optimize the recognition results and proceed to S12. S12. Repeat steps S4-S7, inputting the image data of a steel billet of a certain type from the optimization set into the YOLOv7-tiny model; generating the first feature map, the second feature map, and the third feature map; S13. Control the YOLOv7-tiny model to output the current first feature map, second feature map, and third feature map; identify the type of steel billet from the current first feature map, second feature map, and third feature map; S14. Repeat S12-S13 to identify the image data of different types of steel billets in the optimization set; after all the data in the optimization set has been identified, proceed to S15. S15. Use the test set data to test the recognition accuracy.
3. The method for identifying the type of steel plate billet according to claim 1, characterized in that: In S7, fusing adjacent feature maps at different levels involves superimposing adjacent feature maps at different levels.
4. The method for identifying the type of steel plate billet according to claim 3, characterized in that: The Backbone section includes a first extraction module, a second extraction module, a third extraction module, and a fourth extraction module. The first extraction module includes a first CBS module and a first C3 module. The second extraction module includes a second CBS module and a second C3 module. The third extraction module includes a third CBS module and a third C3 module. The fourth extraction module includes a fourth CBS module and a fourth C3 module. The first C3 module and the second C3 module are C3-1 modules. The third C3 module and the fourth C3 module are C3-3 modules.
5. The method for identifying the type of steel plate billet according to claim 4, characterized in that: S6 specifically includes the following steps: S6.1 First, the features of the image are extracted by the first extraction module and convolution operation is performed to obtain a first-level feature map; S6.
2. The second extraction module extracts features from the feature map of the first level and performs convolution operation to obtain the feature map of the second level. S6.
3. The third extraction module extracts features from the feature map of another level and performs convolution operation to obtain a feature map of yet another level. S6.
4. The features in the feature map of the next level are extracted by the fourth extraction module and convolution operation is performed to obtain the feature map of the next level.
6. The method for identifying the type of steel plate billet according to claim 4, characterized in that: The C3-3 module includes three residual modules, two CONV modules with a kernel size of 3*3 and a stride of 1, two CBS modules with a kernel size of 3*3 and a stride of 2, and a concat module.
7. The method for identifying the type of steel plate billet according to claim 4, characterized in that: The C3-1 module includes a residual module, two CONV modules with a kernel size of 3*3 and a stride of 1, two CBS modules with a kernel size of 3*3 and a stride of 2, and a concat module.