Real-time optimization and implementation of a digital avatar system