A lightweight, prompt-driven cross-modal learning framework for real-time wildfire monitoring on resource-constrained edge devices.
- 90% accuracy on Kaggle Fire & Smoke dataset
- 2239 FPS inference on Raspberry Pi 5 (0.45ms latency)
- 0.36 MB model size with 8-bit quantization
- LoRA-based parameter-efficient fine-tuning
- Zero-shot capability for unseen environments
| Method | Acc. (%) | FPS | Latency (ms) | Size (MB) |
|---|---|---|---|---|
| COCA | 64 | 10 | 99.81 | 1010 |
| Few-shot LoRA | 71 | 2062 | 0.48 | 0.46 |
| Few-shot Hybrid | 46 | 2062 | 0.48 | 0.46 |
| GIT Caption | 71 | 12 | 82.34 | 690 |
| CLIP-ViT | 91 | 273 | 3.65 | 6.70 |
| P-LearnEdge (Ours) | 90 | 2239 | 0.45 | 0.36 |
# Clone the repository
git@github.com:spilabkorea/plearnedge.git
cd plearnedge
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtDownload the Kaggle Fire and Smoke dataset:
# Download from Google Drive
wget --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&id=1L_TOG_sWp4xI9ojwe3YHu46VxmCS5xP8" -O dataset.zip
# Extract
unzip dataset.zip -d data/
Expected structure:
data/
├── fire/
│ ├── 0000000001.jpg
│ └── ...
└── smoke/
├── 0000000001.jpg
└── ...
### Training
```bash
# Basic training
python model/plearnedge.py
### Inference
```bash
# Single image prediction + FPS
python model/plearnedge_fps.pyP-LearnEdge combines:
- Lightweight CNN (4 conv layers, 128D embeddings)
- LoRA layers (r=4, α=16) for efficient adaptation
- CLIP-style dual-encoder architecture
- Prompt-driven zero-shot classification
from models import FireClipModel
# Initialize model
model = FireClipModel(embedding_dim=128, num_classes=2)
# Inference
with torch.no_grad():
logits = model(image)
prediction = torch.argmax(logits, dim=1)# CLIP-ViT baseline
python baselines/clip.py
# COCA baseline
python baselines/coca.py
# Few-shot hybrid
python baselines/fewshot_hybrid.pyIf you use P-LearnEdge in your research, please cite:
@article{plearnedge2025,
title={A Label-Free Lightweight Prompt-Driven Cross-Modal Fire Detection on Robotic Edge Platforms},
author={HyeYoung et al.},
conference={ICRCV},
year={2025}
}This project is licensed under the MIT License - see LICENSE file.
- Author: SPILab Research Team
- Email: support@spilab.kr
- Website: https://spilab.ai/
- Kaggle Fire and Smoke Dataset contributors
- OpenAI CLIP team for inspiration
- SPILab Corporation for support
Note: This is research code. For production deployment, please contact us for optimized versions.