Code Monkey home page Code Monkey logo

Comments (6)

zihangJiang avatar zihangJiang commented on May 18, 2024 1

Hi,
Assume you've got a pre-trained classifier like EfficientNet-B6 for your dataset, you can simply remove the final global average pooling layer (and may have to adjust the shape of the output feature map before you feed it to the classification head) to generate the dense label map.

from tokenlabeling.

wxshan avatar wxshan commented on May 18, 2024

If I save the feature vector of the picture as pt, how can I make the label of the small image correspond to the label of the whole image later?

from tokenlabeling.

zihangJiang avatar zihangJiang commented on May 18, 2024

This is automatically done during training.

target_label = roi_align(
input=label_maps,
boxes=torch.cat(
[torch.arange(num_batches).view(num_batches,
1).float().to(device),
batch_coords.float() * label_maps.size(3) - 0.5], 1),
output_size=(label_size, label_size))

The label map will be cropped (according to the random crop box) and resized to the target shape.

from tokenlabeling.

wxshan avatar wxshan commented on May 18, 2024

from tokenlabeling.

zihangJiang avatar zihangJiang commented on May 18, 2024

You can reopen this issue if you have any further questions.

from tokenlabeling.

poplarzhp avatar poplarzhp commented on May 18, 2024

Hi, Assume you've got a pre-trained classifier like EfficientNet-B6 for your dataset, you can simply remove the final global average pooling layer (and may have to adjust the shape of the output feature map before you feed it to the classification head) to generate the dense label map.

Hi Zihang @zihangJiang , thanks for your excellent work.
I'd like to ask how the score map are generated.
First we use a pretrained machine annotator like NFNet-F6, and as you say we remove the final global average pooling layer, we get the feature map of an input image. But how to transform the feature map to the dense score map, let's say 1000*patch_num for ImageNet? Sorry for my unfamiliarity with the NFNet-F6, will it automatically generate the patch label or there are some other technique to finish this?
Thanks for your reply.

from tokenlabeling.

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.