简体   繁体   English

如何使用Tensorflow的实例分割预训练的MaskRCNN模型?

[英]How to use Instance segmentation pretrained MaskRCNN model by Tensorflow?

Tensorflow recently seems to have released pretrained model for instance segmentation using MaskRCNN as per below tweet. Tensorflow最近似乎已经发布了使用MaskRCNN进行实例分割的预训练模型,如下文所述。

https://twitter.com/TensorFlow/status/963472849511092225 https://twitter.com/TensorFlow/status/963472849511092225

I downloaded mask_rcnn_resnet101_atrous_coco_2018_01_28.tar.gz from this and was trying to figure out how to use it.I found frozen model (pb) file and loaded the graph in Tensorboard. 我从这里下载了mask_rcnn_resnet101_atrous_coco_2018_01_28.tar.gz并试图弄清楚如何使用它。我找到了冻结的模型(pb)文件并将图形加载到Tensorboard中。

But I cant figure out what should be the input for the model.I couldn't find a node where simply I can input an image , though I was able to locate nodes where we get classes,masks,bounding boxes etc. 但是我不知道应该为模型输入什么。我找不到能够简单输入图像的节点,尽管我能够找到获得类,掩码,边界框等的节点。

Also there seems to be no details online on how to use it (May be because it is new) 网上似乎也没有有关如何使用它的详细信息(可能是因为它是新的)

If you follow this tensorflow tutorial it will show you how to run the frozen model on a single/group of images. 如果您遵循此tensorflow教程 ,它将向您展示如何在单个/一组图像上运行冻结的模型。 To apply this to the model you downloaded, the simplest way would be to first replace the line: 要将其应用于您下载的模型,最简单的方法是首先替换以下行:

PATH_TO_CKPT = MODEL_NAME + '/frozen_inference_graph.pb'

with a path to your downloaded model ie 带有下载模型的路径,即

PATH_TO_CKPT = '/absolute/path/to/frozen_inference_graph.pb'

Then there is no need to run the code under the section Download Model . 然后,无需运行“ Download Model ”部分下的代码。 The rest should work the same. 其余的应该相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM