Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,40 +1,64 @@
|
|
| 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 |
-
python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
-
##
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
- **Metrics:** Paste your final test accuracy and confusion matrix stats.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- pytorch
|
| 7 |
+
- timeseries
|
| 8 |
+
- power-systems
|
| 9 |
+
- fault-detection
|
| 10 |
+
- computer-vision
|
| 11 |
+
- s-transform
|
| 12 |
+
pipeline_tag: image-classification
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# ChronoGrid FusionNet: IEEE 9-Bus Fault Detection
|
| 16 |
+
|
| 17 |
+
## Model Description
|
| 18 |
+
ChronoGrid FusionNet is a highly specialized deep learning architecture designed for the classification of electrical transmission line faults in the IEEE 9-Bus (WSCC) test system. It processes time-series electrical signals that have been transformed into 2D S-Transform heatmaps to detect and classify 11 different fault conditions.
|
| 19 |
+
|
| 20 |
+
The architecture is a fusion of three core components:
|
| 21 |
+
1. **1D CNN Backbone:** Extracts multi-band temporal distortions from the frequency dimension.
|
| 22 |
+
2. **BiLSTM Sequence Modeler:** Captures bidirectional evolution of the electrical transient over time.
|
| 23 |
+
3. **Self-Attention Mechanism:** Dynamically focuses on the most critical time-steps of the fault clearing process.
|
| 24 |
+
|
| 25 |
+
## Intended Uses
|
| 26 |
+
- **Academic Research:** Benchmarking fault detection algorithms on power systems.
|
| 27 |
+
- **Power System Analysis:** Classifying Single Line to Ground (SLG), Line to Line (LL), Double Line to Ground (LLG), and Three Phase (LLL) faults.
|
| 28 |
+
|
| 29 |
+
## How to Get Started with the Model
|
| 30 |
+
Because this is a custom PyTorch architecture, you must pass `trust_remote_code=True` when loading the model from Hugging Face.
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
import torch
|
| 34 |
+
from transformers import AutoModel, AutoConfig
|
| 35 |
+
from PIL import Image
|
| 36 |
+
import numpy as np
|
| 37 |
+
|
| 38 |
+
# 1. Load the model and configuration
|
| 39 |
+
repo_id = "Sanath2709/chronogrid-fusionnet"
|
| 40 |
+
config = AutoConfig.from_pretrained(repo_id, trust_remote_code=True)
|
| 41 |
+
model = AutoModel.from_pretrained(repo_id, config=config, trust_remote_code=True)
|
| 42 |
+
model.eval()
|
| 43 |
+
|
| 44 |
+
# 2. Preprocess an S-Transform Heatmap Image
|
| 45 |
+
image_path = "path/to/your/s_transform_heatmap.jpg"
|
| 46 |
+
img = Image.open(image_path).convert('L').resize((227, 227))
|
| 47 |
+
arr = np.array(img, dtype=np.float32) / 255.0
|
| 48 |
+
x = torch.tensor(arr).unsqueeze(0)
|
| 49 |
+
|
| 50 |
+
# 3. Run Inference
|
| 51 |
+
with torch.no_grad():
|
| 52 |
+
logits = model(x)[0]
|
| 53 |
+
probs = torch.softmax(logits, dim=1).squeeze().numpy()
|
| 54 |
+
|
| 55 |
+
# 4. Display Results
|
| 56 |
+
FAULT_CLASSES = ['AG','BG','CG','AB','AC','BC','ABG','ACG','BCG','ABCG','NF']
|
| 57 |
+
print("Predictions:", {FAULT_CLASSES[i]: float(probs[i]) for i in range(len(FAULT_CLASSES))})
|
| 58 |
```
|
| 59 |
|
| 60 |
+
## Training Data
|
| 61 |
+
The model was trained on synthetic data generated using the **WSCC 9-Bus system** in Simulink, simulating various fault locations, inception angles, and loads. The raw voltage and current signals were converted into 227x227 time-frequency heatmaps using the discrete S-Transform.
|
| 62 |
+
|
| 63 |
+
## License & Citation
|
| 64 |
+
If you use this model in your research, please refer to the attached manuscript or citation details once published.
|
|
|