facebookresearch / facebookresearch/detectron2
KeyError: "No object named 'DensePoseROIHeads' found in 'ROI_HEADS' registry!"
- Dominant language
- Python
- Stars
- 34.7k
- Forks
- 7.9k
- PR merge metrics
- No merged PRs in 30d
Description
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
cfg = get_cfg()
add_densepose_config(cfg)
cfg.merge_from_file("/content/detectron2_repo/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x.yaml")
# Find a model from detectron2's model zoo. You can either use the https://dl.fbaipublicfiles.... url, or use the following shorthand
cfg.MODEL.WEIGHTS = "https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/143908701/model_final_dd99d2.pkl"
predictor = DefaultPredictor(cfg)
outputs = predictor(im)
## Logs
KeyError Traceback (most recent call last)
in ()
7 # Find a model from detectron2's model zoo. You can either use the https://dl.fbaipublicfiles.... url, or use the following shorthand
8 cfg.MODEL.WEIGHTS = "https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/143908701/model_final_dd99d2.pkl"
----> 9 predictor = DefaultPredictor(cfg)
10 outputs = predictor(im)
6 frames
/usr/local/lib/python3.7/dist-packages/fvcore/common/registry.py in get(self, name)
70 if ret is None:
71 raise KeyError(
---> 72 "No object named '{}' found in '{}' registry!".format(name, self._name)
73 )
74 return ret
KeyError: "No object named 'DensePoseROIHeads' found in 'ROI_HEADS' registry!"
## Environment:
sys.platform linux
Python 3.7.10 (default, May 3 2021, 02:48:31) [GCC 7.5.0]
numpy 1.19.5
detectron2 0.4 @/usr/local/lib/python3.7/dist-packages/detectron2
Compiler GCC 7.3
CUDA compiler CUDA 10.1
detectron2 arch flags 3.7, 5.0, 5.2, 6.0, 6.1, 7.0, 7.5
DETECTRON2_ENV_MODULE
PyTorch 1.8.1+cu101 @/usr/local/lib/python3.7/dist-packages/torch
PyTorch debug build False
GPU available True
GPU 0 Tesla T4 (arch=7.5)
CUDA_HOME /usr/local/cuda
Pillow 7.1.2
torchvision 0.9.1+cu101 @/usr/local/lib/python3.7/dist-packages/torchvision
torchvision arch flags 3.5, 5.0, 6.0, 7.0, 7.5
fvcore 0.1.3.post20210317
cv2 4.1.2
---------------------- ---------------------------------------------------------------
PyTorch built with:
- GCC 7.3
- C++ Version: 201402
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 10.1
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70
- CuDNN 7.6.3
- Magma 2.5.2
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.1, CUDNN_VERSION=7.6.3, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,
Contributor guide
Assessment
This issue has not been assessed yet.