"train_image_folder": "sample_datasets/segmentation/imgs", "train_annot_folder": "sample_datasets/segmentation/anns", "train_times": 4, "valid_image_folder": "sample_datasets/segmentation/imgs_validation", "valid_annot_folder": "sample_datasets/segmentation/anns_validation", "valid_times": 4, "valid_metric": "val_loss", "batch_size": 8, "learning_rate": 1e-4, "saved_folder": "/home/ubuntu/space safety/segment", "first_trainable_layer": "", "ignore_zero_class": False, "augumentation": True }, "converter" : { "type": ['k210'] } } dict = {'all':[classifier,detector,segnet],'classifier':[classifier],'detector':[detector],'segnet':[segnet]} return dict[network_type] for item in configs(args.type): model_path = setup_training(config_dict=item) K.clear_session() setup_inference(item,model_path)
"learning_rate": 1e-4, "saved_folder": "/home/ubuntu/space safety/segment", "first_trainable_layer": "", "ignore_zero_class": False, "augumentation": True }, "converter": { "type": ["k210", "tflite"] } } dict = { 'classifier': [classifier], 'detector': [detector], 'segnet': [segnet] } return dict[network_type] #visualize_dataset('/home/ubuntu/github/sample_datasets/detector/imgs','/home/ubuntu/github/sample_datasets/detector/anns') if not args.conf: for item in configs(args.type): setup_inference(item, args.weights) K.clear_session() else: with open(args.conf) as config_buffer: config = json.loads(config_buffer.read()) setup_inference(config, args.weights)