Git Product home page Git Product logo

Comments (9)

fmassa avatar fmassa commented on July 21, 2024 1

@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

from detr.

fmassa avatar fmassa commented on July 21, 2024

Hi,

No-object label is num_classes + 1 in DETR, so the last element in the prediction.

There is no need for the dataset to return no-object classes (as it return only existing objects). The only place where the notion of the no-object position is taken into account in the loss and postprocessor.

Let us know if you have further questions

from detr.

raviv avatar raviv commented on July 21, 2024

@fmassa usually when training 10 classes, 0 is for bacgkround and 1-10 are actual classes.
Do you mean that here 0-9 should be the classes and 10 is for background?
Also, when constructing the DETR class should num_classes param be 10 or 11?
Thanks.

from detr.

hariSky avatar hariSky commented on July 21, 2024

@fmassa
I am bit confused with your answer after the EDIT above. Does the first statement hold?
"So if you have 10 classes, you should set num_classes to 10 and class index 10 will be the background,"

from detr.

qiaoran-dawnlight avatar qiaoran-dawnlight commented on July 21, 2024

@hariSky Yes, the mode build with real num_class N that no need for background class. But the model itself set with N+1. The N+1 is no object.

from detr.

zhishao avatar zhishao commented on July 21, 2024

@fmassa fmassa Hi , can DETR train images that without any object on it ? I mean the negtive data .

from detr.

rsong0606 avatar rsong0606 commented on July 21, 2024

@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!

from detr.

frabob2017 avatar frabob2017 commented on July 21, 2024

I want to ask the same question, I want to compare YOLO and DETR. I found that in YOLO, an image without an object(background images) just leave it alone. YOLO will take care of it. Does DETR do the same way, for the background images?

from detr.

vritansh avatar vritansh commented on July 21, 2024

I wanted to know if there's a clarity on this. I've total of 3 object classes, Since DETR outputs num_classes + 1. In coco format how should I even label the negative samples, should I keep the category_id=4 and for bbox=[0,0,0,0]. Any help would be greatly appreciated. Thanks in advance !

from detr.

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.