keras-nlp icon indicating copy to clipboard operation
keras-nlp copied to clipboard

Implement Depth Estimation Pipeline

Open Sohaib-Ahmed21 opened this issue 8 months ago • 5 comments

Depth estimation is the process of determining the distance of objects from a viewpoint, which is crucial for various applications in computer vision, including autonomous driving, augmented reality, and 3D reconstruction..

Sample Input and Output:

Image

Sample images (up) and depth annotation (down).

Applications of Depth Estimation:

  1. Estimation of Volumetric Information: Depth estimation models help study the volumetric formation of objects in images, crucial for computer graphics.
  2. 3D Representation: Depth estimation enables the development of 3D representations from 2D images.
  3. Augmented Reality: Depth estimation ensures accurate object placement and perspective calibration in AR applications.
  4. Robotics and Object Trajectory Estimation: Depth information helps estimate the motion trajectory of objects in 3D space.
  5. Haze and Fog Removal: Depth estimation aids in removing haze and fog by understanding how they affect distant objects.
  6. Portrait Mode: Depth-based blur in portrait mode enhances the focus on subjects and creates appealing background effects.

Depth Estimation Subtasks:

There are two depth estimation subtasks.

Absolute depth estimation: Absolute (or metric) depth estimation aims to provide exact depth measurements from the camera. Absolute depth estimation models output depth maps with real-world distances in meter or feet.

Relative depth estimation: Relative depth estimation aims to predict the depth order of objects or points in a scene without providing the precise measurements.

Depth Estimation Models

Why will it be a good addition?

The backbone of above models already exist in keras-hub and above models will also be compatible with keras-hub structure and API, so it will be easy to add them. The pipeline will also follow the same workflow as other pipelines of image classifcation, object detection, etc. Also, above applications are quite crucial in daily life and this pipeline will help users perform above tasks through keras-hub with greater ease.

I'd love to hear comments from the community. FYI @divyashreepathihalli @mattdangerw @sineeli

Sohaib-Ahmed21 avatar Apr 02 '25 10:04 Sohaib-Ahmed21

depthanything is great! would you like to contribute this to KerasHub?

divyashreepathihalli avatar Apr 04 '25 20:04 divyashreepathihalli

depthanything is great! would you like to contribute this to KerasHub?

Yes, I'd be happy to take that, starting from the depth estimation pipeline. Do we plan to add other famous depth estimation models(as listed above) in the future as well?

Sohaib-Ahmed21 avatar Apr 04 '25 21:04 Sohaib-Ahmed21

Any progress on this? Am hoping to incorporate the depth anything model into a keras training pipeline.

openSourcerer9000 avatar Apr 30 '25 16:04 openSourcerer9000

Any progress on this? Am hoping to incorporate the depth anything model into a keras training pipeline.

I'm currently working on another PR. Then, I've planned to implement depth estimation pipeline with depthanything model. I'd really appreciate that you contribute a model with me.

Sohaib-Ahmed21 avatar Apr 30 '25 17:04 Sohaib-Ahmed21

@openSourcerer9000 you can work on this one as I am currently not pursuing this .

Sohaib-Ahmed21 avatar Jul 10 '25 19:07 Sohaib-Ahmed21