Skip to content

meghakalia/sensor_fusion_adaptive_net

Repository files navigation

Sensor Fusion for GPS Position Estimation

This repository contains code for training and evaluating a gated sensor fusion neural network for GPS position estimation. The project leverages PyTorch, Weights & Biases (wandb), and custom data loaders for handling sensor data.

Features

  • Custom PyTorch datasets for loading and batching sensor fusion data
  • Gated sensor fusion neural network model
  • Training and validation loops with early stopping
  • Inference pipeline for evaluating model performance
  • Integration with Weights & Biases for experiment tracking

Project Structure

  • dataloaders.py: Custom PyTorch Dataset classes for training and inference
  • gated_fusion_net.py: Implementation of the Gated Sensor Fusion neural network
  • train_loop.py: Training script with argument parsing, early stopping, and wandb logging
  • Infererence.py: Inference script for evaluating the model on test data
  • utils.py: Utility functions (e.g., plotting, reading folder names)
  • lists/: Text files listing data folders for training, validation, and testing

Setup

  1. Install dependencies:

    pip install -r requirements.txt

    Ensure you have torch, pandas, numpy, wandb, python-dotenv, and other required packages.

  2. Set up Weights & Biases:

    • Create a .env file with your WANDB API key:
      WANDB_API_KEY=your_wandb_api_key_here
      
  3. Prepare data:

    • Place your data folders and CSV files as referenced in the lists/ directory.

Usage

Training

Run the training loop with default or custom arguments:

python train_loop.py --train_list lists/train.txt --val_list lists/val.txt --seen_data_dir ./seen_subjects_test_set --output_dir ./no_drp_out_checkpoint

Inference

Run the inference script to evaluate the trained model:

python Infererence.py

Notes

  • The model expects CSV files named synced_gps_gt_roin.csv in each data folder.
  • Training and validation folder names should be listed in the corresponding text files in the lists/ directory.
  • Results and logs are tracked using wandb.

License

This project is for educational and research purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages