Learning the Geometry of Wave-Based Imaging