correction suppression modele yolo
This commit is contained in:
@@ -1050,72 +1050,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// YOLO option button
|
||||
Card(
|
||||
color: AppTheme.primaryColor.withAlpha(25),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.psychology, color: AppTheme.primaryColor),
|
||||
title: const Text('IA Detection (YOLOv8)', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: const Text('Détection intelligente via modèle entraîné'),
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 12),
|
||||
Text('Détection IA en cours...'),
|
||||
],
|
||||
),
|
||||
duration: Duration(seconds: 10),
|
||||
),
|
||||
);
|
||||
|
||||
final count = await provider.autoDetectImpactsWithYOLO(
|
||||
clearExisting: clearExisting,
|
||||
);
|
||||
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
count > 0
|
||||
? '$count impact(s) détecté(s) par l\'IA'
|
||||
: 'Aucun impact détecté par l\'IA.',
|
||||
),
|
||||
backgroundColor: count > 0
|
||||
? AppTheme.successColor
|
||||
: AppTheme.warningColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: Divider()),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text('OU', style: TextStyle(color: Colors.grey, fontSize: 12)),
|
||||
),
|
||||
Expanded(child: Divider()),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const Text(
|
||||
'Détection Classique (Paramétrable):',
|
||||
|
||||
Reference in New Issue
Block a user