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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix classification model download logic to resolve zip issue #1967

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ All notable changes to this project will be documented in this file.

- Fix exception -> warning for anomaly dump_feature option
- Remove `dataset.with_empty_annotations()` to keep original input structure (<https://github.com/openvinotoolkit/training_extensions/pull/1964>)
- Fix OV batch inference (saliency map generation) (<https://github.com/openvinotoolkit/training_extensions/pull/1965>)
- Fix OV batch inference (saliency map generation) (<https://github.com/openvinotoolkit/training_extensions/pull/1965>)
- Replace EfficentNetB0 model download logic by pytorchcv to resolve zip issue (<https://github.com/openvinotoolkit/training_extensions/pull/1967>)

## \[v1.1.1\]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def configure(self, model_cfg, model_ckpt, data_cfg, training=True, **kwargs):

# Recipe + model
cfg = self.cfg
self.configure_model(cfg, model_cfg, **kwargs)
self.configure_ckpt(cfg, model_ckpt, kwargs.get("pretrained", None))
self.configure_model(cfg, model_cfg, **kwargs)
self.configure_data(cfg, data_cfg, training)
self.configure_task(cfg, training)
return cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from mmcv.cnn import build_activation_layer
from mmcv.cnn.bricks import ConvModule
from mmcv.runner import load_checkpoint
from pytorchcv.models.model_store import download_model
from torch import nn
from torch.nn import init

Expand Down Expand Up @@ -1281,5 +1282,5 @@ def init_weights(self, pretrained=None):
load_checkpoint(self, pretrained)
logger.info(f"init weight - {pretrained}")
elif pretrained is not None:
load_checkpoint(self, pretrained_urls[self.model_name])
download_model(net=self, model_name=self.model_name)
logger.info(f"init weight - {pretrained_urls[self.model_name]}")
1 change: 1 addition & 0 deletions requirements/classification.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ mmcv-full==1.7.0
mmcls==0.25.0
timm
otxdeploy==0.12.1 # FIXME: mmdeploy==? when PyPI packages are available
pytorchcv
1 change: 1 addition & 0 deletions requirements/segmentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ mmsegmentation==0.30.0
scikit-image
otxdeploy==0.12.1 # FIXME: mmdeploy==? when PyPI packages are available
timm
pytorchcv