TorchSig

A PyTorch Signal Processing Machine Learning Toolkit


...

Key Features

TorchSig is an open-source signal processing machine learning toolkit based on the PyTorch data handling pipeline. Some of the key features include: signals datasets, domain transforms, pretrained models, and open-source code and documentation for community research and development.

Signals Datasets

TorchSig can generate 50+ digital modulations commonly used in radio frequency communication signals, useful for signal detection and recognition research. TorchSig can be used as a standard in the open source community working with signals datasets.

Domain Transforms

Numerous complex signal augmentations, impairments, and expert feature transforms are provided and can be seamlessly customized and further developed.

Pretrained Models

TorchSig’s API mirrors familiar libraries such as TorchVision and TorchAudio, providing the first ever toolkit that shares state-of-the-art convolutional and transformer neural network models pretrained on complex-valued signals datasets.

Research & Development

Open-source code, datasets, and documentation enable community engagement for further advancing research and development in the field of signal processing machine learning.

Why TorchSig?

TorchSig is an versatile, open-source, RFML framework that can be leveraged for any application. We are constantly innovating for more capability and features to enable the community for better research. We also love community interactions for new ideas, finding issues, and providing feedback.

Easy to Install

Simply clone and pip install!


git clone https://github.com/torchdsp/torchsig.git
cd torchsig
pip install .
                                

Easy to Use

Dataset, model, and transform APIs follow familiar TorchVision and TorchAudio coding structure.


# Datasets
from torchsig.datasets.dataset_metadata import DatasetMetadata
from torchsig.datasets.datasets import TorchSigIterableDataset

dataset_infinite_metadata = DatasetMetadata(
    num_iq_samples_dataset = num_iq_samples_dataset,
    fft_size = fft_size,
    impairment_level = impairment_level,
    num_signals_max = num_signals_max,
    num_signals_min = num_signals_min,
    num_samples = None
)

dataset_infinite = TorchSigIterableDataset(
    dataset_metadata = dataset_infinite_metadata
)
data, metadata = next(dataset_infinite)

# Models
from torchsig.models import XCiTClassifier

model = XCiTClassifier(
    input_channels=2, # for IQ data
    num_classes=57,
)

# Transforms
from torchsig.transforms.transforms import CarrierPhaseNoise
transforms = [
    CarrierPhaseNoise(phase_noise_degrees=(0.25, 1.0)),
    Spectrogram(fft_size = 64),
]