Learning To Handle Occlusion For Motion Analysis And View Synthesis