You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My problem
I work in a production environment with no internet access at runtime and i'm loading weights from a file.
when initializing a FeaturExtractor it in turn loads a model with a hard coded argument pretrained=True, so it attempts to download the model weights.
specifically i'm looking at this line but it pops up in a few places: self.feature_extractor = FeatureExtractor(backbone=_backbone(pretrained=True), layers=["avgpool"]).eval()
proposed solution
make the pretrained option to be configurable by environment variables / as an init argument / config option in the classes -
TorchInferencer
DfkdeModel
FeatureExtractor
and any other classes that initialize a model
@baraklior, just to understand the request correctly, you want to add pre_trained flag to config files to set it on/off depending on the need, right? For example, something like this for DFKDE:
My problem
I work in a production environment with no internet access at runtime and i'm loading weights from a file.
when initializing a FeaturExtractor it in turn loads a model with a hard coded argument
pretrained=True
, so it attempts to download the model weights.specifically i'm looking at this line but it pops up in a few places:
self.feature_extractor = FeatureExtractor(backbone=_backbone(pretrained=True), layers=["avgpool"]).eval()
proposed solution
make the pretrained option to be configurable by environment variables / as an init argument / config option in the classes -
TorchInferencer
DfkdeModel
FeatureExtractor
and any other classes that initialize a model
the offending file
https://github.com/openvinotoolkit/anomalib/blob/cab7aa21aba6876173585a6d300c63238b16fb11/anomalib/models/dfkde/torch_model.py
The text was updated successfully, but these errors were encountered: