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

# fast-foundationstereo

> Estimate depth from stereo pair using Fast-FoundationStereo

Estimate depth from stereo pair using Fast-FoundationStereo.

## Parameters

<ParamField body="left_image" type="Union[str, Image.Image, np.ndarray]" required>
  Left stereo image.
</ParamField>

<ParamField body="right_image" type="Union[str, Image.Image, np.ndarray]" required>
  Right stereo image.
</ParamField>

<ParamField body="aux_args" type="Dict[str, Any]">
  Camera parameters: - "K": 3x3 camera intrinsics matrix - "baseline": Stereo baseline in meters - "hiera": Use hierarchical coarse-to-fine inference (bool) - "valid\_iters": Number of GRU refinement iterations (default 8)
</ParamField>

<ParamField body="timeout" type="float | None">
  Optional HTTP timeout.
</ParamField>

## Returns

np.ndarray: Depth map as numpy array (H, W) with dtype float32.
Values represent metric depth in meters.

## Example

```python theme={null}
from grid_cortex_client import CortexClient, ModelType
import numpy as np
from PIL import Image
client = CortexClient()
K = np.array([[525, 0, 320], [0, 525, 240], [0, 0, 1]], dtype=np.float32)
aux = {"K": K, "baseline": 0.1, "hiera": False, "valid_iters": 8}
left_image = np.array(Image.open("left.jpg"))
right_image = np.array(Image.open("right.jpg"))
depth = client.run(ModelType.FAST_FOUNDATIONSTEREO, left_image=left_image, right_image=right_image, aux_args=aux)
print(depth.shape)  # (480, 640)
```

Fast-FoundationStereo is \~10x faster than the original FoundationStereo while maintaining comparable accuracy (14.6M params, real-time capable).


## Related topics

- [fast-foundationstereo](/models/cortex/fast-foundationstereo.md)
- [foundationstereo](/models/cortex/foundationstereo.md)
- [Common FAQs](/faq/common-faqs.md)
