fabio-sim / Depth-Anything-ONNX

ONNX-compatible Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data
Apache License 2.0
234 stars 23 forks source link

Aspect ratio of input image is altered in pre-processing #7

Closed YoniSmolin closed 1 month ago

YoniSmolin commented 5 months ago

In the "official" Depth Anything repo, the preprocessing transform maintains input image's aspect ratio (link):

keep_aspect_ratio=True,

In this repo, the aspect ratio is not maintained (link):

keep_aspect_ratio=False,

My question - is there any particular reason to do say keep_aspect_ratio=False in this repo? Was that done for performance measurement reasons?

The model seems to work fine when I set keep_aspect_ratio to True (I tested this, the image fed to the model indeed maintains the original input image's aspect ratio).

fabio-sim commented 5 months ago

Hi @YoniSmolin, thank you for your interest. Yes, you are correct. I set it to False when I was measuring the latency.