GithubHelp home page GithubHelp logo

vggm not usable about pretrained-models.pytorch HOT 6 OPEN

cadene avatar cadene commented on June 30, 2024
vggm not usable

from pretrained-models.pytorch.

Comments (6)

samxuxiang avatar samxuxiang commented on June 30, 2024 1

@noovd
Did you ensure that the input image is in [0,255] range before you apply normalization?

I use the following code
transformations = transforms.Compose([
transforms.Scale(224),
transforms.ToTensor(),
transforms.Lambda(lambda x: x.mul(255))
])
and then subtract the mean value

In my case I am able to fine-tune the model without any issue. Hope this help solve your problem.

from pretrained-models.pytorch.

Cadene avatar Cadene commented on June 30, 2024

@noovd I could not make vggm work in pytorch sorry. That is why it is not included in the API. It uses old torch7 layers ported in pytorch (which does not work with cuda).

I encourage you to evaluate it on CPU (and maybe port the old torch7 layer). As far as I remember, scores are similar to the caffe implementation.

from pretrained-models.pytorch.

noovd avatar noovd commented on June 30, 2024

Could you be more precise as to what is broken? I am actually able to use your 'vggm' implementation with the given imagenet pretrained weights on gpu but the results I get are unexpectedly bad for several evaluation tasks eventhough i took normalization and RGB -> BGR into account. I was wondering if you could help me out there? Is this the part which is not working?

from pretrained-models.pytorch.

ntuyt avatar ntuyt commented on June 30, 2024

Do we need to convert the images from RGB -> BGR when using this VGGM model?

from pretrained-models.pytorch.

Cadene avatar Cadene commented on June 30, 2024

@ntuyt Yes you do:
https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/vggm.py#L14

from pretrained-models.pytorch.

ntuyt avatar ntuyt commented on June 30, 2024

Hi, I have another question. Since input of original VGGM 224x224. But in your code, the input size is 221x221. Does it influence the performance. Meanwhile, I wonder the provided pretrained model is converted from which model?

from pretrained-models.pytorch.

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.