Data-Driven Optimization For Modeling In Computer Graphics And Vision