Terahertz photonic crystal fiber sensors, powered by machine learning, could transform tuberculosis detection with rapid and accurate diagnostics.