AI-powered visual monitoring system using Vision Language Models (GPT-4V, Claude, Gemini) to analyze manufacturing equipment in real-time. Detects anomalies, safety hazards, and maintenance needs through camera feeds with automated alerts. Supports cloud API, Raspberry Pi 4, and offline edge deployment
1
stars
1
commits
Python
primary language
Dec 17, 2025
updated
A comprehensive Vision Language Model (VLM) based system for predictive maintenance that detects wear & tear, rust, cracks, fire, smoke, sparks, and other equipment issues without requiring training data.
cd C:\VLM
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy .env.example to .env and add your API keys:
copy .env.example .env
Edit .env and add your keys:
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
GOOGLE_API_KEY=your_key_here
from maintenance_analyzer import MaintenanceAnalyzer
# Initialize with your preferred VLM
analyzer = MaintenanceAnalyzer("gpt4v") # or "claude", "gemini", "llava"
# Analyze an image
result = analyzer.analyze_equipment("equipment.jpg")
# Print summary
print(analyzer.generate_summary(result))
from monitoring_system import MonitoringSystem
# Start continuous monitoring
monitor = MonitoringSystem(
vlm_type="gpt4v",
camera_source=0, # Webcam
check_interval=300 # Check every 5 minutes
)
monitor.start_monitoring()
# Analyze multiple images
images = ["img1.jpg", "img2.jpg", "img3.jpg"]
results = analyzer.batch_analyze(images)
All examples are in the examples/ folder:
example_single_image.py - Analyze a single equipment imageexample_batch_analysis.py - Analyze multiple images at onceexample_live_camera.py - Capture and analyze from cameraexample_continuous_monitoring.py - Run 24/7 monitoringexample_vlm_comparison.py - Compare different VLMsexample_safety_check.py - Quick critical safety checkRun any example:
python examples\example_single_image.py
| VLM | Pros | Cons | Cost |
|---|---|---|---|
| GPT-4 Vision | Best accuracy, fast | Requires API key | ~$0.01/image |
| Claude 3 | Great detail | Requires API key | ~$0.01/image |
| Gemini | Fast, good balance | Requires API key | Free tier available |
| VLM | Pros | Cons |
|---|---|---|
| LLaVA | Free, private, offline | Lower accuracy, slower, needs GPU |
The system can detect:
{
"defects_found": [
{
"type": "rust_corrosion",
"severity": "medium",
"confidence": 0.85,
"location": "bottom left corner of housing",
"description": "Surface rust visible on metal casing",
"recommended_action": "Clean and apply protective coating"
}
],
"overall_condition": "fair",
"immediate_action_required": false,
"summary": "Minor surface corrosion detected, no critical issues"
}
Configure alerts in .env:
ALERT_EMAIL=maintenance@company.com
ALERT_WEBHOOK_URL=https://your-webhook.com
Alerts are triggered for:
VLM/
โโโ config.py # Configuration
โโโ vlm_base.py # Base VLM interface
โโโ vlm_gpt4.py # GPT-4 Vision implementation
โโโ vlm_claude.py # Claude 3 implementation
โโโ vlm_gemini.py # Gemini implementation
โโโ vlm_llava.py # LLaVA local implementation
โโโ maintenance_analyzer.py # Main analyzer
โโโ camera_capture.py # Camera integration
โโโ monitoring_system.py # Continuous monitoring
โโโ alert_system.py # Alert handling
โโโ examples/ # Usage examples
โโโ output/ # Captured images
โโโ reports/ # Analysis reports
.env: OPENAI_API_KEY=sk-....env: ANTHROPIC_API_KEY=sk-ant-....env: GOOGLE_API_KEY=AIza...Edit vlm_base.py to add custom inspection prompts:
CUSTOM_PROMPT = """
Look specifically for:
- Your specific defect type
- Your specific conditions
...
"""
Edit config.py:
CONFIDENCE_THRESHOLD = 0.7 # Higher = fewer false positives
For issues or questions:
config.pyMIT License - Free to use and modify
Ready to start? Run: python examples\example_single_image.py
1 commits
Python
87.4%
HTML
10.9%
Shell
1.7%
AI-powered visual monitoring system using Vision Language Models (GPT-4V, Claude, Gemini) to analyze manufacturing equipment in real-time. Detects anomalies, safety hazards, and maintenance needs through camera feeds with automated alerts. Supports cloud API, Raspberry Pi 4, and offline edge deployment
1
stars
1
commits
Python
primary language
Dec 17, 2025
updated
A comprehensive Vision Language Model (VLM) based system for predictive maintenance that detects wear & tear, rust, cracks, fire, smoke, sparks, and other equipment issues without requiring training data.
cd C:\VLM
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy .env.example to .env and add your API keys:
copy .env.example .env
Edit .env and add your keys:
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
GOOGLE_API_KEY=your_key_here
from maintenance_analyzer import MaintenanceAnalyzer
# Initialize with your preferred VLM
analyzer = MaintenanceAnalyzer("gpt4v") # or "claude", "gemini", "llava"
# Analyze an image
result = analyzer.analyze_equipment("equipment.jpg")
# Print summary
print(analyzer.generate_summary(result))
from monitoring_system import MonitoringSystem
# Start continuous monitoring
monitor = MonitoringSystem(
vlm_type="gpt4v",
camera_source=0, # Webcam
check_interval=300 # Check every 5 minutes
)
monitor.start_monitoring()
# Analyze multiple images
images = ["img1.jpg", "img2.jpg", "img3.jpg"]
results = analyzer.batch_analyze(images)
All examples are in the examples/ folder:
example_single_image.py - Analyze a single equipment imageexample_batch_analysis.py - Analyze multiple images at onceexample_live_camera.py - Capture and analyze from cameraexample_continuous_monitoring.py - Run 24/7 monitoringexample_vlm_comparison.py - Compare different VLMsexample_safety_check.py - Quick critical safety checkRun any example:
python examples\example_single_image.py
| VLM | Pros | Cons | Cost |
|---|---|---|---|
| GPT-4 Vision | Best accuracy, fast | Requires API key | ~$0.01/image |
| Claude 3 | Great detail | Requires API key | ~$0.01/image |
| Gemini | Fast, good balance | Requires API key | Free tier available |
| VLM | Pros | Cons |
|---|---|---|
| LLaVA | Free, private, offline | Lower accuracy, slower, needs GPU |
The system can detect:
{
"defects_found": [
{
"type": "rust_corrosion",
"severity": "medium",
"confidence": 0.85,
"location": "bottom left corner of housing",
"description": "Surface rust visible on metal casing",
"recommended_action": "Clean and apply protective coating"
}
],
"overall_condition": "fair",
"immediate_action_required": false,
"summary": "Minor surface corrosion detected, no critical issues"
}
Configure alerts in .env:
ALERT_EMAIL=maintenance@company.com
ALERT_WEBHOOK_URL=https://your-webhook.com
Alerts are triggered for:
VLM/
โโโ config.py # Configuration
โโโ vlm_base.py # Base VLM interface
โโโ vlm_gpt4.py # GPT-4 Vision implementation
โโโ vlm_claude.py # Claude 3 implementation
โโโ vlm_gemini.py # Gemini implementation
โโโ vlm_llava.py # LLaVA local implementation
โโโ maintenance_analyzer.py # Main analyzer
โโโ camera_capture.py # Camera integration
โโโ monitoring_system.py # Continuous monitoring
โโโ alert_system.py # Alert handling
โโโ examples/ # Usage examples
โโโ output/ # Captured images
โโโ reports/ # Analysis reports
.env: OPENAI_API_KEY=sk-....env: ANTHROPIC_API_KEY=sk-ant-....env: GOOGLE_API_KEY=AIza...Edit vlm_base.py to add custom inspection prompts:
CUSTOM_PROMPT = """
Look specifically for:
- Your specific defect type
- Your specific conditions
...
"""
Edit config.py:
CONFIDENCE_THRESHOLD = 0.7 # Higher = fewer false positives
For issues or questions:
config.pyMIT License - Free to use and modify
Ready to start? Run: python examples\example_single_image.py
1 commits
Python
87.4%
HTML
10.9%
Shell
1.7%