Git Product home page Git Product logo

Comments (3)

andsteing avatar andsteing commented on August 21, 2024

Top-1 accuracy on imagenet2012 should be 85.082% for that model.

We use im = tf.image.resize(im, [384, 384]) and then normalize the image m = (im - 127.5) / 127.5 - see https://github.com/google-research/vision_transformer/blob/master/vit_jax/input_pipeline.py

from vision_transformer.

dribnet avatar dribnet commented on August 21, 2024

My current B_16 top-1 accuracy is also a bit lower at 83.6%. One difference I found looking at this more closely is that the image normalization I was using was based on the vit_jax.ipynb sample notebook, which is subtly different:

Screen Shot 2020-12-08 at 7 07 52 AM

I've replaced this in my own code now with the m = (im - 127.5) / 127.5 version and am seeing slight differences and will report back if this closes the gap on the reported score.

[Edit: ok - the normalization difference in score is very small (0.01%) - so also checking resize routing on TiT-B_16 top1 score and will report back]

from vision_transformer.

dribnet avatar dribnet commented on August 21, 2024

So that normalization difference cited above changes very little (0.01%) and so I looked closer at the resizing code, but matching that exactly also only moved my score about 0.4% - the best top-1 accuracy I could get matching both for the ViT-B_16 model was 84.01%. So I'd been keen to do a deeper dive to diagnose this if anyone else has gotten to 85% and would be willing to compare exact results. I'll suggest a good starting point would be to look at the accuracy of a particular class (50 images each) and then potentially dive down into any differences for particular files, etc.

from vision_transformer.

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.