Steel Surface Defect Detection
CONTENT PAGE NO
Abstract
1.INTRODUCTION
1.1 Motivation
1.2 Problem Statement
1.3 Objective of the Project
1.4 Scope
1.5 Project Introduction
2.LITERATURE SURVEY
2.1 Related Work
3. SYSTEM ANALYSIS
3.1 Existing System
3.2 Disadvantages
3.3 Proposed System
3.4 Advantages
4. REQUIREMENT ANALYSIS
4.1 Function and non-functional requirements
4.2 Hardware Requirements
4.3 Software Requirements
4.4 Architecture
5. SYSTEM DESIGN
5.1 Introduction of Input design
5.2 UML Diagram(class, use case, sequence, collaborative, deployment, activity, ER diagram and Component diagram)
6. IMPLEMENTATION AND RESULTS
6.1 Modules
6.2 System
6.3 Algorithms (YOLOv8)
6.4 Output Screens
7. SYSTEM STUDY AND TESTING
7.1 Feasibility study
8. CONCLUSION
9. FUTURE ENHANCEMENT
REFERENCES
ABSTRACT:
The "Steel Surface Defect Detection" project leverages YOLOv8 for real-time, high-accuracy detection of six steel defect types: crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches. The system is developed using Python for backend operations, with Flask as the framework, while HTML, CSS, and JavaScript are used for a responsive frontend interface. By harnessing YOLOv8's object detection capabilities, the system identifies and classifies surface defects on steel, facilitating quality control and defect management in industrial processes. The integration of Flask enables a seamless user experience, allowing users to interact with the system to upload images and visualize defect detection results. This solution aims to optimize production quality and reduce waste by ensuring defect-free products reach the market.
Keywords: Steel defect detection, YOLOv8, Flask framework, real-time classification, surface quality control.
- INTRODUCTION
1.1 Motivation:
In the steel manufacturing industry, ensuring product quality is paramount, as defects on steel surfaces can significantly impact the performance, safety, and aesthetic appeal of the final product. Manual inspection processes are not only time-consuming but also prone to human error, which can lead to inconsistent quality standards and increased production costs. With the advancement in computer vision and deep learning technologies, there is a unique opportunity to automate defect detection and improve accuracy and speed. Utilizing models like YOLOv8 for real-time surface defect detection addresses these industry challenges by providing a reliable, high-speed, and automated solution. This project is motivated by the need to bridge the gap between traditional inspection methods and modern technology, helping the industry achieve higher quality control standards, reduce inspection costs, and boost operational efficiency by minimizing downtime and enhancing productivity
1.2 Problem Statement:
The steel industry faces significant challenges in ensuring the quality and durability of its products, primarily due to surface defects that occur during production. These defects, such as crazing, inclusion, patches, pitted surfaces, rolled-in scales, and scratches, can impact product reliability, structural integrity, and aesthetic value. Traditional inspection methods rely on manual detection, which is both time-consuming and vulnerable to human error, often resulting in inconsistent defect detection and increased production costs. Consequently, there is a pressing need for an efficient, accurate, and scalable solution to detect and classify these defects in real-time. This project aims to leverage YOLOv8, a state-of-the-art deep learning model, to automate defect detection on steel surfaces, providing a streamlined inspection process that reduces human intervention, enhances detection precision, and optimizes production workflow, thereby supporting the industry’s goals of achieving consistent quality standards
1.3 Objective of the Project:
The primary objective of this project is to develop an automated steel surface defect detection system that accurately identifies six distinct types of defects using the YOLOv8 model. Specific objectives include enhancing defect detection speed and precision to facilitate real-time applications, reducing the dependency on manual inspection to improve operational efficiency, and minimizing human error in quality control processes. By implementing this solution, the project seeks to improve the steel production line’s ability to detect defects early, allowing for prompt corrective actions and reducing material waste. Additionally, this system aims to be easily scalable and integrable within existing industrial environments, providing a cost-effective solution for large-scale applications. Through this project, the steel manufacturing industry can achieve higher quality control standards, ensuring that only defect-free products reach the end-users, thus fostering consumer trust and satisfaction.
1.4 Scope:
This project focuses on automating the process of steel surface defect detection in industrial settings. The system’s scope includes utilizing YOLOv8 for defect classification, covering six specific defect types: crazing, inclusion, patches, pitted surfaces, rolled-in scale, and scratches. The project will be implemented with a Flask backend in Python for model handling and inference and a frontend interface using HTML, CSS, and JavaScript for user interaction. This solution is designed to be adaptable for integration into existing production lines, with scalability to meet large-scale industrial demands. It aims to significantly reduce manual inspection time, enhance defect detection accuracy, and lower operational costs. Future scope includes expanding the model’s capability to detect additional defect types and optimizing it for diverse lighting conditions and surface textures to make it universally applicable in various steel manufacturing environments.
1.5 Project Introduction
Steel surface defects are a major concern in the manufacturing industry, as they affect the quality, durability, and aesthetic appeal of the final product. Common defects like crazing, inclusion, patches, pitted surfaces, rolled-in scale, and scratches compromise the structural integrity of steel, which is often used in critical applications. Traditional inspection methods depend on manual checks, which are labor-intensive and prone to human error. However, recent advancements in deep learning have opened new avenues for automating and enhancing the defect detection process. This project explores the application of YOLOv8, a state-of-the-art object detection model, in accurately identifying and classifying various steel surface defects. The system is built on a Flask backend with a user-friendly frontend, providing real-time analysis and feedback. This solution aims to transform steel quality control processes, ensuring high production standards, reducing operational costs, and minimizing the environmental impact of waste and reprocessing.
- LITERATURE SURVEY
2.1 Related Work:
[1] K. He, X. Zhang, S. Ren, and J. Sun, ‘‘Spatial pyramid pooling in deep convolutional networks for visual recognition,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 37, no. 9, pp. 1904–1916, Sep. 2015, doi: 10.1109/TPAMI.2015.2389824.
This work reviews key techniques in image semantic segmentation, focusing on U-Net and its variants. It covers foundational principles, essential datasets, and tools, with an emphasis on U-Net's application in various imaging tasks. The study explores the use of diffusion models for generative segmentation and examines advancements for improving efficiency and accuracy. Additionally, emerging trends, challenges, and future research avenues, including dataset variability and model generalization, are discussed.
[2] S. Ren, K. He, R. Girshick, and J. Sun, ‘‘Faster R-CNN: Towards real-time object detection with region proposal networks,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 39, no. 6, pp. 1137–1149, Jun. 2017.
This work introduces a Region Proposal Network (RPN) that shares full-image convolutional features with the detection network, reducing the cost of region proposal computation. RPNs predict object bounds and objectness scores at each position, and are trained end-to-end to generate high-quality proposals for Fast R-CNN. The system achieves 5fps on a GPU, with state-of-the-art accuracy on PASCAL VOC 2007 (73.2% mAP) and 2012 (70.4% mAP) using 300 proposals per image.
[3] Y. Xu, D. Li, Q. Xie, Q. Wu, and J. Wang, ‘‘Automatic defect detection and segmentation of tunnel surface using modified mask R-CNN,’’ Measurement, vol. 178, Jun. 2021, Art. no. 109316.
This paper proposes a novel tunnel defect detection method using Mask R-CNN, enhanced with a path augmentation feature pyramid network (PAFPN) and an edge detection branch. These improvements, which add minimal memory and computational overhead, aim to address challenges in tunnel surface defect detection caused by complex backgrounds. The study demonstrates the robustness and accuracy of these enhancements in defect detection and segmentation, outperforming traditional methods.
[4] M. Chen, L. Yu, C. Zhi, R. Sun, S. Zhu, Z. Gao, Z. Ke, M. Zhu, and Y. Zhang, ‘‘Improved faster R-CNN for fabric defect detection based on Gabor filter with genetic algorithm optimization,’’ Comput. Ind., vol. 134, Jan. 2022, Art. no. 103551.
This paper presents an improved YOLOv8n-LAW algorithm for fabric defect detection. It enhances feature extraction by integrating LSKNet attention mechanisms and replaces the PAN-FPN structure with AFPN for better feature fusion. Additionally, the WIoU v3 loss is used for dynamic gradient adjustment. The algorithm achieves 97.4% accuracy and 46 frames per second, significantly improving detection speed and the recognition of small target defects in fabric production.
[5] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, ‘‘You only look once: Unified, real-time object detection,’’ in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2016, pp. 779–788.
ol.
- SYSTEM ANALYSIS
3.1 Existing System
Traditional steel defect detection relies heavily on manual inspection, where trained inspectors visually examine steel surfaces for defects. Although some systems utilize basic image processing techniques, they often lack the accuracy and speed required for real-time industrial applications. These approaches are limited in scalability and are prone to human error, often resulting in inconsistent detection outcomes. While a few automated solutions exist, they lack the sophistication of modern deep learning models and are typically costly to implement. As a result, the industry requires a more robust, reliable, and cost-effective solution for effective defect detection.
3.2 Disadvantages
Low detection accuracy and limited defect types recognized.
Inability to perform real-time detection, causing delays in quality control.
Poor integration with web-based applications, limiting usability.
Requires extensive computational resources for defect analysis.
User interface often lacks responsiveness and ease of interaction.
3.3 Proposed System:
The proposed system leverages YOLOv8, a cutting-edge deep learning model, for high-speed, real-time detection of six key defect types on steel surfaces. By implementing a Flask-based Python backend and a responsive frontend in HTML, CSS, and JavaScript, this system provides a seamless user experience. This approach significantly reduces reliance on manual inspection, enhances defect detection precision, and optimizes production workflows. The system’s architecture allows for easy integration into existing production lines, making it a scalable and cost-effective solution that meets the needs of large-scale industrial environments while improving product quality and operational efficiency.
3.4 Advantages
Enhanced detection accuracy using YOLOv8 for six specific steel defect types.
Real-time detection and classification, allowing immediate feedback.
Lightweight integration with Flask for accessible, web-based interaction.
Improved resource efficiency with YOLOv8's streamlined architecture.
User-friendly interface for seamless defect inspection and management.
- REQUIREMENT ANALYSIS
4.1 Functional and non-functional requirements
Requirement’s analysis is very critical process that enables the success of a system or software project to be assessed. Requirements are generally split into two types: Functional and non-functional requirements.
Functional Requirements: These are the requirements that the end user specifically demands as basic facilities that the system should offer. All these functionalities need to be necessarily incorporated into the system as a part of the contract. These are represented or stated in the form of input to be given to the system, the operation performed and the output expected. They are basically the requirements stated by the user which one can see directly in the final product, unlike the non-functional requirements.
Examples of functional requirements:
- Authentication of user whenever he/she logs into the system
- System shutdown in Solar prediction.
- A verification email is sent to user whenever he/she register for the first time on some software system.
Non-functional requirements: These are basically the quality constraints that the system must satisfy according to the project contract. The priority or extent to which these factors are implemented varies from one project to other. They are also called non-behavioral requirements.
They basically deal with issues like:
• Portability
• Security
• Maintainability
• Reliability
• Scalability
• Performance
• Reusability
• Flexibility
Examples of non-functional requirements:
- Emails should be sent with a latency of no greater than 12 hours from such an activity.
- The processing of each request should be done within 10 seconds
- The site should load in 3 seconds whenever of simultaneous users are > 10000
4.2 Hardware Requirements
Operating system : Windows 7 or 7+
RAM : 8 GB
Hard disc or SSD : More than 500 GB
Processor : Intel 3rd generation or high or Ryzen with 8 GB Ram
4.3 Software Requirements:
Software’s : Python 3.10 or high version
IDE : Visual Studio Code.
Framework : Flask
IDE/Workbench : PyCharm
Technology : Python 3.6+
Server Deployment : Xampp Server
Database : MySQL
4.4Architecture
- SYSTEM DESIGN
5.1 Introduction of Input Design:
In an information system, input is the raw data that is processed to produce output. During the input design, the developers must consider the input devices such as PC, MICR, OMR, etc.
Therefore, the quality of system input determines the quality of system output. Well-designed input forms and screens have following properties −
• It should serve specific purpose effectively such as storing, recording, and retrieving the information.
• It ensures proper completion with accuracy.
• It should be easy to fill and straightforward.
• It should focus on user’s attention, consistency, and simplicity.
• All these objectives are obtained using the knowledge of basic design principles regarding −
o What are the inputs needed for the system?
o How end users respond to different elements of forms and screens.
Objectives for Input Design:
The objectives of input design are −
• To design data entry and input procedures
• To reduce input volume
• To design source documents for data capture or devise other data capture methods
• To design input data records, data entry screens, user interface screens, etc.
• To use validation checks and develop effective input controls.
Output Design:
The design of output is the most important task of any system. During output design, developers identify the type of outputs needed, and consider the necessary output controls and prototype report layouts.
The objectives of input design are:
• To develop output design that serves the intended purpose and eliminates the production of unwanted output.
• To develop the output design that meets the end user’s requirements.
• To deliver the appropriate quantity of output.
• To form the output in appropriate format and direct it to the right person.
• To make the output available on time for making good decisions.
5.2 UML Diagrams:
UML DIAGRAMS
UML stands for Unified Modelling Language. UML is a standardized general-purpose modelling language in the field of object-oriented software engineering. The standard is managed, and was created by, the Object Management Group.
The goal is for UML to become a common language for creating models of object-oriented computer software. In its current form UML is comprised of two major components: a Meta-model and a notation. In the future, some form of method or process may also be added to; or associated with, UML.
The Unified Modelling Language is a standard language for specifying, Visualization, Constructing and documenting the artefacts of software system, as well as for business modelling and other non-software systems.
The UML represents a collection of best engineering practices that have proven successful in the modelling of large and complex systems.
The UML is a very important part of developing objects-oriented software and the software development process. The UML uses mostly graphical notations to express the design of software projects.
GOALS:
The Primary goals in the design of the UML are as follows:
- Provide users a ready-to-use, expressive visual modelling Language so that they can develop and exchange meaningful models.
- Provide extendibility and specialization mechanisms to extend the core concepts.
- Be independent of particular programming languages and development process.
- Provide a formal basis for understanding the modelling language.
- Encourage the growth of OO tools market.
- Support higher level development concepts such as collaborations, frameworks, patterns and components.
- Integrate best practices.
5.3 USE CASE DIAGRAM
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram defined by and created from a Use-case analysis.
Its purpose is to present a graphical overview of the functionality provided by a system in terms of actors, their goals (represented as use cases), and any dependencies between those use cases.
The main purpose of a use case diagram is to show what system functions are performed for which actor. Roles of the actors in the system can be depicted.
CLASS DIAGRAM
In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among the classes. It explains which class contains information.
SEQUENCE DIAGRAM
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that shows how processes operate with one another and in what order.
It is a construct of a Message Sequence Chart. Sequence diagrams are sometimes called event diagrams, event scenarios, and timing diagrams
DEPLOYMENT DIAGRAM
Deployment diagram represents the deployment view of a system. It is related to the component diagram. Because the components are deployed using the deployment diagrams. A deployment diagram consists of nodes. Nodes are nothing but physical hardware’s used to deploy the application.
ACTIVITY DIAGRAM:
Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the Unified Modelling Language, activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. An activity diagram shows the overall flow of control.
COMPONENT DIAGRAM:
A component diagram, also known as a UML component diagram, describes the organization and wiring of the physical components in a system. Component diagrams are often drawn to help model implementation details and double-check that every aspect of the system's required function is covered by planned development.
ER DIAGRAM:
An Entity–relationship model (ER model) describes the structure of a database with the help of a diagram, which is known as Entity Relationship Diagram (ER Diagram). An ER model is a design or blueprint of a database that can later be implemented as a database. The main components of E-R model are: entity set and relationship set.
An ER diagram shows the relationship among entity sets. An entity set is a group of similar entities and these entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in database, so by showing relationship among tables and their attributes, ER diagram shows the complete logical structure of a database. Let’s have a look at a simple ER diagram to understand this concept.
DFD DIAGRAM:
A Data Flow Diagram (DFD) is a traditional way to visualize the information flows within a system. A neat and clear DFD can depict a good amount of the system requirements graphically. It can be manual, automated, or a combination of both. It shows how information enters and leaves the system, what changes the information and where information is stored. The purpose of a DFD is to show the scope and boundaries of a system as a whole. It may be used as a communications tool between a systems analyst and any person who plays a part in the system that acts as the starting point for redesigning a system.
Contrast Level:
Level 1 Diagram
Level 2 Diagram
-
IMPLEMENTATION AND RESULTS
6.1 Modules
-
Users can upload a dataset, which is a crucial initial step for the system to work with relevant data. This dataset likely contains historical information or examples that the system will use for its predictions.
-
Users have the capability to view the dataset they've uploaded. This feature helps users confirm the data they've provided and ensures transparency in the process.
-
Users need to input specific values or parameters into the system to request predictions or results. These input values likely correspond to the variables or features in the dataset.
6.2 System
Take the Dataset: The system accepts and processes the dataset provided by the user. This dataset forms the foundation for building the predictive model.
Preprocessing: Before training a predictive model, the system preprocesses the dataset. This includes handling missing data, data cleaning, and feature extraction. Preprocessing ensures that the data is in a suitable format for modeling.
Training: The system uses machine learning techniques and Python modules to train a model based on the preprocessed dataset. The model learns patterns and relationships within the data, allowing it to make predictions.
Generate Results: Once the model is trained, the system can generate results based on user input values. These results typically indicate whether the input data corresponds to a specific condition, event, or prediction, such as Medical Insurance Cost
6.3 Algorithms:
6.3.1 YOLO v8:
YOLO (You Only Look Once) v8 is the latest version of the YOLO family of object detection models, widely used for real-time object detection. Like its predecessors, YOLOv8 aims to balance speed and accuracy, making it ideal for applications requiring high-performance object detection. YOLO models treat object detection as a single regression problem, which makes them much faster than other approaches that involve multiple steps or region proposals.
How YOLOv8 Works
- Input Image Processing
The input image is resized to a fixed size, typically (640 \times 640) pixels, and normalized to a range of values (typically between 0 and 1).
YOLOv8 divides the image into a grid and applies a CNN to the image, extracting features from it.
- Backbone Network
YOLOv8 uses a CSP-Darknet (Cross Stage Partial Darknet) as its backbone, which helps in feature extraction. This network is a convolutional neural network (CNN) that captures spatial features from the input image.
The backbone reduces the dimensions and increases the depth of feature maps through several convolutional layers.
- Feature Pyramid Network (FPN) and Path Aggregation Network (PAN)
YOLOv8 incorporates FPN and PAN structures to enhance feature extraction across scales, capturing both high-level and low-level features.
FPN extracts features at different levels, ensuring that objects of various sizes are captured effectively. PAN further aggregates these features to improve spatial understanding.
- Head and Detection Layers
The head is responsible for predicting bounding boxes and class probabilities.
YOLOv8 uses multiple scales (typically 3) to predict objects, improving accuracy across small, medium, and large objects. Each scale is connected to detection layers that output bounding box coordinates, objectness score, and class probability.
- Bounding Box Prediction
YOLOv8 predicts bounding box coordinates using anchor boxes and regression.
Each grid cell predicts several bounding boxes (based on anchor boxes) for each scale.
The bounding box is parameterized by:
( t_x, t_y ): Offsets of the center of the bounding box relative to the grid cell.
( t_w, t_h ): Width and height scales relative to the anchor box.
- Formula for Bounding Box
If ( c_x ) and ( c_y ) are the cell center coordinates, the bounding box center coordinates ( b_x ) and ( b_y ) are:
The width ( b_w ) and height ( b_h ) are derived as:
Here, ( p_w ) and ( p_h ) are the dimensions of the anchor box, and ( \sigma ) is the sigmoid function, which keeps ( t_x ) and ( t_y ) values between 0 and 1.
7. Objectness Score and Class Prediction
Each bounding box is assigned an objectness score that represents the probability that a detected object is present in the bounding box.
The objectness score is computed using the logistic regression model. For each bounding box, YOLOv8 computes a class score to determine the likelihood of each class.
8. Non-Maximum Suppression (NMS)
YOLOv8 applies Non-Maximum Suppression (NMS) to remove redundant bounding boxes for the same object.
This is done by calculating the Intersection over Union (IoU) for pairs of bounding boxes:
Boxes with IoU scores above a threshold (e.g., 0.5) are suppressed, retaining only the most confident box for each detected object.
9. Loss Function
YOLOv8 optimizes the following loss components:
Localization Loss (IoU Loss): Measures the difference between predicted and ground truth bounding boxes.
Confidence Loss: Measures the accuracy of the model’s objectness score.
Classification Loss: Measures the accuracy of the predicted class label.
YOLOv8 Loss Formula
The combined loss function for YOLOv8 is as follows:
where:
- ( \lambda_{\text{loc}}, \lambda_{\text{conf}}, \lambda_{\text{cls}} ) are the weights assigned to each component.
- Localization Loss often uses IoU-based metrics.
- Confidence Loss uses binary cross-entropy between predicted and true objectness scores.
- Classification Loss uses cross-entropy for multi-class classification.
Results:
This summary shows the validation results of a YOLO model after 100 training epochs. Each defect class (e.g., crazing, inclusion) has metrics like precision (P), recall (R), mAP@50, and mAP@50-95. The overall metrics indicate moderate performance, with high precision and recall in some classes (e.g., patches, scratches) and lower values in others, suggesting varied accuracy across classes. Results are saved for further analysis.
This box loss learning curve depicts training and validation box losses over 100 epochs. The training loss steadily decreases, showing effective learning. The validation loss, however, fluctuates and stabilizes at a higher level, indicating potential difficulty in generalization or some overfitting. Tuning may help reduce validation loss.
This classification loss learning curve illustrates the reduction in training and validation losses across 100 epochs. Both losses initially drop sharply, indicating effective learning. Later, the curves stabilize and converge, suggesting minimal overfitting and good model generalization. The close alignment reflects consistency between training and validation performance.
This focal loss learning curve shows training and validation loss over 100 epochs. Training loss (solid line) steadily decreases, indicating model improvement. Validation loss (dashed line) fluctuates but stabilizes, highlighting potential overfitting or noise. The gap between curves suggests a need for further tuning to enhance generalization.
This normalized confusion matrix illustrates classification accuracy across defect types. The diagonal values represent correct predictions, with higher values indicating better accuracy. Off-diagonal values show misclassifications, where a row class was incorrectly predicted as a column class. Strong accuracy in some classes, like "scratches," contrasts with lower performance in others like "crazing."
This bar chart presents key model performance metrics, including precision, recall, mAP50, mAP50-95, and fitness scores. Higher precision and recall indicate strong classification performance, while mAP50 and mAP50-95 represent average precision at different IoU thresholds, showing detection accuracy. The fitness score reflects overall model optimization.
This plot visualizes training and validation losses, key metrics (precision, recall, mAP50, mAP50-95), and learning rates across epochs, showing model performance improvement and learning rate adjustment over time.
6.4 OUTPUT SCREENS:
HOME PAGE:
This interface enables users to, facilitating Register and login to model home page and prediction and training page
REGISTRATION:
This page allows users to register for services, ensuring secure access by requiring personal details and password confirmation. It provides a user-friendly interface for creating a secure account.
Login Page
This page provides a secure login interface for users to access the prediction account using their email and password.
Home page
This interface enables users facilitating Selection the dataset uploads and model training and prediction and evaluation to achieve precise predictive outcomes.
ABOUT PAGE:
The project predicts using machine learning models, emphasizing interpretability and superior accuracy with ensemble methods.
Prediction page
This page collects user input for various parameters to predict the new values
- SYSTEM STUDY AND TESTING
7.1 System Testing
The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub-assemblies, assemblies and/or a finished product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.
7.2.1 Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is functioning properly, and that program inputs produce valid outputs. All decision branches and internal code flow should be validated. It is the testing of individual software units of the application .it is done after the completion of an individual unit before integration. This is a structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform basic tests at component level and test a specific business process, application, and/or system configuration. Unit tests ensure that each unique path of a business process performs accurately to the documented specifications and contains clearly defined inputs and expected results.
7.2.2 Integration testing
Integration tests are designed to test integrated software components to determine if they actually run as one program. Testing is event driven and is more concerned with the basic outcome of screens or fields. Integration tests demonstrate that although the components were individually satisfaction, as shown by successfully unit testing, the combination of components is correct and consistent. Integration testing is specifically aimed at exposing the problems that arise from the combination of components.
Software integration testing is the incremental integration testing of two or more integrated software components on a single platform to produce failures caused by interface defects.
The task of the integration test is to check that components or software applications, e.g. components in a software system or – one step up – software applications at the company level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant participation by the end user. It also ensures that the system meets the functional requirements.
Test Results: All the test cases mentioned above passed successfully. No defects encountered.
7.2.3 Functional testing
Functional tests provide systematic demonstrations that functions tested are available as specified by the business and technical requirements, system documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.
Organization and preparation of functional tests is focused on requirements, key functions, or special test cases. In addition, systematic coverage pertaining to identify Business process flows; data fields, predefined processes, and successive processes must be considered for testing. Before functional testing is complete, additional tests are identified and the effective value of current tests is determined.
7.2.4 White Box Testing
White Box Testing is a testing in which in which the software tester has knowledge of the inner workings, structure and language of the software, or at least its purpose. It is purpose. It is used to test areas that cannot be reached from a black box level.
7.2.5 Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner workings, structure or language of the module being tested. Black box tests, as most other kinds of tests, must be written from a definitive source document, such as specification or requirements document, such as specification or requirements document. It is a testing in which the software under test is treated, as a black box. you cannot “see” into it. The test provides inputs and responds to outputs without considering how the software works.
Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed
• All links should take the user to the correct page.
• Test cases Model building:
S.NO Test cases I/O Expected O/T Actual O/T P/F
1 Read the datasets. Dataset’s path. Datasets need to read successfully. Datasets fetched successfully. It produced P. If this not F will come
2 Registration Valid username, email, password. Verify that the registration form accepts valid user inputs and successfully creates a new account. User is successfully registered, and an account is created It produced P. If this is not, it will undergo F.
3 Login Valid username and password Verify that users can log in with valid credentials User is successfully logged in and redirected to the dashboard It produced P. If this is not, it will undergo F.
4 Find out
Classification results Input Related to the dataset Output as predicted classification of the results Output as predicted classification of results It produced predicted classes
- CONCLUSION
The "Steel Surface Defect Detection" project efficiently identifies six types of defects—crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches—on steel surfaces using the YOLOv8 model. This solution combines a robust backend in Python, powered by Flask, with a responsive front end using HTML, CSS, and JavaScript. The model accurately pinpoints surface defects, streamlining quality control processes in steel manufacturing. This tool enhances productivity, minimizes human error, and supports the industry’s pursuit of higher standards in defect detection, ultimately leading to cost savings and improved product quality.
- FUTURE ENHANCEMENT
Future enhancements could involve integrating real-time monitoring for continuous defect detection on steel production lines. Expanding the model to include more defect classes and training it on a broader dataset will increase its versatility and accuracy. Additionally, using a cloud-based platform for data storage and processing could support scalable deployment across multiple locations. Implementing a dashboard with advanced analytics could provide insights into defect trends, allowing for predictive maintenance and improved quality control strategies. These enhancements will further streamline manufacturing processes and drive more efficient and proactive defect management.
References
[1] A. Landstrom and M. J. Thurley, ‘‘Morphology-based crack detection for steel slabs,’’ IEEE J. Sel. Topics Signal Process., vol. 6, no. 7, pp. 866–875, Nov. 2012.
[2] K. Song and Y. Yan, ‘‘A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects,’’ Appl. Surf. Sci., vol. 285, pp. 858–864, Nov. 2013, doi: 10.1016/j.apsusc.2013.09.002.
[3] Y. J. Jeon, D. Choi, S. J. Lee, J. P. Yun, and S. W. Kim, ‘‘Steel-surface defect detection using a switching-lighting scheme,’’ Appl. Opt., vol. 55, no. 1, pp. 47–57, 2016, doi: 10.1364/AO.55.000047.
[4] R. Girshick, J. Donahue, T. Darrell, U. Berkeley, and J. Malik, ‘‘R-CNN: Region-based convolutional neural networks,’’ in Proc. Comput. Vis. Pattern Recognit., Jun. 2014, pp. 2–9. 148824 VOLUME 12, 2024 T. Zhang et al.: GDM-YOLO: A Model for Steel Surface Defect Detection Based on YOLOv8s
[5] R. Girshick, ‘‘Fast R-CNN,’’ in Proc. IEEE Int. Conf. Comput. Vis. (ICCV), Dec. 2015, pp. 1440–1448.
[6] K. He, X. Zhang, S. Ren, and J. Sun, ‘‘Spatial pyramid pooling in deep convolutional networks for visual recognition,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 37, no. 9, pp. 1904–1916, Sep. 2015, doi: 10.1109/TPAMI.2015.2389824.
[7] S. Ren, K. He, R. Girshick, and J. Sun, ‘‘Faster R-CNN: Towards real-time object detection with region proposal networks,’’ IEEE Trans. Pattern Anal. Mach. Intell., vol. 39, no. 6, pp. 1137–1149, Jun. 2017.
[8] Y. Xu, D. Li, Q. Xie, Q. Wu, and J. Wang, ‘‘Automatic defect detection and segmentation of tunnel surface using modified mask R-CNN,’’ Measurement, vol. 178, Jun. 2021, Art. no. 109316.
[9] M. Chen, L. Yu, C. Zhi, R. Sun, S. Zhu, Z. Gao, Z. Ke, M. Zhu, and Y. Zhang, ‘‘Improved faster R-CNN for fabric defect detection based on Gabor filter with genetic algorithm optimization,’’ Comput. Ind., vol. 134, Jan. 2022, Art. no. 103551.
[10] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, ‘‘You only look once: Unified, real-time object detection,’’ in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2016, pp. 779–788.
[11] C.-Y. Wang, A. Bochkovskiy, and H.-Y.-M. Liao, ‘‘YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors,’’ in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun., vol. 2023, pp. 7464–7475.
[12] J. Redmon and A. Farhadi, ‘‘YOLOv3: An incremental improvement,’’ 2018, arXiv:1804.02767.
[13] Z. Ge, S. Liu, F. Wang, Z. Li, and J. Sun, ‘‘YOLOX: Exceeding YOLO series in 2021,’’ 2021, arXiv:2107.08430.
[14] M. Ma and H. Pang, ‘‘SP-YOLOv8s: An improved YOLOv8s model for remote sensing image tiny object detection,’’ Appl. Sci., vol. 13, no. 14, p. 8161, Jul. 2023, doi: 10.3390/app13148161.
[15] H. Nie, H. Pang, M. Ma, and R. Zheng, ‘‘A lightweight remote sensing small target image detection algorithm based on improved YOLOv8,’’ Sensors, vol. 24, no. 9, p. 2952, May 2024,