Skip to content

Commit

Permalink
add documentation for mask threshold config
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-vx51 committed Jan 10, 2025
1 parent f129170 commit 7efaa21
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/source/user_guide/using_datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,32 @@ You can disable frame filtering for a video dataset as follows:
Did you know? You can also globally disable frame filtering for all video
datasets via your :ref:`App config <configuring-fiftyone-app>`.

.. _dataset-app-config-detection-mask-threshold:

Configure detection mask threshold
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, detection masks are rendered for all pixels where the mask value is
non-zero.

For non-binary detection masks, you can configure the threshold value at which
the mask should be rendered:

.. code-block:: python
:linenos:
import fiftyone as fo
dataset = fo.load_dataset("non-binary-masks")
print(dataset.app_config.mask_threshold) # 0 by default
# Set the threshold to 16; detection masks will only render for pixels with mask value > 16
dataset.app_config.mask_threshold = 16
dataset.save()
session.refresh()
.. _dataset-app-config-reset:

Resetting a dataset's App config
Expand Down

0 comments on commit 7efaa21

Please sign in to comment.