CHANGES
Abstract – line 17 – we identified VGG16 as the best performing model VGG16 with an accuracy of
99%
Introduction - 2nd para - last line - "This chosen model served as" to "These chosen
models served as"
Introduction 3rd para- 4th line
" We specifically created a dataset with 1000 images using 200 water......before training our machine-
learning model"
to
"To create our dataset we specifically gathered some images from 200 water samples from C-DAC
Kolkata Center. Additionally, another set of E.coli images were gathered from the internet. The image
set collected from internet were expanded further by doing some modifications. Thus, a final dataset
of 1000 images were created for training and testing our machine learning models."
page 3 -
line 8 –ResNet, EfficientNet, Inception -
line 10 and 11 – efficientnetb7 will be vgg16, efficientnet will be vgg
2.1 Data collection and dataset preparation
"Specifically, 200 water samples collected from the CDAC.........photos were doubled in size."
to
"Some E.coli Images were collected from 200 water samples from the CDAC Kolkata Center.
Additionally, some images were collected from the internet which were modified further to increase
their number. Thus, a final dataset of 1000 images were created for training and testing our machine
learning models.
page 6 - contour- line 5 - "cv2.CHAIN APPROXNONE" to "cv2.CHAIN_APPROX_ONE"
2.3 The machine learning model -
In this research, several machine learning models were employed to assess the dataset’s performance.
Subsequently, the top three model types, namely ResNet, EfficientNet, and VGG were selected for further
evaluation. Three classification models, namely ResNet50, EfficientNetB7, and VGG16, were trained using the
dataset of processed E. coli image data. Each of the three models is built on the intricate CNN architecture. All
of the models underwent 15 epochs of training.
The training set consists of two classes of images under the labels “Yes” i.e., the E.coli sample images
and “No” i.e., the non E.coli sample images. The loss function graph and accuracy graph were constructed after
the models had been trained and tested on a test dataset.
<images of graphs>
Considering the performance of these three models in terms of accuracy, the ultimate selection is made to
identify the best-performing model (Table 1), i.e., VGG16. Following examination, the three models’ accuracy
is as follows:
Model name Avg. Training Avg. Training Avg. Validation Avg. Validation
Accuracy Loss: Accuracy Loss:
ResNet50 95.7% 23% 96% 6.1%
VGG16 99% 1.3% 99.7% 2%
EfficientNetB7 50.1% 34% 51.2% 7.1%
Model description of VGG16 –
The pretrained weights of VGG16 encompass a set of learned parameters obtained through training on a
massive dataset, notably the ImageNet Large Scale Visual Recognition Challenge dataset. This pretraining
process involves exposing the model to millions of images from thousands of categories, allowing it to learn
intricate features and patterns within the data. The advantage of using pretrained VGG16 weights lies in its
ability to capture and encode a rich hierarchy of features from images, including edges, textures, and high-level
object representations. These learned features are highly transferable, serving as a powerful foundation for
various image classification tasks. By fine-tuning the pretrained VGG16 architecture, we have made the model
suitable for binary classification. Harnessing the knowledge encoded in the weights helped to achieve
remarkable accuracy in our image classification tasks with limited l data, reduced training time, and improved
convergence.
<VGG16 model architecture image>
Model Setup –
Input Layer - The input layer accepts images of the dimension (256, 256, 3), where the dimensions represent
the height, width, and color channels, respectively.
Pretrained Layers - The pretrained VGG16 model trained on ImageNet dataset is loaded . After the base layers
of the model custom layers are added for fine-tuning the classification.
Custom Layers - A Flatten layer is applied to convert the 3D output into a 1D tensor. A Dense layer is
introduced to capture high-level features. A Dropout layer with a dropout rate of 50% is applied.
Model Summary –
The model has a total of 31,493,442 parameters.
Of these parameters, 16,778,754 are trainable, while 14,714,688 are non-trainable due to the pretrained
VGG16 base.
The architecture has been configured for a binary classification task.
The model is specific for classification of micro-organisms only.
One of the limitations we faced was to correctly classify bacteria structurally equivalent to E.coli. To
mitigate this issue, we have to work further to bring diversification in our training dataset.
3. RESULT
3.1 Data collection and dataset preparation
The experiment initially used water from ten distinct locations, with the CDAC Kolkata facility serving
as the primary supplier of samples from various areas. A few random samples were also taken from
several designated zones in Kolkata, India. Sterile and labeled containers were used to gather the
water samples. The development and labeling of a sizable dataset of E. coli pictures marks a
significant advancement in our study. This extensive database offers researchers a wealth of data to
investigate the form, contour, and structural variety of E. coli. Specifically, 200 water samples
collected from the CDAC Kolkata Center were used to create a dataset of 1000 pictures. Additionally,
a total of 300 photos of E. coli have been gathered from the internet. In order to prepare for training
the machine learning model, the original photos were doubled in number by changing their
orientations. The dataset (Figure 1) has the potential to open up new avenues of information and
enrich our understanding of the artificial intelligence-based E. coli detection system as it continues to
grow and evolve.
< Image collage of E.coli images>
< Image collage of non E.coli images>
3.2 Experimental setup
The local machine that we used for our testing has the following settings HP Victus 16-e0075AX AMD
Ryzen 5 5600H with Radeon Graphics, 3301Mhz, 6 Core(s), 12 Logical Processor(s) Processor 16.1
inches FHD IPS Laptop (8GB DDR4/512GB SSD/Windows 10 Home/MS Office /Natural Silver), 15s
du1034TU, 2.5Kg. Using the Python (Version-3.9.7) language and the TensorFlow framework, all of
the scripts for model construction, data preprocessing, training, and testing are created. To get the
raw datasets ready for the model learning stage, the pre-processed raw datasets are examined for
model breadth and learning rate. For this work, we used Adam Optimizer. The training was carried
out over 15 epochs with a batch size of 32.
Manufacturer Processor RAM GPU
Nvidia GeForce GTX
HP Ryzen 5 5600H 8 GB
1650 4GB
3.3 Image processing – <from maam’s paper full – 2.2>
3.4 Classification with deep learning model
The processed dataset was used to train the models ResNet50, VGG16 and EfficientNetB7. After
computing the accuracy of three of the models, it was decided to move forward with the VGG16
model for further execution. In the training process, categorical_crossentropy was used as the loss
function and the Adam optimizer to minimize the chosen loss function. After training, our model was
able to predict the if there is a presence of E.coli or not in a given sample image.
page 10 - conclusion - line 13 - -" 900 images" to "1000 images"
REFRENCE
INTRODUCTION
A fundamental need of users of public water systems is access to continuously reliable and
clean drinking water. Regularly consuming polluted water can have negative and long-lasting
effects on your health. Water supplies that are contaminated represent a serious risk to the
public and may cause illnesses that are fatal.
[ref]Bilal, M., Khan, S., Ali, J., Ismail, M., Khan, M. I., Asiri, A. M., & Khan, S. B. (2019). Biosynthesized
silver supported catalysts for disinfection of Escherichia coli and organic pollutant from drinking
water. Journal of Molecular Liquids, 281, 295-306.
Grayscaling makes it easier to analyze visual elements like edges, textures, and shapes by removing
color information.
[ref]Ma, P., Li, C., Rahaman, M. M., Yao, Y., Zhang, J., Zou, S., ... & Grzegorzek, M. (2023). A state-of-
the-art survey of object detection techniques in microorganism image analysis: from classical methods
to deep learning approaches. Artificial Intelligence Review, 56(2), 1627-1698.
Deep learning algorithms for computer vision can suffer from noise’s harmful effects. The
training procedure, as well as the overall accuracy and generalization abilities of the models,
can all be enhanced by removing noise from the training images. A random variation in the
visual signal is referred to as noise in photography. The OpenCV routines for image blurring
can be used to remove this noise.
[ref]Carrillo-Gómez, J., Durán-Acevedo, C., & García-Rico, R. (2019). Concentration detection of the
E. coli bacteria in drinking water treatment plants through an E-nose and a volatiles extraction system
(VES). Water, 11(4), 774.
With edge detection algorithms, all the visible edges can be detected in the image. Canny’s edge
detection algorithm has been used here to draw all the edges separately. A threshold value for the
lower limit has been set to 100 to continue the edge detection process.
[ref]Zhao, M. (2021). Image analysis approaches to colorimetric and multispectral detection of heavy
metal or bacterial contamination with printed paper-based test devices (Doctoral dissertation,
Purdue University).
Three classification models, namely ResNet50, EfficientNetB7, and InceptionV3, were trained using
the dataset of processed E. coli image data. Each of the three models is iConDet2: AI-Powered
pHealth App for Detecting Conjunctivitis 7 built on the intricate CNN architecture.
[ref]Khan, F. M., Gupta, R., & Sekhri, S. (2021). A convolutional neural network approach for
detection of E. coli bacteria in water. Environmental Science and Pollution Research, 28(43), 60778-
60786.
There are numerous models available for the EfficientNet implementation in keras, ranging from
B0 to B7. The keras classification model, which has previously been pre-trained with ImageNet and
optionally loaded with weights, is returned by this EfficientNet.
[ref]Weller, D. L., Love, T. M., & Wiedmann, M. (2021). Interpretability versus accuracy: a comparison
of machine learning models built using different algorithms, performance measures, and features to
predict E. coli levels in agricultural water. Frontiers in artificial intelligence, 4, 628441.
It controls the amount of scaling. Ω(omega) is a scaling factor that determines the size of the
model. Ω is set to 3 for EfficientNet B7. It is an effective and accurate deep neural network for
image categorization.
Ahmed, U., Mumtaz, R., Anwar, H., Shah, A. A., Irfan, R., & García-Nieto, J. (2019). Efficient water
quality prediction using supervised machine learning. Water, 11(11), 2210.
The visual appeal and clarity of the image are improved by removing noise, which facilitates
further processing and analysis. The accurate analysis and interpretation of images might be
hampered by noise.
Anagnostidis, V., Sherlock, B., Metz, J., Mair, P., Hollfelder, F., & Gielen, F. (2020). Deep learning
guided image-based droplet sorting for on-demand selection and analysis of single cells and 3D cell
cultures. Lab on a Chip, 20(5), 889-900.
One of the primary purposes of thresholding is image segmentation. It helps divide an image into
meaningful regions or objects based on differences in pixel intensity or color
Zebari, D. A., Zeebaree, D. Q., Abdulazeez, A. M., Haron, H., & Hamed, H. N. A. (2020). Improved
threshold based and trainable fully automated segmentation for breast cancer boundary and pectoral
muscle in mammogram images. Ieee Access, 8, 203097-203116.
During processing, contouring aids in recognizing the image. The findContour function has been
used to accomplish the initial stage of contouring, which is finding the contour.
Sweet, S., Meiksins, P. F., & Meiksins, P. (2020). Changing contours of work: Jobs and opportunities
in the new economy. Sage Publications.
The image can be compressed more successfully without losing crucial details if the noise is
removed, leading to reduced file sizes and more effective storage.
Uthayakumar, J., Elhoseny, M., & Shankar, K. (2020). Highly reliable and low-complexity image
compression scheme using neighborhood correlation sequence algorithm in WSN. IEEE Transactions
on Reliability, 69(4), 1398-1423.
Compared to color images, it often requires fewer computational resources for processing.
Preprocessing can help reduce processing times and memory requirements by turning images to
grayscale.
Bailey, D. G. (2023). Design for embedded image processing on FPGAs. John Wiley & Sons.