feat(v2): add fall event regression engine

This commit is contained in:
ila
2026-07-22 16:18:16 +08:00
parent 258fa49259
commit 1298369054
22 changed files with 1214 additions and 92 deletions
+5 -4
View File
@@ -16,8 +16,9 @@ func TestLetterboxBGRToNCHWPlacesPixelInScaledImage(t *testing.T) {
if got := len(input); got != 3*plane {
t.Fatalf("input length = %d, want %d", got, 3*plane)
}
if got := input[2*plane+159*640+320]; got != 0 {
t.Fatalf("top padding blue channel = %v, want 0", got)
padding := float32(114.0 / 255.0)
if got := input[2*plane+159*640+320]; got != padding {
t.Fatalf("top padding blue channel = %v, want %v", got, padding)
}
if got := input[0*plane+320*640+320]; got != 0 {
t.Fatalf("red channel = %v, want 0", got)
@@ -25,8 +26,8 @@ func TestLetterboxBGRToNCHWPlacesPixelInScaledImage(t *testing.T) {
if got := input[1*plane+320*640+320]; got != 0 {
t.Fatalf("green channel = %v, want 0", got)
}
if got := input[2*plane+320*640+320]; got != 1 {
t.Fatalf("blue channel = %v, want 1", got)
if got := input[2*plane+320*640+320]; got != float32(128.0/255.0) {
t.Fatalf("blue channel = %v, want cv2 INTER_LINEAR value 128/255", got)
}
}