Replies: 1 comment
-
I have figured out what the default strides are by adding a print statement in the anchor generator. The default strides are [4, 8, 16, 32, 64]. My first question still remains though. Is there a way to change these strides? My modification returns a error, so is there somewhere else I should be changing it? |
Beta Was this translation helpful? Give feedback.
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I attempted to register my own custom anchor generator class in anchor_generator.py and copied the DefaultAnchorGenerator making one modification, changing strides to equal a list of integers, rather than the [x.stride for x in input_shape] it is by default.
Using this custom anchor generator results in a error "AttributeError: 'torch.device' object has no attribute 'device'".
So I have two questions:
Here is a section of my custom anchor generator, my modification is in the from_config definition, everything else is the same as the DefaultAnchorGenerator
@ANCHOR_GENERATOR_REGISTRY.register()
class CustomAnchorGenerator(nn.Module):
"""
Compute anchors in the standard ways described in
"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks".
"""
`
Beta Was this translation helpful? Give feedback.
All reactions