[BLOCKED] Replace IntermediateLayerGetter with feature_extraction.create_feature_extractor()
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🚀 The feature
A new feature extraction utility based on FX was introduced by #4302. It allows us to extract internal outputs of a module in a simpler way and it should be a drop-in replacement of the old IntermediateLayerGetter class.
Unfortunately the create_feature_extractor() util is not currently used anywhere on vision. We should investigate using it to replace some of the old approaches. Here is a list of candidates:
- Replace
IntermediateLayerGettercalls in Segmentation models [1, 2] - Replace
IntermediateLayerGettercalls in Detection models [3] - Rewrite model surgery from the
SSDFeatureExtractorVGG[4] andSSDLiteFeatureExtractorMobileNetmodules [5].
Extra care needs to be given to ensure that the old weights of pre-trained models can still load and the validation statistics remain the same.
Motivation, pitch
Using the latest FX-based utility will help us future proof our code-base.
cc @datumbox
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the create_feature_extractor utility and the listed IntermediateLayerGetter uses in segmentation.py and detection/backbone_utils.py. Then inspect SSDFeatureExtractorVGG in ssd.py and SSDLiteFeatureExtractorMobileNet in ssdlite.py. Done means the candidates use the FX-based utility while old pretrained weights still load and validation statistics remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100