def update_mask_only(self, prob_mask, idx):
        """
        Interaction only, no propagation/fusion
        prob_mask - mask of the interacted frame, background included
        idx - Frame index of the interacted frame

        Return: all mask results in np format for DAVIS evaluation
        """
        mask = paddle.argmax(prob_mask, 0)

        self.masks[idx:idx + 1] = mask

        # Mask - 1 * H * W
        if self.pad[2] + self.pad[3] > 0:
            mask = mask[:, self.pad[2]:-self.pad[3], :]
        if self.pad[0] + self.pad[1] > 0:
            mask = mask[:, :, self.pad[0]:-self.pad[1]]

        mask = (mask.detach().numpy()[0]).astype(np.int64)
        self.np_masks[idx:idx + 1] = mask

        return self.np_masks

        Interaction only, no propagation/fusion
        prob_mask - mask of the interacted frame, background included
        idx - Frame index of the interacted frame

        Return: all mask results in np format for DAVIS evaluation
        
EISeg/eiseg/plugin/video/inference_core.py