Optimize the local image model