AbstractThe identification of E. coli bacteria is critical for the prevention of health risks. According to EPA-approved gold standard methods, 24–48 h are required to count viable cells in water. Manual counting of viable bacteria colonies on agar plates is time-consuming and can be prone to human error. The method requires experts to identify and count colonies on agar plates using a microscope. Hence, the bacterial counting procedure must be automated in order to decrease error. The main objective of this study was to develop an automatic system for bacteria colony counting. A total of 1,301 groundwater samples were collected from eight districts in Rajasthan, India, for a field investigation. The results were validated using artificial intelligence (AI) methods on this experimental data set. We automated the process of E. coli bacteria identification using a convolutional neural network (CNN). We developed a smartphone application for the rapid detection of E. coli bacteria on agar plates using CNN. We also automated the process of bacteria colony counting using faster region-based convolutional neural network (R-CNN) to overcome manual cell counting process limitations. A graphical user interface (GUI) application was created to rapidly count bacteria colony–forming units on agar plates using faster R-CNN. The developed faster R-CNN model achieved an overall accuracy of 97% and an error (loss) of 0.10. The performance of the CNN and faster R-CNN models was validated using F-score, precision, sensitivity, and accuracy statistical measures. The comparative analysis showed that the faster R-CNN model is reliable and effective in E. coli cell counting. The study developed a system for identifying and counting viable cells of E. coli bacteria in water that can be used to forecast hotspots of water contamination.