an ImportError: cannot import name 'FastRCNNOutputs'
See original GitHub issueWhen I tried to use the Faster RCNN of detectron2, an unexpected error occurre
- Full runnable code or full changes you made:
from detectron2.modeling.roi_heads.fast_rcnn import (
FastRCNNOutputLayers,
FastRCNNOutputs
)
- What exact command you run: from detectron2.modeling.roi_heads.fast_rcnn import ( FastRCNNOutputLayers, FastRCNNOutputs )
- Full logs or other relevant observations:
ImportError: cannot import name 'FastRCNNOutputs' from 'detectron2.modeling.roi_heads.fast_rcnn' (/home/tony/detectron2/detectron2/modeling/roi_heads/fast_rcnn.py)
Environment:
Paste the output of the following command:
Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge absl-py 1.0.0 pypi_0 pypi antlr4-python3-runtime 4.8 pypi_0 pypi backports-entry-points-selectable 1.1.1 pypi_0 pypi black 21.4b2 pypi_0 pypi ca-certificates 2021.10.8 ha878542_0 conda-forge cachetools 4.2.4 pypi_0 pypi certifi 2021.10.8 pypi_0 pypi charset-normalizer 2.0.7 pypi_0 pypi click 8.0.3 pypi_0 pypi cloudpickle 2.0.0 pypi_0 pypi cycler 0.11.0 pypi_0 pypi cython 0.29.24 pypi_0 pypi filelock 3.4.0 pypi_0 pypi fonttools 4.28.2 pypi_0 pypi future 0.18.2 pypi_0 pypi fvcore 0.1.5.post20211023 pypi_0 pypi google-auth 2.3.3 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi grpcio 1.42.0 pypi_0 pypi hydra-core 1.1.1 pypi_0 pypi idna 3.3 pypi_0 pypi importlib-metadata 4.8.2 pypi_0 pypi importlib-resources 5.4.0 pypi_0 pypi iopath 0.1.9 pypi_0 pypi kiwisolver 1.3.2 pypi_0 pypi ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 11.2.0 h1d223b6_11 conda-forge libgomp 11.2.0 h1d223b6_11 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge libzlib 1.2.11 h36c2ea0_1013 conda-forge markdown 3.3.6 pypi_0 pypi matplotlib 3.5.0 pypi_0 pypi mypy-extensions 0.4.3 pypi_0 pypi ncurses 6.2 h58526e2_4 conda-forge numpy 1.21.4 pypi_0 pypi oauthlib 3.1.1 pypi_0 pypi omegaconf 2.1.1 pypi_0 pypi openssl 3.0.0 h7f98852_2 conda-forge packaging 21.3 pypi_0 pypi pathspec 0.9.0 pypi_0 pypi pillow 8.4.0 pypi_0 pypi pip 21.3.1 pyhd8ed1ab_0 conda-forge platformdirs 2.4.0 pypi_0 pypi portalocker 2.3.2 pypi_0 pypi protobuf 3.19.1 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycocotools 2.0.2 pypi_0 pypi pydot 1.4.2 pypi_0 pypi pyparsing 3.0.6 pypi_0 pypi python 3.7.12 hf930737_100_cpython conda-forge python-dateutil 2.8.2 pypi_0 pypi python_abi 3.7 2_cp37m conda-forge pyyaml 6.0 pypi_0 pypi readline 8.1 h46c0cb4_0 conda-forge regex 2021.11.10 pypi_0 pypi requests 2.26.0 pypi_0 pypi requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.7.2 pypi_0 pypi setuptools 59.2.0 py37h89c1867_0 conda-forge setuptools-scm 6.3.2 pypi_0 pypi six 1.16.0 pypi_0 pypi sqlite 3.36.0 h9cd32fc_2 conda-forge tabulate 0.8.9 pypi_0 pypi tensorboard 2.7.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi tk 8.6.11 h27826a3_1 conda-forge tomli 1.2.2 pypi_0 pypi torch 1.8.0+cu101 pypi_0 pypi torchaudio 0.8.0 pypi_0 pypi torchvision 0.9.0+cu101 pypi_0 pypi tqdm 4.62.3 pypi_0 pypi typed-ast 1.5.0 pypi_0 pypi typing-extensions 4.0.0 pypi_0 pypi urllib3 1.26.7 pypi_0 pypi virtualenv 20.10.0 pypi_0 pypi werkzeug 2.0.2 pypi_0 pypi wheel 0.37.0 pyhd8ed1ab_1 conda-forge xz 5.2.5 h516909a_1 conda-forge yacs 0.1.8 pypi_0 pypi zlib 1.2.11 h36c2ea0_1013 conda-forge (sorry,It looks messy, but wget-nc-nvhttps://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py &&python collect_env.py has no output,This file named “raw” does not exist) What should I do? thank you
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
FastRCNNOutputs
was removed fromdetectron2
.Try installing version v0.5. For example:
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@v0.5'
This is the problem of detecron2 version, I solve it by installing suitable version in https://github.com/facebookresearch/detectron2/releases