thingsvision icon indicating copy to clipboard operation
thingsvision copied to clipboard

source-specific extractor classes that inherit from a base extractor class

Open LukasMut opened this issue 2 years ago • 1 comments

  • now, one can only use DEFAULT weights for torchvision which is limited behavior (our goal is flexible behavior)
  • we need to make feature extraction more flexible for a source by inheritance from a base extractor class and a backend-specific extractor class (TensorFlowMixin and PyTorchMixin); something along the following lines does the trick
@dataclass(repr=True)
class TimmExtractor(BaseExtractor, PyTorchMixin):

    def __init__(self, config: object) -> None:
        super(TimmExtractor, self).__init__()
        raise NotImplementedError

LukasMut avatar Aug 31 '22 09:08 LukasMut

  • Write a function that takes in the source (e.g., torchvision, timm) and a source-specific config object (see issue #87 ) and returns the respective extractor object (not the class itself)

LukasMut avatar Sep 09 '22 18:09 LukasMut