def from_dataset(
        cls: type["SyntheticAnomalyDataset"],
        dataset: AnomalibDataset,
    ) -> "SyntheticAnomalyDataset":
        """Create synthetic dataset from existing dataset of normal images.

        Args:
            dataset: Dataset containing only normal images to convert into a
                synthetic dataset with 50/50 normal/anomalous split.

        Returns:
            New synthetic anomaly dataset.

        Example:
            >>> normal_dataset = Dataset(...)
            >>> synthetic = SyntheticAnomalyDataset.from_dataset(normal_dataset)
        """
        return cls(augmentations=dataset.augmentations, source_samples=dataset.samples, dataset_name=dataset.name)
Create synthetic dataset from existing dataset of normal images.

        Args:
            dataset: Dataset containing only normal images to convert into a
                synthetic dataset with 50/50 normal/anomalous split.

        Returns:
            New synthetic anomaly dataset.

        Example:
            >>> normal_dataset = Dataset(...)
            >>> synthetic = SyntheticAnomalyDataset.from_dataset(normal_dataset)
        
src/anomalib/data/utils/synthetic.py