0% found this document useful (0 votes)
8 views29 pages

Portable Cataract Detection System

The document outlines a portable cataract detection and grading system utilizing a MobileNet model for improved accuracy in classifying cataract types. It details the implementation of an IoT system on a Raspberry Pi, including image processing, predictions, and database integration with Firebase and Cloudinary. Additionally, it provides technical specifications and circuit diagrams for the hardware components involved in the system.

Uploaded by

harshraut73
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

Portable Cataract Detection System

The document outlines a portable cataract detection and grading system utilizing a MobileNet model for improved accuracy in classifying cataract types. It details the implementation of an IoT system on a Raspberry Pi, including image processing, predictions, and database integration with Firebase and Cloudinary. Additionally, it provides technical specifications and circuit diagrams for the hardware components involved in the system.

Uploaded by

harshraut73
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

PORTABLE

CATARACT
DETECTION
AND GRADING
SYSTEM
INDEX
Sr. No. Title Page No.

1 Experimenting with mobilenet 1

2 IOT implementation 11

3 System schematic diagram 16

4 Circuit diagram 18

5 Raspberry Pi 4 Detailed Architecture 20


Experimenting with mobilenet for 1

better accuracy
● By training the model of different batch
sizes and same epochs

● By reducing the most misclassified classes


or irrelevant classes
-PSC
-NS ←—------------- Targeting NS classes
-Normal
-MC
-C
Experimenting with mobilenet for 2

better accuracy
Keeping NS1

Epochs, Batch size Accuracy


12,32 65%
12,64 64%
12,128 68%
12,256 63%
Experimenting with mobilenet for 3

better accuracy
Keeping NS2

Epochs, Batch size Accuracy


12,32 72%
12,64 73%
12,128 73.39%
12,256 75%
4

Experimenting with mobilenet for


better accuracy
Keeping NS3

Epochs, Batch size Accuracy


12,32 73%
12,64 71%
12,128 74%
12,256 70%
5

Experimenting with mobilenet for


better accuracy
Combining NS class

Epochs, Batch size Accuracy


12,32 72%
12,64 70%
12,128 69%
12,256 67%
6

Experimenting with mobilenet for


better accuracy
Removing Entire NS class

Epochs, Batch size Accuracy


12,32 85%
12,64 81%
12,128 79%
12,256 84%
7
Confusion Matrix for the best fit
models
(Without NS class)

12 epochs
32 batch size
8
Confusion Matrix for the best fit
models
(Without NS class)

12 epochs
64 batch size
9
Confusion Matrix for the best fit
models
(Without NS class)

12 epochs
128 batch size
10
Confusion Matrix for the best fit
models
(Without NS class)

12 epochs
256 batch size
11

IOT IMPLEMENTATION on Raspberry Pi

● Loads images
● Displays predictions on LCD
● Uploads the images on the database when
in network connection

Backend databases are:


1. Firebase
2. Cloudinary
12

Raspberry Pi after predictions

● Moving the images to a separate folder named


“predictions” for upload

● Images will be stored inside the folder with unique ID


as folder name

● Also json file is maintained to store the class of


cataract

● After uploading the images the folders are moved to


“uploaded” folder
13

Raspberry Pi after predictions

Directory
14

Backend : Firebase Realtime database


15

Backend : Cloudinary database


16

System Schematic Diagram

Digital
Camera

Image Preprocessing CNN Model Prediction LCD

Database Centralized
APP
17
18
Cataract
Dataset
● Dataset taken from a github repository pygot
● Annotated the dataset on roboflow
● Labels for train and test images
● Total train images : 204 images
● Total test images : 25 images

0 0.08125 0.1484375 0.7390625 0.1484375


Circuit Diagram 19
20
Battery 16V : A 16V battery is an energy storage device that produces an electrical potential difference of 16 volts between
its terminals.

Buck 3A & 5A : A buck converter rated for 3A & 5A is an electronic circuit used to step down voltage levels. Specifically, it is
designed to convert a higher input voltage to a lower output voltage while being capable of delivering a maximum continuous
output current of 3 amperes (A) & 5 amperes(A).

Relay : A relay is an electromechanical switch that is operated by an electric current. It consists of a coil and one or more sets
of contacts. When the coil is energized, it creates a magnetic field that causes the contacts to move, thereby completing or
interrupting electrical circuits.

Raspberry Pi : The Raspberry Pi is a small, affordable single-board computer developed by the Raspberry Pi Foundation. The
Raspberry Pi features a CPU, RAM, GPIO (General Purpose Input/Output) pins, USB ports, HDMI output, and other peripherals,
allowing it to run various operating systems (such as Linux) and interact with external devices and sensors.

LED : An LED (Light-Emitting Diode) is a semiconductor device that emits light when current flows through it. LEDs are
commonly used as indicators, status lights, and in illumination applications.

I2C Convertor : An I2C converter is a device that facilitates communication between two or more electronic components
using the I2C (Inter-Integrated Circuit) protocol. It acts as a translator, allowing devices with different I2C voltages or
communication speeds to communicate seamlessly. This enables interoperability between various devices such as sensors,
displays, microcontrollers, and other peripherals in a system.
Raspberry Pi 4 Detailed
2.4 GHz & 5.0 GHz
Architecture 21

IEEE 802.11b/g/n/ac
Bluetooth 5.0, BLE
Processor: Standard 40-pin
Broadcom GPIO header
BCM2711, quad-
core Cortex-A72 Gigabit
(ARM v8) 64-bit SoC Ethernet
@ 1.5GHz
Memory: 8GB LPDDR4

Micro SD card slot for


loading operating 2 × USB 3.0
system and data ports
storage

2-lane MIPI DSI


display port 2 × USB 2.0
ports

5V DC via USB-C
connector
(minimum 3A) 2-lane MIPI CSI
2 × micro HDMI ports (up to 4Kp60) camera port
GPIO and the 40 Pin Header 22
Header 23

● The Raspberry Pi features a row of GPIO (general-purpose input/output) pins along the top edge of
the board.
● A 40-pin GPIO header is found on all current Raspberry Pi boards.
● The GPIO headers are unpopulated on Raspberry Pi Zero, Raspberry Pi Zero W, and Raspberry Pi
Zero 2 W.
● The GPIO headers on all boards have a 0.1in (2.54mm) pin pitch.
● Any of the GPIO pins can be designated in software as an input or output pin and used for a wide
range of purposes.
● Voltages
○ Two 5V pins and two 3.3V pins are present on the board, as well as a number of ground pins
(GND), which cannot be reconfigured.
○ The remaining pins are all general-purpose 3.3V pins, meaning outputs are set to 3.3V and
inputs are 3.3V-tolerant.
● Input
○ A GPIO pin designated as an input pin can be read as high (3.3V) or low (0V).
○ Reading inputs is made easier with the use of internal pull-up or pull-down resistors.
○ Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins, this can be configured in
software
● Output
○ A GPIO pin designated as an output pin can be set to high (3.3V) or low (0V)
24

GPIO and the 40 Pin Header

Note: The GPIO pin numbering scheme is not in numerical order. GPIO pins 0 and 1 are present on the
board (physical pins 27 and 28), but are reserved for advanced use.
GPIO and the 40 Pin Header 25

● SDA (Serial Data):


○ This is the data line for the I2C protocol. The SDA pin on the Raspberry Pi is GPIO 2.
○ It includes a fixed, 1.8 kΩ pull-up to 3.3v1.
○ This pin is not suitable for use as a general-purpose IO where no pull-up resistor is desired.

● SCL (Serial Clock):


○ This is the clock line for the I2C protocol.
○ The SCL pin on the Raspberry Pi is GPIO 3.
○ It’s used to synchronize the data transfer between the devices on the I2C bus.

● GND (Ground):
○ The Ground pins on the Raspberry Pi are all electrically connected.
○ There are several GND pins available on the Raspberry Pi, including pins number: 6, 9, 14, 20, 25, 30,
34, and 39. They are used to complete the electrical circuit.

● VCC (Voltage at the Common Collector):


○ This term is commonly used to denote the supply voltage to a transistor.
○ However, in the context of Raspberry Pi and other similar boards, VCC usually refers to the power
supply voltage.
○ The Raspberry Pi does not have a specific VCC pin. Instead, it has two 5V pins (pins 2 and 4) and two
3.3V pins (pins 1 and 17) that can be used to supply power to other devices.
I2C Converter 26

● We have procured an I2C converter module


specifically designed for the Raspberry Pi.
● The Inter-Integrated Circuit (I2C) is a short-distance,
serial communication protocol that allows multiple
slave devices to be controlled by multiple master
devices.
● The primary purpose of this acquisition is to facilitate
the connection between the Raspberry Pi and the
Liquid Crystal Display (LCD).
● The LCD is a flat-panel display or other electronically
modulated optical device that uses the light-
modulating properties of liquid crystals combined
with polarizers.
● By using the I2C converter module, we are able to
efficiently manage the communication between
these two components.
● This setup simplifies the overall design and enhances
the performance of our system by reducing the
number of GPIO pins used on the Raspberry Pi.
27

THANK
YOU

You might also like