[英]Getting a classification on a croped image from tensorflow with inceptionV3 Model
我有一個來自Tensorflow OD的預訓練CocoModel,並在kitti數據集上對其進行了重新訓練。
我只是想對裁切后的圖像進行分類,但是沒有清晰的文檔來說明張量的名稱。 當我嘗試使用Tensorflow的分類腳本時,它說inceptionV3模型中沒有這樣命名的Tensors。
是否有人已經嘗試過並知道張量的名稱?
結果應該是可能的標簽/類別及其分數的列表!
在此先感謝您的幫助
嗨! 感謝您的快速回復。
要獲得概述:
a)繪制自己的邊界框並貼上標簽(與Canvas和Angular配合使用)
b)將裁剪后的邊界框發送到我的服務器,並從我的模型中獲得課堂建議=>這就是問題所在!!! 我需要張量的名稱進行分類。
我試圖重寫自己的張量流classify_image.py https://github.com/tensorflow/models/blob/master/tutorials/image/imagenet/classify_image.py
如果您的問題僅涉及張量名稱,則此代碼段可能會有所幫助,
ops = tf.get_default_graph().get_operations()
all_tensor_names = {output.name for op in ops for output in op.outputs}
tensor_dict = {}
for key in [
'num_detections', 'detection_boxes', 'detection_scores',
'detection_classes', 'detection_masks'
]:
tensor_name = key + ':0'
if tensor_name in all_tensor_names:
tensor_dict[key] = tf.get_default_graph().get_tensor_by_name(
tensor_name)
這里的工作示例代碼, https://github.com/dennywangtenk/balder/blob/master/Samples/test_pk_v1.py
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.