嘗試使用最近發佈的Tensorflow對象檢測API,並想知道如何評估他們在模型動物園中提供的預訓練模型之一?恩。我怎樣才能獲得該預訓練模型的mAP值?如何在Tensorflow對象檢測API中評估預訓練模型
因爲他們所提供的script似乎使用檢查點(根據自己的documentation)我一直試圖使該指出,在他們的模型動物園提供model.ckpt.data-00000-of-00001
模型的檢查點愚蠢的副本,但eval.py沒」那樣。
checkpoint
model_checkpoint_path: "model.ckpt.data-00000-of-00001"
我已經考慮在預訓練的一個簡要然後評估培訓......但我不知道這會給我正確的度量。
對不起,如果這是一個基本問題 - 我剛開始在Tensorflow,並想驗證我得到正確的東西。將不勝感激任何指針!
編輯:
我做了一個檢查點文件按喬納森的回答是:
model_checkpoint_path: "model.ckpt"
all_model_checkpoint_paths: "model.ckpt"
其中評估了劇本,並使用COCO數據集進行評估。然而,評估停止,說有一個形狀不匹配:
...
[[Node: save/Assign_19 = Assign[T=DT_FLOAT, _class=["loc:@BoxPredictor_4/ClassPredictor/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](BoxPredictor_4/ClassPredictor/weights, save/RestoreV2_19/_15)]]
2017-07-05 18:40:11.969641: W tensorflow/core/framework/op_kernel.cc:1158] Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
[[Node: save/Assign_19 = Assign[T=DT_FLOAT, _class=["loc:@BoxPredictor_4/ClassPredictor/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](BoxPredictor_4/ClassPredictor/weights, save/RestoreV2_19/_15)]]
2017-07-05 18:40:11.969725: W tensorflow/core/framework/op_kernel.cc:1158]
...
Invalid argument: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1,1,256,486] rhs shape= [1,1,256,546]
什麼可能導致這種形狀不匹配?我該如何解決它?
感謝Jonathan的回覆!我嘗試運行'python eval.py --logtostderr --checkpoint_dir = path/to/model.ckpt eval_dir = path/to/eval --pipeline_config_path = path/to/.config'但是這不起作用;澄清,我究竟在哪裏指示在哪裏指向? (目前正在使用.config文件指向ckpt文件) 也只是爲了確保:它是否是我在最後獲得的單個mAP值? – jaydee713
最後你會得到一個單獨的mAP值,是的。關於配置文件,請查看以下目錄:https://github.com/tensorflow/models/tree/master/object_detection/samples/configs ---您必須指向該目錄中與您的檢查點相匹配的文件我想評估。 –
對不起,這是關於評估一般模型?我希望重現模型動物園的結果。我最終將COCO數據集轉換爲TFRecord,並對其進行訓練/評估以進行幾次迭代以獲得mAP ....關於mAP值差異的信息雖然有幫助! – jaydee713