In the current implementation, the target virtual pinhole image uses the following camera intrinsics:
pinhole_intrinsics: [463.99945, 463.25045, 400, 300]
pinhole_resolution: [800, 600]
The image aspect ratio is:
Depth Anything 3 (DA3) resizes the input image so that the longest side is 504 pixels by default. As a result, reducing the input resolution alone does not significantly reduce GPU memory usage, since the image is internally rescaled during inference.
If you encounter CUDA out-of-memory (OOM) errors, try one of the following approaches:
1. Reduce the image height
Decrease the image height while keeping the image width and camera intrinsics unchanged. For example:
pinhole_intrinsics: [463.99945, 463.25045, 400, 300]
pinhole_resolution: [800, 520]
Reducing the image height decreases the number of pixels processed after resizing, which can significantly reduce GPU memory usage during inference.
2. Lower the inference resolution
In depthanything.py, locate the model.inference() call and set process_res to a value smaller than 504.
This reduces the internal processing resolution while preserving the original aspect ratio, thereby lowering GPU memory consumption during inference.
In the current implementation, the target virtual pinhole image uses the following camera intrinsics:
The image aspect ratio is:
Depth Anything 3 (DA3) resizes the input image so that the longest side is 504 pixels by default. As a result, reducing the input resolution alone does not significantly reduce GPU memory usage, since the image is internally rescaled during inference.
If you encounter CUDA out-of-memory (OOM) errors, try one of the following approaches:
1. Reduce the image height
Decrease the image height while keeping the image width and camera intrinsics unchanged. For example:
Reducing the image height decreases the number of pixels processed after resizing, which can significantly reduce GPU memory usage during inference.
2. Lower the inference resolution
In
depthanything.py, locate themodel.inference()call and setprocess_resto a value smaller than504.This reduces the internal processing resolution while preserving the original aspect ratio, thereby lowering GPU memory consumption during inference.