Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Deep learning for smartphone based malaria parasite detection in thick blood smears
1. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Deep Learning for Smartphone-based Malaria Parasite
Detection in Thick Blood Smears
In this paper author is describing concept to detect malaria
parasites from thick blood smear images using Convolution Neural
Network which is also called as deep learning and this detection
process can also be run in smart phones but we don’t have any
API or mobile sensor machines to implement this technique on
smart phones so we are implementing this technique on computer
platform using Python programming language.
This project consists of two parts such as 1) intensity-based
Iterative Global Minimum Screening (IGMS) 2) Customized
Convolution Neural Network to detect whether image contains
parasites or not.
1) Intensity-based Iterative Global Minimum Screening (IGMS):
Using this module we will take all images as input and then
convert this image into gray colour. Then we apply binary
mask using OSTU method which will give all thick smears and
then we remove other background small dots as noise value.
Left over image will contains all WBC (white blood
corpuscles) and parasites dots. All dots which are thick
and contains many thick region will consider as parasites
and other as WBC. If image contains parasite then it will
consider as image contains malaria disease.
2) CNN Module: Based on above identification of images we will
generate positive and negative train dataset. CNN will be
applied on train images to generate customized CNN model.
Whenever user give any test image then this CNN model will
be applied on test image to detect whether image contains
parasites or not.
To implement this project author has given 150 images of infected peoples and
this dataset available at this URL ‘ftp://lhcftp.nlm.nih.gov/Open-Access-
Datasets/Malaria/Thick_Smears_150’. We also downloaded image from same
2. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
website and then convert that dataset to positive and negative samples using
IGMS technique and then generate CNN train model.
All this dataset saved inside ‘dataset’ folder and after building train CNN model
you test the model by uploading images from ‘testimage’ folder.
Convolution Neural Network Working Procedure
CNN working procedure
To demonstrate how to build a convolutional neural network based image
classifier, we shall build a 7 layer neural network that will identify and separate
one image from other. This network that we shall build is a very small network
that we can run on a CPU as well. Traditional neural networks that are very
good at doing image classification have many more parameters and take a lot of
time if trained on normal CPU. However, our objective is to show how to build
a real-world convolutional neural network using TENSORFLOW.
Neural Networks are essentially mathematical models to solve an optimization
problem. They are made of neurons, the basic computation unit of neural
networks. A neuron takes an input (say x), do some computation on it (say:
multiply it with a variable w and adds another variable b) to produce a value
(say; z= wx+b). This value is passed to a non-linear function called activation
function (f) to produce the final output(activation) of a neuron. There are many
kinds of activation functions. One of the popular activation function is Sigmoid.
The neuron which uses sigmoid function as an activation function will be called
sigmoid neuron. Depending on the activation functions, neurons are named and
there are many kinds of them like RELU, TanH.
If you stack neurons in a single line, it’s called a layer; which is the next
building block of neural networks. See below image with layers
3. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
To predict image class multiple layers operate on each other to get best match
layer and this process continues till no more improvement left.
Below are the dataset images
Screen shots
Double click on ‘run.bat’ file to get below screen
4. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Upload Thick Blood Images’ button and upload
dataset
In above screen I am uploading ‘dataset’ folder which contains infected images,
after uploading dataset will get below screen
5. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
In above screen click on ‘Remove Noise’ button to remove noise from all
images available in dataset folder. After removing noise will get below screen
After applying Noise technique all dataset images noise will be removed out
and saved inside ‘data/train/positive’ folder. It’s not possible to show all clean
images so I am showing only one image after removing noise. All clean images
you can see inside ‘data/train/positive’.
6. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Now click on ‘Generate CNN Training Model’ button to generate model on all
clean images. After building model we will get below screen
In above screen we can see CNN model generated and we can see details at
black console. See below screen with CNN details
In above screen we can see total 7 layers are created to generate CNN model.
First layer start from image size 126, 126, 32 where 126 and 126 is image
height and width and 32 is the image colour. After building model click on
7. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
‘Upload Test Image & Predict Parasite’ button to upload test image and predict
disease.
In above screen I am uploading ‘7.jpg’ file and below are the prediction result
In above screen we can see uploaded test image contains positive result and all
red colour marks are the parasites and non-red colour dots are WBC. All dots
which contains thick pixels will consider as parasites. Now click on ‘Parasite &
8. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
WBC Count Graph’ button to see number of WBC and parasites pixels in graph
format
In above graph x-axis represents CELL type and y-axis represents count. Now
check with other image
In above screen I am uploading ’75.jpg’ file and below are the results
9. Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Above image contains no parasites so no red mark pixels found. Similarly u can
upload any image and test