Quick Start Guide
Get your malware classification model up and running in just a few minutes.Prerequisites
Installation
- Using uv (Recommended)
- Using pip
Launch the Dashboard
The app will automatically detect your hardware:
- CUDA GPU for NVIDIA graphics cards
- MPS for Apple Silicon (M1/M2/M3)
- CPU fallback if no GPU is available
Your First Model
Follow this workflow to train your first malware classifier:Create New Session
Click “New Session” in the header to start with a clean state
Sessions are automatically saved and can be resumed later from the “Past Sessions” dropdown
Configure Dataset
Navigate to 📊 Dataset page and complete these tabs:Tab 1: Selection
- The app automatically scans
dataset/malware/for class folders - Set train/validation/test splits (default: 70/15/15)
- View class distribution chart
- Target size:
224x224(recommended for transfer learning) - Normalization:
[0,1]orImageNet - Color mode:
Grayscale(typical for malware images)
- Select a preset:
Light,Moderate, orHeavy - Or configure custom augmentation parameters
- View random sample images with preprocessing applied
Build Model
Navigate to 🧠 Model page and choose an architecture:
- Transfer Learning (Recommended)
- Custom CNN
For best results with limited data:
Configure Training
Navigate to ⚙️ Training page:Quick Start Settings:
The sidebar shows configuration status:
- ✅ Dataset configured
- ✅ Model configured
- ✅ Training configured
Start Training
Navigate to 📈 Monitor page:
- Review your configuration summary
- Click “Start Training”
- Watch real-time metrics:
- Training & validation loss/accuracy
- Current learning rate
- Batch progress
- Time per epoch
- Pause/Resume: Temporarily halt training
- Stop: End training early
- Auto-checkpointing: Best model saved automatically
Evaluate Results
Navigate to 🎯 Results page:Available Visualizations:
- Learning curves (loss & accuracy over time)
- Confusion matrix with per-class accuracy
- Per-class metrics (precision, recall, F1-score)
- ROC curves for each class
- Training summary statistics
- Download confusion matrix
- Save metrics to CSV
- Export model checkpoint
Interpret Model (Optional)
Navigate to 🔍 Interpretability page:Visualization Tools:
Grad-CAM
Grad-CAM
Visualize what regions the model focuses on:
- Select an image from test set
- View heatmap overlay showing attention
- Compare true vs predicted labels
Misclassifications
Misclassifications
Analyze prediction errors:
- Grid view of misclassified images
- Confidence scores
- Confusion pairs (which classes get confused)
Embeddings (t-SNE/UMAP)
Embeddings (t-SNE/UMAP)
Explore learned feature space:
- 2D projection of final layer embeddings
- Color-coded by true/predicted class
- Identify clustering patterns
Example Training Session
Here’s what a typical training session looks like:Common Workflows
Quick Experiment
Goal: Test if transfer learning works for your dataset
- Use default dataset splits
- Pick ResNet50 with Feature Extraction
- Train for 10 epochs
- Check validation accuracy
Hyperparameter Tuning
Goal: Optimize learning rate and batch size
- Create baseline session
- Clone session for each experiment
- Vary one parameter at a time:
- LR: [0.0001, 0.001, 0.01]
- Batch: [16, 32, 64]
- Compare results on Results page
Architecture Search
Goal: Find best custom CNN architecture
- Start with simple baseline (2 conv blocks)
- Gradually increase depth
- Try different filter sizes
- Add regularization (dropout, batch norm)
Production Model
Goal: Train best possible model
- Use heavy data augmentation
- Fine-tune large model (ResNet101)
- Train until convergence (50+ epochs)
- Analyze misclassifications
- Iterate on augmentation/architecture
Troubleshooting
Out of Memory (OOM) Errors
Out of Memory (OOM) Errors
Solutions:
- Reduce batch size (try 16 or 8)
- Use smaller model (try EfficientNetB0 instead of ResNet101)
- Reduce image size (192x192 instead of 224x224)
- Close other GPU applications
- Enable gradient checkpointing (for very large models)
Training is Very Slow
Training is Very Slow
Check:
- Device being used (should be GPU, not CPU)
- View device info in header: “Device: CUDA” or “Device: MPS”
- If showing “Device: CPU”, check GPU drivers
- Increase batch size if memory allows
- Use mixed precision training (FP16)
- Ensure data augmentation isn’t too heavy
Model Not Learning (Flat Loss)
Model Not Learning (Flat Loss)
Possible causes:
- Learning rate too high or too low
- Model too deep/complex for dataset size
- Data not normalized properly
- Class imbalance not handled
- Try learning rate: 0.0001 → 0.001 → 0.01
- Enable Auto Class Weights
- Check preprocessing (normalize to [0,1] or ImageNet stats)
- Start with simpler model
Dataset Not Found
Dataset Not Found
Required structure:The
dataset/malware/ directory must exist relative to the app/ folder where you run Streamlit.Next Steps
Full Installation Guide
Detailed setup including GPU drivers and optional dependencies
Architecture Guide
Deep dive into model architectures and design patterns
Training Best Practices
Advanced techniques for better model performance
API Reference
Documentation for core modules and functions
Need help? Check the tooltips throughout the app (hover over ⓘ icons) for context-specific guidance.