diff --git a/configs/supervised_configs.json b/configs/supervised_configs.json index c18f899..a1b8bf3 100644 --- a/configs/supervised_configs.json +++ b/configs/supervised_configs.json @@ -1,20 +1,20 @@ { - "wandb_project":"YOUR_PROJECT", + "wandb_project":"YOUR_WANDB_PROJECT", "wandb_entity":"YOUR_ENTITY", "task":"classification", - "num_classes":11, + "num_classes":10, "wandb":true, "mixed_precision":true, - "ssl_encoder":null, // SSL encoder to finetune. Otherwise null + "ssl_encoder":null,// SSL encoder to finetune. Otherwise null "ssl_config_path":null, // Config file of the ssl method if finetuning. Otherwise null - "annotation_path":"YOUR_PATH/annotations/", // Full annotation path - "data_path":"YOUR_PATH/Hephaestus_Raw/", // Raw data path. - "batch_size":128, + "annotation_path":"YOUR_ANNOTATION_PATH/annotations/", // Full annotation path + "data_path":"YOUR_DATA_PATH/Hephaestus_Raw/", // Raw data path. + "batch_size":64, "num_workers":4, "device":"cuda:1", - "lr":0.0001, - "weight_decay":1e-4, - "epochs":1, + "lr": 1e-4, // SSL lr: 0.00001, + "weight_decay":0, + "epochs":10, "architecture":"ResNet50", "oversampling":true, // Oversampling at training time "multilabel":true, // For metric construction. Training is mainly built for multilabel (TODO make it more generic) @@ -22,6 +22,6 @@ "augment":false, // wheter to augment for supervised training (TODO) "metric_strategy":"none", //none to get per class metrics "num_channel":2, // number of channels, 1 for the phase and one for the coherence - "image_size":224, // How to resize the frame. + "image_size":560, // How to resize the frame. "test_frames": ["124D_04854_171313", "022D_04826_121209", "087D_07004_060904","174A_09133_131313","021D_09150_131313","109D_05390_141615", "162A_06192_060402", "076D_09725_121107","115D_04999_131313","152D_08915_131313", "164A_13146_131313","151D_SM_REUN_S4","144A_SM_REUN_S6"] // Volcanoes in Campi Flegrei (Italy), Kilauea (Hawaii), Mauna Loa (Hawaii), Puu Ooo (Hawaii), Nyiragongo (Congo), Santorini (Greece), Caldera de los Marteles (Spain/Africa), Merapi (Indonesia), Korosi (Kenya), Silali (Kenya), Cerro Tronador (Chile), Osorno (Chile), Puyehue (Chile), La Soufriere (Carribean) } \ No newline at end of file diff --git a/dataset/Dataset.py b/dataset/Dataset.py index 5089489..c172e29 100644 --- a/dataset/Dataset.py +++ b/dataset/Dataset.py @@ -341,33 +341,33 @@ def create_label_vector(self,annotation): # - Deformation, No Deformation # --- Deformation Type: Mogi, Dyke, Sill, Earthquake # --- Deformation Intensity - label = np.zeros((11,)) + label = np.zeros((10,)) if 'Non_Deformation' in annotation['label']: - label[1] = 1 + label[0] = 0 return label else: label[0] = 1 # Check activity type. It's possible to have more than one if 'Mogi' in annotation['activity_type']: - label[2] = 1 + label[1] = 1 if 'Dyke' in annotation['activity_type']: - label[3] = 1 + label[2] = 1 if 'Sill' in annotation['activity_type']: - label[4] = 1 + label[3] = 1 if 'Spheroid' in annotation['activity_type']: - label[5] = 1 + label[4] = 1 if 'Earthquake' in annotation['activity_type']: - label[6] = 1 + label[5] = 1 if 'Unidentified' in annotation['activity_type']: - label[7] = 1 + label[6] = 1 # Check event intensity if 'Low' in annotation['intensity_level']: - label[8] = 1 + label[7] = 1 if 'Medium' in annotation['intensity_level']: - label[9] = 1 + label[8] = 1 if 'High' in annotation['intensity_level']: - label[10] = 1 + label[9] = 1 return label