This project analyzes edge device behavior by monitoring CNN performance metrics and device metrics.
The goal is to identify unusual device states, such as blurred inputs, high CPU stress, or other conditions that affect inference reliability.
Metrics collected include:
- Latency:
latency_mean_ms,latency_std_ms - Confidence:
confidence_mean,confidence_std - Entropy:
entropy_mean,entropy_std - Top-2 difference:
top2_diff_mean
Data was generated by simulating edge device behavior in Docker, including blurred images, normal images, and CPU stress scenarios.
- Simulated normal and unusual device states
- Collected both model-level and device-level metrics
- Trained a Multi-Layer Perceptron (MLP) using tabular metrics
- Evaluated the model on accuracy and detection performance
- Converted the MLP from FP32 → INT8 for deployment efficiency
- Achieved ~50% reduction in model size with minimal accuracy loss
| Metric | FP32 | INT8 |
|---|---|---|
| Model Size | 49.85 KB | 23.41 KB |
| Accuracy | 95% | 94.5% |
Model before quantization
Model post quantization
- Combining model metrics and device metrics can improve detection of unusual device states
- INT8 quantization reduces model size with minimal impact on accuracy, making it suitable for real-time edge deployment
- Simulated anomalies (blurred images, CPU stress) provide a safe and repeatable test setup for edge models
- Python, PyTorch
- Docker (for simulation)
- Numpy, Pandas, Matplotlib/Seaborn (for visualizations)