| --- |
| license: apache-2.0 |
| language: en |
| library_name: keras |
| tags: |
| - intrusion-detection |
| - cyber-physical-systems |
| - iot-security |
| - lstm |
| - time-series |
| - cybersecurity |
| datasets: |
| - ToN_IoT |
| --- |
| |
| # ClimIDS: Sensor-Layer Intrusion Detection System |
|
|
| This model card is for **ClimIDS**, a lightweight, LSTM-based intrusion detection system (IDS) for the physical sensor layer of IoT deployments. |
|
|
| ## Model Description |
| ClimIDS analyzes time-series data from environmental sensors (temperature, pressure, humidity) to detect anomalies in climate-monitoring systems. Its lightweight architecture (~5,000 parameters) makes it suitable for edge devices. |
|
|
| - **Architecture:** `LSTM -> Dropout -> Dense -> Dense (Sigmoid)` |
| - **Dataset:** Trained on `IoT_Weather` subset of ToN_IoT |
| - **Performance:** 98.81% accuracy, 99.7% attack recall |
| |
| ## Intended Use |
| - **Primary Use:** Real-time binary classification of sensor telemetry |
| - **Input:** `(batch_size, 10, 3)` — features `[temperature, pressure, humidity]`, normalized |
| - **Output:** Float between 0.0 (Normal) and 1.0 (Attack), threshold 0.5 |
|
|
| ## How to Use |
| ```python |
| import tensorflow as tf |
| import numpy as np |
| from huggingface_hub import hf_hub_download |
| |
| MODEL_PATH = hf_hub_download("Codelord01/sensor_binary", "sensor_binary.keras") |
| model = tf.keras.models.load_model(MODEL_PATH) |
| model.summary() |
| |
| sample_data = np.random.rand(1, 10, 3).astype(np.float32) |
| prediction_prob = model.predict(sample_data) |
| predicted_class = 1 if prediction_prob > 0.5 else 0 |
| print(f"Prediction Probability: {prediction_prob:.4f}") |
| print("Anomaly Detected" if predicted_class == 1 else "Normal Conditions") |
| |