How guifagundes01/transformer-locindoor works
Project type and purpose
• Transformer-Localization is a machine-learning research pipeline focused on indoor localization.
• It provides baseline KNN experiments and a Transformer-based localization model (tLoc) with data augmentation, filtering, training, and inference stages.
File structure
• Top level:
• data/ — raw and preprocessed CSV/NumPy geometry files
• experiments/ — shell scripts and result logs for KNN experiments
• figures/ — (presumably output visualization)
• localization/ — core Python package with submodules:
– augmentation/ — augmentation routines and tests
– dataset/ — dataset definitions/loaders for RSS, language masks, building geometry
– models/ — model building blocks (_feedforward, _rnn, positional encoding, RBF model)
– scripts/ — CLI entry points for running KNN, training tLoc, filtering data, etc.
– transformations/ — ranking-based dataset transformations and tests
– utils/ — constants, determinism helpers
• experimentation.ipynb, tests.ipynb — notebooks for exploratory analysis
• Makefile, .gitignore, requirements.txt
README
• Provides CLI usage for KNN and tLoc
• Describes a 4-step workflow for training, filtering, retraining, and inference
• Indicates that two main “systems” coexist: a KNN baseline and the Transformer-based tLoc pipeline
Main components
a. Data Layer
• Raw Data: data/*.csv, data/geometry_building_*.npy
• Augmented Data: data/augmented* and data/filtered folders
b. Preprocessing & Augmentation
• localization.augmentation (augmentation.py, augmentation_rbf_model.py)
• localization.transformations (ranking_based.py)
c. Dataset & Loader
• localization.dataset (RSSDataset, LangDataset, UjiIndoorLoc)
• langmaskdataset for language-masked input
d. Model Training & Architecture
• tLoc model: feedforward + positional encoding + lock-in encoder + RNN layers (in localization.models)
• RBF model variant (RBF-based augmentor)
e. Baseline Experiments
• KNN: run_knn script, experiments/knn.sh
f. Filtering & Retraining
• Scripts: filter_tloc, train_tloc_filtered
g. Inference
• run_tloc (with building/floor arguments)
Relationships and interactions
• Data flows from Raw Data → Augmentation/Filtering → Dataset loaders → Model training → Trained model
• Experiments branch off for KNN (no model training) versus full tLoc pipeline
• Utilities (constants, determinism) are shared across augmentation, dataset, and model components
Architectural patterns and technologies
• Modular Python package (localization/) following separation of concerns
• Test-driven for augmentation and transformations
• Scripts as thin orchestration layers (Unix CLI + -m localization.scripts.*)
• Data-centric, batch pipeline (no microservices; single process)