Skip to content

Problem in ResNet50 backbone of "Image segmentation" example #169

@cdsousa

Description

@cdsousa

I suspect that the following code line from the Image segmentation example

backbone = Metalhead.ResNet50(pretrain=true).layers[1:end-3]

is not doing what is intended since ResNet50 from Metalhead (https://github.com/darsnack/Metalhead.jl/tree/darsnack/vision-refactor) returns a 2 item Chain (backbone and head), and the 1:end-3 indexing returns an empty Chain.

Funny enough, with the model return by methodmodel (basically a Conv((1,1), 3=>32)) the example still works and is able to produce some image segmentation (does it works like just a pixel color indexer?).

I'd say the expected code should be something Metalhead.ResNet50(pretrain=true).layers[1].layers and I would open a PR, but I'm not sure since, with that, the example fails later in the training loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions