Advertisement

训练BlendMask报错

阅读量:

参考文章:https://gitmemory.com/issue/aim-uofa/AdelaiDet/235/731017126

出现原因

Detectron 2会持续不断地推出新版本, 这将导致BlendMask作者所使用的Detectron 2与我们安装的不同版本存在差异, 这一差异就是报错的根本原因。

解决方法

在 BlendMask 项目的源代码库中对 train_net.py 文件第 128 行的函数调用进行修改。具体来说,“build_detection_train_loader(cfg, mapper)”应调整为 “build_detection_train_loader(cfg, mapper=mapper)”。

复制代码
    def build_train_loader(cls, cfg):
        """
        Returns:
            iterable
    
        It calls :func:`detectron2.data.build_detection_train_loader` with a customized
        DatasetMapper, which adds categorical labels as a semantic mask.

全部评论 (0)

还没有任何评论哟~