thingsvision
thingsvision copied to clipboard
source-specific extractor classes that inherit from a base extractor class
- now, one can only use
DEFAULT
weights fortorchvision
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
andPyTorchMixin
); 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
- 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)