diff --git a/README.md b/README.md index c71966c..5a5250b 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ The easiest way to install ukis-csmask is through pip. The default installation pip install ukis-csmask ``` -To install ukis-csmask with GPU support run the following instead. This requires that you have a GPU with CUDA runtime libraries (CUDA 10.2 and cuDNN 8.0.3) installed on the system. +To install ukis-csmask with GPU support run the following instead. This requires that you have a GPU with CUDA runtime libraries installed on the system. ```shell pip install ukis-csmask[gpu] diff --git a/requirements.txt b/requirements.txt index 92dd0ac..372aba6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ numpy -onnxruntime +onnxruntime>=1.13 scipy diff --git a/tests/test_mask.py b/tests/test_mask.py index fe65aba..f5c1853 100644 --- a/tests/test_mask.py +++ b/tests/test_mask.py @@ -70,8 +70,8 @@ def test_csmask_valid(data): csmask = CSmask(img=data["img"], band_order=["Blue", "Green", "Red", "NIR", "SWIR1", "SWIR2"]) y_pred = csmask.valid y_true = reclassify(data["msk"], {"reclass_value_from": [0, 1, 2, 3, 4], "reclass_value_to": [0, 1, 1, 1, 0]}) - y_true_inverted = ~y_true.astype(np.bool) - y_true = (~ndimage.binary_dilation(y_true_inverted, iterations=4).astype(np.bool)).astype(np.uint8) + y_true_inverted = ~y_true.astype(bool) + y_true = (~ndimage.binary_dilation(y_true_inverted, iterations=4).astype(bool)).astype(np.uint8) y_true = y_true.ravel() y_pred = y_pred.ravel() kappa = round(cohen_kappa_score(y_true, y_pred), 2) diff --git a/ukis_csmask/mask.py b/ukis_csmask/mask.py index 9572776..53d2e81 100644 --- a/ukis_csmask/mask.py +++ b/ukis_csmask/mask.py @@ -118,8 +118,8 @@ def _valid(self, invalid_buffer): # dilate the inverse of the binary valid pixel mask (invalid=0) # this effectively buffers the invalid pixels - valid_i = ~valid.astype(np.bool) - valid = (~ndimage.binary_dilation(valid_i, iterations=invalid_buffer).astype(np.bool)).astype(np.uint8) + valid_i = ~valid.astype(bool) + valid = (~ndimage.binary_dilation(valid_i, iterations=invalid_buffer).astype(bool)).astype(np.uint8) if self.nodata_value is not None: # add image nodata pixels to valid pixel mask