zhyever / Monocular-Depth-Estimation-Toolbox

Monocular Depth Estimation Toolbox based on MMSegmentation.
Apache License 2.0
907 stars 104 forks source link

how to test single picture? #70

Open eugeneYz opened 1 year ago

eugeneYz commented 1 year ago

how can I test one single picture , and get the output of the depth value?

mexicantexan commented 1 year ago

The way that the owner of this repo has it set up at this time, out of the box you can't just test on one of your images. A "hacky" way to get the depth values is to one of the following:

  1. Copy your image into the corresponding data directory and adjust the test.txt file associated with that directory to only have the name of your image in it. i.e. if you're running binsformer. Copy your image into the data/nyu directory then adjust the nyutest.txt to only have your image name in it.
  2. Edit the tools/test.py file directly
  3. point the config file parameter 'data_root' to the directory that contains your image
  4. also check out -> https://github.com/zhyever/Monocular-Depth-Estimation-Toolbox/blob/main/docs/dataset_prepare.md#prepare-datasets to set up your own custom dataset using the steps there
fanshixiong commented 1 year ago

@mexicantexan Hello, I put the pictures in the nyu dataset directory, and modified the nyu_test file, but the program does not run normally, but the nyu dataset can run normally, is it because of the resolution or what?Thanks.

My data resolution is 3840 * 2160, what needs to be modified?