File size: 1,045 Bytes
09a70d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
base_path = '/kaggle/input/csiro-biomass/'

train_path = os.path.join(base_path, 'train')
test_path = os.path.join(base_path, 'test')
test_csv_path = os.path.join(base_path, 'test.csv')
train_csv_path = os.path.join(base_path, 'train.csv')
data_dir = os.path.join(base_path,  "")
nFolds = 5
seed = 42
pretrained = False
pretrained_weights_path = os.path.join(base_path, "")
best_model_dir = "/kaggle/input/dinov2-training"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
epochs = 15
batch_size = 8
lr = 1e-3
eta_min = 1e-5
weight_decay = 1e-6

# image
img_size_h = 448 # 224
img_size_w = 448 # 224
in_chans = 3

# target columns
target_cols = [
    "Dry_Clover_g",
    "Dry_Dead_g",
    "Dry_Green_g",
    "Dry_Total_g",
    "GDM_g"
]
n_targets = 3
# we can predict multiple configs
targets_configs = ["Dry_Clover_g", "Dry_Dead_g", "Dry_Green_g"]
weights = np.array([0.1, 0.1, 0.1, 0.5, 0.2])
mapping = {"Dry_Clover_g": 0, "Dry_Dead_g": 1, "Dry_Green_g": 2, "Dry_Total_g": 3, "GDM_g": 4}