簡體   English   中英

如何在 Tensorflow 中使用 label_image.py 一次測試多個圖像

[英]How to test multiple images at once with label_image.py in Tensorflow

我一直在研究一種方法來加載我的多分類 tensorflow 模塊,一次掃描 25-30 幅圖像。 它目前在測試階段一次只運行一個圖像。 這個想法是通過編輯過的 label_image.py 一次比較它們,並通過 tensorflow 庫在 docker 中運行。 我曾希望自己解決這個問題,但無濟於事。 我目前的假設是,雖然可以一次測試多個圖像,但我不確定應該在 labe_image.py 中編輯的位置。 我提前致謝。

您可以在之后使用 for 循環

graph = load_graph(model_file)
files=["tf_files/1.jpg","tf_files/2.jpg"]

像這樣:

for file_name in files:
  t = read_tensor_from_image_file(file_name,input_height=input_height,input_std=input_std)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM