def getNets(self): """ Returns a list of all available netloaders @rtype: List @return: List of all available netloaders """ return NetLoader.listNetworks()
def setType(self, type): """ Sets the type of the net @type type: string @param type: the type-identifier string """ if not self.Loaded: self.type = type self.loader = NetLoader.getNetwork(type) self.isTypeSet = True
def setConfig(self, cfg): """ Sets the config of the net @type cfg: string @param cfg: the filename of the net config """ if not self.Loaded: self.cfg = cfg if (cfg != ""): self.isCfgSet = NetLoader.loadConfig(self.type,cfg) else: self.isCfgSet = True
# Can be removed if there is no folder with gesture data image_val_data_location_1_1 = "../HandGestureData/Ack/" image_val_data_location_2_1 = "../HandGestureData/Fist/" image_val_data_location_3_1 = "../HandGestureData/Hand/" image_val_data_location_4_1 = "../HandGestureData/One/" image_val_data_location_5_1 = "../HandGestureData/Straight/" image_val_data_location_6_1 = "../HandGestureData/Palm/" image_val_data_location_7_1 = "../HandGestureData/Thumbs/" image_val_data_location_8_1 = "../HandGestureData/None/" image_val_data_location_9_1 = "../HandGestureData/Swing/" image_val_data_location_10_1 = "../HandGestureData/Peace/" net = NetLoader.NetLoader(model_file=model_path, weights_file=weights_path, learning_rate=0.001, decay_rate=0.00000001, create_file=True, epoch_save=1) data_list = [ # First data set (Positional Gestures) image_val_data_location_1_1, image_val_data_location_2_1, image_val_data_location_3_1, image_val_data_location_4_1, image_val_data_location_5_1, image_val_data_location_6_1, image_val_data_location_7_1, image_val_data_location_8_1, image_val_data_location_9_1, image_val_data_location_10_1 ] # if training mode is false, then data list can just be an empty array if not train_mode: data_list = []