Skip to content

Commit c65acf0

Browse files
committed
continue fixing linter
1 parent 31e1914 commit c65acf0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

torchdet3d/builders/loader_builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import cv2
44

55
from torchdet3d.dataloaders import Objectron
6-
import torchdet3d.utils as uti
6+
from torchdet3d.utils import ConvertColor, ToTensor
77

88
def build_loader(config, mode='train'):
99

@@ -30,20 +30,20 @@ def build_augmentations(cfg):
3030
normalize = A.augmentations.transforms.Normalize (**cfg.data.normalization)
3131

3232
train_transform = A.Compose([
33-
uti.ConvertColor(),
33+
ConvertColor(),
3434
A.Resize(*cfg.data.resize, interpolation=cv2.INTER_CUBIC),
3535
A.HorizontalFlip(p=0.3),
3636
# A.Rotate(limit=30, p=0.3, interpolation=cv2.INTER_CUBIC),
3737
A.RandomBrightnessContrast(p=0.2),
3838
normalize,
39-
uti.ToTensor(cfg.data.resize)
39+
ToTensor(cfg.data.resize)
4040
], keypoint_params=A.KeypointParams(format='xy', remove_invisible=False))
4141

4242
test_transform = A.Compose([
43-
uti.ConvertColor(),
43+
ConvertColor(),
4444
A.Resize(*cfg.data.resize,cv2.INTER_CUBIC),
4545
normalize,
46-
uti.ToTensor(cfg.data.resize)
46+
ToTensor(cfg.data.resize)
4747
], keypoint_params=A.KeypointParams(format='xy', remove_invisible=False))
4848

4949
return train_transform, test_transform

torchdet3d/builders/model_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from efficientnet_lite2_pytorch_model import EfficientnetLite2ModelFile
1212

1313
from torchdet3d.models import MobileNetV3, init_pretrained_weights, model_params
14-
import torchdet3d.utils as uti
14+
from torchdet3d.utils import load_pretrained_weights
1515

1616
__AVAI_MODELS__ = {
1717
'mobilenetv3_large', 'mobilenetv3_small', 'efficientnet-lite0', 'efficientnet-lite1',
@@ -37,7 +37,7 @@ def build_model(config, export_mode=False):
3737
global_params=global_params)
3838

3939
if config.model.pretrained and not export_mode:
40-
uti.load_pretrained_weights(model, weights_path)
40+
load_pretrained_weights(model, weights_path)
4141

4242
elif config.model.name == 'mobilenetv3_large':
4343
params = model_params['mobilenetv3_large']

torchdet3d/utils/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import torch
44
from albumentations.core.transforms_interface import BasicTransform, ImageOnlyTransform
55

6-
from torchdet3d.utils import normalize
6+
from utils import normalize
77

88
class ConvertColor(ImageOnlyTransform):
99
"""Converting color of the image

0 commit comments

Comments
 (0)