This is a PyTorch implementation of BCRNet inference. The BCRNet network performance is improved with codeword mimic (CM) learning. The key results (BCRNet benchmark and BCRNet-CM) in paper Better Lightweight Network for Free: Codeword Mimic Learning for Massive MIMO CSI feedback can be reproduced.
The following requirements need to be installed.
- Python == 3.7
- PyTorch == 1.10.0
The channel state information (CSI) matrix is generated from COST2100 model and setting can be found in our paper. On the other hand, Chao-Kai Wen provides a pre-processed COST2100 dataset, which we adopt in BCsiNet training and inference. You can download it from Google Drive or Baidu Netdisk.
The checkpoints of our proposed BCRNet can be downloaded from Baidu Netdisk (passwd: 5ipq) or Google Drive
We recommend you to arrange the project tree as follows.
home
├── CodewordMimicFeedback # The cloned current repository
│ ├── dataset
│ ├── models
│ ├── utils
│ ├── main.py
├── COST2100 # COST2100 dataset downloaded following section A
│ ├── DATA_Htestin.mat
│ ├── ...
├── Experiments
│ ├── checkpoints # The checkpoints folder downloaded following section B
│ │ ├── in_cr4
│ │ ├── in_cr8
│ │ ├── ...
│ ├── run.sh # The bash script
...
The key results reported in Table I of the paper are presented as follows.
Compression Ratio | Methods | Scenario | NMSE | Params | Checkpoints Path |
---|---|---|---|---|---|
1/4 | BCRNet | indoor | -17.39dB | 33K | in_cr4/bcrnet.pth |
1/4 | BCRNet-CM | indoor | -19.25dB | 33K | in_cr4/bcrnet-cm.pth |
1/4 | BCRNet | outdoor | -8.90dB | 33K | out_cr4/bcrnet.pth |
1/4 | BCRNet-CM | outdoor | -10.00dB | 33K | out_cr4/bcrnet-cm.pth |
1/8 | BCRNet | indoor | -13.19dB | 17K | in_cr8/bcrnet.pth |
1/8 | BCRNet-CM | indoor | -13.90dB | 17K | in_cr8/bcrnet-cm.pth |
1/8 | BCRNet | outdoor | -6.31dB | 17K | out_cr8/bcrnet.pth |
1/8 | BCRNet-CM | outdoor | -6.73dB | 17K | out_cr8/bcrnet-cm.pth |
1/16 | BCRNet | indoor | -8.94dB | 8K | in_cr16/bcrnet.pth |
1/16 | BCRNet-CM | indoor | -10.36dB | 8K | in_cr16/bcrnet-cm.pth |
1/16 | BCRNet | outdoor | -4.36dB | 8K | out_cr16/bcrnet.pth |
1/16 | BCRNet-CM | outdoor | -4.53dB | 8K | out_cr16/bcrnet-cm.pth |
1/32 | BCRNet | indoor | -7.87dB | 4K | in_cr32/bcrnet.pth |
1/32 | BCRNet-CM | indoor | -8.20dB | 4K | in_cr32/bcrnet-cm.pth |
1/32 | BCRNet | outdoor | -2.91dB | 4K | out_cr32/bcrnet.pth |
1/32 | BCRNet-CM | outdoor | -2.98dB | 4K | out_cr32/bcrnet-cm.pth |
The key results reported in Table II of the paper are presented as follows. Note that the performance of the original CsiNet can be found in their papers CsiNet and CsiNet+.
Compression Ratio | Methods | Scenario | NMSE | Params | Checkpoints Path |
---|---|---|---|---|---|
1/4 | CsiNet-CM | indoor | -25.60dB | 1.049M | in_cr4/csinet-cm.pth |
1/4 | CsiNet-CM | outdoor | -10.09dB | 1.049M | out_cr4/csinet-cm.pth |
1/8 | CsiNet-CM | indoor | -15.33dB | 0.525M | in_cr8/csinet-cm.pth |
1/8 | CsiNet-CM | outdoor | -7.63dB | 0.525M | out_cr8/csinet-cm.pth |
1/16 | CsiNet-CM | indoor | -10.12dB | 0.262M | in_cr16/csinet-cm.pth |
1/16 | CsiNet-CM | outdoor | -5.02dB | 0.262M | out_cr16/csinet-cm.pth |
1/32 | CsiNet-CM | indoor | -8.75dB | 0.131M | in_cr32/csinet-cm.pth |
1/32 | CsiNet-CM | outdoor | -3.38dB | 0.131M | out_cr32/csinet-cm.pth |
In order to reproduce the aforementioned key results, you need to download the given dataset and checkpoints. Moreover, you should arrange your project tree as instructed. An example of Experiments/run.sh
can be found as follows.
python /home/CodewordMimicFeedback/main.py \
--data-dir '/home/COST2100' \
--scenario 'in' \
--model 'bcrnet' \
--pretrained './checkpoints/in_cr4/bcrnet.pth' \
--batch-size 200 \
--workers 0 \
--reduction 4 \
--cpu \
2>&1 | tee log.out
This repository is modified from the BCsiNet open source code. Please refer to it for more information.
Thank Chao-Kai Wen and Shi Jin group again for providing the pre-processed COST2100 dataset, you can find their related work named CsiNet in Github-Python_CsiNet.