$\phi$-SfT: Shape-from-Template with a Physics-Based Deformation Model