diff --git a/__init__.py b/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/segmentation/model/backbone/hrnet.py b/segmentation/model/backbone/hrnet.py index 7211037..7d2dbb2 100755 --- a/segmentation/model/backbone/hrnet.py +++ b/segmentation/model/backbone/hrnet.py @@ -25,7 +25,7 @@ import logging import torch.nn as nn import torch.nn.functional as F -from torchvision.models.utils import load_state_dict_from_url +from torch.hub import load_state_dict_from_url logger = logging.getLogger('hrnet_backbone') diff --git a/segmentation/model/backbone/mnasnet.py b/segmentation/model/backbone/mnasnet.py index db5461b..0ae87cb 100755 --- a/segmentation/model/backbone/mnasnet.py +++ b/segmentation/model/backbone/mnasnet.py @@ -8,7 +8,7 @@ import torch import torch.nn as nn -from torchvision.models.utils import load_state_dict_from_url +from torch.hub import load_state_dict_from_url __all__ = ['MNASNet', 'mnasnet0_5', 'mnasnet0_75', 'mnasnet1_0', 'mnasnet1_3'] diff --git a/segmentation/model/backbone/mobilenet.py b/segmentation/model/backbone/mobilenet.py index 5ae4a4d..48d0e64 100755 --- a/segmentation/model/backbone/mobilenet.py +++ b/segmentation/model/backbone/mobilenet.py @@ -4,7 +4,7 @@ # ------------------------------------------------------------------------------ from torch import nn -from torchvision.models.utils import load_state_dict_from_url +from torch.hub import load_state_dict_from_url __all__ = ['MobileNetV2', 'mobilenet_v2'] diff --git a/segmentation/model/backbone/resnet.py b/segmentation/model/backbone/resnet.py index e936eba..e4b890b 100755 --- a/segmentation/model/backbone/resnet.py +++ b/segmentation/model/backbone/resnet.py @@ -4,7 +4,7 @@ # ------------------------------------------------------------------------------ import torch.nn as nn -from torchvision.models.utils import load_state_dict_from_url +from torch.hub import load_state_dict_from_url __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', diff --git a/segmentation/model/backbone/xception.py b/segmentation/model/backbone/xception.py index 1fa7e39..96dd503 100644 --- a/segmentation/model/backbone/xception.py +++ b/segmentation/model/backbone/xception.py @@ -6,7 +6,7 @@ from collections import OrderedDict import torch.nn as nn -from torchvision.models.utils import load_state_dict_from_url +from torch.hub import load_state_dict_from_url __all__ = ['Xception65', 'xception65'] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..477993d --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup, find_packages + +setup(name='panoptic-deeplab', version='1.0', packages=find_packages())