Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability add custom/modified backbone to FasterRCNN #660

Closed
abhayraw1 opened this issue Jun 15, 2021 · 4 comments 路 Fixed by #661
Closed

Add ability add custom/modified backbone to FasterRCNN #660

abhayraw1 opened this issue Jun 15, 2021 · 4 comments 路 Fixed by #661
Labels
enhancement New feature or request help wanted Extra attention is needed won't fix This will not be worked on

Comments

@abhayraw1
Copy link
Contributor

abhayraw1 commented Jun 15, 2021

馃殌 Feature

In the Faster RCNN bolt, it would be awesome to have the functionality to pass custom pl.LightningModules or torch.nn.Module backbone. In the current state, the constructor requires the backbone argument to be a str

https://github.com/PyTorchLightning/lightning-bolts/blob/c3b60de7dc30c5f7947256479d9be3a042b8c182/pl_bolts/models/detection/faster_rcnn/faster_rcnn_module.py#L33-L63

Motivation

I wanted to try some custom version of the ResNet model in the Faster RCNN pipeline and thought this functionality might help.

Alternatives

These are the two workarounds that I think would work:

  1. Reassign the backbone manually. Similar to how we reassign the predictor head in torchvision tutorials - link.
  2. Subclass the FasterRCNN and manually reassign the backbone
@abhayraw1 abhayraw1 added enhancement New feature or request help wanted Extra attention is needed labels Jun 15, 2021
@github-actions
Copy link

Hi! thanks for your contribution!, great first issue!

@Borda
Copy link
Member

Borda commented Jun 15, 2021

@abhayraw1 that would be great, do you want to implement it?

@abhayraw1
Copy link
Contributor Author

@Borda sure! Will drop a PR soon!

@stale
Copy link

stale bot commented Aug 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Aug 14, 2021
@stale stale bot closed this as completed Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed won't fix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants