def get_id_photo_output(img):
        """
        Get the special size and background photo.

        Args:
            img(numpy:ndarray): The image array.
            size(str): The size user specified.
            bg(str): The background color user specified.
            download_size(str): The size for image saving.

        """
        predictor = generator
        masks = predictor.generate(img)
        pred_result, pseudo_map = masks2pseudomap(masks)  # PIL Image
        added_pseudo_map = visualize(
            img, pred_result, color_map=get_color_map_list(256))
        res_download = download(pseudo_map)

        return pseudo_map, added_pseudo_map, res_download

        Get the special size and background photo.

        Args:
            img(numpy:ndarray): The image array.
            size(str): The size user specified.
            bg(str): The background color user specified.
            download_size(str): The size for image saving.

        
contrib/SegmentAnything/scripts/amg_paddle.py