def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'smgo': download_and_convert_smgo.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'smgo6': download_and_convert_smgo6.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist_eo': download_and_convert_mnist_eo.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist_11': download_and_convert_mnist_11.run(FLAGS.dataset_dir) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wikiart': if not FLAGS.input_dataset_dir is None: convert_wikiart.run(FLAGS.input_dataset_dir, FLAGS.dataset_dir) else: raise ValueError( "For wikiart, you must supply a valid input directory with --input_dataset_dir" ) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'chair': download_and_convert_chair.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'stand': download_and_convert_stand.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'desk': download_and_convert_desk.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'sofa': download_and_convert_sofa.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'bed': download_and_convert_bed.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wardrobe_cabinet': download_and_convert_wardrobe_cabinet.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'tv_stand': download_and_convert_tv_stand.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'table': download_and_convert_table.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'television': download_and_convert_television.run(FLAGS.dataset_dir) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'visualwakewords': download_and_convert_visualwakewords.run( FLAGS.dataset_dir, FLAGS.small_object_area_threshold, FLAGS.foreground_class_of_interest) elif FLAGS.dataset_name == 'generic': download_and_convert_generic.run(FLAGS.dataset_dir, perc_validation=FLAGS.perc_validation, labels_filename=FLAGS.labels_filename, num_shards=FLAGS.num_shards) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'pic': download_and_convert_pic.run(FLAGS.dataset_dir) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'cifar10_val': download_and_convert_cifar10_val.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == ''google_speech': download_and_convert_google_speech.run(FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': #提供的三个数据集,[cifar10],[flowers],[mnist] download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name) #数据经名字不属于上述三个
def main(_): if not FLAGS.dataset_name: #supply v. 补给, 提供, 供给; 替代他人职务, 替代 raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) else: raise ValueError( #recognized v. 认出, 识别; 正式承认; 认识; 认可, 认定 'dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'expand': convert_foldered_images.run() else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'casia': download_and_convert_casia.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_face_2013': download_and_convert_wvu_face_2013.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_face_overlap_2013': download_and_convert_wvu_face_overlap_2013.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_face_overlap_2012': download_and_convert_wvu_face_overlap_2012.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_face_overlap_frontal_2012': download_and_convert_wvu_face_overlap_frontal_2012.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_face_overlap_2012_no_repeat': download_and_convert_wvu_joint_face_overlap_2012_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_iris_overlap_2012_no_repeat': download_and_convert_wvu_joint_iris_overlap_2012_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_face_overlap_2013_no_repeat': download_and_convert_wvu_joint_face_overlap_2013_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_iris_overlap_2013_no_repeat': download_and_convert_wvu_joint_iris_overlap_2013_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_iris_and_face_overlap_2013_no_repeat': download_and_convert_wvu_joint_iris_and_face_overlap_2013_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_joint_iris_and_face_overlap_2012_no_repeat': download_and_convert_wvu_joint_iris_and_face_overlap_2012_no_repeat.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_iris_2013': download_and_convert_wvu_iris_2013.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_iris_overlap_2013': download_and_convert_wvu_iris_overlap_2013.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'wvu_iris_overlap_2012': download_and_convert_wvu_iris_overlap_2012.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'casia_ndiris': download_and_convert_casia_ndiris.run(FLAGS.dataset_dir) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) else: print( 'dataset_name [%s] was not official support, please make sure having this folder in data dir.' % FLAGS.dataset_name) img2tfrecord.run(FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'quiz': convert_quiz.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'pj_vehicle': convert_pj_vehicle.run(FLAGS.dataset_dir) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): FLAGS.dataset_name = 'cifar10' FLAGS.dataset_dir = 'D:/pig_recognize/models/research/slim/cifar10' if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( "You must supply the dataset name with --dataset_name") if not FLAGS.dataset_dir: raise ValueError( "You must supply the dataset directory with --dataset_dir") if FLAGS.dataset_name == "cifar10": download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == "flowers": download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == "mnist": download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == "custom": download_and_convert_custom.run(FLAGS.dataset_dir) else: raise ValueError("dataset_name [%s] was not recognized." % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'custom': convert_custom_dataset.run(FLAGS.dataset_dir, FLAGS.num_validation, FLAGS.num_shards) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'custom': convert_tfrecord.run(FLAGS.dataset_dir, dataset_name=FLAGS.dataset_name) else: convert_tfrecord.run(FLAGS.dataset_dir, dataset_name=FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'nuswide': convert_nuswide.run(FLAGS.dataset_dir, FLAGS.create_label_dict) elif FLAGS.dataset_name == 'espgame': convert_espgame.run(FLAGS.dataset_dir, FLAGS.create_label_dict) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'visualwakewords': download_and_convert_visualwakewords.run( FLAGS.dataset_dir, FLAGS.small_object_area_threshold, FLAGS.foreground_class_of_interest, FLAGS.download, FLAGS.coco_dir) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) #added by chenww elif FLAGS.dataset_name == 'maskCls': convert_maskCls.run(FLAGS.dataset_dir, FLAGS.validation_or_train) elif FLAGS.dataset_name == 'mura2Cls': convert_maskCls.run(FLAGS.dataset_dir, FLAGS.validation_or_train) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'cats_and_dogs': convert_cats_and_dogs.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'svhn': convert_svhn.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'gtsrb': convert_gtsrb.run(FLAGS.dataset_dir) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def main(_): if not FLAGS.dataset_name: raise ValueError( 'You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError( 'You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'plantVSnoplant': download_and_convert_plantVSnoplant.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'plantclef': if FLAGS.dataset == 'training_data_2014': download_and_convert_plantclef.run(FLAGS.dataset_dir, FLAGS.dataset) elif FLAGS.dataset == 'training_data_2015': download_and_convert_plantclef.run(FLAGS.dataset_dir, FLAGS.dataset) elif FLAGS.dataset == 'test_data_2015': download_and_convert_plantclef.run(FLAGS.dataset_dir, FLAGS.dataset) elif FLAGS.dataset == 'whole_data_2015': download_and_convert_plantclef.run(Flags.dataset_dir, Frlags.dataset) elif FLAGS.dataset == 'test_data_2016': download_and_convert_plantclef_for_test.run( FLAGS.dataset_dir, FLAGS.dataset) else: raise ValueError('dataset [%s] was not recognized.' % FLAGS.dataset) else: raise ValueError('dataset_name [%s] was not recognized.' % FLAGS.dataset_dir)
def main(_): if not FLAGS.dataset_name: raise ValueError('You must supply the dataset name with --dataset_name') if not FLAGS.dataset_dir: raise ValueError('You must supply the dataset directory with --dataset_dir') if FLAGS.dataset_name == 'cifar10': download_and_convert_cifar10.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'flowers': download_and_convert_flowers.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'mnist': download_and_convert_mnist.run(FLAGS.dataset_dir) elif FLAGS.dataset_name == 'fxtrade': if FLAGS.sig2png: download_and_convert_fxtrade.sig2png(FLAGS.signal_path, FLAGS.out_dir, FLAGS.draw) else: download_and_convert_fxtrade.run(FLAGS.signal_dir, FLAGS.label_dir, FLAGS.label_files,\ FLAGS.dataset_dir, FLAGS.symbol, FLAGS.periods, FLAGS.draw_signals, \ image_size = tuple([int(i) for i in FLAGS.image_size.split(",")]), \ label_offset=FLAGS.label_offset, interpolation=FLAGS.interpolation) else: raise ValueError( 'dataset_name [%s] was not recognized.' % FLAGS.dataset_name)
def download_convert(): dataset_dir = flowers_data_dir download_and_convert_flowers.run(dataset_dir) return
# limitations under the License. # ============================================================================== r"""Downloads and converts a particular dataset. Usage: ```shell $ python download_and_convert_data.py \ --dataset_name=mnist \ --dataset_dir=/tmp/mnist $ python download_and_convert_data.py \ --dataset_name=cifar10 \ --dataset_dir=/tmp/cifar10 $ python download_and_convert_data.py \ --dataset_name=flowers \ --dataset_dir=/tmp/flowers ``` """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from datasets import download_and_convert_flowers download_and_convert_flowers.run( "/home/tech-garage/Documents/SortAi/Object-Classification_Retraining/slim/transfer_learn/flowers" )
def main(_): download_and_convert_flowers.run('../dataset')