A Generalist Framework for Panoptic Segmentation of Images and Videos