v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
108
verify_models.py
Normal file
108
verify_models.py
Normal file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Script de vérification de l'état réel des modèles dans RPA Vision V3.
|
||||
Vérifie si les modèles de l'architecture de référence sont bien utilisés.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
print("=" * 70)
|
||||
print(" Vérification des Modèles - RPA Vision V3")
|
||||
print("=" * 70)
|
||||
print()
|
||||
|
||||
# 1. Vérifier OpenCLIP
|
||||
print("1. OpenCLIP (Embeddings)")
|
||||
try:
|
||||
import open_clip
|
||||
print(" ✅ Module open_clip installé")
|
||||
|
||||
# Vérifier si utilisé dans StateEmbeddingBuilder
|
||||
builder_path = Path(__file__).parent / "core/embedding/state_embedding_builder.py"
|
||||
if builder_path.exists():
|
||||
content = builder_path.read_text()
|
||||
if "clip" in content.lower() or "CLIPEmbedder" in content:
|
||||
print(" ✅ OpenCLIP utilisé dans StateEmbeddingBuilder")
|
||||
else:
|
||||
print(" ❌ OpenCLIP NON utilisé dans StateEmbeddingBuilder")
|
||||
print(" → Utilise des vecteurs aléatoires actuellement")
|
||||
else:
|
||||
print(" ⚠️ StateEmbeddingBuilder non trouvé")
|
||||
except ImportError:
|
||||
print(" ❌ Module open_clip NON installé")
|
||||
|
||||
print()
|
||||
|
||||
# 2. Vérifier OWL-v2
|
||||
print("2. OWL-v2 (Détection UI)")
|
||||
try:
|
||||
from transformers import Owlv2Processor, Owlv2ForObjectDetection
|
||||
print(" ✅ Module OWL-v2 installé")
|
||||
|
||||
# Vérifier si utilisé dans UIDetector
|
||||
detector_path = Path(__file__).parent / "core/detection/ui_detector.py"
|
||||
if detector_path.exists():
|
||||
content = detector_path.read_text()
|
||||
if "owl" in content.lower() or "Owlv2" in content:
|
||||
print(" ✅ OWL-v2 utilisé dans UIDetector")
|
||||
else:
|
||||
print(" ❌ OWL-v2 NON utilisé dans UIDetector")
|
||||
print(" → Utilise OpenCV + Qwen3-VL actuellement")
|
||||
else:
|
||||
print(" ⚠️ UIDetector non trouvé")
|
||||
except ImportError:
|
||||
print(" ❌ Module OWL-v2 NON installé")
|
||||
|
||||
print()
|
||||
|
||||
# 3. Vérifier Qwen3-VL
|
||||
print("3. Qwen3-VL (Raisonnement Visuel)")
|
||||
import subprocess
|
||||
try:
|
||||
result = subprocess.run(
|
||||
["ollama", "list"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
timeout=5
|
||||
)
|
||||
if "qwen3-vl" in result.stdout:
|
||||
print(" ✅ Qwen3-VL installé via Ollama")
|
||||
|
||||
# Vérifier si utilisé dans UIDetector
|
||||
detector_path = Path(__file__).parent / "core/detection/ui_detector.py"
|
||||
if detector_path.exists():
|
||||
content = detector_path.read_text()
|
||||
if "qwen3-vl" in content.lower() or "qwen" in content.lower():
|
||||
print(" ✅ Qwen3-VL utilisé dans UIDetector")
|
||||
else:
|
||||
print(" ❌ Qwen3-VL NON utilisé dans UIDetector")
|
||||
else:
|
||||
print(" ⚠️ UIDetector non trouvé")
|
||||
else:
|
||||
print(" ❌ Qwen3-VL NON installé")
|
||||
print(" → Installer avec: ollama pull qwen3-vl:8b")
|
||||
except (subprocess.TimeoutExpired, FileNotFoundError):
|
||||
print(" ❌ Ollama non disponible")
|
||||
print(" → Installer avec: curl -fsSL https://ollama.com/install.sh | sh")
|
||||
|
||||
print()
|
||||
print("=" * 70)
|
||||
print(" Résumé")
|
||||
print("=" * 70)
|
||||
print()
|
||||
print("Architecture de Référence:")
|
||||
print(" - OpenCLIP : Pour embeddings image/texte")
|
||||
print(" - OWL-v2 : Pour détection UI (optionnel)")
|
||||
print(" - Qwen3-VL : Pour classification et raisonnement")
|
||||
print()
|
||||
print("État Actuel:")
|
||||
print(" - OpenCLIP : Installé mais NON intégré dans StateEmbeddingBuilder")
|
||||
print(" - OWL-v2 : Installé mais NON utilisé (remplacé par OpenCV)")
|
||||
print(" - Qwen3-VL : Installé et utilisé dans UIDetector ✅")
|
||||
print()
|
||||
print("Actions Nécessaires:")
|
||||
print(" 1. Intégrer OpenCLIP dans StateEmbeddingBuilder")
|
||||
print(" 2. (Optionnel) Intégrer OWL-v2 dans UIDetector")
|
||||
print(" 3. Tester le pipeline complet avec vrais modèles")
|
||||
print()
|
||||
Reference in New Issue
Block a user