v1.0.0 update
This commit is contained in:
@@ -5,14 +5,13 @@ import random
|
||||
|
||||
# https://github.com/TengdaHan/DPC/blob/master/utils/augmentation.py
|
||||
import torch
|
||||
from torchvision.transforms import Compose, Lambda
|
||||
|
||||
from scepter.modules.transform.image import ImageTransform
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.transform.utils import (BACKEND_CV2, BACKEND_PILLOW,
|
||||
BACKEND_TORCHVISION,
|
||||
TORCHVISION_CAPABILITY)
|
||||
from scepter.modules.utils.config import dict_to_yaml
|
||||
from torchvision.transforms import Compose, Lambda
|
||||
|
||||
if TORCHVISION_CAPABILITY:
|
||||
BACKENDS = (BACKEND_PILLOW, BACKEND_CV2, BACKEND_TORCHVISION)
|
||||
|
||||
@@ -8,7 +8,6 @@ import opencv_transforms.transforms as cv2_transforms
|
||||
import torch
|
||||
import torchvision.transforms as transforms
|
||||
import torchvision.transforms.functional as TF
|
||||
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.transform.utils import (
|
||||
BACKEND_CV2, BACKEND_PILLOW, BACKEND_TORCHVISION, INPUT_CV2_TYPE_WARNING,
|
||||
|
||||
@@ -7,7 +7,6 @@ import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
from PIL import Image, ImageFile
|
||||
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.utils.config import dict_to_yaml
|
||||
from scepter.modules.utils.distribute import we
|
||||
|
||||
@@ -8,7 +8,6 @@ import threading
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from scepter.modules.transform import LoadImageFromFile
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.utils.config import dict_to_yaml
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import numpy as np
|
||||
import torch
|
||||
from PIL import Image
|
||||
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.utils.config import dict_to_yaml
|
||||
from scepter.modules.utils.distribute import we
|
||||
|
||||
@@ -7,7 +7,6 @@ import opencv_transforms.functional as cv2_TF
|
||||
import torch
|
||||
import torchvision.transforms.functional as TF
|
||||
from PIL.Image import Image
|
||||
|
||||
from scepter.modules.transform import TRANSFORMS, ImageTransform
|
||||
from scepter.modules.transform.image import BACKENDS
|
||||
from scepter.modules.transform.utils import BACKEND_PILLOW, BACKEND_TORCHVISION
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) Alibaba, Inc. and its affiliates.
|
||||
from packaging import version
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
from packaging import version
|
||||
from PIL import Image
|
||||
from torchvision.version import __version__ as tv_version
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
|
||||
import random
|
||||
|
||||
from packaging import version
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
import torchvision.transforms.functional as functional
|
||||
import torchvision.transforms.transforms as transforms
|
||||
from packaging import version
|
||||
from torchvision.version import __version__ as tv_version
|
||||
|
||||
from scepter.modules.transform.registry import TRANSFORMS
|
||||
from scepter.modules.transform.utils import (BACKEND_TORCHVISION,
|
||||
INTERPOLATION_STYLE, is_tensor)
|
||||
# torchvision.transform._transforms_video is deprecated since torchvision 0.10.0, use transform instead
|
||||
from scepter.modules.utils.config import dict_to_yaml
|
||||
from torchvision.version import __version__ as tv_version
|
||||
|
||||
use_video_transforms = version.parse(tv_version) < version.parse('0.10.0')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user