first commit

This commit is contained in:
vl.arkhangelskii
2026-09-27 19:12:14 +03:00
commit ba3ba38fc9
318 changed files with 9377 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:sign_checker/domain/detection_stabilizer.dart';
import 'package:sign_checker/domain/norm_rect.dart';
void main() {
SignDetection hit(String label) {
return SignDetection(
rawLabel: label,
confidence: 0.9,
box: const NormRect(0.1, 0.1, 0.2, 0.2),
);
}
test('a sign is shown only after a second hit and dropped after misses', () {
final stabilizer = DetectionStabilizer();
expect(stabilizer.update([hit('3.27')]), isEmpty);
final visible = stabilizer.update([hit('3.27')]);
expect(visible, hasLength(1));
expect(visible.single.rawLabel, '3.27');
expect(stabilizer.update(const []), hasLength(1));
expect(stabilizer.update(const []), isEmpty);
});
}