Skip to content

Commit

Permalink
Wideband datasets, models, etc. (#21)
Browse files Browse the repository at this point in the history
* Wideband extensions to TorchSig

* add missing req and update dataset init

* Adding necessary transforms and visualizations.

Co-authored-by: Luke Boegner <luke.boegner@gmail.com>
Co-authored-by: Garrett Vanhoy <gmvanhoy@gmail.com>
  • Loading branch information
3 people authored Nov 22, 2022
1 parent c230f50 commit 8c93d7c
Show file tree
Hide file tree
Showing 104 changed files with 18,329 additions and 191 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__/
*.pyc
*.mdb
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@
-----


TorchSig is an open-source signal processing machine learning toolkit based on the PyTorch data handling pipeline. The user-friendly toolkit simplifies common digital signals processing operations, augmentations, and transformations when dealing with both real and complex-valued signals. TorchSig streamlines the integration process of these signals processing tools building on PyTorch, enabling faster and easier development and research for machine learning techniques applied to signals data, particularly within (but not limited to) the radio frequency domain. An example dataset based on many unique communication signal modulations is also included to accelerate the field of modulation recognition.
TorchSig is an open-source signal processing machine learning toolkit based on the PyTorch data handling pipeline. The user-friendly toolkit simplifies common digital signal processing operations, augmentations, and transformations when dealing with both real and complex-valued signals. TorchSig streamlines the integration process of these signals processing tools building on PyTorch, enabling faster and easier development and research for machine learning techniques applied to signals data, particularly within (but not limited to) the radio frequency domain. An example dataset, Sig53, based on many unique communication signal modulations is included to accelerate the field of modulation classification. Additionally, an example wideband dataset, WidebandSig53, is also included that extends Sig53 with larger data example sizes containing multiple signals enabling accelerated research in the fields of wideband signal detection and recognition.

*TorchSig is currently in beta (v0.1.0)*
*TorchSig is currently in beta*

## Key Features
---
TorchSig provides many useful tools to facilitate and accelerate research on signals processing machine learning technologies:
- The `SignalData` class and its `SignalDescription` objects enable signals objects and meta data to be seamlessly handled and operated on throughout the TorchSig infrastructure.
- The `Sig53` Dataset is a state-of-the-art static modulations-based RF dataset meant to serve as the next baseline for RFML development & evaluation.
- The `Sig53` Dataset is a state-of-the-art static modulations-based RF dataset meant to serve as the next baseline for RFML classification development & evaluation.
- The `ModulationsDataset` class synthetically creates, augments, and transforms the largest communications signals modulations dataset to date in a generic, flexible fashion.
- The `WidebandSig53` Dataset is a state-of-the-art static wideband RF signals dataset meant to serve as the baseline for RFML signal detection and recognition development & evaluation.
- The `WidebandModulationsDataset` class synthetically creates, augments, and transforms the largest wideband communications signals dataset in a generic, flexible fashion.
- Numerous signals processing transforms enable existing ML techniques to be employed on the signals data, streamline domain-specific signals augmentations in signals processing machine learning experiments, and signals-specific data transformations to speed up the field of expert feature signals processing machine learning integration.
- TorchSig also includes a model API similar to open source code in other ML domains, where several state-of-the-art convolutional and transformer-based neural architectures have been adapted to the signals domain and pretrained on the `Sig53` and `WidebandSig53` datasets. These models can be easily used for follow-on research in the form of additional hyperparameter tuning, out-of-the-box comparative analysis/evaluations, and/or fine-tuning to custom datasets.


## Documentation
---
Documentation can be built locally by following the instructions below.
Documentation can be found [online](https://torchsig.readthedocs.io/en/latest/) or built locally by following the instructions below.
```
cd docs
pip install -r docs-requirements.txt
Expand Down
30 changes: 30 additions & 0 deletions docs/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ Sig53
.. autoclass:: Sig53


WidebandSig53
~~~~~~~~~~~~~~

.. autoclass:: WidebandSig53


ModulationsDataset
~~~~~~~~~~~~~~~~~~~~

.. autoclass:: ModulationsDataset


WidebandModulationsDataset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: WidebandModulationsDataset


DigitalModulationDataset
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -70,6 +82,24 @@ FMDataset
.. autoclass:: FMDataset


WidebandDataset
~~~~~~~~~~~~~~~~~~

.. autoclass:: WidebandDataset


SyntheticBurstSourceDataset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: SyntheticBurstSourceDataset


FileBurstSourceDataset
~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: FileBurstSourceDataset


RadioML2016
~~~~~~~~~~~~~~

Expand Down
84 changes: 82 additions & 2 deletions docs/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ The following utilities are available:
:local:


IQ Models
------------------


EfficientNet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.efficientnet
.. currentmodule:: torchsig.models.iq_models.efficientnet.efficientnet

.. autoclass:: efficientnet_b0

Expand All @@ -27,8 +31,84 @@ EfficientNet
XCiT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.xcit
.. currentmodule:: torchsig.models.iq_models.xcit.xcit

.. autoclass:: xcit_nano

.. autoclass:: xcit_tiny12


Spectrogram Models
------------------


YOLOv5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.spectrogram_models.yolov5

.. autoclass:: yolov5p

.. autoclass:: yolov5n

.. autoclass:: yolov5s

.. autoclass:: yolov5p_mod_family

.. autoclass:: yolov5n_mod_family

.. autoclass:: yolov5s_mod_family


DETR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.spectrogram_models.detr

.. autoclass:: detr_b0_nano

.. autoclass:: detr_b2_nano

.. autoclass:: detr_b4_nano

.. autoclass:: detr_b0_nano_mod_family

.. autoclass:: detr_b2_nano_mod_family

.. autoclass:: detr_b4_nano_mod_family


PSPNet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.spectrogram_models.pspnet

.. autoclass:: pspnet_b0

.. autoclass:: pspnet_b2

.. autoclass:: pspnet_b4

.. autoclass:: pspnet_b0_mod_family

.. autoclass:: pspnet_b2_mod_family

.. autoclass:: pspnet_b4_mod_family


Mask2Former
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: torchsig.models.spectrogram_models.mask2former

.. autoclass:: mask2former_b0

.. autoclass:: mask2former_b2

.. autoclass:: mask2former_b4

.. autoclass:: mask2former_b0_mod_family

.. autoclass:: mask2former_b2_mod_family

.. autoclass:: mask2former_b4_mod_family
49 changes: 49 additions & 0 deletions docs/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ CutOut
^^^^^^^^^
.. autoclass:: CutOut

PatchShuffle
^^^^^^^^^^^^^
.. autoclass:: PatchShuffle

DatasetWidebandMixUp
^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: DatasetWidebandMixUp

DatasetWidebandCutMix
^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: DatasetWidebandCutMix

SpectrogramRandomResizeCrop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramRandomResizeCrop


Expert Feature Transforms
-------------------------
Expand Down Expand Up @@ -159,6 +175,10 @@ RandomFrequencyShift
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: RandomFrequencyShift

RandomDelayedFrequencyShift
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: RandomDelayedFrequencyShift

LocalOscillatorDrift
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: LocalOscillatorDrift
Expand Down Expand Up @@ -239,3 +259,32 @@ ImpulseInterferer
RandomPhaseShift
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: RandomPhaseShift


Spectrogram Transforms
----------------------------
.. currentmodule:: torchsig.transforms.spectrogram_transforms.spec

SpectrogramResize
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramResize

SpectrogramDropSamples
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramDropSamples

SpectrogramPatchShuffle
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramPatchShuffle

SpectrogramTranslation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramTranslation

SpectrogramMosaicCrop
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramMosaicCrop

SpectrogramMosaicDownsample
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autoclass:: SpectrogramMosaicDownsample
14 changes: 13 additions & 1 deletion docs/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@ Signal Visualizers

.. autoclass:: TimeSeriesVisualizer

.. autoclass:: ImageVisualizer
.. autoclass:: ImageVisualizer

.. autoclass:: PSDVisualizer

.. autoclass:: MaskVisualizer

.. autoclass:: MaskClassVisualizer

.. autoclass:: SemanticMaskClassVisualizer

.. autoclass:: BoundingBoxVisualizer

.. autoclass:: AnchorBoxVisualizer
Loading

0 comments on commit 8c93d7c

Please sign in to comment.