YvanYin / Metric3D

The repo for "Metric3D: Towards Zero-shot Metric 3D Prediction from A Single Image" and "Metric3Dv2: A Versatile Monocular Geometric Foundation Model..."
https://jugghm.github.io/Metric3Dv2/
BSD 2-Clause "Simplified" License
1.39k stars 103 forks source link

Get a depth dataset from REPLICA dataset #171

Open czeyveli1 opened 3 weeks ago

czeyveli1 commented 3 weeks ago

Hello everyone,

I am trying to create a metric depth dataset using the Replica RGB dataset, but I am not entirely sure how to proceed with it. I don’t quite understand which code file I need to work on to achieve this.

Additionally, below are the config settings for the dataset I will be using:

dataset_name: 'replica'
camera_params:
  image_height: 680
  image_width: 1200
  fx: 600.0
  fy: 600.0
  cx: 599.5
  cy: 339.5
  png_depth_scale: 6553.5
  crop_edge: 0

In which file exactly should I set these parameters? In short, how can I obtain the depth outputs? I would appreciate it if you could help me with this.

JUGGHM commented 2 days ago

Well I think we need to configure two files: (1) The json file to read the data, formatted like this. Here the camera intrinsics are configurated. The height and width do not need additional configuration.

(2) The metric_scale is configured here.

Before the training, we should check whether the depth is correctly loaded by adding some breakpoints here.