Ejemplo n.º 1
0
import torch
from torch import nn
import pretrainedmodels
from torchvision import transforms
from torch.utils.data import DataLoader

from src.utils.misc import AttrDict
from src.data.storms_dataset import get_storms_df, StormsDatasetRGBSequence, DATASET_MEAN, DATASET_STD
from src.data.data_feeders import DataFeed

MODEL_TYPE = 'L1A'
MODEL_VERSION = 'C'
TRAINING_VERSION = '2'  # se_resnext101_32x4d_s03g10_v2 - B01n06

args = AttrDict({})

# Data
args.update({
    'sequence_gap': 1,  # hours
})
# Model
args.update({
    'basemodel_name': 'se_resnext101_32x4d',
    'pretrained': 'imagenet',  # 'imagenet' or 'imagenet+background'
    'freeze_basemodel':
    False,  # Indicate first layer to train, True for freeze all, False none
    'reset_weights': False,
})
# Transformations
SIZE = 224
import torch
from torch import nn
import pretrainedmodels
from torchvision import transforms
from torch.utils.data import DataLoader
from src.utils.misc import AttrDict
from src.data.storms_dataset import get_storms_df, StormsDatasetSequence, DATASET_MEAN, DATASET_STD
from src.data.data_feeders import DataFeed
from src.pytorch.transformer import TransformerEncoder

MODEL_TYPE = 'L1A'
MODEL_VERSION = 'A'
TRAINING_VERSION = '4'  # vgg11_transformer_s24g05B - CS061tbn24g05r3

args = AttrDict({})

# Data
args.update({
    'sequence_gap': 0.5,  # hours
    'sequence_length': 8 * 3,
    'train_split_ratio': 0.40,
})
# Train ALL
args.update({
    'all_train_epochs': None,
    'all_train_lr_step': None,
})
# Model
args.update({
    'basemodel_name': 'vgg11_bn',
import torch
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms

from src.data.geodata_utils import get_data_dict, get_dataset_df
from src.utils.misc import AttrDict
from src.data.roof_dataset import RoofDataset
from src.utils.image_transformations import trim
from src.data.data_feeders import DataFeed

MODEL_TYPE = 'L1A'
MODEL_VERSION = 'C'
TRAINING_VERSION = '06g'

args = AttrDict({})

# Data
args.update({
    'use_only_verified':
    True,  # Whether to use only verified data to train the model
    'add_location': False,
    'train_split_ratio': 0.091,  # Ratio split train/validation (if needed)
    'random_split_seed': 999,  # Random seed for splitting training set
    'correct_train_samples': None,
    'thershold_for_corrections': None,  # None or float
    'validate_with_corrected_labels':
    False,  # Use original labels or corrected to validate
})
# Model
args.update({
Ejemplo n.º 4
0
from torch import nn
import pretrainedmodels
from torchvision import transforms
from torch.utils.data import DataLoader

from src.utils.misc import AttrDict
from src.data.storms_dataset import get_storms_df, StormsDatasetSequence, DATASET_MEAN, DATASET_STD
from src.data.data_feeders import DataFeed
from src.pytorch.transformations import RandomRingMask, RandomCircleMask


MODEL_TYPE = 'L1A'
MODEL_VERSION = 'C'
TRAINING_VERSION = '3'  # se_resnext101_32x4d_s07g10 - C01

args = AttrDict({})

# Data
args.update({
    'sequence_gap': 1,  # hours
    'sequence_length': 7,
})
# Train ALL
args.update({
    'all_train_epochs': None,
    'all_train_lr_step': None,
})
# Model
args.update({
    'basemodel_name': 'se_resnext101_32x4d',
    'pretrained': 'imagenet', # 'imagenet' or 'imagenet+background'
Ejemplo n.º 5
0
import torch
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms

from src.data.geodata_utils import get_data_dict, get_dataset_df
from src.utils.misc import AttrDict
from src.data.roof_dataset import RoofDataset
from src.utils.image_transformations import trim
from src.data.data_feeders import DataFeed

MODEL_TYPE = 'L1A'
MODEL_VERSION = 'A'
TRAINING_VERSION = '06'

args = AttrDict({})

# Data
args.update({
    'use_only_verified':
    True,  # Whether to use only verified data to train the model
    'train_split_ratio': 0.091,  # Ratio split train/validation (if needed)
    'random_split_seed': 999,  # Random seed for splitting training set
})
# Model
args.update({
    'basemodel_name': 'dpn92',
    'pretrained':
    'imagenet+5k',  # 'imagenet' or 'imagenet+background' or 'imagenet+5k'
    'freeze_basemodel':
    False,  # Indicate first layer to train, True for freeze all, False none