<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/tasks/maskrcnn.py#L41-L62) |

Zeroes out IDs of classes not in allowed_class_ids.

    tfm.vision.maskrcnn.zero_out_disallowed_class_ids(
        batch_class_ids: tf.Tensor, allowed_class_ids: List[int]
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `batch_class_ids` | A \[batch_size, num_instances\] int tensor of input class IDs. |
| `allowed_class_ids` | A python list of class IDs which we want to allow. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `filtered_class_ids` | A \[batch_size, num_instances\] int tensor with any class ID not in allowed_class_ids set to 0. |

<br />