# file: $NEDC_NFC/util/python/nedc_eeg_resnet/src/nedc_eeg_resnet_decode/params_v00.txt # # A parameter file that defines key paramters for decoding EEG signals. # The standard NEDC parameter file parser is used to load this. There is # a function in the decoder class, called load_parameters, that loads this. # # revision history: # # 20240118 (DH): converted to toml # 20240923 (DH): replaced channels property with a montage path # 20220818 (JP): another code review # 20220816 (JP): code review # 20220721 (ML): initial version # # set version information # version = "param_v1.0.0" #------------------------------------------------------------------------------ # [RESNET_DECODE] # sample_frequency is measured in Hz (50 Hz). # frame_duration is the duration of a frame in secs (256 samples @ 50 Hz). # transform_crop is the number of samples we throw away (32 samples). # The transform order is frame_duration_in_samples - transform_crop. # sample_frequency = 50.000 frame_duration = 5.1200 transform_crop = 32 # Transforms are different for each class # Notes: # Using Imagenet data is common practice when using images in deep # machine learning, this is because of the large database that ImageNet # boasts, (over 1 million classified images) because if this their values # for mean, standard deviation, resize and crop tend to do very well # and all of these values are taken from the ImageNet database, more # information about ImageNet can be found here: # https://www.image-net.org/about.php # # transforms.Resize resizes the image to a specified length and width # transforms.CenterCrop crops the image to a specified length and width # transforms.ToTensor converts the PIL image to tensor format and scales # the pixel values between 0.0 and 1.0 # transforms.Normalize normalizes (smooths) the image by applying the # formula: out = (in - mean) / standard deviation, the first list # contains mean values for red, green, and blue channels (an RGB image has # 3 channels, red, green, and blue), the second list contains values for # the standard deviation also for the red, green, and blue channels # transforms = 'transforms.Compose([transforms.Resize(frmsize), transforms.CenterCrop(transform_order), transforms.ToTensor(), transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])' # define the number of batched frames the data loader will use # for evaluating the signals with the trained model # generally the larger the batch size the faster but requires # more memory # batch_size = 20 # define the number of workers we want to use for the data loader # num workers will make make I/O operations faster # num_workers = 2 # define the number of threads we want to use (only for use of CPU) # number of threads will make large tensor operations faster # num_threads = 16 # montage property: # montage = "$NEDC_NFC/util/python/nedc_eeg_resnet/v2.0.1/montage/montage_resnet_v00.txt" # model to decode on # model_path = "$NEDC_NFC/util/python/nedc_eeg_resnet/v2.0.1/models/model.pckl" # pre-trained model path # pre_trained_model_path = "$NEDC_NFC/util/python/nedc_eeg_resnet/v2.0.1/models/resnet-18_pretrained.pth" # select a CPU or GPU device: # decoding does not run significantly faster on a GPU, so we use # CPU's for decoding since we have a lot of available CPU's. # device = "cpu" # set the post processor parameters: # seizure_threshold: the minimum probability for a seizure event # minimum_background_duration: the minimum time for an acceptable # background event # minimum_seizure_duration: the minimum time for an acceptable # seizure event # seizure_threshold = 0.90 minimum_background_duration = 40 minimum_seizure_duration = 20 #------------------------------------------------------------------------------ # # end of file # #------------------------------------------------------------------------------