This application provides a transparent overlay for real-time image analysis using KoboldCPP or Ollama. It captures screenshots of a selected region or the entire screen and analyzes them using AI, providing descriptions and alerts based on user-defined conditions. Currently tested only on Windows, but might be also Linux-compatible.
update-Video.mp4
2.update.mp4
- Transparent overlay that stays on top of other windows
- Customizable capture region selection
- Real-time screen analysis using KoboldCPP or Ollama
- Customizable system prompts for analysis
- Pause/Resume functionality
- Alert system for specific conditions
- Ability to save analysis results
- Resizable overlay
- Hide/show buttons by double clicking the overlay
- Toggle overlay visibility during screenshots
- Saves analysis history to SQL database
- Search and view analysis history
- Export analysis history to JSON or CSV file
- Set analysis Start and End times
- Switch between KoboldCPP and Ollama backends
- Choose Ollama model for analysis
- Python 3.8+
- PyQt5
- pyautogui
- Pillow
- requests
-
Clone this repository:
git clone https://github.com/PasiKoodaa/Screen-Analysis-Overlay cd image-analysis-overlay
-
Set up a Python environment:
conda create -n screen-analysis python=3.9 conda activate screen-analysis pip install -r requirements.txt
python -m venv venv venv\Scripts\activate pip install -r requirements.txt
-
Ensure you have KoboldCPP running locally on
http://localhost:5001
or Ollama running onhttp://localhost:11434
. Adjust theKOBOLDCPP_URL
in the script if your setup is different.
-
Run the application:
python main.py
-
Use the buttons or right-click context menu to:
- View history and search history
- Export history to JSON or CSV
- Select a capture region
- Update the analysis prompt
- Pause/Resume analysis
- Set alert conditions
- Save analysis results
- Resize the overlay
- Toggle overlay visibility during screenshots
- Select backend (KoboldCPP or Ollama)
- Choose Ollama model (when using Ollama backend)
-
The overlay will continuously capture and analyze the selected region, displaying results in real-time.
- Adjust the
KOBOLDCPP_URL
variable in the script if your KoboldCPP server is running on a different address. - Modify the
system_prompt
variable to change the default analysis prompt.
- Ensure Ollama is installed and running on your system.
- In the application, click "Select Backend" button.
- Choose "Ollama" as the backend.
- Enter the desired Ollama model name (e.g., "llava" or "minicpm-v").
- Click "OK" to confirm the selection.