Here we present machine learning-based approach to automatic classify live and dead bacteria that can be used for rapid search for optimal antibiotics in case of bacterial infections. The patients must be promptly administered a most efficient medication because all delays significantly increase morbidity and mortality. We engineered a new technology allowing us to efficiently and rapidly capture bacterial cells from different biological samples and proceed with a rapid antibiotic susceptibility testing thereby bypassing the need to culture the bacterium. We developed a new machine learning and microscopy-based approach for rapid assessment of bacterial viability following tests with antibiotics. Also, we created a labeled dataset with 100 images of live and dead bacteria stained with DAPI (DNA; blue) and FM4-64 (membrane; red) either treated with an antibiotic or untreated. We analyzed wild type (WT) and ampicillin-resistant (ampR) E. coli, WT and ampR S. aureus, and B. subtilis. For antibiotic susceptibility testing we used ampicillin, chloramphenicol and erythromycin. We extracted information about red and blue channels from the images and tried two machine learning classifiers for rapid assessment of viability of the bacteria. The classifiers Random Forest and J48 Decision Tree demonstrated precision 90.7% and 96%, recall 94.4% and 100%, and F-measure 92.5% and 95.2%, correspondingly, on 10-fold cross-validation.