Bulletproof Neural Network Recipe
Automate augmentation search for PyTorch vision models. Classification, detection, XAI explainability, and a real-time dashboard — all in one package.
pip install "bnnr[dashboard]"How BNNR works
A closed-loop pipeline that trains, diagnoses, repairs, and proves — so you ship models that actually work in production.
Train your model
Start with your PyTorch model and data. BNNR trains a baseline, then iteratively evaluates candidate augmentations — keeping only those that measurably improve performance.
Understand with XAI
OptiCAM, GradCAM, NMF, and CRAFT saliency maps reveal what the model focuses on. Per-class diagnoses expose blind spots and biases invisible to accuracy alone.
Fix with ICD / AICD
Intelligent Coarse Dropout (ICD) masks salient regions, forcing the model to learn from context. Anti-ICD (AICD) sharpens focus on key features. Both are XAI-driven and automatic.
Prove with evidence
A structured report with metrics, XAI heatmaps, branch decisions, and before/after comparisons. Shareable, auditable, and ready for stakeholders or regulatory review.
Everything you need for better models
BNNR combines augmentation search, explainability, and real-time monitoring into a single, cohesive toolkit.
Auto-Augment Search
Iterative branching strategy tests augmentations against a baseline, keeping only those that improve performance. No manual tuning needed.
Classification + Detection
Same workflow for both tasks. Accuracy for classification, mAP for detection. Bbox-aware augmentations automatically update coordinates.
XAI Explainability
OptiCAM, GradCAM, NMF, and CRAFT heatmaps show why the model improves. Per-class diagnoses with severity and trend analysis.
ICD & AICD Augmentations
XAI-driven augmentations that use saliency maps to intelligently mask or focus regions. Forces the model to learn robust features instead of shortcuts.
8 Novel Augmentations
Unique texture-rich transforms: ChurchNoise, TeaStains, LuxferGlass, ProCAM, DifPresets, Smugs, Drust, and BasicAugmentation — designed for real-world domains.
GPU-Native Speed
ChurchNoise, ProCAM, DifPresets, ICD, and AICD run natively on CUDA tensors. Kornia integration for differentiable augmentations.
Real-time Dashboard
Live monitoring with 512×512 high-res previews, branch decision trees, per-class metrics, and XAI insights. Accessible from your phone via QR code.
Auditable Reports
Structured JSON reports with metrics, XAI heatmaps, and augmentation decisions. Export static dashboards for stakeholder review or regulatory compliance.
Simple yet powerful API
Whether you're doing image classification or object detection, BNNR adapts to your workflow with minimal code.
from bnnr import quick_run, BNNRConfig
result = quick_run(
model, train_loader, val_loader,
config=BNNRConfig(
m_epochs=5,
max_iterations=3,
device="auto",
)
)
print(f"Best: {result.best_metrics}")
# Best: {'accuracy': 0.847, 'f1_macro': 0.845}Real-time dashboard
Monitor your training live with branch decision trees, metrics charts, augmentation previews, and XAI insights — all from your browser or phone.
Interactive visualization of the augmentation search tree. Click nodes for details, hover for metrics.
Scan the QR code printed in your terminal to monitor training from your phone. Full dashboard, responsive layout.
Try it in Google Colab
Novel augmentations
Beyond standard flips and crops — texture-rich transforms and XAI-driven augmentations that force your model to learn better features.