Skip to content

Commit

Permalink
Clip removed and docs updated #149
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslaw-aszkowski committed Feb 21, 2024
1 parent e531992 commit 362ccc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/source/creators/creators_description_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ For each output class, a separate vector layer can be created.

Output report contains information about percentage coverage of each class.

The model should have at least two output classes, one for the background and one (or more) for the object of interest. The background class should be the first class in the output.
Model outputs should sum to 1.0 for each pixel, so the output is a probability map. To achieve this, the output should be passed through a softmax function.


===============
Detection Model
Expand Down
3 changes: 2 additions & 1 deletion src/deepness/processing/models/segmentor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def postprocessing(self, model_output: List) -> np.ndarray:
np.ndarray
Batch of postprocessed masks (N,H,W,C), 0-1
"""
labels = np.clip(model_output[0], 0, 1)
# labels = np.clip(model_output[0], 0, 1)
labels = model_output[0] # no need for clipping I think - see #149

return labels

Expand Down

0 comments on commit 362ccc5

Please sign in to comment.