1
This commit is contained in:
@@ -90,4 +90,26 @@ void main() {
|
||||
expect(vm.state.results.length, 1, reason: '同位置只有一条轨迹可见');
|
||||
expect(vm.state.results.single.label, '斑鸠', reason: '框内容跟随后到的检测');
|
||||
});
|
||||
|
||||
test('平卧长条框不被几何过滤(RNPHE_2030 实测框:归一化宽高比 3.99)', () async {
|
||||
final vm = CameraViewModel(reminder: _RecordingReminder());
|
||||
// 实测模型 0.8845 检出,框 0.283×0.071(像素 199×89,长尾雉鸡),
|
||||
// 旧逻辑 aspect > 3.0 在建轨迹前丢弃 → 高分也无框
|
||||
final flat = box('雉鸡', 0.88, 0.405, 0.419, 0.688, 0.490);
|
||||
feed(vm, [flat]);
|
||||
await Future<void>.delayed(const Duration(milliseconds: 600));
|
||||
feed(vm, [flat]);
|
||||
expect(vm.state.results.length, 1);
|
||||
expect(vm.state.results.single.score, 0.88);
|
||||
});
|
||||
|
||||
test('近距离大目标(占画面高 45%)与远距离小目标(高 0.8%)均可显示', () async {
|
||||
final vm = CameraViewModel(reminder: _RecordingReminder());
|
||||
final near = box('雉鸡', 0.9, 0.15, 0.05, 0.85, 0.50);
|
||||
final far = box('雉鸡', 0.9, 0.45, 0.80, 0.48, 0.808);
|
||||
feed(vm, [near, far]);
|
||||
await Future<void>.delayed(const Duration(milliseconds: 600));
|
||||
feed(vm, [near, far]);
|
||||
expect(vm.state.results.length, 2);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user