YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
AI Sentinel - Behavioral Analysis Application
A Flask-based web application for real-time behavioral pattern analysis and anomaly detection using AI models.
Features
- Mouse Dynamics Analysis: Captures and analyzes mouse movement patterns
- Typing Pattern Analysis: Analyzes typing speed and patterns with 250 WPM threshold
- Real-time Monitoring: Live behavioral pattern detection
- AI-powered Classification: Distinguishes between human and robotic behavior
Project Structure
ai-challenge/src/
βββ app.py # Main Flask application
βββ model_definition.py # PyTorch model architecture
βββ behavior_model.pth # Trained mouse dynamics model
βββ typing_model.pkl # Trained typing pattern model
βββ templates/ # HTML templates
β βββ index.html # Landing page
β βββ main.html # Command center
β βββ about.html # About page
βββ requirements.txt # Python dependencies
βββ run.py # Application startup script
Installation & Setup
Navigate to the project directory:
cd ai-challenge/srcInstall dependencies:
pip install -r requirements.txtRun the application:
python run.pyOr alternatively:
python app.py
Usage
- Start the application using one of the methods above
- Open your browser and go to
http://localhost:5000 - Navigate to the Command Center at
http://localhost:5000/main - Test the features:
- Mouse Dynamics: Move your mouse in the monitoring area
- Typing Analysis: Enter text for pattern analysis
API Endpoints
GET /- Landing pageGET /main- Command center interfaceGET /about- About pagePOST /predict- Mouse dynamics predictionPOST /predict_typing- Typing pattern prediction
Deployment
For deployment on platforms like Render:
- Ensure all files are in the
src/directory - Set the build command:
pip install -r requirements.txt - Set the start command:
gunicorn app:app --bind 0.0.0.0:$PORT - The application will be available at the provided URL
Technical Details
- Framework: Flask 2.3.3
- ML Framework: PyTorch 2.1.0
- ML Library: Scikit-learn 1.3.0
- Typing Speed Threshold: 250 WPM (above this = ROBOT classification)
- Model Types:
- Mouse Dynamics: Transformer-based neural network
- Typing Patterns: TF-IDF + Machine Learning classifier
Troubleshooting
- Model Loading Issues: Ensure
behavior_model.pthandtyping_model.pklare in the same directory asapp.py - Port Issues: The application runs on port 5000 by default
- Dependencies: Make sure all requirements are installed correctly
License
This project is part of the AI Sentinel behavioral analysis system.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support