Giter VIP home page Giter VIP logo

Comments (3)

hellbell avatar hellbell commented on July 26, 2024

Hi, are you looking at label_map?

def get_labelmaps(label_maps_topk, num_batches):
label_maps_topk_sizes = label_maps_topk[0].size()
label_maps = torch.zeros([num_batches, 1000, label_maps_topk_sizes[2],
label_maps_topk_sizes[3]])
for _label_map, _label_topk in zip(label_maps, label_maps_topk):
_label_map = _label_map.scatter_(
0,
_label_topk[1][:, :, :].long(),
_label_topk[0][:, :, :]
)
label_maps = label_maps.cuda()
return label_maps

For the first dim of label_map,
label_map[0] is a tensor for the prediction scores, and label_map[1] is for the class indices as you saying.
The second dim indicates the top-k index because we only store the top-k label maps for storage efficiency.

from relabel_imagenet.

SeungyounShin avatar SeungyounShin commented on July 26, 2024

image

This is a sample image from the Imagenet and Relabel dataset. The dominant pixel value of label map is 769, and I would like to know the class name of the number. Is there any way of converting this?

from relabel_imagenet.

SanghyukChun avatar SanghyukChun commented on July 26, 2024

@SeungyounShin
You can use this JSON data.
https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a
769 is 'rule, ruler'

from relabel_imagenet.

Related Issues (13)

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.