Still working on the project...
- Clone the repository
git clone https://github.com/KumaarBalbir/droneAnalyzer.git- Create a virtual environment in the root directory of the project On Ubuntu or Debian based systems:
python3 -m venv <venv_name>On Windows:
python -m venv <venv_name>- Activate your virtual environment: On Ubuntu or Debian based systems:
source <venv_name>/bin/activateOn Windows:
<venv_name>\Scripts\activate- Install uv (a fast Python package manager that acts as a drop-in replacement for pip)
pip install uv- Install the project dependencies
uv pip install -r pyproject.toml- Run the project
streamlit run main.py --server.port 5000- View the project in your browser
http://localhost:5000- The project architecture:
-
Modular Design
- Separated concerns into distinct modules (processors, models, storage, alerts)
- Each module has a single responsibility
- Easy to extend and maintain
-
Data Flow Pipeline
Video Input → Frame Processing → Object Detection → Event Analysis → Storage/Alerts- Linear pipeline for predictable data flow
- Each stage processes data independently
- Easy to add new processing stages
-
Vision Language Model Choice (BLIP)
- Selected over CLIP for better scene understanding
- Provides detailed natural language descriptions
- More suitable for security surveillance use case
- Better at describing activities and relationships
-
Storage Design (will shift from in Memory to persistent storage)
- Frame-by-frame indexing for historical analysis
- Separate event logging for security incidents
- Enables efficient querying by time and object type
- Supports both real-time and historical analysis
-
Video Processing
- OpenCV for efficient frame capture and processing
- Configurable frame sampling rate (1 FPS default)
- Support for both live streams and recorded videos
- Memory-efficient processing
-
Object Detection
- YOLOv8 for real-time object detection
- Configurable confidence thresholds
- Supports multiple object classes
- Efficient inference on CPU/GPU
-
Data Structures
- Standardized frame data format
- Consistent event logging structure
- Type hints for better code maintainability
- JSON-compatible data structures
-
API Design
- Simple, intuitive interfaces
- Consistent method naming
- Clear input/output contracts
- Easy to integrate with other systems
- Scalability
- Modular design allows horizontal scaling
- Efficient indexing for quick queries
- Alert System
- Configurable security rules
- Multiple alert severity levels
- Real-time alert generation
- Historical alert tracking
-
Planned Enhancements
- Additional ML model support
- Enhanced query capabilities
- Advanced analytics features
- Integration with external systems
-
Integration Points
- Shift to persistent frame indexing
- Standard API endpoints
- Webhook support
- Database adapters
- Message queue integration
The full documentation is available at: https://KumaarBalbir.github.io/droneAnalyzer/
For local development:
cd docs
make html
# Open docs/build/html/index.html in your browser