This is the PyTorch implementation of paper “Convolutional Neural Network Assisted Transformer for Automatic Modulation Recognition under Large CFOs and SROs”.
@ARTICLE{10458301,
author={Zeng, Rui and Lu, Zhilin and Zhang, Xudong and Wang, Jintao and Wang, Jian},
journal={IEEE Signal Processing Letters},
title={Convolutional Neural Network Assisted Transformer for Automatic Modulation Recognition Under Large CFOs and SROs},
year={2024},
volume={31},
number={},
pages={741-745},
keywords={Transformers;Convolution;Modulation;Feature extraction;Task analysis;Receivers;Frequency modulation;Automatic modulation recognition;carrier frequency offsets;sample rate offsets;transformer;group convolution},
doi={10.1109/LSP.2024.3372770}}
pytorch
yacs
h5py
matplotlib
thop
home
├── amr/
│ ├── dataloaders/
│ ├── models/
│ │ ├── losses/
│ │ ├── networks/
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── draw.py
│ │ ├── init.py
│ │ ├── logger.py
│ │ ├── solver.py
│ │ ├── static.py
├── configs/ (hyperparameters)
│ ├── *.yaml
├── main.py
├── datasets/
├── results/
If you want to train a network from scratch, please follow these steps:
-
preparing dataset: download the dataset with large-scale offsets dataset.rar, and form the file path like 'dataset/cfo.hdf5'
-
training and testing: run
python main.py --config xxx. e.g.python main.py --config configs/transgroupnet_cfo.yaml -
checking the results: check the well-trained models and the figures in
results/
-
preparing dataset: download the dataset with large-scale offsets dataset.rar, and form the file path like 'dataset/cfo.hdf5'
-
preparing models: download the prepared models and results in results.rar, and extract to the current path
-
modifying settings: change the state of
trainFromTruetoFalseinconfigs/transgroupnet_cfo.yaml, and runpython main.py --config configs/transgroupnet_cfo.yamlto get the expermential results.e.g.
method: 'ours' train: False # change the state: from True to False dataset: 'cfo' mod_type: ["BPSK", "QPSK", "8PSK", "PAM4", "QAM16", "QAM32", "QAM64", "QAM128", "QAM256", "GFSK", "WBFM", "AM-DSB", "AM-SSB", "OOK", "4ASK", "8ASK", "16PSK", "32PSK","8APSK","GMSK", "DQPSK","16APSK","32APSK","64APSK","128APSK"] workers: 8 seed: 1 gpu: 0 cpu: False params: "network": "TransGroupNet" "loss": "loss_CE" "batch_size": 1024 "epochs": 200 "lr": 5e-3 "lr_decay": 0.8 "weight_decay": 5e-2 "early_stop": False "Xmode": [{"type":"APF","options":{"IQ_norm":False, "zero_mask":False}}]