我似乎找不到适用于TensorFlow 2的Mask-RCNN的可靠版本。matterport掩码-rcnn (https://github.com/matterport/Mask_RCNN)已经贬低了Tensorflow 1的代码。有人知道RCNN或其他目标检测模型的TensorFlow 2实现吗?或者一个可以与Matterport一起工作的稳定的Docker镜像?
发布于 2021-04-03 04:17:50
在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在TF2.4中不再起作用。
然后使用下面的更正:https://stackoverflow.com/a/66842506/13467454
它在TF 2.4上应该工作得很好。
发布于 2020-08-02 12:04:12
发布于 2021-07-27 22:52:30
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"]https://stackoverflow.com/questions/62239835
复制相似问题