Git Product home page Git Product logo

Comments (1)

nagadomi avatar nagadomi commented on July 21, 2024

I encountered NaN problem when I tried to support fp16 inference.
The cause is that some of MiDaS outputs are very large values, and that turns into inf in float16.
A workaround is to clip MiDaS output within float16 range.
nagadomi@384f325
Also, running DPTDepthModel.head with float16 degraded the accuracy, so it was better to use float32 for that one.
nagadomi/MiDaS_iw3@2e398c9
Note that I tried this only for inference.

--use_amp 0

{'a1': 0.954, 'a2': 0.995, 'a3': 0.999, 'abs_rel': 0.075, 'rmse': 0.27, 'log_10': 0.032, 'rmse_log': 0.095, 'silog': 7.034, 'sq_rel': 0.03}
654/654 [02:27<00:00,  4.42it/s]

--use_amp 1

{'a1': 0.954, 'a2': 0.995, 'a3': 0.999, 'abs_rel': 0.075, 'rmse': 0.271, 'log_10': 0.033, 'rmse_log': 0.095, 'silog': 7.039, 'sq_rel': 0.03}
654/654 [01:50<00:00,  5.90it/s]

from zoedepth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.