-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
33 lines (24 loc) · 1 KB
/
main.py
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
import random
from configuration import Config
from image_reader import ReadSentinel2
from training import training_main
from evaluation import evaluation_main
from datetime import datetime
from configuration import Debug
if __name__ == "__main__":
""" Main function containing the main logic and flow of the code.
Instead of calling this function, it is possible to run the jupyter notebook file
provided in this project.
"""
# Initialize random seed
random.seed(1)
# Set logging path
Debug.set_logging_file(time_now=datetime.now())
# Instance of Image Reader object
image_reader = ReadSentinel2(Config.image_dimensions[Config.scenario]['dim_x'],
Config.image_dimensions[Config.scenario]['dim_y'])
# Training Stage
labels, gmm_densities, trained_lr_model = training_main(image_reader)
# Evaluation Stage
# This stage includes the plotting of plot_results
evaluation_main(gmm_densities, trained_lr_model, image_reader)