@@ -213,6 +213,14 @@ def test_custom_dataset():
213
213
assert 'mPrecision' in eval_results
214
214
assert 'mRecall' in eval_results
215
215
216
+ assert not np .isnan (eval_results ['mIoU' ])
217
+ assert not np .isnan (eval_results ['mDice' ])
218
+ assert not np .isnan (eval_results ['mAcc' ])
219
+ assert not np .isnan (eval_results ['aAcc' ])
220
+ assert not np .isnan (eval_results ['mFscore' ])
221
+ assert not np .isnan (eval_results ['mPrecision' ])
222
+ assert not np .isnan (eval_results ['mRecall' ])
223
+
216
224
# test evaluation with pre-eval and the dataset.CLASSES is necessary
217
225
train_dataset .CLASSES = tuple (['a' ] * 7 )
218
226
pseudo_results = []
@@ -250,6 +258,14 @@ def test_custom_dataset():
250
258
assert 'mPrecision' in eval_results
251
259
assert 'mRecall' in eval_results
252
260
261
+ assert not np .isnan (eval_results ['mIoU' ])
262
+ assert not np .isnan (eval_results ['mDice' ])
263
+ assert not np .isnan (eval_results ['mAcc' ])
264
+ assert not np .isnan (eval_results ['aAcc' ])
265
+ assert not np .isnan (eval_results ['mFscore' ])
266
+ assert not np .isnan (eval_results ['mPrecision' ])
267
+ assert not np .isnan (eval_results ['mRecall' ])
268
+
253
269
254
270
@pytest .mark .parametrize ('separate_eval' , [True , False ])
255
271
def test_eval_concat_custom_dataset (separate_eval ):
0 commit comments