-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: bioimage.io core prediction task
- Loading branch information
Showing
4 changed files
with
82 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import pytest | ||
|
||
from plantseg.functionals.prediction.prediction import biio_prediction | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"raw_fixture_name, input_layout, model_id", | ||
( | ||
('raw_zcyx_96x2x96x96', 'ZCYX', 'philosophical-panda'), | ||
('raw_cell_3d_100x128x128', 'ZYX', 'emotional-cricket'), | ||
('raw_cell_2d_96x96', 'YX', 'pioneering-rhino'), | ||
), | ||
) | ||
def test_biio_prediction(raw_fixture_name, input_layout, model_id, request): | ||
named_pmaps = biio_prediction(request.getfixturevalue(raw_fixture_name), input_layout, model_id) | ||
for key, pmap in named_pmaps.items(): | ||
assert pmap is not None, f"Prediction map for {key} is None" | ||
assert pmap.ndim == 4, f"Prediction map for {key} has {pmap.ndim} dimensions" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters