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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
| # - requirement.txt - GPU: tensorflow-gpu, CPU: tensorflow # - If you use the GPU version, you need to install some additional applications. System: MemoryUsage: 0.8 Version: 2
# CNNNetwork: [CNN5, ResNet, DenseNet] # RecurrentNetwork: [CuDNNBiLSTM, CuDNNLSTM, CuDNNGRU, BiLSTM, LSTM, GRU, BiGRU, NoRecurrent] # - The recommended configuration is CNN5+GRU # UnitsNum: [16, 64, 128, 256, 512] # - This parameter indicates the number of nodes used to remember and store past states. # Optimizer: Loss function algorithm for calculating gradient. # - [AdaBound, Adam, Momentum] # OutputLayer: [LossFunction, Decoder] # - LossFunction: [CTC, CrossEntropy] # - Decoder: [CTC, CrossEntropy] NeuralNet: CNNNetwork: CNNX RecurrentNetwork: GRU UnitsNum: 64 Optimizer: RAdam OutputLayer: LossFunction: CTC Decoder: CTC
# ModelName: Corresponding to the model file in the model directory # ModelField: [Image, Text] # ModelScene: [Classification] # - Currently only Image-Classification is supported. Model: ModelName: dede_9885 ModelField: Image ModelScene: Classification
# FieldParam contains the Image, Text. # When you filed to Image: # - Category: Provides a default optional built-in solution: # -- [ALPHANUMERIC, ALPHANUMERIC_LOWER, ALPHANUMERIC_UPPER, # -- NUMERIC, ALPHABET_LOWER, ALPHABET_UPPER, ALPHABET, ALPHANUMERIC_CHS_3500_LOWER] # - or can be customized by: # -- ['Cat', 'Lion', 'Tiger', 'Fish', 'BigCat'] # - Resize: [ImageWidth, ImageHeight/-1, ImageChannel] # - ImageChannel: [1, 3] # - In order to automatically select models using image size, when multiple models are deployed at the same time: # -- ImageWidth: The width of the image. # -- ImageHeight: The height of the image. # - MaxLabelNum: You can fill in -1, or any integer, where -1 means not defining the value. # -- Used when the number of label is fixed # When you filed to Text: # This type is temporarily not supported. FieldParam: Category: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] Resize: [68, 24] ImageChannel: 1 ImageWidth: 68 ImageHeight: 24 MaxLabelNum: 4 OutputSplit: null AutoPadding: True
# The configuration is applied to the label of the data source. # LabelFrom: [FileName, XML, LMDB] # ExtractRegex: Only for methods extracted from FileName: # - Default matching apple_20181010121212.jpg file. # - The Default is .*?(?=_.*\.) # LabelSplit: Only for methods extracted from FileName: # - The split symbol in the file name is like: cat&big cat&lion_20181010121212.png # - The Default is null. Label: LabelFrom: FileName ExtractRegex: .*?(?=_) LabelSplit: null
# DatasetPath: [Training/Validation], The local absolute path of a packed training or validation set. # SourcePath: [Training/Validation], The local absolute path to the source folder of the training or validation set. # ValidationSetNum: This is an optional parameter that is used when you want to extract some of the validation set # - from the training set when you are not preparing the validation set separately. # SavedSteps: A Session.run() execution is called a Step, # - Used to save training progress, Default value is 100. # ValidationSteps: Used to calculate accuracy, Default value is 500. # EndAcc: Finish the training when the accuracy reaches [EndAcc*100]% and other conditions. # EndCost: Finish the training when the cost reaches EndCost and other conditions. # EndEpochs: Finish the training when the epoch is greater than the defined epoch and other conditions. # BatchSize: Number of samples selected for one training step. # ValidationBatchSize: Number of samples selected for one validation step. # LearningRate: [0.1, 0.01, 0.001, 0.0001] # - Use a smaller learning rate for fine-tuning. Trains: DatasetPath: Training: - ./projects/dede/dataset/Trains.0.tfrecords Validation: - ./projects/dede/dataset/Validation.0.tfrecords SourcePath: Training: - /root/dede Validation: ValidationSetNum: 1000 SavedSteps: 100 ValidationSteps: 500 EndAcc: 0.9 EndCost: 0.5 EndEpochs: 2 BatchSize: 64 ValidationBatchSize: 300 LearningRate: 0.001
# Binaryzation: The argument is of type list and contains the range of int values, -1 is not enabled. # MedianBlur: The parameter is an int value, -1 is not enabled. # GaussianBlur: The parameter is an int value, -1 is not enabled. # EqualizeHist: The parameter is an bool value. # Laplace: The parameter is an bool value. # WarpPerspective: The parameter is an bool value. # Rotate: The parameter is a positive integer int type greater than 0, -1 is not enabled. # PepperNoise: This parameter is a float type less than 1, -1 is not enabled. # Brightness: The parameter is an bool value. # Saturation: The parameter is an bool value. # Hue: The parameter is an bool value. # Gamma: The parameter is an bool value. # ChannelSwap: The parameter is an bool value. # RandomBlank: The parameter is a positive integer int type greater than 0, -1 is not enabled. # RandomTransition: The parameter is a positive integer int type greater than 0, -1 is not enabled. DataAugmentation: Binaryzation: -1 MedianBlur: -1 GaussianBlur: -1 EqualizeHist: False Laplace: False WarpPerspective: False Rotate: -1 PepperNoise: -1.0 Brightness: False Saturation: False Hue: False Gamma: False ChannelSwap: False RandomBlank: -1 RandomTransition: -1 RandomCaptcha: Enable: False FontPath: None
# Binaryzation: The parameter is an integer number between 0 and 255, -1 is not enabled. # ReplaceTransparent: Transparent background replacement, bool type. # HorizontalStitching: Horizontal stitching, bool type. # ConcatFrames: Horizontally merge two frames according to the provided frame index list, -1 is not enabled. # BlendFrames: Fusion corresponding frames according to the provided frame index list, -1 is not enabled. # - [-1] means all frames Pretreatment: Binaryzation: -1 ReplaceTransparent: True HorizontalStitching: False ConcatFrames: -1 BlendFrames: -1 ExecuteMap: {}
|