Python data_utils.get_data() Examples

The following are 11 code examples of data_utils.get_data(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module data_utils , or try the search function .
Example #1
Source File: interpolation_in_z.py    From Hands-On-Generative-Adversarial-Networks-with-Keras with MIT License 6 votes vote down vote up
def infer(data_filepath='data/flowers.hdf5', z_dim=128, out_dir='gan',
          n_steps=10):

    G = load_model(out_dir)
    val_data = get_data(data_filepath, 'train')
    val_data = next(iterate_minibatches(val_data, 1))
    emb_fixed, txt_fixed = val_data[1], val_data[2]
    
    z_start = np.random.uniform(-1, 1, size=(1, z_dim))
    z_end = np.random.uniform(-1, 1, size=(1, z_dim))

    G.trainable = False
    for i in range(n_steps+1):
        p = i/float(n_steps)
        z = z_start * (1-p) + z_end * p
        fake_image = G.predict([z, emb_fixed])[0]
        img = ((fake_image + 1)*0.5)
        plt.imsave("{}/fake_z_interpolation_i{}".format(out_dir, i), img)
        print(i, str(txt_fixed[0]).strip(),
              file=open("{}/fake_z_interpolation.txt".format(out_dir), "a")) 
Example #2
Source File: train.py    From DOTA_models with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #3
Source File: train.py    From yolo_v2 with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #4
Source File: train.py    From Gun-Detector with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #5
Source File: train.py    From hands-detection with MIT License 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #6
Source File: train.py    From object_detection_kitti with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #7
Source File: train.py    From object_detection_with_tensorflow with MIT License 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #8
Source File: train.py    From HumanRecognition with MIT License 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #9
Source File: train.py    From g-tensorflow-models with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #10
Source File: train.py    From models with Apache License 2.0 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run() 
Example #11
Source File: train.py    From multilabel-image-classification-tensorflow with MIT License 5 votes vote down vote up
def main(unused_argv):
  train_data, valid_data = data_utils.get_data()
  trainer = Trainer(train_data, valid_data, data_utils.IMAGE_NEW_SIZE ** 2)
  trainer.run()