
Abstract:In resource-limited settings, identifying a bacterial infection and selecting an antibiotic can take days of laboratory culture — time that is not always available. In this work, we attempt to demonstrate that a single optical microscopy photograph of a bacterial organism is sufficient to retrieve, in under 250 milliseconds, a prioritized list of antibiotic molecular candidates for experimental evaluation. We show that this is feasible using a compact 51.3 KB binary index that fits on any smartphone, with no internet connection and no specialized hardware required.The approach relies on two observations: that the visual morphology of bacteria under the microscope carries information about which antibiotic classes can penetrate the cell (grounded in Gram-stain cell wall structure), and that this morphological signal, encoded by a deep vision model and compressed to a 32-byte binary code, is sufficient to retrieve structurally related antibiotic candidates from a clinical database. The method is Weighted 1-Hodge Spectral Product Quantization (W1H-SPQ). Held-out validation (70/30 stratified split, 29 species, 609 images) achieves 32.2% Recall@10 (1-stage) and 49.7% Recall@10 (2-stage cosine re-ranking). Antibiotic retrieval recovers 86.9% of the Tanimoto maximum across 994 ChEMBL compounds. For 14 species without direct antibiotic records, morphological analogy inference generates candidate lists. Full prospective clinical validation is required before any deployment.
