Code Monkey home page Code Monkey logo

Comments (6)

vfdev-5 avatar vfdev-5 commented on June 12, 2024 1

Actually, the reason of 0.017 is the following:
Originally, they preprocess normalized between [0.0; 1.0] RGB images by subtracting a mean value [0.485, 0.456, 0.406] and dividing each channel by a corresponding std value from [0.229, 0.224, 0.225], see here.
But as @titu1994 says that the weights are ported from here and Felix says that the weights were ported from here, where the preprocessing is

  • BGR mean values [103.94,116.78,123.68] are subtracted
  • scale: 0.017 is used, instead of the original std values for image preprocessing

and if you compute the inverse of 255 * mean(std), it gives 1.0 / (255.0 * 0.227) = 0.01727563272004837

HTH

from densenet.

titu1994 avatar titu1994 commented on June 12, 2024

Primarily, incorrect classification if scaling is not performed. I referred to the Keras-Densenet repo for this right ? Or did I forget that when I rewrote the call

from densenet.

titu1994 avatar titu1994 commented on June 12, 2024

It's approximately 1/58.8 for some reason. I never could find out why this is the case.

from densenet.

titu1994 avatar titu1994 commented on June 12, 2024

Maybe try with 1/255 and see if it still classifies correctly?

from densenet.

titu1994 avatar titu1994 commented on June 12, 2024

Thank you very much for the explanation @vfdev-5 !

from densenet.

ahundt avatar ahundt commented on June 12, 2024

@vfdev-5 good sleuthing, thanks!

from densenet.

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.