question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What is the class id for background class?

See original GitHub issue

I have a quick question: is the background class id 0 or 91? (DETR used 91 COCO categories to train) It seems the targets object returned by dataloader uses 1-91 for all the object categories, but the loss_labels function used 91 instead of 0 for background. I am not sure if I missed something.

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fmassacommented, Jun 2, 2020

@raviv DETR uses the last value for the class. So if you have 10 classes, you should set num_classes to 10 and class index 10 will be the background,

EDIT: corrected the value for num_classes, the no-object class is added in the model definition

0reactions
rsong0606commented, Aug 22, 2022

@fmassa same question as @zhishao . For an image without an object(negative example), how do we label it in COCO format? Do we label the annotations bbox as all zeros? Or we do not even label it, since there’s an extra class built in to handle no-object? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Difference between class and id .... and background and ...
IDs are hook attributes that allow you to specify a specific element on a page. Classes are hook attributes that allow you to...
Read more >
Lesson 1: Understanding ID and Class in CSS
In this lesson you will learn how ID and Class attributes can be used to stylize ... p#alert { color: black; font-weight: bold;...
Read more >
Class and ID Selectors - HTML Dog
In the CSS, a class selector is a name preceded by a full stop (“.”) and an ID selector is a name preceded...
Read more >
How to set ID/class to background image of a class [closed]
A background image is attached to an element which can have an ID. You can't have an ID on the background image itself....
Read more >
How to find the class id of an element on page: Background
The easiest way of finding the right class is to inspect the element with your Chrome Dev tools. If you right click on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found