【问题标题】:TensorFlow 2 Mask-RCNN? [closed]TensorFlow 2 Mask-RCNN? [关闭]
【发布时间】:2020-09-26 02:32:46
【问题描述】:

我似乎找不到适用于 TensorFlow 2 的可靠版本的 Mask-RCNN。matterport mask-rcnn (https://github.com/matterport/Mask_RCNN) 已经贬低了 Tensorflow 1 代码。有人知道 RCNN 或其他对象检测模型的 TensorFlow 2 实现吗?或者可能是一个可以与 Matterport 一起使用的稳定 Docker 映像?

【问题讨论】:

标签: docker tensorflow machine-learning neural-network faster-rcnn


【解决方案1】:

Matterport 版本的最新分支支持 TF2:https://github.com/ahmedfgad/Mask-RCNN-TF2

TF Hub 也有一个方便的 Mask RCNN 资源:https://hub.tensorflow.google.cn/tensorflow/mask_rcnn/inception_resnet_v2_1024x1024/1 可以这样简单地使用:

import tensorflow_hub as hub

# Apply image detector on a single image.
detector = hub.load("https://hub.tensorflow.google.cn/tensorflow/mask_rcnn/inception_resnet_v2_1024x1024/1")
detector_output = detector(image_tensor)
class_ids = detector_output["detection_classes"]

【讨论】:

    【解决方案2】:

    在 TF 2+ 中有一个 Mask RCNN 的工作实现。我在这里找到它:https://github.com/matterport/Mask_RCNN/tree/295c802f0bebbc4a34ec4855f4960a52a701271d

    要使所有示例在 TF 2.4 中工作,您必须通过替换修改 rcnn/model.py 文件:

    if model.uses_learning_phase and not isinstance(K.learning_phase(), int):
    

    if not isinstance(K.learning_phase(), int):
    

    因为 uses_learning_phase 在 TF 2.4 中不再起作用。

    然后使用此更正:https://stackoverflow.com/a/66842506/13467454

    它在 TF 2.4 上应该可以正常工作。

    【讨论】:

    • 谢谢你!!!真的很有帮助
    【解决方案3】:

    看看这个端口,它对我有用。 https://www.immersivelimit.com/tutorials/mask-rcnn-for-windows-10-tensorflow-2-cuda-101

    Nvidia也有一个实现,我没有尝试但似乎是认真的: https://ngc.nvidia.com/catalog/resources/nvidia:mask_r_cnn_for_tensorflow2

    【讨论】:

    猜你喜欢
    • 2023-01-30
    • 2020-03-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-27
    • 1970-01-01
    相关资源
    最近更新 更多