cfg parameters don't overwrite custom ROIHeads implementation #2904
Unanswered
eugeniotonanzi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm working with Detectron2 Faster R-CNN models. What I need to do is to extract features that are 2048-dimensional from Regions of Interest, rather than the default 1024-dimensional features. So, starting from a model from the model zoo, I registered a new custom ROIHeads class which should be the same as StandardROIHeads class but replacing the linear layers in order to have dimension 2048:
The problem is that if I try to overwrite its parameters using cfg, nothing happens. That is, if I run for example
to train the model on the balloon dataset from the Detectron2 tutorial, the model ROIHeads has still a final output with 81 classes, as the default. Instead, if I use the standard model without my custom ROIHeads, using the previous command works and overwrites the cfg parameters, making the output 2-dimensional rather than 81.
I don't get where I'm doing it wrong, since my custom implementation just subclasses the StandardROIHeads used by the default model.
Beta Was this translation helpful? Give feedback.
All reactions