File size: 1,618 Bytes
173be5c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
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")