def __init__(
        self,
        target_classifier: "CLASSIFIER_NEURALNETWORK_TYPE",
        ssl_classifier: "CLASSIFIER_NEURALNETWORK_TYPE",
        augmentations: Callable,
        aug_num: int = 50,
        alpha: float = 0.8,
        var_K: int = 20,
        percentile: int = 5,
    ) -> None:
        """
        Initialize the BEYOND detector.

        :param target_classifier: The target model to be protected
        :param ssl_classifier: The self-supervised learning model used for feature extraction
        :param augmentations: data augmentations for generating neighborhoods
        :param aug_num: Number of augmentations to apply to each sample (default: 50)
        :param alpha: Weight factor for combining label and representation similarities (default: 0.8)
        :param var_K: Number of top similarities to consider (default: 20)
        :param percentile: using to calculate the threshold
        """
        import torch

        super().__init__()
        self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

        self.target_model = target_classifier.model.to(self.device)
        self.ssl_model = ssl_classifier.model.to(self.device)
        self.aug_num = aug_num
        self.alpha = alpha
        self.var_K = var_K

        self.backbone = self.ssl_model.backbone
        self.model_classifier = self.ssl_model.classifier
        self.projector = self.ssl_model.projector

        self.img_augmentations = augmentations

        self.percentile = percentile  # determine the threshold
        self.threshold: float | None = None

        Initialize the BEYOND detector.

        :param target_classifier: The target model to be protected
        :param ssl_classifier: The self-supervised learning model used for feature extraction
        :param augmentations: data augmentations for generating neighborhoods
        :param aug_num: Number of augmentations to apply to each sample (default: 50)
        :param alpha: Weight factor for combining label and representation similarities (default: 0.8)
        :param var_K: Number of top similarities to consider (default: 20)
        :param percentile: using to calculate the threshold
        
art/defences/detector/evasion/beyond_detector.py