/usr/bin/python3.10 -m venv .gsrf
source .gsrf/bin/activate
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
pip install -e submodules/simple-knn -e submodules/complex-gaussian-tracer -e submodules/complex-gaussian-tracer-csi
pip install tqdm plyfile matplotlib scikit-image lpips seaborn pyyaml
pip install "numpy<2"Three datasets are used in this project:
| Dataset | Signal Type |
|---|---|
| RFID | Spectrum |
| BLE | Received Signal Strength Indicator (RSSI) |
| CSI | Channel State Information (CSI) |
All datasets are available at: https://github.com/XPengZhao/NeRF2
Place each dataset under ./data/:
./data/rfid/
./data/ble_rssi/
./data/csi/
Pretrained weights can be downloaded below. Place them under ./weights/.
| Dataset | Weights |
|---|---|
| RFID | download |
| BLE | download |
| CSI | download |
./weights/rfid/
./weights/ble_rssi/
./weights/csi/
bash run_rfid.shThis runs both training and inference using arguments/configs/rfid/exp1.yaml on GPU 0 by default.
bash run_rfid.sh --config path/to.yaml # use a different config
bash run_rfid.sh --train # training only
bash run_rfid.sh --infer # inference onlyPretrained weights (trained with rfid/exp1.yaml settings) are available in Section 2.
python inference_rfid.py --config <config> \
--model_path <model_dir> --output_dir <output_dir>
# example: using pretrained weights
python inference_rfid.py --config arguments/configs/rfid/exp1.yaml \
--model_path weights/rfid --output_dir results/rfidbash run_ble.shThis trains one model per gateway using arguments/configs/ble/exp1.yaml on GPU 0 by default. The first gateway is trained fully (geometry + FLE coefficients). Since all gateways share the same physical environment, subsequent gateways reuse the learned geometry and only train their FLE coefficients. Evaluation runs on the test set at each checkpoint.
bash run_ble.sh --config path/to.yaml # use a different configPretrained weights for all 21 gateways (trained with ble/exp1.yaml settings) are available in Section 2.
python inference_ble.py --config <config> \
--model_path <model_dir> --output_dir <output_dir>
# example: using pretrained weights
python inference_ble.py --config arguments/configs/ble/exp1.yaml \
--model_path weights/ble_rssi --output_dir results/ble_rssibash run_csi.shThis runs two-phase training using arguments/configs/csi/exp1.yaml on GPU 0 by default:
- Phase 1: Autoencoder pretraining — learns an encoder that maps uplink CSI to 3D TX positions. The pretrained encoder is saved to
logs/csi/pretrained_encoder.pthand reused on subsequent runs. - Phase 2: Per-antenna Gaussian splatting — the first antenna is trained fully (geometry + FLE coefficients). Since all antennas share the same physical environment, subsequent antennas reuse the learned geometry and only train their FLE coefficients. Evaluation runs at each test checkpoint.
bash run_csi.sh --config path/to.yaml # use a different config
# skip Phase 1 by providing a pretrained encoder
python main_csi.py --config arguments/configs/csi/exp1.yaml \
--pretrained_encoder /path/to/pretrained_encoder.pthPretrained weights for all 8 antennas (trained with csi/exp1.yaml settings) are available in Section 2.
python inference_csi.py --config <config> \
--model_path <model_dir> --output_dir <output_dir>
# example: using pretrained weights
python inference_csi.py --config arguments/configs/csi/exp1.yaml \
--model_path weights/csi --output_dir results/csiThis codebase is adapted from 3D Gaussian Splatting (3DGS) by the GraphDECO research group at Inria.