Spaces:
Configuration error
Configuration error
| # π’ Indoor Localization and Navigation System | |
|  | |
|  | |
|  | |
| > A deep learning-based indoor positioning system with real-time A\* navigation, achieving **0β3 meter accuracy** β a significant improvement over existing methods. | |
| --- | |
| ## π Overview | |
| Indoor localization is a challenging problem due to the lack of GPS signals inside buildings and complex environments with walls, obstacles, and interference. Many existing systems rely on signal strength, Wi-Fi fingerprints, or other heuristics, but these approaches often have limited accuracy, with errors ranging from **0 to 5 meters**. | |
| This project builds upon the methodology proposed in the **WiDeep paper** with two key improvements: | |
| 1. β Replaced the weighted-sum approach with a **trainable softmax-based layer** for position approximation. | |
| 2. β Implemented a **grid-based mapping system** with the **A\* algorithm** for path planning and real-time navigation. | |
| --- | |
| ## π§ Approach | |
| ### Position Approximation | |
| The core of the localization method is a custom Keras layer called **`PositionAproxmator`**: | |
| - Takes a predefined list of possible positions in the environment (`PlacesPosition`). | |
| - Learns a small **trainable offset weight** `W` for each position, allowing the model to refine predicted locations. | |
| - Computes the final position via matrix multiplication of probabilities with `(PlacesPosition + W)`. | |
| ```python | |
| import tensorflow as tf | |
| from tensorflow import keras | |
| class PositionAproxmator(keras.layers.Layer): | |
| def __init__(self, PlacesPosition, name="PositionAproxmator"): | |
| super(PositionAproxmator, self).__init__() | |
| self.PlacesPosition = tf.constant(PlacesPosition, dtype=tf.float32, name="PlacesPositions") | |
| def build(self, inputs_shape): | |
| self.W = self.add_weight( | |
| shape=(inputs_shape[1], 2), | |
| trainable=True, | |
| dtype=tf.float32, | |
| name="PlacesWeight" | |
| ) | |
| def call(self, Probilites): | |
| return Probilites @ (self.PlacesPosition + self.W) | |
| def get_config(self): | |
| config = super().get_config() | |
| config.update({"PlacesPosition": self.PlacesPosition}) | |
| return config | |
| ``` | |
| --- | |
| ### πΊοΈ Mapping & Navigation | |
| Once the position is estimated, the system uses a **grid-based map** of the environment and applies the **A\* algorithm** to plan the optimal path from the current location to a target β enabling real-time indoor navigation. | |
| --- | |
| ## π System Workflow | |
| ``` | |
| Input Probabilities | |
| β | |
| βΌ | |
| Softmax Layer β Normalizes probabilities | |
| β | |
| βΌ | |
| PositionAproxmator β PlacesPosition + learned W offsets | |
| β | |
| βΌ | |
| Predicted (x, y) Position | |
| β | |
| βΌ | |
| Grid Map Representation | |
| β | |
| βΌ | |
| A* Path Planning | |
| β | |
| βΌ | |
| Navigation Instructions / Path | |
| ``` | |
| --- | |
| ## π Results | |
| | System | Error Range | | |
| |----------------|-------------| | |
| | **My System** | **0 β 3 m** | | |
| | WiDeep Paper | 0 β 5 m | | |
| By integrating mapping and A\* navigation, the system also generates accurate indoor routes, making it practical for real-world applications. | |
| --- | |
| ## π οΈ Tech Stack | |
| | Category | Tools / Libraries | | |
| |----------------------|------------------------------------------| | |
| | Language | Python 3.10 | | |
| | Deep Learning | TensorFlow / Keras | | |
| | Data Processing | NumPy, Pandas | | |
| | Visualization | Matplotlib, Seaborn | | |
| | Navigation | Custom Grid Map + A\* Algorithm | | |
| --- | |
| ## π Future Work | |
| - [ ] Real-time deployment on mobile devices | |
| - [ ] Multi-floor building support | |
| - [ ] Sensor fusion: Bluetooth, UWB, IMU | |
| - [ ] Dynamic obstacle avoidance | |
| --- | |
| ## π¬ Contact | |
| Feel free to reach out for collaborations, discussions, or contributions! |