qoherent / ria

Radio Intelligence Apps' open-source core, by Qoherent šŸ“”šŸš€
https://www.qoherent.ai/radiointelligenceapps-project/
GNU Affero General Public License v3.0
6 stars 0 forks source link


Radio Intelligence Apps

Radio Intelligence Apps, By Qoherent

Let's build intelligent radios together. šŸ“”šŸš€

RIA Core

RIA Core is the foundational, open-source core of RIA Hub, an extensive AI development platform tailored for software-defined radio (SDR).

RIA Core drives the creation of intelligent radios, unlocking solutions in an increasingly congested, contested, and complex wireless spectrum. Learn more about RIA Core on our website here.

šŸŒŸ Key Features

šŸš€ Want More RIA?

šŸ› ļø Getting Started

RIA Core is available from PyPI, and can be installed with pip:

pip install ria

RIA Core is also available from Conda-Forge, and can be installed with Conda:

conda install ria

Interfacing with your local SDR hardware may require additional drivers and configurations.

Please refer to the documentation for more information on getting started with RIA Core.

šŸ³ Docker Support

Coming soon: Docker support for building images for both CPU and GPU targets.

šŸ’» Usage

RIA Core consists of importable modules that can be used within your Python projects, as well as a command-line interface (CLI), allowing you to execute key functionality directly from the command line.

The RIA CLI is automatically installed alongside RIA. Simply execute ria --help from the command line for CLI usage information.

For example, if we wanted to curate a dataset from a collection of SigMF recordings, apply an artificial IQ Imbalance, and save to file as a machine-learning ready dataset, we could do this from the command line with:

ria curate --recordings 'data/recordings' --output 'data/datasets/out.h5' --phase_imbalance $pi

Alternatively, we could achieve the same in Python with:

from math import pi
from ria import curate
from ria.impairments import iq_imblance

# Curate a radio dataset from a collection of SigMF recordings.
dataset = curate(recordings='data/recordings')

# Apply an artificial IQ Imbalance.
dataset = iq_imblance(dataset=dataset, phase_imbalance=pi)

# Save the dataset to file.
dataset.to_h5('data/datasets/out.h5')

We can proceed to train a 4G LTE / 5G NR classifier using this dataset, and save the trained model to file in ONNX format:

ria train --train_dataset 'data/datasets/out.h5' --model 'LTE_NR_CLassifier' --batchsize 4 --to_onnx 'models/classifier.onnx'

Equivalently, in Python:

from ria.models import LTE_NR_CLassifier
from pytorch_lightning import Trainer
from torch.utils.data import DataLoader

# A custom RIA model, optimized for radio classification!
lte_nr_classifier = LTE_NR_CLassifier()  

# RIA datasets are compatible with the Torch DataLoader...
train_loader = DataLoader(dataset, batch_size=4)

# ...and can be trained using a PyTorch Lightning Trainer! 
trainer = Trainer()
trainer.fit(model=lte_nr_classifier, train_dataloaders=train_loader)

# Save model as ONNX graph
lte_nr_classifier.to_onnx("models/classifier.onnx")

If RIA's syntax feels familiar, that's because RIA is built on PyTorch and PyTorch Lightning!

Please refer to the documentation for additional usage examples. If you encounter any difficulties, don't hesitate to reach out on our open support forum.

Additional back-ends can be made available. Please contact us for further details.

šŸ¤ Contribution

We welcome contributions from the community! Whether it's an enhancement, bug fix, or new how-to guide, your input is valuable. To get started, please visit our Contribution Guidelines.

If you encounter any issues or to report a security vulnerability, please submit a bug report.

If you have a larger project in mind, please contact us directly, we'd love to collaborate with you. šŸš€

Qoherent is dedicated to fostering a friendly, safe, and inclusive environment for everyone. For more information on our commitment to diversity, please refer to our Diversity Statement.

We kindly insist that all contributors review and adhere to our Code of Conduct and that all code contributors review our Coding Guidelines.

šŸ–Šļø Authorship

RIA Core is developed and maintained by Qoherent, with the invaluable support of many independent contributors.

If you are doing research with RIA, please cite the project:

[1] Qoherent Inc., "Radio Intelligence Apps," 2024. [Online]. Available: https://github.com/qoherent/ria

If you like what we're doing, don't forget to give the project a star! ā­

šŸ“„ License

RIA Core is free and open-source, released under AGPLv3.

Alternative licensing options are available. Please contact us for further details.