Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +252 -117
templates/index.html
CHANGED
|
@@ -3,14 +3,24 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>FaceAI Pro - Reconnaissance Faciale
|
| 7 |
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
-
--primary-color: #
|
| 13 |
-
--secondary-color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
|
| 16 |
/* Animations */
|
|
@@ -25,13 +35,17 @@
|
|
| 25 |
}
|
| 26 |
|
| 27 |
/* Composants */
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
.preview-container {
|
| 29 |
position: relative;
|
| 30 |
aspect-ratio: 1;
|
| 31 |
-
background:
|
| 32 |
-
border-radius:
|
| 33 |
overflow: hidden;
|
| 34 |
-
|
| 35 |
}
|
| 36 |
|
| 37 |
.preview-image {
|
|
@@ -42,28 +56,34 @@
|
|
| 42 |
height: 100%;
|
| 43 |
background-size: cover;
|
| 44 |
background-position: center;
|
| 45 |
-
transition: transform 0.
|
| 46 |
}
|
| 47 |
|
| 48 |
.preview-container:hover .preview-image {
|
| 49 |
-
transform: scale(1.
|
| 50 |
}
|
| 51 |
|
| 52 |
.delete-btn {
|
| 53 |
position: absolute;
|
| 54 |
bottom: 0.5rem;
|
| 55 |
right: 0.5rem;
|
| 56 |
-
background-color: rgba(
|
| 57 |
color: white;
|
| 58 |
-
padding: 0.
|
| 59 |
border-radius: 50%;
|
| 60 |
opacity: 0;
|
| 61 |
-
transition: opacity 0.
|
| 62 |
cursor: pointer;
|
| 63 |
z-index: 10;
|
|
|
|
| 64 |
}
|
| 65 |
|
| 66 |
.preview-container:hover .delete-btn {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
opacity: 1;
|
| 68 |
}
|
| 69 |
|
|
@@ -73,7 +93,7 @@
|
|
| 73 |
left: 0;
|
| 74 |
width: 100%;
|
| 75 |
height: 100%;
|
| 76 |
-
background: rgba(0, 0, 0, 0.
|
| 77 |
display: none;
|
| 78 |
justify-content: center;
|
| 79 |
align-items: center;
|
|
@@ -81,65 +101,103 @@
|
|
| 81 |
}
|
| 82 |
|
| 83 |
.progress-ring {
|
| 84 |
-
animation: spin
|
| 85 |
-
width:
|
| 86 |
-
height:
|
| 87 |
}
|
| 88 |
|
| 89 |
.btn-primary {
|
| 90 |
-
background:
|
| 91 |
-
|
| 92 |
-
|
| 93 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
.btn-primary:hover {
|
| 97 |
-
|
| 98 |
-
box-shadow: 0 4px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
|
| 101 |
.result-card {
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
| 104 |
}
|
| 105 |
|
| 106 |
.result-card.show {
|
| 107 |
-
animation:
|
| 108 |
}
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
.camera-feed {
|
| 111 |
-
border-radius:
|
| 112 |
transform: scaleX(-1);
|
| 113 |
-
|
| 114 |
}
|
| 115 |
|
| 116 |
.github-corner {
|
| 117 |
position: fixed;
|
| 118 |
top: 0;
|
| 119 |
right: 0;
|
| 120 |
-
width:
|
| 121 |
-
height:
|
| 122 |
-
|
| 123 |
-
z-index: 1001; /* Ensure it's above the loading overlay */
|
| 124 |
}
|
| 125 |
|
| 126 |
.github-corner:hover {
|
| 127 |
-
transform: scale(1.
|
|
|
|
| 128 |
}
|
| 129 |
|
| 130 |
-
/* Nouvelles classes */
|
| 131 |
.section-title {
|
| 132 |
-
font-size: 1.
|
| 133 |
font-weight: 700;
|
| 134 |
-
color:
|
| 135 |
margin-bottom: 1.5rem;
|
| 136 |
display: flex;
|
| 137 |
align-items: center;
|
|
|
|
|
|
|
| 138 |
}
|
| 139 |
|
| 140 |
.section-title i {
|
| 141 |
color: var(--primary-color);
|
| 142 |
-
margin-right:
|
|
|
|
| 143 |
}
|
| 144 |
|
| 145 |
.input-hidden {
|
|
@@ -147,22 +205,24 @@
|
|
| 147 |
}
|
| 148 |
|
| 149 |
.comparison-result {
|
| 150 |
-
font-size: 1.
|
| 151 |
-
margin-bottom: 0.
|
| 152 |
}
|
| 153 |
|
| 154 |
.comparison-result.positive {
|
| 155 |
-
color: #
|
|
|
|
| 156 |
}
|
| 157 |
|
| 158 |
.comparison-result.negative {
|
| 159 |
-
color: #
|
|
|
|
| 160 |
}
|
| 161 |
|
| 162 |
.progress-bar {
|
| 163 |
-
height:
|
| 164 |
-
background-color: #
|
| 165 |
-
border-radius: 0.
|
| 166 |
margin-bottom: 1rem;
|
| 167 |
overflow: hidden;
|
| 168 |
}
|
|
@@ -174,34 +234,26 @@
|
|
| 174 |
transition: width 0.5s ease;
|
| 175 |
}
|
| 176 |
|
| 177 |
-
.progress-bar-fill.show {
|
| 178 |
-
animation: progress-animation 2s ease-in-out;
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
@keyframes progress-animation {
|
| 182 |
-
0% { width: 0%; }
|
| 183 |
-
100% { width: var(--progress-value, 0%); }
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
/* Description du projet */
|
| 187 |
.project-description {
|
| 188 |
-
background-color:
|
| 189 |
-
padding:
|
| 190 |
border-radius: 0.5rem;
|
| 191 |
-
margin-bottom:
|
|
|
|
| 192 |
}
|
| 193 |
|
| 194 |
.project-description h2 {
|
| 195 |
-
font-size:
|
| 196 |
-
font-weight:
|
| 197 |
-
color:
|
| 198 |
-
margin-bottom:
|
|
|
|
| 199 |
}
|
| 200 |
|
| 201 |
.project-description p {
|
| 202 |
-
font-size: 1rem;
|
| 203 |
color: #4b5563;
|
| 204 |
-
line-height: 1.
|
| 205 |
}
|
| 206 |
|
| 207 |
.project-description ul {
|
|
@@ -212,24 +264,106 @@
|
|
| 212 |
}
|
| 213 |
|
| 214 |
.project-description ul li {
|
| 215 |
-
margin-bottom: 0.
|
|
|
|
|
|
|
| 216 |
}
|
| 217 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
margin-top: 0.5rem;
|
| 219 |
}
|
| 220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
/* Responsiveness */
|
| 222 |
@media (max-width: 768px) {
|
| 223 |
.preview-container {
|
| 224 |
margin-bottom: 1rem;
|
| 225 |
}
|
| 226 |
-
|
| 227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
}
|
| 229 |
}
|
| 230 |
</style>
|
| 231 |
</head>
|
| 232 |
-
<body class="bg-
|
| 233 |
<div class="loading-overlay">
|
| 234 |
<svg class="progress-ring text-blue-500" viewBox="0 0 50 50">
|
| 235 |
<circle cx="25" cy="25" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-dasharray="80, 200"/>
|
|
@@ -237,21 +371,21 @@
|
|
| 237 |
</div>
|
| 238 |
|
| 239 |
<!-- Navigation -->
|
| 240 |
-
<nav class="
|
| 241 |
-
<div class="container mx-auto
|
| 242 |
-
<
|
| 243 |
-
<
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
<
|
| 248 |
-
<
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
</
|
| 254 |
-
</
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
</nav>
|
|
@@ -260,56 +394,57 @@
|
|
| 260 |
<main class="container mx-auto p-6">
|
| 261 |
<!-- Description du projet -->
|
| 262 |
<div class="project-description">
|
| 263 |
-
<h2 class="text-3xl font-
|
| 264 |
-
<p>
|
| 265 |
-
FaceAI Pro est une application web de
|
| 266 |
-
Elle utilise des technologies de pointe en matière de reconnaissance faciale pour fournir des résultats rapides et précis.
|
| 267 |
</p>
|
| 268 |
-
<p>
|
| 269 |
-
Cette
|
| 270 |
-
Elle peut être utilisée à des fins de test, d'apprentissage ou de développement.
|
| 271 |
</p>
|
| 272 |
-
<h3 class="text-xl font-bold text-gray-800 mt-
|
| 273 |
-
<ul>
|
| 274 |
-
<li>Comparaison de deux images contenant des visages.</li>
|
| 275 |
-
<li>Détection automatique des visages dans les images.</li>
|
| 276 |
-
<li>
|
| 277 |
-
<li>
|
| 278 |
-
<li>Interface utilisateur
|
| 279 |
</ul>
|
| 280 |
-
<h3 class="text-xl font-bold text-gray-800 mt-
|
| 281 |
-
<ul>
|
| 282 |
<li>
|
| 283 |
-
<strong>Backend :</strong> <a href="https://flask.palletsprojects.com/" target="_blank" class="text-blue-600 hover:underline">Flask</a>
|
| 284 |
</li>
|
| 285 |
<li>
|
| 286 |
-
<strong>Reconnaissance
|
| 287 |
-
<ul class="tech-used">
|
| 288 |
<li>
|
| 289 |
-
Modèle par défaut : <strong>VGG-Face</strong>
|
| 290 |
</li>
|
| 291 |
<li>
|
| 292 |
-
Détecteur de visage par défaut : <strong>RetinaFace</strong>
|
| 293 |
</li>
|
| 294 |
<li>
|
| 295 |
-
Métrique de distance : <strong>Cosine</strong>
|
| 296 |
</li>
|
| 297 |
</ul>
|
| 298 |
</li>
|
| 299 |
<li>
|
| 300 |
-
<strong>Frontend :</strong>
|
| 301 |
</li>
|
| 302 |
<li>
|
| 303 |
-
<strong>Icônes :</strong> <a href="https://fontawesome.com/" target="_blank" class="text-blue-600 hover:underline">Font Awesome</a>
|
| 304 |
</li>
|
| 305 |
<li>
|
| 306 |
-
<strong>Animations :</strong> <a href="https://animate.style/" target="_blank" class="text-blue-600 hover:underline">Animate.css</a>
|
| 307 |
</li>
|
| 308 |
</ul>
|
|
|
|
|
|
|
|
|
|
| 309 |
</div>
|
| 310 |
<div class="grid md:grid-cols-2 gap-8">
|
| 311 |
<!-- Section de capture -->
|
| 312 |
-
<div class="bg-white rounded-
|
| 313 |
<h2 class="section-title">
|
| 314 |
<i class="fas fa-camera"></i>
|
| 315 |
Capture d'Images
|
|
@@ -319,11 +454,11 @@
|
|
| 319 |
<div class="flex space-x-4">
|
| 320 |
<label for="fileInput" class="btn-primary text-white px-6 py-3 rounded-lg flex items-center cursor-pointer">
|
| 321 |
<i class="fas fa-upload mr-2"></i>
|
| 322 |
-
Importer
|
| 323 |
</label>
|
| 324 |
-
<button id="cameraBtn" class="
|
| 325 |
<i class="fas fa-video mr-2"></i>
|
| 326 |
-
Caméra
|
| 327 |
</button>
|
| 328 |
</div>
|
| 329 |
|
|
@@ -348,22 +483,22 @@
|
|
| 348 |
</div>
|
| 349 |
|
| 350 |
<!-- Section des résultats -->
|
| 351 |
-
<div class="bg-white rounded-
|
| 352 |
<h2 class="section-title">
|
| 353 |
<i class="fas fa-chart-bar"></i>
|
| 354 |
-
Résultats
|
| 355 |
</h2>
|
| 356 |
|
| 357 |
-
<div id="results" class="result-card
|
| 358 |
<div class="text-center text-gray-500">
|
| 359 |
<i class="fas fa-upload text-4xl mb-3"></i>
|
| 360 |
-
<p>Importez ou capturez deux images pour démarrer l'analyse.</p>
|
| 361 |
</div>
|
| 362 |
</div>
|
| 363 |
|
| 364 |
<button id="compareBtn" class="btn-primary w-full mt-6 py-3 rounded-lg text-white font-semibold hidden">
|
| 365 |
<i class="fas fa-sync-alt mr-2"></i>
|
| 366 |
-
Lancer la
|
| 367 |
</button>
|
| 368 |
</div>
|
| 369 |
</div>
|
|
@@ -371,7 +506,7 @@
|
|
| 371 |
|
| 372 |
<!-- GitHub Corner -->
|
| 373 |
<a href="https://github.com/Yusufibin" class="github-corner" target="_blank" aria-label="Voir le code source sur GitHub">
|
| 374 |
-
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:var(--
|
| 375 |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
| 376 |
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
| 377 |
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
|
|
@@ -424,7 +559,7 @@
|
|
| 424 |
// Arrêter la caméra
|
| 425 |
stream.getTracks().forEach(track => track.stop());
|
| 426 |
video.classList.add('hidden');
|
| 427 |
-
cameraBtn.innerHTML = '<i class="fas fa-video mr-2"></i>Caméra';
|
| 428 |
stream = null;
|
| 429 |
} else {
|
| 430 |
// Démarrer la caméra
|
|
@@ -432,7 +567,7 @@
|
|
| 432 |
stream = await navigator.mediaDevices.getUserMedia({ video: { facingMode: 'user' } });
|
| 433 |
video.srcObject = stream;
|
| 434 |
video.classList.remove('hidden');
|
| 435 |
-
cameraBtn.innerHTML = '<i class="fas fa-times mr-2"></i>Arrêter';
|
| 436 |
} catch (err) {
|
| 437 |
console.error('Erreur lors de l\'accès à la caméra:', err);
|
| 438 |
}
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>FaceAI Pro - Démonstration de Reconnaissance Faciale</title>
|
| 7 |
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
| 10 |
<style>
|
| 11 |
:root {
|
| 12 |
+
--primary-color: #2563eb; /* Bleu plus formel */
|
| 13 |
+
--secondary-color: #1d4ed8; /* Bleu secondaire */
|
| 14 |
+
--gray-dark: #1f2937;
|
| 15 |
+
--gray-light: #f3f4f6;
|
| 16 |
+
--font-sans: 'Inter', sans-serif; /* Police plus professionnelle */
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
body {
|
| 20 |
+
font-family: var(--font-sans);
|
| 21 |
+
background-color: var(--gray-light);
|
| 22 |
+
color: var(--gray-dark);
|
| 23 |
+
line-height: 1.6;
|
| 24 |
}
|
| 25 |
|
| 26 |
/* Animations */
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
/* Composants */
|
| 38 |
+
.container {
|
| 39 |
+
max-width: 1200px;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
.preview-container {
|
| 43 |
position: relative;
|
| 44 |
aspect-ratio: 1;
|
| 45 |
+
background: white;
|
| 46 |
+
border-radius: 0.5rem;
|
| 47 |
overflow: hidden;
|
| 48 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 49 |
}
|
| 50 |
|
| 51 |
.preview-image {
|
|
|
|
| 56 |
height: 100%;
|
| 57 |
background-size: cover;
|
| 58 |
background-position: center;
|
| 59 |
+
transition: transform 0.2s ease;
|
| 60 |
}
|
| 61 |
|
| 62 |
.preview-container:hover .preview-image {
|
| 63 |
+
transform: scale(1.03);
|
| 64 |
}
|
| 65 |
|
| 66 |
.delete-btn {
|
| 67 |
position: absolute;
|
| 68 |
bottom: 0.5rem;
|
| 69 |
right: 0.5rem;
|
| 70 |
+
background-color: rgba(220, 53, 69, 0.9); /* Red-500 with opacity */
|
| 71 |
color: white;
|
| 72 |
+
padding: 0.4rem 0.5rem;
|
| 73 |
border-radius: 50%;
|
| 74 |
opacity: 0;
|
| 75 |
+
transition: opacity 0.2s ease;
|
| 76 |
cursor: pointer;
|
| 77 |
z-index: 10;
|
| 78 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 79 |
}
|
| 80 |
|
| 81 |
.preview-container:hover .delete-btn {
|
| 82 |
+
opacity: 0.9;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.preview-container:hover .delete-btn:hover {
|
| 86 |
+
background-color: rgba(220, 53, 69, 1);
|
| 87 |
opacity: 1;
|
| 88 |
}
|
| 89 |
|
|
|
|
| 93 |
left: 0;
|
| 94 |
width: 100%;
|
| 95 |
height: 100%;
|
| 96 |
+
background: rgba(0, 0, 0, 0.8);
|
| 97 |
display: none;
|
| 98 |
justify-content: center;
|
| 99 |
align-items: center;
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
.progress-ring {
|
| 104 |
+
animation: spin 1.5s linear infinite;
|
| 105 |
+
width: 60px;
|
| 106 |
+
height: 60px;
|
| 107 |
}
|
| 108 |
|
| 109 |
.btn-primary {
|
| 110 |
+
background-color: var(--primary-color);
|
| 111 |
+
color: white;
|
| 112 |
+
transition: all 0.2s ease;
|
| 113 |
font-weight: 600;
|
| 114 |
+
padding: 0.75rem 1.5rem;
|
| 115 |
+
border-radius: 0.375rem;
|
| 116 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 117 |
}
|
| 118 |
|
| 119 |
.btn-primary:hover {
|
| 120 |
+
background-color: var(--secondary-color);
|
| 121 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.btn-primary:active {
|
| 125 |
+
transform: translateY(1px);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.btn-secondary {
|
| 129 |
+
background-color: #4b5563;
|
| 130 |
+
color: white;
|
| 131 |
+
transition: all 0.2s ease;
|
| 132 |
+
font-weight: 600;
|
| 133 |
+
padding: 0.75rem 1.5rem;
|
| 134 |
+
border-radius: 0.375rem;
|
| 135 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.btn-secondary:hover {
|
| 139 |
+
background-color: #374151;
|
| 140 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 141 |
}
|
| 142 |
|
| 143 |
.result-card {
|
| 144 |
+
border: 1px solid #e5e7eb;
|
| 145 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 146 |
+
padding: 1.5rem;
|
| 147 |
+
border-radius: 0.5rem;
|
| 148 |
+
background-color: white;
|
| 149 |
}
|
| 150 |
|
| 151 |
.result-card.show {
|
| 152 |
+
animation: fadeInUp 0.4s; /* Animation plus subtile */
|
| 153 |
}
|
| 154 |
|
| 155 |
+
@keyframes fadeInUp {
|
| 156 |
+
from {
|
| 157 |
+
opacity: 0;
|
| 158 |
+
transform: translate3d(0, 20px, 0);
|
| 159 |
+
}
|
| 160 |
+
to {
|
| 161 |
+
opacity: 1;
|
| 162 |
+
transform: none;
|
| 163 |
+
}
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
.camera-feed {
|
| 167 |
+
border-radius: 0.5rem;
|
| 168 |
transform: scaleX(-1);
|
| 169 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 170 |
}
|
| 171 |
|
| 172 |
.github-corner {
|
| 173 |
position: fixed;
|
| 174 |
top: 0;
|
| 175 |
right: 0;
|
| 176 |
+
width: 70px;
|
| 177 |
+
height: 70px;
|
| 178 |
+
z-index: 1001;
|
|
|
|
| 179 |
}
|
| 180 |
|
| 181 |
.github-corner:hover {
|
| 182 |
+
transform: scale(1.05);
|
| 183 |
+
transition: transform 0.2s ease;
|
| 184 |
}
|
| 185 |
|
|
|
|
| 186 |
.section-title {
|
| 187 |
+
font-size: 1.75rem;
|
| 188 |
font-weight: 700;
|
| 189 |
+
color: var(--gray-dark);
|
| 190 |
margin-bottom: 1.5rem;
|
| 191 |
display: flex;
|
| 192 |
align-items: center;
|
| 193 |
+
border-bottom: 2px solid var(--primary-color);
|
| 194 |
+
padding-bottom: 0.75rem;
|
| 195 |
}
|
| 196 |
|
| 197 |
.section-title i {
|
| 198 |
color: var(--primary-color);
|
| 199 |
+
margin-right: 1rem;
|
| 200 |
+
font-size: 1.5rem;
|
| 201 |
}
|
| 202 |
|
| 203 |
.input-hidden {
|
|
|
|
| 205 |
}
|
| 206 |
|
| 207 |
.comparison-result {
|
| 208 |
+
font-size: 1.2rem;
|
| 209 |
+
margin-bottom: 0.75rem;
|
| 210 |
}
|
| 211 |
|
| 212 |
.comparison-result.positive {
|
| 213 |
+
color: #22c55e; /* Vert plus formel */
|
| 214 |
+
font-weight: 600;
|
| 215 |
}
|
| 216 |
|
| 217 |
.comparison-result.negative {
|
| 218 |
+
color: #ef4444; /* Rouge plus formel */
|
| 219 |
+
font-weight: 600;
|
| 220 |
}
|
| 221 |
|
| 222 |
.progress-bar {
|
| 223 |
+
height: 1rem;
|
| 224 |
+
background-color: #e5e7eb;
|
| 225 |
+
border-radius: 0.5rem;
|
| 226 |
margin-bottom: 1rem;
|
| 227 |
overflow: hidden;
|
| 228 |
}
|
|
|
|
| 234 |
transition: width 0.5s ease;
|
| 235 |
}
|
| 236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
.project-description {
|
| 238 |
+
background-color: white;
|
| 239 |
+
padding: 2.5rem;
|
| 240 |
border-radius: 0.5rem;
|
| 241 |
+
margin-bottom: 2.5rem;
|
| 242 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 243 |
}
|
| 244 |
|
| 245 |
.project-description h2 {
|
| 246 |
+
font-size: 2.25rem;
|
| 247 |
+
font-weight: 800;
|
| 248 |
+
color: var(--gray-dark);
|
| 249 |
+
margin-bottom: 1.5rem;
|
| 250 |
+
line-height: 1.2;
|
| 251 |
}
|
| 252 |
|
| 253 |
.project-description p {
|
| 254 |
+
font-size: 1.1rem;
|
| 255 |
color: #4b5563;
|
| 256 |
+
line-height: 1.7;
|
| 257 |
}
|
| 258 |
|
| 259 |
.project-description ul {
|
|
|
|
| 264 |
}
|
| 265 |
|
| 266 |
.project-description ul li {
|
| 267 |
+
margin-bottom: 0.75rem;
|
| 268 |
+
font-size: 1.1rem;
|
| 269 |
+
line-height: 1.7;
|
| 270 |
}
|
| 271 |
+
.project-description ul li ul{
|
| 272 |
+
list-style-type: circle;
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
.tech-used {
|
| 276 |
margin-top: 0.5rem;
|
| 277 |
}
|
| 278 |
|
| 279 |
+
/* Navigation */
|
| 280 |
+
.navbar {
|
| 281 |
+
background-color: white;
|
| 282 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 283 |
+
padding: 1rem 1.5rem;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.navbar .container {
|
| 287 |
+
display: flex;
|
| 288 |
+
align-items: center;
|
| 289 |
+
justify-content: space-between;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
.navbar-brand {
|
| 293 |
+
display: flex;
|
| 294 |
+
align-items: center;
|
| 295 |
+
font-weight: 800;
|
| 296 |
+
font-size: 1.75rem;
|
| 297 |
+
color: var(--gray-dark);
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
.navbar-brand i {
|
| 301 |
+
color: var(--primary-color);
|
| 302 |
+
margin-right: 1rem;
|
| 303 |
+
font-size: 2rem;
|
| 304 |
+
}
|
| 305 |
+
.navbar-brand:hover{
|
| 306 |
+
color: var(--secondary-color);
|
| 307 |
+
transition: all 0.2s ease;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.navbar-links {
|
| 311 |
+
display: flex;
|
| 312 |
+
align-items: center;
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
.navbar-links a {
|
| 316 |
+
color: #4b5563;
|
| 317 |
+
font-weight: 500;
|
| 318 |
+
margin-left: 2rem;
|
| 319 |
+
transition: color 0.2s ease;
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.navbar-links a:hover {
|
| 323 |
+
color: var(--primary-color);
|
| 324 |
+
}
|
| 325 |
+
.font-bold{
|
| 326 |
+
font-weight: 700;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
/* Responsiveness */
|
| 330 |
@media (max-width: 768px) {
|
| 331 |
.preview-container {
|
| 332 |
margin-bottom: 1rem;
|
| 333 |
}
|
| 334 |
+
|
| 335 |
+
.project-description {
|
| 336 |
+
margin-bottom: 1.5rem;
|
| 337 |
+
padding: 1.5rem;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
.project-description h2 {
|
| 341 |
+
font-size: 2rem;
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
.section-title {
|
| 345 |
+
font-size: 1.5rem;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.section-title i {
|
| 349 |
+
font-size: 1.25rem;
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.navbar-brand {
|
| 353 |
+
font-size: 1.5rem;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
.navbar-brand i {
|
| 357 |
+
font-size: 1.75rem;
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
.navbar-links a {
|
| 361 |
+
margin-left: 1.5rem;
|
| 362 |
}
|
| 363 |
}
|
| 364 |
</style>
|
| 365 |
</head>
|
| 366 |
+
<body class="bg-gray-100">
|
| 367 |
<div class="loading-overlay">
|
| 368 |
<svg class="progress-ring text-blue-500" viewBox="0 0 50 50">
|
| 369 |
<circle cx="25" cy="25" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-dasharray="80, 200"/>
|
|
|
|
| 371 |
</div>
|
| 372 |
|
| 373 |
<!-- Navigation -->
|
| 374 |
+
<nav class="navbar">
|
| 375 |
+
<div class="container mx-auto">
|
| 376 |
+
<a href="/" class="navbar-brand">
|
| 377 |
+
<i class="fas fa-brain text-blue-600"></i>
|
| 378 |
+
FaceAI Pro
|
| 379 |
+
</a>
|
| 380 |
+
<div class="navbar-links">
|
| 381 |
+
<a href="#" class="hover:text-blue-600">
|
| 382 |
+
<i class="fas fa-question-circle text-lg"></i>
|
| 383 |
+
<span class="hidden md:inline-block ml-1">Aide</span>
|
| 384 |
+
</a>
|
| 385 |
+
<a href="#" class="hover:text-blue-600">
|
| 386 |
+
<i class="fas fa-cog text-lg"></i>
|
| 387 |
+
<span class="hidden md:inline-block ml-1">Paramètres</span>
|
| 388 |
+
</a>
|
| 389 |
</div>
|
| 390 |
</div>
|
| 391 |
</nav>
|
|
|
|
| 394 |
<main class="container mx-auto p-6">
|
| 395 |
<!-- Description du projet -->
|
| 396 |
<div class="project-description">
|
| 397 |
+
<h2 class="text-3xl font-extrabold text-gray-900 mb-4 tracking-tight">FaceAI Pro : Démonstration de Reconnaissance Faciale en Temps Réel</h2>
|
| 398 |
+
<p class="text-gray-700">
|
| 399 |
+
<strong class="font-bold">FaceAI Pro</strong> est une application web interactive conçue pour <strong class="font-bold">démontrer la puissance et la précision des algorithmes de reconnaissance faciale</strong> modernes. Elle permet aux utilisateurs de comparer deux visages en temps réel et d'évaluer leur similarité avec une grande exactitude.
|
|
|
|
| 400 |
</p>
|
| 401 |
+
<p class="mt-4 text-gray-700">
|
| 402 |
+
Cette démonstration met en lumière les capacités de la reconnaissance faciale, un domaine en pleine expansion qui trouve des applications dans divers secteurs, notamment la sécurité, l'authentification et l'analyse d'images. <strong class="font-bold">FaceAI Pro</strong> est un outil idéal pour explorer cette technologie, comprendre son fonctionnement et découvrir ses applications potentielles.
|
|
|
|
| 403 |
</p>
|
| 404 |
+
<h3 class="text-xl font-bold text-gray-800 mt-8 mb-3">Fonctionnalités Clés :</h3>
|
| 405 |
+
<ul class="text-gray-700">
|
| 406 |
+
<li><strong class="font-bold">Comparaison en temps réel</strong> de deux images contenant des visages.</li>
|
| 407 |
+
<li><strong class="font-bold">Détection automatique</strong> et précise des visages dans les images téléchargées.</li>
|
| 408 |
+
<li><strong class="font-bold">Évaluation quantitative</strong> de la similarité entre les visages détectés, exprimée en pourcentage.</li>
|
| 409 |
+
<li><strong class="font-bold">Capture d'image</strong> via la caméra de l'appareil pour une analyse instantanée.</li>
|
| 410 |
+
<li><strong class="font-bold">Interface utilisateur épurée</strong> et intuitive pour une expérience optimale.</li>
|
| 411 |
</ul>
|
| 412 |
+
<h3 class="text-xl font-bold text-gray-800 mt-8 mb-3">Technologies Employées :</h3>
|
| 413 |
+
<ul class="text-gray-700">
|
| 414 |
<li>
|
| 415 |
+
<strong class="font-bold">Backend :</strong> <a href="https://flask.palletsprojects.com/" target="_blank" class="text-blue-600 hover:underline">Flask</a>, un framework web Python léger et flexible, idéal pour les API rapides et les microservices.
|
| 416 |
</li>
|
| 417 |
<li>
|
| 418 |
+
<strong class="font-bold">Reconnaissance Faciale :</strong> <a href="https://github.com/serengil/deepface" target="_blank" class="text-blue-600 hover:underline">DeepFace</a>, une librairie Python performante qui implémente les algorithmes de reconnaissance faciale les plus avancés.
|
| 419 |
+
<ul class="tech-used text-gray-700">
|
| 420 |
<li>
|
| 421 |
+
Modèle par défaut : <strong class="font-bold">VGG-Face</strong>, un modèle reconnu pour sa précision et sa robustesse.
|
| 422 |
</li>
|
| 423 |
<li>
|
| 424 |
+
Détecteur de visage par défaut : <strong class="font-bold">RetinaFace</strong>, un détecteur de pointe offrant une grande précision, même dans des conditions difficiles.
|
| 425 |
</li>
|
| 426 |
<li>
|
| 427 |
+
Métrique de distance : <strong class="font-bold">Cosine</strong>, une mesure de similarité angulaire qui donne d'excellents résultats dans la comparaison de visages.
|
| 428 |
</li>
|
| 429 |
</ul>
|
| 430 |
</li>
|
| 431 |
<li>
|
| 432 |
+
<strong class="font-bold">Frontend :</strong> HTML5, CSS3 (avec <a href="https://tailwindcss.com/" target="_blank" class="text-blue-600 hover:underline">Tailwind CSS</a> pour un développement rapide et un style élégant), JavaScript pour l'interactivité.
|
| 433 |
</li>
|
| 434 |
<li>
|
| 435 |
+
<strong class="font-bold">Icônes :</strong> <a href="https://fontawesome.com/" target="_blank" class="text-blue-600 hover:underline">Font Awesome</a>, une bibliothèque d'icônes vectorielles scalable et facile à utiliser.
|
| 436 |
</li>
|
| 437 |
<li>
|
| 438 |
+
<strong class="font-bold">Animations :</strong> <a href="https://animate.style/" target="_blank" class="text-blue-600 hover:underline">Animate.css</a>, pour des animations CSS fluides et performantes.
|
| 439 |
</li>
|
| 440 |
</ul>
|
| 441 |
+
<p class="mt-4 text-gray-700">
|
| 442 |
+
<strong class="font-bold">FaceAI Pro</strong> est une démonstration open-source, et le code source est disponible sur GitHub : <a href="https://github.com/Yusufibin" target="_blank" class="text-blue-600 hover:underline">https://github.com/Yusufibin</a>.
|
| 443 |
+
</p>
|
| 444 |
</div>
|
| 445 |
<div class="grid md:grid-cols-2 gap-8">
|
| 446 |
<!-- Section de capture -->
|
| 447 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
| 448 |
<h2 class="section-title">
|
| 449 |
<i class="fas fa-camera"></i>
|
| 450 |
Capture d'Images
|
|
|
|
| 454 |
<div class="flex space-x-4">
|
| 455 |
<label for="fileInput" class="btn-primary text-white px-6 py-3 rounded-lg flex items-center cursor-pointer">
|
| 456 |
<i class="fas fa-upload mr-2"></i>
|
| 457 |
+
Importer des Images
|
| 458 |
</label>
|
| 459 |
+
<button id="cameraBtn" class="btn-secondary text-white px-6 py-3 rounded-lg flex items-center transition-all">
|
| 460 |
<i class="fas fa-video mr-2"></i>
|
| 461 |
+
Utiliser la Caméra
|
| 462 |
</button>
|
| 463 |
</div>
|
| 464 |
|
|
|
|
| 483 |
</div>
|
| 484 |
|
| 485 |
<!-- Section des résultats -->
|
| 486 |
+
<div class="bg-white rounded-lg shadow-md p-6">
|
| 487 |
<h2 class="section-title">
|
| 488 |
<i class="fas fa-chart-bar"></i>
|
| 489 |
+
Résultats de l'Analyse
|
| 490 |
</h2>
|
| 491 |
|
| 492 |
+
<div id="results" class="result-card">
|
| 493 |
<div class="text-center text-gray-500">
|
| 494 |
<i class="fas fa-upload text-4xl mb-3"></i>
|
| 495 |
+
<p class="text-gray-600">Importez ou capturez deux images pour démarrer l'analyse.</p>
|
| 496 |
</div>
|
| 497 |
</div>
|
| 498 |
|
| 499 |
<button id="compareBtn" class="btn-primary w-full mt-6 py-3 rounded-lg text-white font-semibold hidden">
|
| 500 |
<i class="fas fa-sync-alt mr-2"></i>
|
| 501 |
+
Lancer la Comparaison
|
| 502 |
</button>
|
| 503 |
</div>
|
| 504 |
</div>
|
|
|
|
| 506 |
|
| 507 |
<!-- GitHub Corner -->
|
| 508 |
<a href="https://github.com/Yusufibin" class="github-corner" target="_blank" aria-label="Voir le code source sur GitHub">
|
| 509 |
+
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:var(--gray-dark); color:#fff;">
|
| 510 |
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
| 511 |
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
| 512 |
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
|
|
|
|
| 559 |
// Arrêter la caméra
|
| 560 |
stream.getTracks().forEach(track => track.stop());
|
| 561 |
video.classList.add('hidden');
|
| 562 |
+
cameraBtn.innerHTML = '<i class="fas fa-video mr-2"></i>Utiliser la Caméra';
|
| 563 |
stream = null;
|
| 564 |
} else {
|
| 565 |
// Démarrer la caméra
|
|
|
|
| 567 |
stream = await navigator.mediaDevices.getUserMedia({ video: { facingMode: 'user' } });
|
| 568 |
video.srcObject = stream;
|
| 569 |
video.classList.remove('hidden');
|
| 570 |
+
cameraBtn.innerHTML = '<i class="fas fa-times mr-2"></i>Arrêter la caméra';
|
| 571 |
} catch (err) {
|
| 572 |
console.error('Erreur lors de l\'accès à la caméra:', err);
|
| 573 |
}
|