> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Utilities.coco.polygon utils

#### find\_contours

```python theme={"dark"}
def find_contours(mask: Any) -> List[List[List[float]]]
```

Find all contours in the given binary mask, including inner contours.
Returns polygons in GeoJSON format: triple nested list where:

* Top level = polygon
* Second level = list of rings (first is outer contour, rest are inner/holes)
* Third level = flat list of coordinates \[x1, y1, x2, y2, ...]

**Arguments**:

* `mask` - np.ndarray

**Returns**:

List of polygons in GeoJSON format
