Skip to content

Commit 6890eb9

Browse files
committed
final update for report
1 parent 234dd5f commit 6890eb9

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
11
# pytorch-modulation-recognition
22
PyTorch Implementation of various Modulation Recognition Networks benchmarked on the RadioML2016 Dataset
3+
4+
## Install Requirements
5+
6+
```bash
7+
# Base requirements
8+
pip3 install -r requirements.txt
9+
10+
# Required to use train.py
11+
pip3 install poutyne
12+
13+
# Required to run the demo web app
14+
pip3 install streamlit
15+
16+
```
17+
18+
## Train
19+
20+
```bash
21+
# Train VTCNN2
22+
python train.py --model vtcnn --epochs 25 --batch_size 512 --split 0.8
23+
24+
# Train MRResNet
25+
python train.py --model mrresnet --epochs 25 --batch_size 512 --split 0.8
26+
27+
```
28+
29+
### Results
30+
31+
After training Tensorboard logs will be located in the logs directory and the models in the models directory. Run the below command to start Tensorboard and point your browser to localhost:6006.
32+
33+
```bash
34+
tensorboard --logdir=logs
35+
36+
```
37+
38+
### Demo
39+
40+
To run the web app for visualizing the In-Phase (I) and Quadrature (Q) channels of signals at various modulations and signal-to-noise ratios, use the following command.
41+
42+
```bash
43+
streamlit run app.py
44+
45+
```

demo/app.py renamed to app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import matplotlib.pyplot as plt
55
import streamlit as st
66

7-
sys.path.append("../")
87
import torch_modulation_recognition as tmr
98

109

@@ -18,7 +17,7 @@
1817

1918
@st.cache(allow_output_mutation=True)
2019
def load_data():
21-
data = tmr.RadioML2016()
20+
data = tmr.data.RadioML2016()
2221
return data
2322

2423
def get_params(data):
@@ -58,7 +57,7 @@ def main(data):
5857
if params["BUTTON_PRESSED"]:
5958
fig, ax = plt.subplots(nrows=2, ncols=1, sharey=True, sharex=True)
6059
plt.xlabel("time (s)")
61-
fig.suptitle("({}) Modulation: {}, Signal-to-Noise Ratio: {}".format(params["IDX"], params["MOD"], params["SNR"]))
60+
fig.suptitle("({}) Modulation: {}, Signal-to-Noise Ratio: {} (In-Phase (I) and Quadrature (Q) Channels)".format(params["IDX"], params["MOD"], params["SNR"]))
6261
ax[0].plot(params["SIGNALS"][(params["MOD"], params["SNR"])][params["IDX"], 0, :])
6362
ax[1].plot(params["SIGNALS"][(params["MOD"], params["SNR"])][params["IDX"], 1, :])
6463
st.pyplot()

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
numpy
22
torch
3-
poutyne
4-
tqdm
5-
streamlit
3+
tqdm

0 commit comments

Comments
 (0)