Natural Language-Powered Drone Tracking: Combine the precision of computer vision with the intuition of human language to track specific objects in drone footage.
The Drone Natural Language Tracker demonstrates how Vision Language Models (VLMs) can revolutionize autonomous systems by enabling natural language control of complex computer vision tasks. This project showcases drone-based object tracking that responds to human queries like "track all blue cars" or "find damaged vehicles" using state-of-the-art AI models.
Built with a fine-tuned YOLOv8n model on the VisDrone dataset, BotSORT tracking, and Qwen2.5-VL for natural language understanding, this system bridges the gap between human intuition and machine precision.
Baseline tracking using YOLOv8n fine-tuned on VisDrone dataset with BotSORT and ReID for persistent object tracking across frames.
Natural language query-based filtering: "Track red cars" - The system uses Qwen2.5-VL to analyze each detected vehicle and filter results based on the text description.
- šÆ Natural Language Queries: Filter objects using intuitive text descriptions
- š Real-time Processing: Live video analysis with immediate visual feedback
- š Interactive Dashboard: Streamlit-based UI with dual video displays and live statistics
- š¾ Experiment Logging: Automatic CSV logging with timestamped experiment sessions
- šØ Multi-tab Interface: Separate views for tracking and data analysis
- š Persistent Tracking: BotSORT algorithm maintains object identity across frames
- š§ Vision-Language Integration: Qwen2.5-VL model for intelligent object categorization
graph TD
A[Drone Video Feed] --> B[YOLOv8n Detection]
B --> C[BotSORT Tracking]
C --> D{Natural Language Query?}
D -->|Yes| E[Qwen2.5-VL Analysis]
D -->|No| F[Standard Visualization]
E --> G[Query-Filtered Results]
G --> H[Annotated Video Output]
F --> H
H --> I[CSV Logging]
I --> J[Live Dashboard Updates]
- Python 3.13 or higher
- Ollama installed locally
- CUDA-compatible GPU (recommended for optimal performance)
-
Clone the repository
git clone https://github.com/SalmanFarizN/drone-nl-tracker.git cd drone-nl-tracker -
Install dependencies (choose one method):
Using uv (recommended):
uv sync uv run streamlit run main.py
Using pip:
pip install -r requirements.txt streamlit run main.py
-
Setup Qwen2.5-VL model
ollama pull qwen2.5vl:7b
-
Launch the application
streamlit run main.py
The dashboard will open at
http://localhost:8501
drone-nl-tracker/
āāā š main.py # Streamlit application entry point
āāā š src/ # Core application modules
ā āāā utils.py # Computer vision utilities
ā āāā tab_tracking.py # Main tracking interface
ā āāā tab_logs.py # Data analysis interface
ā āāā file_io.py # CSV logging utilities
āāā š models/ # Pre-trained models
ā āāā yolov8n-VisDrone.pt # Fine-tuned YOLO model
ā āāā botsort.yaml # BotSORT configuration
āāā š data/ # Video files and logs
āāā š assets/ # Demo GIFs and documentation
āāā š docs/ # Sphinx documentation
āāā š pyproject.toml # Project dependencies (uv format)
āāā š requirements.txt # Dependencies (pip format)
- Launch the application
- Navigate to the š„ Tracking tab
- Click
ā¶ļø Start Detection to begin processing - View live results in the dual video display
- Enter your query in the text input (e.g., "blue cars", "red vehicles", "trucks")
- Click š Apply Query or press Enter
- The system will filter detections based on your description
- View filtered results in the annotated video feed
- š New Log File: Create a new timestamped experiment session
- ā Stop: Halt processing and clear current query
- š Logs: View live tracking statistics and data
- Object Detection: YOLOv8n fine-tuned on VisDrone dataset
- Object Tracking: BotSORT with Re-Identification (ReID)
- Vision-Language: Qwen2.5-VL 7B model via Ollama
- Video Source: CARLA 0.9.15 simulation environment
- GPU Acceleration: CUDA support for YOLOv8n inference
- Memory Management: Efficient frame processing with OpenCV
- Real-time Processing: Optimized pipeline for live video analysis
The system automatically logs tracking data to timestamped CSV files:
- Track ID: Unique identifier for each detected object
- Class Information: Object type and confidence scores
- Bounding Boxes: Spatial coordinates for each detection
- Natural Language Masks: Query-based filtering results
We welcome contributions! Please see our documentation for detailed development guidelines.
git clone https://github.com/SalmanFarizN/drone-nl-tracker.git
cd drone-nl-tracker
uv sync --dev
pre-commit installComprehensive documentation is available at: salmanfarizn.github.io/drone-nl-tracker
- Multi-drone coordination support
- Advanced query syntax (temporal, spatial constraints)
- Real-time streaming from live drone feeds
- Cloud deployment with WebRTC support
- Integration with additional VLM providers
- Custom model fine-tuning pipeline
This project is licensed under the MIT License - see the LICENSE file for details.
- VisDrone Dataset: For providing comprehensive drone imagery data
- Ultralytics: For the excellent YOLOv8 implementation
- Ollama Team: For making local LLM deployment accessible
- CARLA Simulator: For realistic drone simulation environment
- Qwen Team: For the powerful vision-language model
ā Star this repository if you find it useful!
Documentation ⢠Issues ⢠Discussions