Article: Zijian Zhao, Fanyi Meng, Zhonghao Lyu, Hang Li, XiaoYang Li, Guangxu Zhu*, "CSI-BERT2: A BERT-inspired Framework for Efficient CSI Prediction and Classification in Wireless Communication and Sensing", (under review, IEEE Transactions on Mobile Computing (TMC))
Upgraded version of Official Repository for The Paper, Finding the Missing Data: A BERT-inspired Approach Against Package Loss in Wireless Sensing.
Notice: We have uploaded our model, pre-trained parameters (RS2002/WiGesture · Datasets at Hugging Face), and dataset (RS2002/WiCount · Datasets at Hugging Face) to Hugging Face.
Public Dataset: WiGesture, WiFall
Proposed Dataset: WiCount (./WiCount)
python pretrain.py --GAN --data_path <data path>
If you do not want to use the discriminator, you can delete the --GAN
, it keeps the same in the following.
python prediction.py --GAN --data_path <data path> --parameters <fold path of the whole pre-trained models>
python finetune.py --data_path <data path> --class_num <class num> --task <task name> --path <parameter path of the backbone> --mode <mode>
The mode can be set as 0, 1, or 2, corresponding to three experiments in our paper: 0: Training Set (100Hz), Testing Set (100Hz) 1: Training Set (100Hz+50Hz), Testing Set (100Hz+50Hz) 2: Training Set (100Hz), Testing Set (50Hz)
You can also change the gap
parameter in load_data_random
function to get more sampling rate.
The task name can be set as "action", "fall", or "people", representing different tasks when using different datasets: WiGesture: action (gesture recognition), people (people identification) WiFall: action (action recognition), fall (fall detection), people (people identification) WiCount: people (people number estimation)
python recover.py --data_path <data path> --parameters <parameter path of the pre-trained recoverer>
python prediction.py --data_path <data path> --parameters <fold path of the whole pretrained models> --eval_percent <the percentage of CSI sequence to be predicted>
The current version of our code does not support multiple GPUs. Please specify only one GPU or fix the relevant code. We would appreciate if you could share the code that can solve this problem.
@article{zhao2024mining,
title={CSI-BERT2: A BERT-inspired Framework for Efficient CSI Prediction and Classification in Wireless Communication and Sensing},
author={Zhao, Zijian and Meng, Fanyi and Lyu, Zhonghao and Li, Hang and Li, Xiaoyang and Zhu, Guangxu},
journal={arXiv preprint arXiv:2412.06861},
year={2024}
}