我只是想知道是否有可能產生存儲在與im2txt同一文件夾中成千上萬的JPEG圖像的標題。我應該去那樣的事情嗎?生成標題,然後將結果寫入.txt文件。字幕大JPEG組與im2txt
# Directory containing model checkpoints.
CHECKPOINT_DIR="${HOME}/im2txt/model/train"
# Vocabulary file generated by the preprocessing script.
VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt"
# JPEG image file to caption.
IMAGE_FILE="${HOME}/im2txt/data/lotofimages/
# Build the inference binary.
bazel build -c opt im2txt/run_inference
# Ignore GPU devices (only necessary if your GPU is currently memory
# constrained, for example, by running the training script).
export CUDA_VISIBLE_DEVICES=""
# Run inference to generate captions.
bazel-bin/im2txt/run_inference >> 1.txt \
--checkpoint_path=${CHECKPOINT_DIR} \
--vocab_file=${VOCAB_FILE} \
--input_files=${IMAGE_FILE}
謝謝!
我忘了:這是im2txt GitHub的 - HTTPS:// github上。 COM/tensorflow /模型/樹/主/ im2txt –