Measuring sub-cellular pH with high accuracy and spatiotemporal resolution remains challenging. Here, Johnston and co-workers develop a pH biosensor that combines the pH dependant fluorescent lifetime of mApple with deep learning to accurately determine sub-cellular pH in individual vesicles.