# Written by Dr Daniel Buscombe, Marda Science LLC # for the SandSnap Program # # MIT License # # Copyright (c) 2020-2021, Marda Science LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ##> Release v1.4 (Aug 2021) ## Contains values for defaults that you may change. ## They are listed in order of likelihood that you might change them: # size of image in pixels. keep this consistent in training and application # suggestd: 512 -- 1024 (larger = larger GPU required) # integer IM_HEIGHT = 1024 IM_WIDTH = IM_HEIGHT # number of images to feed the network per step in epoch #suggested: as many as you have gpu memory for, probably # integer # BATCH_SIZE =8 # BATCH_SIZE =10 BATCH_SIZE =12 #use an ensemble of batch sizes like this #BATCH_SIZE = [7,12,14] # if True, use a smaller (shallower) network architecture ##True or False ##False=larger network SHALLOW = False #True ## if True, carry out data augmentation. 2 x number of images used in training ##True or False DO_AUG = False #True # maximum learning rate ##1e-1 -- 1e-5 MAX_LR = 1e-4 # MAX_LR = 1e-5 # MAX_LR = 5e-3 # MAX_LR = 5e-4 # max. number of training epics (20 -1000) # integer NUM_EPOCHS = 300 ## loss function for continuous models (2 choices) #CONT_LOSS = 'pinball' CONT_LOSS = 'mse' ## loss function for categorical (disrete) models (2 choices) CAT_LOSS = 'focal' #CAT_LOSS = 'categorical_crossentropy' # optimizer (gradient descent solver) good alternative == 'rmsprop' OPT = 'adam' # base number of conv2d filters in categorical models # integer BASE_CAT = 30 # base number of conv2d filters in continuous models # integer # BASE_CONT = 30 BASE_CONT = 10 # number of Dense units for continuous prediction # integer # CONT_DENSE_UNITS = 3072 CONT_DENSE_UNITS = 2048 # CONT_DENSE_UNITS = 1024 # number of Dense units for categorical prediction # integer CAT_DENSE_UNITS = 128 # set to False if you wish to use cpu (not recommended) ##True or False USE_GPU = True ## standardize imagery (recommended) DO_STANDARDIZE = True # STOP_PATIENCE = 10 # FACTOR = 0.2 # MIN_DELTA = 0.0001 # MIN_LR = 1e-4