Giter Club home page Giter Club logo

Comments (9)

tkone2018 avatar tkone2018 commented on June 16, 2024

@lucky-xu-1994 你好,你这个搞定了嘛?我发现找不到模型的输入输出节点

from ssd-tensorflow.

lucky-xu-1994 avatar lucky-xu-1994 commented on June 16, 2024

@lucky-xu-1994 你好,你这个搞定了嘛?我发现找不到模型的输入输出节点

你把ckpt文件的输入输出节点打印出来,如果是这个工程文件的的话,
我找到的是六个特征图的输出节点,每个特征图输出一个分类和位置回归,例如:第一个特征图是“ssd_512_vgg/softmax/Softmax”(分类),"ssd_512_vgg/block4_box/Reshape"(位置回归),要是想得到最终的结果,需要将所有层的输出综合一起做非极大值抑制,具体可以参考工程文件中的notebooks/ssd_notebook.ipynb,
输入节点是一个队列输入,如果想要方便测试单张图片,可以在冻结模型时通过输入占位符进行冻结。

from ssd-tensorflow.

tkone2018 avatar tkone2018 commented on June 16, 2024

可以加qq或微信吗?qq:843783062 微信:tk-conquer

from ssd-tensorflow.

tkone2018 avatar tkone2018 commented on June 16, 2024

@lucky-xu-1994 然后我就很迷惑

from ssd-tensorflow.

lucky-xu-1994 avatar lucky-xu-1994 commented on June 16, 2024

@lucky-xu-1994 然后我就很迷惑

你要打印的是节点名字,试试这个,找一下soft_max输出
from tensorflow.python import pywrap_tensorflow
import tensorflow as tf
import os
model_dir = '/home/pb/'
ckpt='/home/logs/model.ckpt-332005'

with tf.Session() as sess:
saver = tf.train.import_meta_graph(ckpt +'.meta', clear_devices=True)
graph_def = tf.get_default_graph().as_graph_def(add_shapes=True)
node_list = [n.name for n in graph_def.node]
result_file = os.path.join(model_dir,'result1.txt')
with open(result_file,'w+') as f:
for node in node_list:
#print("node_name", node)
f.write(node+'\n')

print('done')

from ssd-tensorflow.

tkone2018 avatar tkone2018 commented on June 16, 2024
import tensorflow as tf
import os
model_dir = './out/'
ckpt='F:/SSD/SSD-Tensorflow/train_model/model.ckpt-750'
with tf.Session() as sess:
    saver = tf.train.import_meta_graph(ckpt +'.meta', clear_devices=True)
graph_def = tf.get_default_graph().as_graph_def(add_shapes=True)
node_list = [n.name for n in graph_def.node]
result_file = os.path.join(model_dir,'result1.txt')
with open(result_file,'w+') as f:
    for node in node_list:
         #print("node_name", node)
        f.write(node+'\n')
        print('done')

代码格式是这样的吧

from ssd-tensorflow.

lucky-xu-1994 avatar lucky-xu-1994 commented on June 16, 2024

import tensorflow as tf
import os
model_dir = './out/'
ckpt='F:/SSD/SSD-Tensorflow/train_model/model.ckpt-750'
with tf.Session() as sess:
saver = tf.train.import_meta_graph(ckpt +'.meta', clear_devices=True)
graph_def = tf.get_default_graph().as_graph_def(add_shapes=True)
node_list = [n.name for n in graph_def.node]
result_file = os.path.join(model_dir,'result1.txt')
with open(result_file,'w+') as f:
for node in node_list:
#print("node_name", node)
f.write(node+'\n')
print('done')

代码格式是这样的吧

你把session下面的代码都放在会话结构中,然后仔细看一下网络的定义,找一下softmax输出
具体你可以参照 https://blog.csdn.net/guyuealian/article/details/82218092
以及https://blog.csdn.net/zkgoup/article/details/105657577?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

from ssd-tensorflow.

tkone2018 avatar tkone2018 commented on June 16, 2024

好的,谢谢

from ssd-tensorflow.

tkone2018 avatar tkone2018 commented on June 16, 2024

你好,我又来麻烦你了,哈哈,我找到的是六个特征图的输出节点,每个特征图输出一个分类和位置回归,例如:第一个特征图是“ssd_512_vgg/softmax/Softmax”(分类),"ssd_512_vgg/block4_box/Reshape"(位置回归),要是想得到最终的结果,需要将所有层的输出综合一起做非极大值抑制,具体可以参考工程文件中的notebooks/ssd_notebook.ipynb,
输入节点是一个队列输入,如果想要方便测试单张图片,可以在冻结模型时通过输入占位符进行冻结。
根据你之前说的,我现在也是得到了输入输出节点,现在是我想弄成可以发布服务的那种,那模型的输出就得是做过后处理的,请问一下如果将所有层的输出综合一起做非极大值抑制,我看了下那个推理文件,这个好像是得到6个输出节点后再进行后处理

from ssd-tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.