From 55cf0c3c1121fba0f3bb6c32ead55f02adf3c3fd Mon Sep 17 00:00:00 2001 From: ZIDEA Date: Sat, 7 Jun 2025 01:48:49 +0200 Subject: [PATCH] Add list view for admin manual annotations --- LocalApp/SMARTWEBSCRAPPER-CV/app/routes.py | 1 + .../admin_annotations_manuelles.html | 848 ++++++------------ 2 files changed, 297 insertions(+), 552 deletions(-) diff --git a/LocalApp/SMARTWEBSCRAPPER-CV/app/routes.py b/LocalApp/SMARTWEBSCRAPPER-CV/app/routes.py index 183c093..9577948 100644 --- a/LocalApp/SMARTWEBSCRAPPER-CV/app/routes.py +++ b/LocalApp/SMARTWEBSCRAPPER-CV/app/routes.py @@ -584,6 +584,7 @@ def admin_delete_prediction(item_id): # GESTION DES ANNOTATIONS MANUELLES # ─────────────────────────────────────────────────────────────────── +@app.route("/admin/annotations_manuelle") @app.route("/admin/annotations_manuelles") def admin_annotations_manuelles(): """Affichage des annotations créées manuellement""" diff --git a/LocalApp/SMARTWEBSCRAPPER-CV/app/templates/admin_annotations_manuelles.html b/LocalApp/SMARTWEBSCRAPPER-CV/app/templates/admin_annotations_manuelles.html index b2e0bff..b1c96d4 100644 --- a/LocalApp/SMARTWEBSCRAPPER-CV/app/templates/admin_annotations_manuelles.html +++ b/LocalApp/SMARTWEBSCRAPPER-CV/app/templates/admin_annotations_manuelles.html @@ -1,552 +1,296 @@ - - - - - - 📝 Annotation Manuelle Admin - {{ capture_id }} - - - - -
- -
-
-
-

📝 Annotation Manuelle Administrateur

- 🔧 Mode Admin -
-

- Image: {{ capture_id }} | - ⚠️ Important: Ces annotations vont directement dans fine_tune_data/ -

-
-
- - -
-
- -
-
- -
- -
-
-
-
🎯 Interface d'Annotation
-
-
- -
- -
-
📢 Advertisement
-
🔝 Header
-
🔻 Footer
-
◀️ Left Sidebar
-
▶️ Right Sidebar
-
🏷️ Logo
-
📋 Title
-
📝 Description
-
🎥 Media
-
💬 Commentaire
-
❤️ Likes
-
👁️ Vues
-
🎯 Recommendations
-
💡 Suggestions
-
⚡ Pop Up
-
📺 Chaine
-
❓ Other
-
-
- - -
- Image à annoter - -
- - -
- 📋 Instructions : -
    -
  • Sélectionnez une classe ci-dessus
  • -
  • Cliquez et glissez sur l'image pour créer une boîte
  • -
  • Vous pouvez déplacer les boîtes créées
  • -
  • Cliquez sur ❌ dans la liste pour supprimer une annotation
  • -
-
-
-
-
- - -
-
-
-
📝 Annotations Créées
-
-
-
-

Aucune annotation pour le moment

-
- - -
- - - - ↩️ Retour au Dashboard - -
- - -
- - 📊 Stats :
- Annotations créées : 0
- Classe active : advertisement -
-
-
-
-
-
-
- - - - - \ No newline at end of file +{% extends "base.html" %} + +{% block title %}Annotations Manuelles{% endblock %} + +{% block content %} +
+ +
+
+
+

✍️ Annotations Manuelles

+ {{ items|length }} éléments +
+

+ Images annotées manuellement par les utilisateurs +

+
+
+ + +
+
+ +
+
+ + +
+
+
+
+
+
+
⚡ Actions groupées
+ Sélectionnez des éléments puis choisissez une action +
+
+
+ + +
+
+
+
+
+
+
+ + +
+
+
+
+
📋 Liste des Annotations
+
+
+ {% if items %} +
+ + + + + + + + + + + + + {% for item in items %} + + + + + + + + + {% endfor %} + +
+ + 🆔 ID🖼️ Image📝 Fichier JSON🕒 Date⚡ Actions
+ + + {{ item.id }}
+ Annotation manuelle +
+
+
+
+ 🖼️ +
+
+
+ {{ item.image_filename }}
+ Image annotée +
+
+
+ 📝 {{ item.json_filename }} + + {{ item.timestamp | timestamp_to_date }}
+ {{ item.timestamp | timestamp_to_date }} +
+
+ + 🔍 Détails + +
+ + +
+
+
+
+ {% else %} +
+
📭
+

Aucune annotation manuelle

+

Les annotations créées manuellement apparaîtront ici après validation par les utilisateurs.

+
+ + Les utilisateurs doivent d'abord effectuer une annotation manuelle dans l'application. + +
+ {% endif %} +
+
+
+
+ + +
+
+
+
+
💡 À propos des Annotations Manuelles
+
+
+
+
+
🔄 Workflow :
+
    +
  1. Capture : L'utilisateur capture une page web
  2. +
  3. Annotation : L'utilisateur dessine manuellement les boîtes
  4. +
  5. Stockage : Les données arrivent dans human_data/manual/
  6. +
  7. Validation admin : Vous décidez de valider, modifier ou supprimer
  8. +
+
+
+
⚡ Actions disponibles :
+
    +
  • ✅ Valider : Déplace vers fine_tune_data/ pour réentraînement
  • +
  • ✏️ Modifier : Ouvre l'interface d'annotation admin (Page AA)
  • +
  • 🗑️ Supprimer : Supprime complètement tous les fichiers liés
  • +
+
+ + ⚠️ Important : Après validation, les fichiers vont dans fine_tune_data/ + et sont supprimés d'ici. Le lien d'origine reste dans visited_links.json. + +
+
+
+
+
+
+
+
+ + + + + +{% endblock %}