python - ValueError:未知的池类型
问题描述
当我尝试用 Colab 在 Facebook 上研究代码时,机器说我:
ValueError:未知的池类型
源代码:[https://colab.research.google.com/drive/1QIoL2g0jdt5E-vYKCIojkIz21j3jyEvo?usp=sharing][1]
我得到错误的标题在这里:Instance Segmentation Using PointRend
如何修复此错误?
segmenter = get_pointrend_predictor()
instances = segmenter(image)["instances"]
vis = PointRendVisualizer(image, metadata=MetadataCatalog.get("coco_2017_val"))
Image.fromarray(vis.draw_instance_predictions(instances.to("cpu")).get_image())
ValueError:未知的池类型
解决方案
也花了我一天的时间来弄清楚。我认为这是由于 Detectron2 的兼容性,
尝试安装Detectron2如下:
!mkdir -p external
!git clone --branch v0.2.1 https://github.com/facebookresearch/detectron2.git external/detectron2
!python -m pip install -e external/detectron2
推荐阅读
- clickhouse - DBeaver - Clickhouse - SQL 错误 [159] .. 读取超时
- c# - ASP.NET MVC Core 3 中的独特 DataAnnotation
- c# - LINQ如何以列表形式返回分组?
- javascript - 如何在 JavaScript 中创建回文代码?
- python - 正确的单词生成没有重复
- javascript - 如何使用 discord.js 制作问候消息
- typescript - 在 webpack 中找不到模块(开发模式)
- mongodb - mongo-go-driver 上下文包装函数
- intellij-idea - 在项目视图 Intellij 中查看文件
- telegram - 如何通过 API 将机器人添加到电报组?