import os
from SegmentationCOVID import Segmentation3D
# from semi_superCOVID import Segmentation3D

os.environ["CUDA_VISIBLE_DEVICES"]="7"

import logging
logger = logging.getLogger()
fh = logging.FileHandler('TrainLog/01_COVID.log',encoding='utf-8')
fh.setLevel(logging.DEBUG)
sh = logging.StreamHandler()
sh.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s')
fh.setFormatter(formatter)  
sh.setFormatter(formatter)

logger.addHandler(fh)   
logger.addHandler(sh)

logger.setLevel(10)  


if __name__ == '__main__':
    path = './files/trainFiles/COVID/train_files.json'
    mode = 'training'
    train_obj = Segmentation3D(path,mode,logger)
    train_obj()
