Python Call Class Method From Instance Segmentation