首页 > 解决方案 > 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:未知的池类型

在此处输入图像描述

标签: pythondeep-learningartificial-intelligencegoogle-colaboratory

解决方案


也花了我一天的时间来弄清楚。我认为这是由于 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

https://github.com/facebookresearch/phosa/issues/4


推荐阅读