Reputation: 62549
I have already built and executed the TensorFlow Android Demo but now i would like to generate another graph. I need to train another data set first. I wanted to use ImageNet . I actually want to download all the images from imageNet. i'll need about 500GB. There is a script to do this here
I want to know after i run this script and get a large number of training files will they be jpegs ? what format will they be in ? Because i then want to use the results(the training files) to create a graph i can build with tensorflow.
How can i use the results from inception script to create a graph using the following training script:
cd /tensorflow
python tensorflow/examples/image_retraining/retrain.py \
--bottleneck_dir=/tf_files/bottlenecks \
--how_many_training_steps 500 \
--model_dir=/tf_files/inception \
--output_graph=/tf_files/retrained_graph.pb \
--output_labels=/tf_files/retrained_labels.txt \
--image_dir /tf_files/flower_photos
Upvotes: 0
Views: 498
Reputation: 741
According to the page you provided:
Each tf.Example proto contains the ImageNet image (JPEG encoded) as well as metadata such as label and bounding box information. See parse_example_proto for details.
so all the imageNet files you are downloading seems like in jpeg format.
And the tool you are saying is for retrain the already trained model. I guess you want to train all the images from scratch, right?
The page you provided : https://github.com/tensorflow/models/tree/master/inception also explains how to train the data from scratch very well.
So, if you downloaded imageNet data using
bazel-bin/inception/download_and_preprocess_imagenet "${DATA_DIR}"
(Of course you have to set DATA_DIR and build download_and_preprocess_imagenet before use)
then, you can start training with:
bazel-bin/inception/imagenet_train --num_gpus=1 --batch_size=32 --train_dir=${TRAIN_DIR} --data_dir=${DATA_DIR}
you can change above options according to your needs and conditions, and also you have to specify TRAIN_DIR too.
After that, you can retrain the model with the actual data you want to train using retrain tool.
If you finished with training, then convert it to optimized and/or quantized so that you can use in the android mobile demo. ( refer this page for how to do this: https://petewarden.com/2016/09/27/tensorflow-for-mobile-poets/ )
Upvotes: 1