Tensorflow 在cloud ml引擎示例中使用您自己的评估和培训集
在谷歌的花卉教程中:Tensorflow 在cloud ml引擎示例中使用您自己的评估和培训集,tensorflow,computer-vision,google-cloud-platform,prediction,tensorflow-serving,Tensorflow,Computer Vision,Google Cloud Platform,Prediction,Tensorflow Serving,在谷歌的花卉教程中: 对于数据预处理,我们使用了推拉命令: python trainer/preprocess.py \ --input_dict "$DICT_FILE" \ --input_path "gs://cloud-ml-data/img/flower_photos/train_set.csv" \ --output_path "${GCS_PATH}/preproc/train" \ --cloud 我知道我们可以用自己的列表替换csv文件,从而使用不同的图像集进行训练,但是为1
对于数据预处理,我们使用了推拉命令:
python trainer/preprocess.py \
--input_dict "$DICT_FILE" \
--input_path "gs://cloud-ml-data/img/flower_photos/train_set.csv" \
--output_path "${GCS_PATH}/preproc/train" \
--cloud
我知道我们可以用自己的列表替换csv文件,从而使用不同的图像集进行训练,但是为100多种图像创建csv文件会很麻烦,有没有办法克服这个问题?train_set.csv是谷歌云存储和预测标签中的文件路径列表 这是文件的一部分:
gs://cloud-ml-data/img/flower_photos/daisy/754296579_30a9ae018c_n.jpg,daisy
gs://cloud-ml-data/img/flower_photos/dandelion/18089878729_907ed2c7cd_m.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/dandelion/284497199_93a01f48f6.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/dandelion/3554992110_81d8c9b0bd_m.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/daisy/4065883015_4bb6010cb7_n.jpg,daisy
gs://cloud-ml-data/img/flower_photos/roses/7420699022_60fa574524_m.jpg,roses
gs://cloud-ml-data/img/flower_photos/dandelion/4558536575_d43a611bd4_n.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/daisy/7568630428_8cf0fc16ff_n.jpg,daisy
gs://cloud-ml-data/img/flower_photos/tulips/7064813645_f7f48fb527.jpg,tulips
gs://cloud-ml-data/img/flower_photos/sunflowers/4933229095_f7e4218b28.jpg,sunflowers
gs://cloud-ml-data/img/flower_photos/daisy/14523675369_97c31d0b5b.jpg,daisy
gs://cloud-ml-data/img/flower_photos/sunflowers/21518663809_3d69f5b995_n.jpg,sunflowers
gs://cloud-ml-data/img/flower_photos/dandelion/15782158700_3b9bf7d33e_m.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/tulips/8713398906_28e59a225a_n.jpg,tulips
gs://cloud-ml-data/img/flower_photos/tulips/6770436217_281da51e49_n.jpg,tulips
gs://cloud-ml-data/img/flower_photos/dandelion/8754822932_948afc7cef.jpg,dandelion
gs://cloud-ml-data/img/flower_photos/daisy/22873310415_3a5674ec10_m.jpg,daisy
gs://cloud-ml-data/img/flower_photos/sunflowers/5967283168_90dd4daf28_n.jpg,sunflowers
因此,您必须为自己的列车组收集一组图像,将其上传到地面军事系统并分类。然后,您只需检索路径列表(可以使用gsutil ls
命令轻松实现),并与分类标签连接