Training and detection all in the same page