@@ -80,44 +80,44 @@ def img_dir() -> Path:
80
80
def img_patch_dir () -> Path :
81
81
"""Return a path to directory with a few test images."""
82
82
path = Path ().resolve ()
83
- return path / "cellseg_models_pytorch/datasets /tests/data/imgs"
83
+ return path / "cellseg_models_pytorch/utils /tests/data/imgs"
84
84
85
85
86
86
@pytest .fixture (scope = "package" )
87
87
def mask_patch_dir () -> Path :
88
88
"""Return a path to directory with a few test images."""
89
89
path = Path ().resolve ()
90
- return path / "cellseg_models_pytorch/datasets/tests/data/masks"
91
-
90
+ dir = path / "cellseg_models_pytorch/utils/tests/data/masks"
91
+ assert dir .exists (), f"Directory does not exist: { dir } "
92
+ assert dir .is_dir (), f"Path is not a directory: { dir } "
93
+ return dir
92
94
93
95
@pytest .fixture (scope = "package" )
94
- def type_map_tensor () -> torch . Tensor :
95
- """Return a dummy type map target tensor. Shape (8, 320, 320) ."""
96
+ def img_sample () -> np . ndarray :
97
+ """Read in test RGB img ."""
96
98
path = Path ().resolve ()
97
- path = path / "cellseg_models_pytorch/training/tests/data/type_target_batch8.pt"
98
- return torch .load (path .as_posix ())
99
+ return FileHandler .read_img (path / "cellseg_models_pytorch/utils/tests/data/HE.png" )
99
100
100
101
101
102
@pytest .fixture (scope = "package" )
102
- def sem_map_tensor () -> torch . Tensor :
103
- """Return a dummy semantic map target tensor. Shape (8, 320, 320) ."""
103
+ def img_sample512 () -> np . ndarray :
104
+ """Read in test RGB img ."""
104
105
path = Path ().resolve ()
105
- path = path / "cellseg_models_pytorch/training /tests/data/sem_target_batch8.pt"
106
- return torch . load ( path . as_posix () )
106
+ return FileHandler . read_img ( path / "cellseg_models_pytorch/inference /tests/data/test1.png" )
107
+ @ pytest . fixture ( scope = "package" )
107
108
108
109
109
- @pytest .fixture (scope = "package" )
110
- def img_sample () -> np .ndarray :
110
+ def img_sample256 () -> np .ndarray :
111
111
"""Read in test RGB img."""
112
112
path = Path ().resolve ()
113
- return FileHandler .read_img (path / "cellseg_models_pytorch/utils/tests/data/HE .png" )
113
+ return FileHandler .read_img (path / "cellseg_models_pytorch/utils/tests/data/imgs/patch2 .png" )
114
114
115
115
116
116
@pytest .fixture (scope = "package" )
117
117
def hdf5db () -> Path :
118
118
"""Read in test RGB img."""
119
119
path = Path ().resolve ()
120
- return path / "cellseg_models_pytorch/datasets /tests/data/tiny_test.h5"
120
+ return path / "cellseg_models_pytorch/utils /tests/data/tiny_test.h5"
121
121
122
122
123
123
@pytest .fixture (scope = "package" )
0 commit comments