@@ -33,7 +33,7 @@ def test_seg_onnx_package_with_static_batch_size_and_letterbox_numpy(
3333 assert np .allclose (
3434 predictions [0 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
3535 )
36- assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
36+ assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
3737 assert np .allclose (predictions [0 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
3838 assert 16600 <= predictions [0 ].mask [0 ].cpu ().numpy ().sum () <= 16900
3939
@@ -68,13 +68,13 @@ def test_seg_onnx_package_with_static_batch_size_and_letterbox_numpy_list(
6868 assert np .allclose (
6969 predictions [0 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
7070 )
71- assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
71+ assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
7272 assert np .allclose (predictions [0 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
7373 assert 16600 <= predictions [0 ].mask [0 ].cpu ().numpy ().sum () <= 16900
7474 assert np .allclose (
7575 predictions [1 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
7676 )
77- assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
77+ assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
7878 assert np .allclose (predictions [1 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
7979 assert 16600 <= predictions [1 ].mask [0 ].cpu ().numpy ().sum () <= 16900
8080
@@ -108,7 +108,7 @@ def test_seg_onnx_package_with_static_batch_size_and_letterbox_torch(
108108 assert np .allclose (
109109 predictions [0 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
110110 )
111- assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
111+ assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
112112 assert np .allclose (predictions [0 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
113113 assert 16600 <= predictions [0 ].mask [0 ].cpu ().numpy ().sum () <= 16900
114114
@@ -142,13 +142,13 @@ def test_seg_onnx_package_with_static_batch_size_and_letterbox_torch_list(
142142 assert np .allclose (
143143 predictions [0 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
144144 )
145- assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
145+ assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
146146 assert np .allclose (predictions [0 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
147147 assert 16600 <= predictions [0 ].mask [0 ].cpu ().numpy ().sum () <= 16900
148148 assert np .allclose (
149149 predictions [1 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
150150 )
151- assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
151+ assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
152152 assert np .allclose (predictions [1 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
153153 assert 16600 <= predictions [1 ].mask [0 ].cpu ().numpy ().sum () <= 16900
154154
@@ -182,12 +182,12 @@ def test_seg_onnx_package_with_static_batch_size_and_letterbox_torch_tensor(
182182 assert np .allclose (
183183 predictions [0 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
184184 )
185- assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
185+ assert np .allclose (predictions [0 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
186186 assert np .allclose (predictions [0 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
187187 assert 16600 <= predictions [0 ].mask [0 ].cpu ().numpy ().sum () <= 16900
188188 assert np .allclose (
189189 predictions [1 ].xyxy [0 ].cpu ().numpy (), [59 , 162 , 192 , 387 ], atol = 1
190190 )
191- assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [0 ], atol = 1 )
191+ assert np .allclose (predictions [1 ].class_id [0 ].cpu ().numpy (), [21 ], atol = 1 )
192192 assert np .allclose (predictions [1 ].confidence [0 ].cpu ().numpy (), [0.7349 ], atol = 0.005 )
193193 assert 16600 <= predictions [1 ].mask [0 ].cpu ().numpy ().sum () <= 16900
0 commit comments