Hard Frame Detection and Online Mapping for Surgical Phase Recognition