GEMS NEW MILLENNIUM SCHOOL
ARTIFICIAL INTELLIGENCE PROJECT REPORT ON
Second Eye
Submitted by: Mohammad Ayman Rasheed
Guided by: Shyni Sulthan
Day & Date: 01/02/2023
Class : Grade 10B
AI for ALL Certificate
Ayman Rasheed
Abstract
This project focuses on a colour blindness app designed to help
individuals suffering from the condition. The app provides a variety of
features designed to make everyday tasks easier for people with
colour blindness, such as shopping and driving. In addition, the app
will provide education and resources to help those dealing with the
condition, such as information on driver's license requirements and
other legal restrictions.
The app has the potential to greatly improve the quality of life for
those affected by colour blindness, by providing them with a tool to
help them navigate their day-to-day lives
“Second Eye” is a powerful and innovative tool designed to help
those with colour blindness. It uses a combination of Python code
and computer vision to detect colours and provide educational
resources and features to those with colour blindness.
The app works by first recognizing the colours in the environment. It
then uses the recognition to provide resources and features such as
colour-coded maps, with colours based on the individual’s
preference of colours, and tools to help identify colours.
Additionally, the app also provides educational resources on colour
theory and colour blindness, as well as support and resources for
those with colour blindness.
With ‘Second Eye’, individuals with colour blindness can gain a better
understanding of the world around them and make their lives easier.
Introduction
Artificial Intelligence (AI) refers to the simulation of human intelligence
in computers.
The development of AI involves creating algorithms and models that
enable machines to perform tasks that typically require human
intelligence, such as visual perception, speech recognition, decision-
making, and language translation.
In relation to computer vision, AI has made significant progress in the
field of image and video analysis. The development of convolutional
neural networks (CNNs) has greatly improved the accuracy of image
classification and object detection tasks.
AI-powered computer vision systems can now perform tasks such as
identifying objects and people in images, tracking movements in videos,
and detecting objects in real-time video streams.
With further advancements, AI will play an increasingly important role in
various industries such as automotive, healthcare, security, and
entertainment.
Problem Statement
Colour blindness is a genetic condition that affects the ability to
perceive certain colours. People with colour blindness have
difficulty distinguishing between certain colour combinations, which
can lead to a range of challenges in their daily lives.
Some of the obstacles faced by people with colour blindness
include:
Difficulty in reading colour-coded information: People with
colour blindness may have trouble reading colour-coded maps,
graphs, and charts, which can lead to confusion and
misinterpretation of data.
Difficulty in identifying objects and selecting clothes: People
with colour blindness may have trouble identifying different
objects based on their colour, and difficulty matching clothes
and accessories, which can lead to fashion mishaps.
Difficulty in educational and occupational settings: People
with colour blindness may have difficulty in educational and
occupational settings that require the ability to differentiate
between colours, such as in the fields of science, engineering,
and art.
Overall, colour blindness can pose significant challenges for those
affected by it, and it is important to raise awareness and provide
support to help mitigate these obstacles.
Literature Survey
Artificial Intelligence (AI) has shown promising results in addressing
the problem of colour blindness. A literature survey on AI and colour
blindness would reveal several studies that focus on developing AI-
powered solutions to help people with colour blindness.
Colour Blindness Simulation: AI algorithms have been developed
to simulate the experience of colour blindness, enabling
individuals to experience how colours are perceived by people
with different types of colour blindness.
Colour Palette Generation: AI algorithms have been developed to
generate colour palettes that are easier to distinguish for
people with colour blindness.
Colour Correction in Computer Graphics: AI algorithms have
been used to correct the colours in computer graphics to make
them more accessible for people with colour blindness.
These studies demonstrate that AI has the potential to greatly
improve the lives of people with colour blindness by providing them
with new tools and technologies to overcome their visual
limitations.
However, more research is needed to fully understand the potential
of AI in addressing colour blindness, and to develop solutions that
are both effective and practical for everyday use.
AI Project Cycle (4W Canvas)
The 4W Canvas for an AI-powered app to help people with colour
blindness would look something like this:
Who: The target audience for the app would be people
with colour blindness, including those who have mild to severe
forms of the condition.
What: The app would be designed to detect colours and
provide educational resources and features to help people with
colour blindness.
When: The app could be developed and released for use
as soon as possible, with ongoing updates and improvements based
on user feedback and changing technological advancements.
Where: The app would be developed for use on mobile
devices, such as smartphones and tablets, making it accessible and
convenient for users. The app could also be made available for
download from app stores, such as the Apple App Store and Google
Play Store.
In conclusion, The app would be designed to be user-friendly and
accessible, providing educational resources and features to help
people with colour blindness in their day-to-day lives.
System Map
Data Acquisition
The prevalence of colour blindness affects around 8% of men and
0.5% of women of Northern European descent. Colour blindness can
be caused by genetic factors, and the prevalence can vary based on
ethnicity and geographic location.
For example, in some countries in Africa and Asia, the prevalence of
colour blindness can be as high as 20%. The incidence of colour
blindness can also increase with age.
However, exact statistics on the number of people with colour
blindness are not widely available, and the numbers can vary
depending on the methods used to assess and diagnose colour
blindness
Existing apps and programs such as : Colourblind Assistant - A
browser extension that helps colourblind people see web pages by
altering their appearance or EnChroma - A company that offers
glasses for colour blindness that enhance colour discrimination and
many other programs such as Colour Oracle and Colour Safe simply
provide colour filters or use static palettes for colour representation
Whereas "Second Eye" project uses computer vision and python. It
lies under the domain of Assistive Technology, which refers to the use
of technology to support individuals with disabilities or special
needs to perform tasks that might otherwise be difficult or
impossible.
It's different from existing programs and tools for colourblind people
as it uses computer vision to detect colours and provide real-time
feedback
Computer vision is a field of study within computer science and
artificial intelligence that focuses on enabling computers to
interpret and understand visual information from the world in the
same way that humans do. The goal of computer vision research is to
develop algorithms and models that can automatically analyze digital
images and videos.
Computer vision plays an important role in assistive technology, as it
enables computers to interpret and understand visual information in
a way that can support individuals with disabilities or special needs.
In the context of assistive technology, computer vision can be used
for tasks such as object recognition, scene analysis, and facial
expression recognition, among others. This information can then be
used to provide feedback and support to individuals with disabilities,
such as helping those with low vision to navigate their environment
or assisting individuals with cognitive disabilities in performing
daily tasks.
By leveraging the capabilities of computer vision and other AI
technologies, assistive technology has the potential to revolutionize
the way in which individuals with disabilities and special needs lives,
work, and interact with the world around them.
Data Exploration
Modelling
The Python code that detects colours and provides educational resources based on
different types of colour blindness works by:
1. The code starts by importing the required libraries, cv2 and numpy.
We will use OpenCV (cv2) for capturing the webcam and processing the images, and
Numpy for manipulating arrays and performing mathematical operations.
2. Define the color boundaries in the HSV format:
These arrays define the lower and upper bounds for each color in the HSV format. The
values in the arrays are the Hue, Saturation, and Value values, respectively.
3. Initialize the webcam:
The VideoCapture function from OpenCV captures the webcam and returns a
VideoCapture object, which is stored in the cap variable. The argument 0 tells
OpenCV to use the default camera (usually the built-in webcam).
4. Start a loop to continuously capture the webcam and capture the
frame from the webcam:
The read method of the cap VideoCapture object returns the return value 'ret' and the
captured frame frame. The 'ret' value is a Boolean indicating whether the frame was
captured successfully.
This loop will run continuously until we press the q key, which will break the loop and
end the program.
5. Convert the frame to the HSV format::
The cvtColor function from OpenCV converts the captured frame from the BGR format
to the HSV format. This allows us to easily compare the color values in the frame with
our color boundaries.
6. Get the middle 10 pixels in HSV:
This line gets the 10 pixels in the middle of the frame in the HSV format. It does this by
slicing the 'hsv' array with the indices hsv.shape[0]//2-5:hsv.shape[0]//2+5 and
hsv.shape[1]//2-5:hsv.shape[1]//2+5. The 'shape' method returns the dimensions of the
hsv array, and the '//' operator performs integer division to get the middle row and
column of the frame.
7.Get the average color of the middle pixels:
The np.mean function is used to calculate the average color of the middle
pixels. The axis argument is used to specify the axis along which the
mean should be calculated. In this case, the mean is calculated along
both the row and column axes.
8. Check color:
The code checks if the average color falls within the bounds of the color
boundaries for blue, red, or green. If the average color falls within the bounds,
the color is set to "BLUE", "RED", or "GREEN". If the average color does not fall
within the bounds, the color is set to "UNKNOWN".
9. Put the color information on the frame and display the frame:
The code uses the putText function from the OpenCV library to put the color
information on the frame. The first argument is the frame, the second argument is
the color information, the third argument is the position of the text, the fourth
argument is the font, the fifth argument is the font scale, the sixth argument is the
color of the text, and the seventh argument is the thickness of the text.
The code uses the imshow function from the OpenCV library to display the frame
with the color information on the top left corner.
10. Break the loop, release the webcam and close all windows:
Evaluation
In the evaluation phase, the following factors were considered:
Accuracy: The accuracy of the colour detection algorithm is
critical for the success of the program. The algorithm was tested
with images to evaluate its accuracy and also was tested live
User Experience: The program is made to be user-friendly and
easy to use. The user interface is simple and intuitive. The
resources provided are relevant and helpful.
Performance: The performance of the program should be
evaluated in terms of speed and memory usage. The program
should be optimized to provide a fast and responsive user
experience.
Conclusion
In conclusion, the program that uses python code to detect
colours and provide educational resources based on
different types of colour blindness has the potential to be a
valuable tool for the colourblind community.
Colour blindness is a condition that affects a significant
proportion of the population and can have a notable impact
on their daily lives. The development of the program involved
writing code to implement the solution.
The code was tested with sample images to check if it was
working as expected.
The program is based on a solid foundation of computer
vision techniques and has been carefully planned,
developed, evaluated, deployed, and maintained.
The success of the program will depend on its ability to
provide accurate and relevant information to the colourblind
community, as well as its user-friendly design and
accessibility.
Overall, this project has the potential to make a positive
impact on the lives of people with colour blindness.
Future Enhancements
There are several potential future enhancements that could be made such as:
Integration with other assistive technologies: The project could be
integrated with other assistive technologies, such as screen readers or
text-to-speech software, to make it even more accessible and user-friendly.
Improved colour detection accuracy: The accuracy of the colour detection
algorithm could be improved by using more advanced computer vision
techniques and training the model on a larger and more diverse dataset.
Expansion of educational resources: The program could be expanded to
include additional educational resources, such as video tutorials and
interactive simulations, to provide a more comprehensive understanding
of colour blindness and how it affects daily life.
Improved performance: The performance of the program could be
improved by optimizing the code and using more efficient algorithms. This
would allow the program to run smoothly on a wider range of devices,
including older and low-performance devices (such as a desktop
application, web application, or mobile application).
Multi-language support: The program could be translated into multiple
languages to make it accessible to a wider audience and reach more
people with colour blindness.
The future of the project will depend on the feedback received from users, the
advancements in computer vision and assistive technology, and the goals and
priorities of the development team. The program will be maintained and
updated regularly to fix bugs and improve the accuracy and performance of the
program. The feedback from users should be considered and used to improve
the program. The key is to continually evolve and improve the program to
better meet the needs of the colourblind community.