Goorm-AI-04/Drone_RCS_Measurement
Viewer β’ Updated β’ 8.29M β’ 29
A high-performance Selective State Space Model (Mamba) for classifying Radar Cross Section (RCS) signatures of drones and objects.
This model was trained on the Drone_RCS_Measurement dataset:
StandardScalerModel Specifications:
d_model)d_state)[batch_size, 181, 1][batch_size, 10]Training Configuration:
import torch
import joblib
import numpy as np
from model_code import DroneMambaClassifier
# 1. Load model and preprocessing
model = DroneMambaClassifier(num_classes=10, d_model=256, depth=6)
model.load_state_dict(torch.load("pytorch_model.bin", map_location='cpu'))
scaler = joblib.load("scaler.pkl")
model.eval()
# 2. Prepare your RCS data (181 points from 0Β° to 180Β°)
rcs_signal = np.random.randn(181, 1) # Replace with your actual RCS measurements
# 3. Normalize and predict
normalized = scaler.transform(rcs_signal)
x = torch.tensor(normalized, dtype=torch.float32).unsqueeze(0)
with torch.no_grad():
logits = model(x)
probs = torch.softmax(logits, dim=1)
pred_class = logits.argmax(dim=1).item()
confidence = probs[0, pred_class].item()
print(f"Predicted Class: {pred_class}")
print(f"Confidence: {confidence*100:.2f}%")
# For multiple sequences
rcs_batch = np.random.randn(10, 181, 1) # 10 sequences
normalized_batch = scaler.transform(rcs_batch.reshape(-1, 181)).reshape(10, 181, 1)
x_batch = torch.tensor(normalized_batch, dtype=torch.float32)
with torch.no_grad():
predictions = model(x_batch).argmax(dim=1)
print(predictions) # Tensor of predicted classes
| File | Description |
|---|---|
pytorch_model.bin |
Model weights (state_dict) |
scaler.pkl |
StandardScaler fitted on training data |
model_code.py |
Model architecture definition |
confusion_matrix.png |
Test set confusion matrix visualization |
classification_report.txt |
Detailed per-class metrics |
per_class_metrics.csv |
Per-class accuracy table |
The Mamba architecture implements a selective SSM with:
h'(t) = Ah(t) + Bx(t)Ξt computed per tokenB, C, Ξt are input-dependent# Export to ONNX for production deployment
dummy_input = torch.randn(1, 181, 1)
torch.onnx.export(
model,
dummy_input,
"dronemamba.onnx",
input_names=['rcs_signal'],
output_names=['class_logits'],
dynamic_axes={'rcs_signal': {0: 'batch'}, 'class_logits': {0: 'batch'}}
)
If you use this model in your research, please cite:
@model{dronemamba2024,
title={DroneMamba-RCS: Selective State Space Model for Drone Classification},
author={Bombek1},
year={2024},
url={https://huggingface.co/Bombek1/DroneMamba-RCS}
}
@dataset{drone_rcs_2024,
title={Drone RCS Measurement Dataset},
author={Goorm-AI-04},
year={2024},
url={https://huggingface.co/datasets/Goorm-AI-04/Drone_RCS_Measurement}
}
MIT License - Free to use with attribution.