Giter Site home page Giter Site logo

zjwfufu / awn Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 2.0 1.94 MB

Official code for "Towards the Automatic Modulation Classification with Adaptive Wavelet Network".

License: MIT License

Python 100.00%
automatic-modulation-classification automatic-modulation-recognition deep-neural-networks lifting-scheme

awn's Introduction

AWN

Code for "Towards the Automatic Modulation Classification with Adaptive Wavelet Network".

Jiawei Zhang, Tiantian Wang, Zhixi Feng, and Shuyuan Yang

Xidian University

[Paper] | [中文文档] | [code]

Preparation

Data

We conducted experiments on three datasets, namely RML2016.10a, RML2016.10b, and RML2018.01a.

dataset modulation formats samples
RML2016.10a 8 digital formats: 8PSK, BPSK, CPFSK, GFSK, PAM4, 16QAM, 64QAM, QPSK; 3 analog formats: AM-DSB,AM-SSB,WBFM 220 thousand (2×128)
RML2016.10b 8 digital formats: 8PSK, BPSK, CPFSK, GFSK, PAM4, 16QAM, 64QAM, QPSK; 3 analog formats: AM-DSB,WBFM 1.2 million (2×128)
RML2018.01a 19 digital formats: 32PSK, 16APSK, 32QAM, GMSK, 32APSK, OQPSK, 8ASK, BPSK, 8PSK, 4ASK, 16PSK, 64APSK, 128QAM, 128APSK, 64QAM, QPSK, 256QAM, OOK, 16QAM; 5 analog formats: AM-DSB-WC, AM-SSB-WC, AM-SSB-SC, AM-DSB-SC, FM, 2.5 million (2×1024)

The datasets can be downloaded from the DeepSig. Please extract the downloaded compressed file directly into the ./data directory, and keep the file name unchanged. The final directory structure of ./data should is shown below:

data
├── GOLD_XYZ_OSC.0001_1024.hdf5
├── RML2016.10a_dict.pkl
└── RML2016.10b.dat

Pretrained Model

We provide pre-trained models on three datasets, which can be downloaded from Google Drive or Baidu Netdisk. Please extract the downloaded compressed file directly into the ./checkpoint directory.

Environment Setup

  • Python >= 3.6
  • PyTorch >=1.7

This version of the code has been tested on Pytorch==1.8.1.

Training

Run the following commands to train the AWN. (<DATASET> in {2016.10a, 2016.10b, 2018.01a}).

python main.py --mode train --dataset <DATASET>

The YAML configs for three datasets lies in ./config.

After running the command, a new directory <DATASET>_$ will be created in the ./training directory, and ./models, ./result, ./log directories will be created under ./<DATASET>_$. The trained model will be saved to ./models, and the training logs will be saved to ./log. The loss, accuracy, and learning rate changes during training and validation will be plotted together in ./result.

After the training is completed, an testing on the test set will be performed automatically, which can be referred to in the Evaluation section.

Evaluation

Run the following command to evaluate the trained AWN:

python main.py --mode eval --dataset <DATASET>

After running the command, a new directory <DATASET>_$ will be created in the ./inference directory, which is consistent with the Training section. The overall accuracy, macro F1-score, and Kappa coefficient on the test set will be displayed in the terminal. The test logs will be saved to ./log, and the accuracy curve with respect to SNRs and confusion matrix will be saved to ./result.

If you have further analysis needs, we recommend modifying the Run_Eval() function to directly save the raw data, such as Confmat_Set.

Visualize

We provide an additional mode to visualize the decomposition of the feature maps by the adaptive lifting scheme, which can be called by the following command:

python main.py --mode visualize --dataset <DATASET>

Similar to Evaluation, the plotted figures are stored in ./result in the form of .svg.

Acknowledgments

Some of the code is borrowed from DAWN. We sincerely thank them for their outstanding work.

License

This code is distributed under an MIT LICENSE. Note that our code depends on other libraries and datasets which each have their own respective licenses that must also be followed.

Citation

Please consider citing our paper if you find it helpful in your research:

@ARTICLE{10058977,
	author={Zhang, Jiawei and Wang, Tiantian and Feng, Zhixi and Yang, Shuyuan},
	journal={IEEE Transactions on Cognitive Communications and Networking}, 
	title={Towards the Automatic Modulation Classification with Adaptive Wavelet Network}, 
	year={2023},
	doi={10.1109/TCCN.2023.3252580}
}

Contact at: zjw AT stu DOT xidian DOT edu DOT cn

awn's People

Contributors

zjwfufu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.