Professional Documents
Culture Documents
Group 42 Report Final
Group 42 Report Final
1. Introduction:
This project aims to address the challenges of manual gear inspection in
automobile transmission systems by developing an advanced system that employs
computer vision algorithms and machine learning techniques to monitor and
inspect the quality of products or processes in real-time. It utilizes cameras or
sensors to capture live images or video feeds, which are then analyzed and
processed to detect defects or deviations from predetermined quality standards.
Manual inspection is a time-consuming and tedious task that adds to the costs,
particularly for small and medium enterprise industries (SMEs). The proposed
solution utilizes image processing techniques, such as histogram analysis and
quadratic distance, to assess color concentration.[7] Additionally, depth inspection
is conducted using vertical and horizontal reference levels. The project primarily
focuses on Convolutional Neural Networks (CNNs) for image recognition and
processing in order to inspect manufactured gears. Gears play a crucial role in
automobile transmissions, directly impacting the vehicle's overall performance
and the functionality of the transmission system. Transmission faults are
responsible for approximately one-third of automobile chassis issues, with gear
problems being the most common. Despite mature design, materials, and
manufacturing techniques, defects such as dimensional deviations, surface
scratches, crushing, dents, and insufficient filling can occur in high-speed
production lines. Defective gears not only compromise car performance but also
pose security risks and result in significant losses for manufacturers. Due to the
complex shape and structure of gears and the various types of defects they can
have, gear quality inspection is a challenging task. Current manual inspection
methods are inefficient, time-consuming, and fail to ensure consistent and stable
quality. The slow inspection speed also hampers the requirements of high-speed
production lines. While machine vision-based gear defect detection technology
exists, it is mainly focused on inspecting broken teeth and flat surfaces of
conventional gears. There is a lack of research on gears with complex shapes and
structures. Traditional single vision systems are inadequate for capturing
sufficient information due to the multiple measurement tasks and diverse defects
involved. The objective of this project is to develop a system that can quickly and
accurately measure multiple dimensions, detect defects, and classify them
accordingly. By leveraging advanced image recognition techniques, the proposed
solution aims to overcome the limitations of existing methods and provide an
efficient and effective gear inspection solution.[4]
To design and fabricate defect detecting machine for Gear which will analyse the
product by image processing for surface defects.
1.2 Objective
The main aim of the project is to convert the manual operation of surface inspection
into automatic process at the minimum possible cost and based on this following
objectives are to be made.
1.3 Scope
This initiative is specifically designed to address the quality assessment requirements
of small-scale industries engaged in mass production of gears. The project centers
around the creation of an automated, real-time vision-based quality inspection
monitoring system. By automating the inspection process, the project aims to overcome
the limitations of manual gear inspection, which is known to be laborious and time-
intensive. The primary objective is to achieve cost reduction, with a particular emphasis
on small and medium enterprise industries (SMEs).
2. LITERATURE SURVEY
• Sharifzadeh,S et. al had worked on detection of steel defect using the image
processing algorithms in his work. The paper focuses on detecting and classifying
surface defects in steel using image processing techniques. Specifically, the study
examines four common types of steel defects: holes, scratches, coil breaks, and rust.
The researchers applied various image processing algorithms to identify these
defects in steel surfaces. The results of their analysis demonstrate that the selected
algorithms perform well in detecting steel defects. The numerical findings indicate
the effectiveness of the implemented image processing algorithms for each type of
defect: holes, scratches, coil breaks, and rust. In simple terms, the paper discusses
how image processing algorithms can be used to detect and classify different types
of defects on steel surfaces. The researchers found that the algorithms they applied
worked effectively in identifying holes, scratches, coil breaks, and rust. While the
specific defects discussed in the paper are related to steel surfaces, the general
principles of defect detection and classification can be transferred to the context of
gear inspection. Understanding the methodologies and challenges addressed in the
paper can provide valuable knowledge and insights for designing and implementing
our gear defect detection system.
• Ruiling Liu et. al had worked on a bevel gear quality inspection system based on
multi-camera vision technology. They addressed the challenges associated with
manual inspection of surface defects and dimension measurement in automotive
bevel gears. The manual inspection process was found to be costly, inefficient,
slow, and inaccurate. To overcome these issues, the researchers developed a bevel
gear quality inspection system based on multi-camera vision technology. The
developed system is capable of simultaneously detecting surface defects and
measuring gear dimensions. Three efficient algorithms were proposed for this
purpose: Neighbourhood Average Difference (NAD), Circle Approximation
Method (CAM), and Fast Rotation-Position (FRP). These algorithms enable the
detection of various types of defects, including knock damage, cracks, scratches,
dents, and repeated cutting of the spline. The system achieves a high level of
precision in defect detection, with a minimum detectable defect size of 0.4 mm ×
0.4 mm. Additionally, the system demonstrates accurate dimension measurement
with a precision of approximately 40–50 µm. The inspection process itself is fast,
taking no more than 1.3 seconds to complete. Both the speed and precision of the
system meet the requirements of real-time online inspection in bevel gear
production. The findings from this study are highly relevant and beneficial for gear
defect detection using image processing. The proposed algorithms and the multi-
camera vision technology serve as valuable references for developing similar
systems that can detect and classify defects in gears. The research contributes to
• Maha Alghawazi et. al had worked on detection of sql injection attack using
machine learning techniques: a systematic literature review. They highlighted the
significance of SQL (Structured Query Language) as a means to interact with
database management systems. While research on detecting and preventing SQL
injection attacks has been ongoing, it remains a relevant and important area of study.
The authors proposed that the application of techniques from various domains can
enhance the detectability of these attacks. Artificial intelligence and machine
learning techniques have shown promise in controlling SQL injection attacks.
While the primary focus of this study is on SQL injection attacks, it may have
potential benefits and usefulness in the context of gear defect detection using image
processing. The techniques and methodologies discussed in the paper can serve as
a reference for exploring machine learning-based approaches to detect and classify
defects in gears. By leveraging the knowledge and insights gained from the study,
researchers in gear defect detection can potentially adapt and apply similar machine
learning techniques to enhance the accuracy and efficiency of their own systems.
Therefore, while the direct applicability of the paper to gear defect detection may
require adaptation and customization, the findings and methodologies presented can
offer valuable insights and serve as a foundation for the development of effective
defect detection systems in the field of gear manufacturing.
• Deepika S. et. al had worked on gear assembly fault analysis using dual-tree
complex wavelet transform. The paper highlights the diagnosis of gear faults by
employing this specific wavelet transform. The reference signal used for
comparison is the acoustic signal obtained from a healthy gear mesh. The study
analyzes gears with intentionally introduced defects in one or more teeth. The
proposed method achieves accurate measurement of the angles between damaged
teeth, allowing for effective fault analysis. Simulations are conducted to evaluate
the detection effectiveness of the method. Various parameters, including mean,
standard deviation, autocorrelation, and dynamic range, are measured to assess the
severity of the gear defects. By utilizing acoustic signals, the proposed method
enables gear defect identification and estimation of defect severity. This approach
proves useful in preventing gear teeth fractures and ensuring the overall health of
the gears and motors. Although the paper's focus is on gear fault analysis using the
dual-tree complex wavelet transform and acoustic signals, the principles and
techniques presented can be beneficial in gear defect detection using image
processing. Adapting the concepts and methodologies from this study can
potentially enhance gear defect detection systems by incorporating image
processing techniques. By combining image analysis with acoustic signal
processing, researchers can develop comprehensive and accurate gear defect
detection systems. Such systems can help improve gear reliability, prevent failures,
and optimize maintenance efforts in various industries that rely on gears.
3. Methodology
In the context of the gear defect detection project, the Data Flow Diagram (DFD) is
used to depict the flow of data within our system. The DFD0 represents the foundational
DFD, where rectangles represent inputs and outputs, while circles represent our system.
Moving to DFD1, we illustrate the actual input and output of the gear defect detection
system. The input can consist of text or images, while the output corresponds to the
detection of gear defects. Similarly, in DFD2, we demonstrate the operations performed
by both users and administrators. The DFD serves as a visual representation of how
data moves through our gear defect detection system. It allows us to understand the
interactions between inputs, system processes, and outputs at different stages. By
following the flow of data in the DFD, we can effectively design and optimize our
system to accurately detect and classify gear defects.
In the context of the gear defect detection project, the UML can be utilized as a powerful
tool for designing and documenting the system. It enables us to create different types
of UML diagrams to represent various aspects of the project. These diagrams can help
visualize the system architecture, specify the interactions and relationships between
different components, and document the artifacts related to gear defect detection.By
employing the UML in our project, we can enhance the clarity and communication
among project stakeholders, facilitate the understanding of the system design, and
ensure that the development process follows an effective and well-defined approach.
The availability of multiple UML diagrams provides flexibility in choosing the
appropriate diagram types that best suit the specific needs and requirements of the gear
defect detection project.
In our project, we utilized Anaconda as the platform for building the front end of the
software using Python. The Graphical User Interface (GUI) was developed and
executed on Spyder IDE. We imported various libraries such as tkinter and PIL to
display the Login and Registration buttons on the main page. The software consists of
two modules: Login and Registration, where users need to provide accurate details.
In the context of gear defect detection using image processing, extracting objects from
their background to create a binary image is crucial. This binary image serves as input
for the feature extraction process and plays a significant role in generating distinctive
features for class differentiation in pattern recognition. The paper we refer to proposes
an image processing algorithm that converts an RGB image into a binary image. The
algorithm successfully produces the desired object in the binary image.
The proposed image processing algorithm and the generation of binary images are
highly relevant and beneficial in the field of gear defect detection. By applying similar
techniques, researchers and practitioners can extract gear components from complex
backgrounds and isolate them into binary images for further analysis. This process
enables the identification and examination of specific regions within the gear images,
aiding in the detection and classification of defects. Thus, the algorithm presented in
the paper provides a valuable foundation for developing image processing methods
specifically tailored for gear defect detection.
To effectively run machine learning algorithms and utilize various high-level libraries,
a laptop should meet certain specifications:
5. Coding Language: Python version 3.5 is highly suitable for machine learning due to
the availability of high-performance libraries and frameworks.
The software must demonstrate efficient performance across all functions and
modules to ensure smooth user experience. The encryption process should be fast and
efficient. The virtual environment provided by the software should also deliver fast
performance. The modular design of the application allows for easy error detection
and resolution, facilitating the installation and integration of new functionalities when
necessary.
The software is designed with a modular approach, enabling easy detection and
resolution of errors. This design philosophy ensures seamless installation and updates
of new functionalities as needed.
Availability: The software is freely available to all users and can be easily accessed.
Reliability: The software exhibits high performance, enhancing its overall reliability.
User Friendliness: The software employs a graphical user interface (GUI) that
provides a user-friendly experience.
Integrity: The software ensures control over unauthorized access to software or data.
Testability: The software undergoes comprehensive testing to address all aspects of its
functionality.
Python :
Python is a popular programming language that was created in the early 1990s. It is
known for its easy-to-read syntax and supports various programming styles. Python is
often used for both small and large projects due to its versatility and extensive standard
library.
Python is dynamically typed, which means you don't have to explicitly declare variable
types, and it has a garbage collection system that automatically manages memory. It
offers features for structured, object-oriented, and functional programming.
The language has gone through several versions, with Python 3.0 being a major update
released in 2008. Python 2, the previous version, was officially discontinued in 2020,
with all support and updates ending. Python 3.6 and later versions are currently
supported.
Python can be used on different operating systems, and it has a large community of
developers who contribute to its development. The Python Software Foundation is a
non-profit organization that oversees the management and resources for Python.
Guido van Rossum, the creator of Python, started working on the language in the late
1980s. He initially developed Python as a successor to another programming language
called ABC. Van Rossum led the project for many years and made important decisions.
However, in 2018, he stepped back from his leadership role and formed a steering
council with other core developers to guide the future direction of Python.
Anaconda:
The distribution comes with over 250 pre-installed packages, and you can install
thousands of additional packages from PyPI and the conda package manage
One of the key features of Anaconda is its package management system called conda.
Unlike the pip package manager, conda takes care of managing dependencies between
packages. It ensures that installed packages are compatible and avoids conflicts that
may arise when different packages require different versions of the same library.
Anaconda also includes a graphical user interface called Anaconda Navigator, which
provides an alternative to the command line interface for managing packages and
environments.
With Anaconda, you can create custom environments and easily share them with others.
It supports building and uploading packages to Anaconda Cloud, PyPI, or other
repositories.
By using Anaconda, you can simplify the installation and management of packages for
data science and scientific computing projects, ensuring compatibility and avoiding
conflicts between dependencies.
1. Graphics User Interface (GUI) for the defect detection system has been developed.
Libraries Used:
1.Pillow
2.Keras
3.OpenCV
4.TensorFlow
5.Matplotlib
Tool Used
1) Anaconda Navigator
2)Spyder
The pack manager arranges widgets in a column or row, the grid manager
organizes them in a grid-like structure, and the place manager allows precise
widget placement on the screen.
Tkinter offers a broad range of widgets, including standard ones like buttons
and labels, as well as advanced options like scrollbars, canvas, and treeview.
Additionally, Tkinter provides pre-built dialogs for displaying messages,
gathering user input, or selecting files and directories.
import tkinter as tk
from tkinter import ttk, LEFT, END
from PIL import Image, ImageTk
from tkinter.filedialog import askopenfilename
from tkinter import messagebox as ms
##############################################+==============
===============================================
root = tk.Tk()
root.configure(background="brown")
# root.geometry("1300x700")
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry("%dx%d+0+0" % (w, h))
root.title("Gear Defected System")
# 43
# ++++++++++++++++++++++++++++++++++++++++++++
#####For background Image
image2 = Image.open('ui.jpg')
image2 = image2.resize((1800, 900), Image.ANTIALIAS)
background_image = ImageTk.PhotoImage(image2)
background_label.image = background_image
#T1.tag_configure("center", justify='center')
#T1.tag_add("center", 1.0, "end")
################################$%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
#def clear_img():
# img11 = tk.Label(root, background='bisque2')
# img11.place(x=0, y=0)
#############################################################
####$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%
################################$%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%
# def cap_video():
# video1.upload()
# #from subprocess import call
# #call(['python','video_second.py'])
def reg():
from subprocess import call
call(["python","registration.py"])
def log():
from subprocess import call
call(["python","login.py"])
def window():
root.destroy()
This defines a sequential model with three convolutional layers, each followed by
a max pooling layer, and two fully connected layers. The input shape of the first
layer is (32, 32, 3), which corresponds to the shape of the input images.
Code:
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
#from keras.optimizers import SGD,RMSprop,Adam
from keras.utils import np_utils
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import os
#import theano
from PIL import Image
from numpy import *
# SKLEARN
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
#from Alexnet import AlexNet
# number of channels
img_channels = 3
This loads the saved model from the specified file path.
4. Make predictions:
y_pred = model.predict(X_new)
This uses the `predict` method of the model to make predictions on the new data.
3. Make predictions:
y_pred = model.predict(img)
This uses the `predict` method of the model to make predictions on the input
image.
4. Get the predicted class label:
class_idx = np.argmax(y_pred)
class_label = class_names[class_idx]
This gets the index of the predicted class with the highest probability and looks up
the corresponding class label in a list of class names. The output of the above code
will be the predicted class label for the input image.
6. Costing:
5. Stand (Brolaviya, 29 Inch arm, 3.5 Inch wide, Material: Iron) 1300
Total 3523
7. Future Scope:
Dimensional Analysis: Enhance the image processing algorithm to accurately
analyze and measure the dimensions of the gear, such as diameter, width, tooth
thickness, and pitch.
Automatic Defect Detection: Extend the image processing capabilities to not only
detect defects but also analyze their impact on gear dimensions. This could help
identify if defects are causing any dimensional deviations.
Machine Learning and Artificial Intelligence: Explore the use of machine learning
and AI techniques to train models that can predict gear dimensions based on input
parameters or analyse complex gear geometries that are difficult to measure
directly.
8. Conclusion:
In conclusion, Convolutional Neural Networks (CNNs) have become a popular
approach for image classification due to their ability to learn and extract features
from images. By stacking convolutional layers, pooling layers, and fully
connected layers, CNNs can learn complex patterns and structures from raw image
data.
1. Developing a defect-detecting machine to accurately identify gear defects,
automating the inspection process and ensuring consistent quality in gear
manufacturing.
2. Reducing inspection time through the implementation of automated systems and
image processing techniques, resulting in increased productivity and cost savings.
3. Enhancing the accuracy of defect detection by leveraging advanced algorithms
and machine learning, leading to higher-quality gears and improved customer
satisfaction.
4. Designing a user-friendly GUI to simplify operation, allowing for easy interaction,
parameter input, visualization of gear images, and access to inspection results.
This improves user experience and maximizes the efficiency of the defect-
detecting machine.
REFERENCES
1. das, A. (n.d.). A comprehensive guide towards working with CNN in Python.
12. X. Cao, W. X. (2020). Defect detection meth od for rail surface based on line-
structured light,” Measurement, vo l. 159. 107771.
13. X. Lv, F. D. (2020). Deep Metallic Surface Defect Detection. The New
Benchmark and Detection Network,” Sensors, vol. 20.