You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-36Lines changed: 72 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
# Spectrogram Segmentation
2
2
3
-
The successful application of [semantic segmentation](https://www.ibm.com/topics/semantic-segmentation) to radiofrequency (RF) spectrograms holds significant applications
4
-
for [spectrum sensing](https://iopscience.iop.org/article/10.1088/1742-6596/2261/1/012016#:~:text=In%20cognitive%20radio%2C%20spectrum%20sensing,user%20can%20use%20the%20spectrum.) and serves as a foundational example showcasing the near-term feasibility of
3
+
The successful application of [semantic segmentation](https://www.ibm.com/topics/semantic-segmentation) to radiofrequency (RF) spectrograms has significant
4
+
implications for [spectrum sensing](https://iopscience.iop.org/article/10.1088/1742-6596/2261/1/012016#:~:text=In%20cognitive%20radio%2C%20spectrum%20sensing,user%20can%20use%20the%20spectrum.), and serves as a foundational example showcasing the near-term feasibility of
In this example, we use [PyTorch](https://pytorch.org/) and [Lightning](https://lightning.ai/docs/pytorch/stable/) to train a segmentation model to identify and
8
8
differentiate between 5G NR and 4G LTE signals within wideband spectrograms.
9
9
10
10
Qoherent's mission to drive the creation of intelligent radio technology requires a combination of open-source and
11
11
proprietary tools. This example, which leverages open-source tools and machine learning frameworks to train on
12
-
synthetic radio data generated using MATLAB, showcases our commitment to interoperability and our tool-agnostic
13
-
approach to innovation.
12
+
synthetic radio data generated using MATLAB's powerful 5G and LTE toolboxes, showcases our commitment to
13
+
interoperability and our tool-agnostic approach to innovation.
14
14
15
-
Classification results are comparable to those reported by MathWorks' AI-based network. For more information,
16
-
please refer to the following article by MathWorks:
15
+
Classification results are comparable to those achieved by MathWorks' custom network, albeit with more learnables.
16
+
For more information, please refer to the following article by MathWorks:
17
17
[Spectrum Sensing with Deep Learning to Identify 5G and LTE Signals](https://www.mathworks.com/help/comm/ug/spectrum-sensing-with-deep-learning-to-identify-5g-and-lte-signals.html).
18
18
19
19
If you found this example interesting or helpful, don't forget to give it a star! ⭐
@@ -24,15 +24,15 @@ If you found this example interesting or helpful, don't forget to give it a star
24
24
This example is provided as a Jupyter Notebook. You have the option to either run this example locally or in Google
25
25
Colab.
26
26
27
-
To run this example locally, you'll need to download the project and dataset and set up a Conda
28
-
virtual environment. If this seems daunting, we recommend running this example on Google Colab.
27
+
To run this example locally, you'll need to download the project and dataset and set up a Python
28
+
virtual environment. If this seems daunting, we recommend running this example on Google Colab (Coming soon!).
29
29
30
30
### Running this example locally
31
31
32
-
Please note that running this example locally will require approximately 10 GB of free space. Please ensure you
32
+
Please note that running this example locally will require approximately 6.1 GB of free space. Please ensure you
33
33
have sufficient space available prior to proceeding.
34
34
35
-
1. Ensure that [Git](https://git-scm.com/downloads) and [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) are installed on the computer where you plan to run this example.
35
+
1. Ensure that [Git](https://git-scm.com/downloads) and [Python](https://www.python.org/downloads/) are installed on the computer where you plan to run this example.
36
36
Additionally, if you'd like to accelerate model training with a GPU, you'll require [CUDA](https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html).
3. Create a Conda environment using the provided `environment.yml` file:
45
+
3. Create and activate a Python [virtual environment](https://docs.python.org/3/library/venv.html). This is a best practice for isolating project dependencies.
46
+
47
+
<details>
48
+
<summary><strong>Windows</strong></summary>
49
+
50
+
Use the following command to create a new directory named `venv` within the project directory:
51
+
```commandline
52
+
python -m venv venv
53
+
```
54
+
55
+
Then, activate the virtual environment with:
56
+
```commandline
57
+
venv\Scripts\activate
58
+
```
59
+
60
+
</details>
61
+
62
+
<details>
63
+
<summary><strong>Linux/Mac</strong></summary>
64
+
65
+
Use the following command to create a new directory named `venv` within the project directory:
46
66
```commandline
47
-
conda env create -f environment.yml
67
+
python3 -m venv venv
48
68
```
49
-
This will create a new Conda environment named `spectrogram-segmentation` within the Conda installation directory.
50
69
70
+
Then, activate the virtual environment with:
71
+
```commandline
72
+
source venv/bin/activate
73
+
```
74
+
75
+
</details>
76
+
77
+
Activating the virtual environment should modify the command prompt to show `(venv)` at the beginning, indicating
78
+
that the virtual environment is active.
51
79
52
-
4. Active the environment:
80
+
81
+
4. Install project dependencies from the provided `requirements.txt` file:
53
82
```commandline
54
-
conda activate spectrogram-segmentation
83
+
pip install -r requirements.txt
55
84
```
56
85
57
86
58
-
5. Download and unpack the spectrum sensing dataset:
87
+
5. Download the spectrum sensing dataset.
88
+
89
+
<details>
90
+
<summary><strong>Windows</strong></summary>
91
+
59
92
```commandline
60
93
python download_dataset.py
61
94
```
62
-
This command will create a new directory named `SpectrumSensingDataset` at the project's root. The
63
-
MathWorks Spectrum Sensing dataset will be downloaded and unpacked into this directory automatically.
95
+
96
+
</details>
97
+
98
+
<details>
99
+
<summary><strong>Linux/Mac</strong></summary>
100
+
101
+
```commandline
102
+
python3 download_dataset.py
103
+
```
104
+
105
+
</details>
106
+
107
+
This will download the `spectrum_sensing_dataset.hdf5` source file to the project's root directory.
8. Give yourself a pat on the back - you're all set up and ready to explore the example! For more information on
79
-
navigating the Jupyter Notebook interface and executing code, please check out this tutorial by the Codecademy
123
+
navigating the Jupyter Notebook interface and executing code cells, please check out this tutorial by the Codecademy
80
124
Team: [How To Use Jupyter Notebooks](https://www.codecademy.com/article/how-to-use-jupyter-notebooks).
81
125
82
126
Depending on your system specifications and the availability of a CUDA, running this example locally may take
83
127
several minutes. If a cell is taking too long to execute, you can interrupt its execution by clicking the "Kernel"
84
128
menu and selecting "Interrupt Kernel" or by pressing `Ctrl + C` in the terminal where Jupyter Notebook is running.
85
129
86
130
87
-
9. After you finish exploring, consider removing the dataset from your system and deleting the Conda environment to
88
-
free up space. You can delete the Conda environment using the following command:
89
-
```commandline
90
-
conda env remove --name spectrogram-segmentation
91
-
```
92
-
93
-
### Running this example in Google Colab
94
-
95
-
**Coming soon:** Don't want the hassle of downloading the project and dataset and setting up a Conda environment?
96
-
We've shared the notebook on Google Colab: [Spectrogram Segmentation]().
131
+
9. After you finish exploring, consider removing the dataset from your system and deleting the virtual environment to
132
+
free up space. Remember to deactivate the virtual environment using the deactivate command before deleting the folder.
97
133
98
134
99
135
## 🤝 Contribution
@@ -119,10 +155,10 @@ This work is a product of the collaborative efforts of the Qoherent team. Of spe
119
155
120
156
## 🙏 Attribution
121
157
122
-
The dataset used in this example was prepared by MathWorks and is publicly available [here](https://www.mathworks.com/supportfiles/spc/SpectrumSensing/SpectrumSenseTrainingDataNetwork.tar.gz). For more information
123
-
on how this dataset was generated or to generate further spectrum data, please refer to MathWork's article on spectrum
124
-
sensing. For more information about Qoherent's use of MATLAB to accelerate intelligent radio research, check out our
The dataset used in this example was prepared by MathWorks using their 5G and LTE toolboxes and is publicly available
159
+
[here](https://www.mathworks.com/supportfiles/spc/SpectrumSensing/SpectrumSenseTrainingDataNetwork.tar.gz). For more information on how this dataset was generated or to generate further spectrum data, please refer
160
+
to MathWork's article on spectrum sensing. For more information about Qoherent's use of MATLAB to accelerate
161
+
intelligent radio research, check out our [customer story](https://www.mathworks.com/company/user_stories/qoherent-uses-matlab-to-accelerate-research-on-next-generation-ai-for-wireless.html).
126
162
127
163
The DeepLabv3 models used in this example were initially proposed by Chen _et al._ and are further discussed
128
164
in their 2017 paper titled '[Rethinking Atrous Convolution for Semantic Image Segmentation](https://arxiv.org/abs/1706.05587)'. The MobileNetV3
0 commit comments