GithubHelp home page GithubHelp logo

Comments (6)

bfialkoff avatar bfialkoff commented on May 17, 2024

This arose because I tried to build a Unet with b5 backbone, and got a shape error. Is this why the b4 and b5 models haven't been updated on segmentation-models master?

from efficientnet.

qubvel avatar qubvel commented on May 17, 2024

It should be ok:

  1. (None None 3) shape is ok for segmentation models as they are fylly-conv and dont require input size - so this is expected behavior
  2. It is not updated cause I did not prepare release for efficient net (I was waiting for b6/7 weights)
  3. If you install efficientnet from master and use segmentation-models from b4-b5 brach should work ok, but did not test it

from efficientnet.

bfialkoff avatar bfialkoff commented on May 17, 2024
  1. I understand that its a valid input for segmentation models, but it causes the efficientnet backbone to not fall back onto its default input. For example the B5's default input is (456, 456, 3) and if you call Unet with the b5 backbone without specifying the shape, it falls back to (224, 224, 3) instead of the expected (456, 456, 3).

  2. I have done so, in fact it does not work. See my comment.

from efficientnet.

qubvel avatar qubvel commented on May 17, 2024

Sorry if I dont catch your logic.
From my point of veiw could be next cases:

  • input_shape = None -> go to default shape
  • input_shape = (None, None, 3) and include_top = False -> ok
  • input_shape = (h, w, c) -> ok
    else:
    raise error

If I replace with such statement if input_shape is None or None in input_shape it would be not possible to make model with input shape (None, None, 3)

from efficientnet.

bfialkoff avatar bfialkoff commented on May 17, 2024

Could you clarify what is include_top?

It was my understanding that
input_shape = (None, None, 3) -> default_shape?

Am I missing something?
What do you say about the B5?

from efficientnet.

qubvel avatar qubvel commented on May 17, 2024

If you specify include_top=False parameter the model will not build pooling and dense layers on top.
So there will be no error for input_shape=(None, None, 3) and it will be possible to pass images of different size (useful case for semantic segmentation).

from efficientnet.

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.