Coder Social home page Coder Social logo

Comments (4)

narchitect avatar narchitect commented on July 17, 2024 1

Do not replace the full back

Thank you so much for your reply! I was also planning to use another object detection model. hope I get better results soon thanks again!

from scene-graph-benchmark.pytorch.

Maelic avatar Maelic commented on July 17, 2024

Hi @narchitect ,

The mAP you are referring to here is the performance of your object detection alone (i.e. bounding box regression + classification), I would suggest you to switch from Faster-RCNN to another detector which will be more performant for few-shot settings, which seems to be your case. Faster-RCNN is a pretty old and bad detector at this point, especially for few-shot, using a more recent detector pretrained on a larger dataset such as Swin transformer, DETR, ViT etc will be better.
Then you can train a SGGen model by freezing the weights of your object detector and replacing the RPN layers, as I explained it in here.
Do not replace the full backbone layers or you will have to change the features extractor as well, which is more complex.

from scene-graph-benchmark.pytorch.

Lxy811 avatar Lxy811 commented on July 17, 2024

Hi @narchitect ,

The mAP you are referring to here is the performance of your object detection alone (i.e. bounding box regression + classification), I would suggest you to switch from Faster-RCNN to another detector which will be more performant for few-shot settings, which seems to be your case. Faster-RCNN is a pretty old and bad detector at this point, especially for few-shot, using a more recent detector pretrained on a larger dataset such as Swin transformer, DETR, ViT etc will be better. Then you can train a SGGen model by freezing the weights of your object detector and replacing the RPN layers, as I explained it in here. Do not replace the full backbone layers or you will have to change the features extractor as well, which is more complex.

How to freeze the weight of your object detector and how to implement the code

from scene-graph-benchmark.pytorch.

Maelic avatar Maelic commented on July 17, 2024

Hi @narchitect ,
The mAP you are referring to here is the performance of your object detection alone (i.e. bounding box regression + classification), I would suggest you to switch from Faster-RCNN to another detector which will be more performant for few-shot settings, which seems to be your case. Faster-RCNN is a pretty old and bad detector at this point, especially for few-shot, using a more recent detector pretrained on a larger dataset such as Swin transformer, DETR, ViT etc will be better. Then you can train a SGGen model by freezing the weights of your object detector and replacing the RPN layers, as I explained it in here. Do not replace the full backbone layers or you will have to change the features extractor as well, which is more complex.

How to freeze the weight of your object detector and how to implement the code

How to freeze the weights depends on your detector, however here you can do something simpler by forcing your detector to be in eval mode with something like model.rpn.eval() or model.backbone.eval() somewhere before your training loop, to ensure no gradients are computed.

from scene-graph-benchmark.pytorch.

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.