Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: "NuScenesDataset: 'infos'" #769

Closed
lijain opened this issue Jul 21, 2021 · 34 comments
Closed

KeyError: "NuScenesDataset: 'infos'" #769

lijain opened this issue Jul 21, 2021 · 34 comments

Comments

@lijain
Copy link

lijain commented Jul 21, 2021

I WANT TO PREDICETION : python tools/test.py configs/fcos3d/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune.py model/weights/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune_20210427_091419-35aaaad0.pth --show-dir /home/mnt_abc004-data/mq/Project/mmdetection3d-master/output/ --eval mAP

always no key "NuScenesDataset: 'infos'",why???
my set
image

@Wuziyi616
Copy link
Contributor

Wuziyi616 commented Jul 21, 2021

MMDet3D requires generating .pkl info files to provide the input path and annotations. Please follow the doc to prepare nuScenes data.

If you want to do inference on one image, see our demo using FCOS3D.

@lijain
Copy link
Author

lijain commented Jul 22, 2021

image
do not??

@Wuziyi616
Copy link
Contributor

Can you post the entire error output message here? I am a bit confused about your question now.

@lijain
Copy link
Author

lijain commented Jul 22, 2021

ok,Yes, following the first question, nothing has changed in my order.The input test data format is coco. JSON.Always no key "NuscenesDataset: 'infos'" in test?

@Wuziyi616
Copy link
Contributor

I think I got your point. The reason is that, the data under demo/data/ is for our demo program (e.g. FCOS3D). So they are slightly different from our generated info files used by test.py. You can't use it as input to test.py. If you only want to do prediction on that one image, try the demo file. If you want to test FCOS3D on the entire nuScenes dataset, you need to use create_data.py.

@lijain
Copy link
Author

lijain commented Jul 22, 2021

i get it.
image
python demo/mono_det_demo.py /home/mnt_abc004-data/mq/Project/mmdetection3d-master/demo/data/nuscenes/images/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525.jpg /home/mnt_abc004-data/mq/Project/mmdetection3d-master/demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525_mono3d.coco.json configs/fcos3d/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune.py model/weights/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune_20210427_091419-35aaaad0.pth --out-dir /home/mnt_abc004-data/mq/Project/mmdetection3d-master/output/
it have a problem:
image
looked for your issues, and the online search failed to solve.Please give directions, thank

@Wuziyi616
Copy link
Contributor

That's so strange, I test the demo and it works smoothly. When do you download our repo? We have a update recently which may causes your bug. Maybe you can download the newest master branch and have a try?

@lijain
Copy link
Author

lijain commented Jul 22, 2021

I have one more question,
i test :python demo/pcd_demo.py demo/data/kitti/kitti_000008.bin configs/second/hv_second_secfpn_6x8_80e_kitti-3d-car.py data/predtrain_models/hv_second_secfpn_6x8_80e_kitti-3d-car_20200620_230238-393f000c.pth --out-dir data/output_result/
so result:
image
I keep getting errors when I visualize:python tools/misc/visualize_results.py ${CONFIG_FILE} --result ${RESULTS_PATH} --show-dir
${SHOW_DIR}
always error not .pkl file, Am I using the wrong command?
other You're using that version

@Wuziyi616
Copy link
Contributor

Oh no no! tools/misc/visualize_results.py is used to visualize results saved by tools/test.py. The saved results from demo can be easily visualized using Meshlab, which is a commonly used 3D visualization software. You can simply download it from Internet (I think we already clarify this point in the doc).

@lijain
Copy link
Author

lijain commented Jul 22, 2021

Version 0.14.0 should not ask! Which version do you use?

@Wuziyi616
Copy link
Contributor

MMDetection3D: 0.15.0 with MMDetection 2.14.0, MMSegmentation 0.14.1 and MMCV 1.3.9. Yes you need to update MMDetection3D to 0.15.0!

@lijain
Copy link
Author

lijain commented Jul 22, 2021

ok thank you.Yesterday I downloaded the master

@lijain
Copy link
Author

lijain commented Jul 23, 2021

I recompiled it to the environment you said. Run :python demo/mono_det_demo.py demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525.jpg demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525_mono3d.coco.json configs/fcos3d/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune.py weights/pretain/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune_20210427_091419-35aaaad0.pth --out-dir /home/mnt_abc004-data/mq/Project/mmdetection3d-15/result/output

There is a problem:
image
Searched the reason on the net, say :
image
Do I want to change the source code??

@Wuziyi616
Copy link
Contributor

Sorry I didn't see this. Can you run python mmdet3d/utils/collect_env.py to show me your environment? Also what opencv/numpy/torch version are you using?

@lijain
Copy link
Author

lijain commented Jul 23, 2021

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:07:04_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148
Package Version Location


absl-py 0.13.0
addict 2.4.0
anyio 3.3.0
appdirs 1.4.4
argon2-cffi 20.1.0
astor 0.8.1
async-generator 1.10
asynctest 0.13.0
attrs 21.2.0
Babel 2.9.1
backcall 0.2.0
black 21.7b0
bleach 3.3.1
cached-property 1.5.2
cachetools 4.2.2
certifi 2021.5.30
cffi 1.14.6
charset-normalizer 2.0.3
click 8.0.1
codecov 2.1.11
colorama 0.4.4
coverage 5.5
cycler 0.10.0
Cython 0.29.24
dataclasses 0.6
debugpy 1.4.0
decorator 5.0.9
defusedxml 0.7.1
deprecation 2.1.0
descartes 1.1.0
entrypoints 0.3
fire 0.4.0
flake8 3.9.2
future 0.18.2
gast 0.2.2
google-auth 1.33.1
google-auth-oauthlib 0.4.4
google-pasta 0.2.0
grpcio 1.39.0
h5py 3.3.0
idna 3.2
imageio 2.9.0
importlib-metadata 3.10.1
iniconfig 1.1.1
interrogate 1.4.0
ipykernel 6.0.3
ipython 7.25.0
ipython-genutils 0.2.0
ipywidgets 8.0.0a5
isort 5.9.2
jedi 0.18.0
Jinja2 3.0.1
joblib 1.0.1
json5 0.9.6
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.12
jupyter-console 6.4.0
jupyter-core 4.7.1
jupyter-packaging 0.10.4
jupyter-server 1.10.0
jupyterlab 3.0.16
jupyterlab-pygments 0.1.2
jupyterlab-server 2.6.1
jupyterlab-widgets 2.0.0a2
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
kiwisolver 1.3.1
kwarray 0.5.19
llvmlite 0.31.0
lyft-dataset-sdk 0.0.8
Markdown 3.3.4
MarkupSafe 2.0.1
matplotlib 3.4.2
matplotlib-inline 0.1.2
mccabe 0.6.1
mistune 0.8.4
mkl-fft 1.3.0
mkl-random 1.2.2
mkl-service 2.4.0
mmcv-full 1.3.9
mmdet 2.14.0
mmdet3d 0.15.0 /home/mnt_abc004-data/mq/Project/mmdetection3d-15
mmsegmentation 0.15.0
mypy-extensions 0.4.3
nbclassic 0.3.1
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
networkx 2.2
notebook 6.4.0
numba 0.48.0
numpy 1.19.5
nuscenes-devkit 1.1.5
oauthlib 3.1.1
olefile 0.46
open3d 0.13.0
opencv-python 4.2.0.32
opt-einsum 3.3.0
ordered-set 4.0.2
packaging 21.0
pandas 1.3.0
pandocfilters 1.4.3
parso 0.8.2
pathspec 0.9.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.3.1
pip 21.1.3
plotly 5.1.0
pluggy 1.0.0.dev0
plyfile 0.7.4
prettytable 2.1.0
prometheus-client 0.11.0
prompt-toolkit 3.0.19
protobuf 4.0.0rc2
ptyprocess 0.7.0
py 1.10.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycocotools 2.0.1
pycodestyle 2.7.0
pycparser 2.20
pyflakes 2.3.1
Pygments 2.9.0
pyparsing 2.4.7
pyquaternion 0.9.9
pyrsistent 0.18.0
pytest 6.2.4
pytest-cov 2.12.1
pytest-runner 5.3.1
python-dateutil 2.8.2
pytz 2021.1
PyWavelets 1.1.1
PyYAML 5.4.1
pyzmq 22.1.0
qtconsole 5.1.1
QtPy 1.9.0
regex 2021.7.6
requests 2.26.0
requests-oauthlib 1.3.0
requests-unixsocket 0.2.0
rsa 4.7.2
scikit-image 0.18.2
scikit-learn 0.24.2
scipy 1.4.1
Send2Trash 1.7.1
setuptools 52.0.0.post20210125
Shapely 1.8a2
six 1.16.0
sniffio 1.2.0
tabulate 0.8.9
tenacity 8.0.1
tensorboard 2.1.1
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.0
tensorflow-estimator 2.1.0
tensorflow-gpu 2.1.0
termcolor 1.1.0
terminado 0.10.1
terminaltables 3.1.0
testpath 0.5.0
threadpoolctl 2.2.0
tifffile 2021.7.2
toml 0.10.2
tomli 1.0.4
tomlkit 0.7.2
torch 1.7.0
torchaudio 0.7.0a0+ac17b64
torchvision 0.8.0
tornado 6.1
tqdm 4.61.2
traitlets 5.0.5
trimesh 2.35.39
typed-ast 1.4.3
typing-extensions 3.10.0.0
ubelt 0.9.5
urllib3 1.26.6
waymo-open-dataset-tf-2-1-0 1.2.0
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.1.0
Werkzeug 2.0.1
wheel 0.36.2
widgetsnbextension 4.0.0a3
wrapt 1.12.1
xdoctest 0.15.5
yapf 0.31.0
zipp 3.5.0
Is my CUDA version low?Or should I compile from source code for MMDetection etc

@Wuziyi616
Copy link
Contributor

Hi @lijain, I really need your output of this command python mmdet3d/utils/collect_env.py. Please also post it here, because it will show something like GCC version, etc.

@lijain
Copy link
Author

lijain commented Jul 24, 2021

I'm sorry. It's a bit of a headache
image

@lijain
Copy link
Author

lijain commented Jul 24, 2021

I recompiled the environment, but I still have this problem:
image
Should I change mmDetection3D version, please? Thanks for your guidance.I hope you have time to guide me

@Wuziyi616
Copy link
Contributor

This is really weird. The bug is from cv2 not our openmmlab packages. If you enter a command line of python and import cv2 and PyTorch at the same time, do you have such bug? (Try both the import order) I don't think this is a bug related to our mmdet3d.

@lijain
Copy link
Author

lijain commented Jul 24, 2021

I also find it strange that my previous installations with MMDetection have been very easy to install.I felt a little bit difficult this time. After checking the problem, it said that Opencv-Python conflicted with Python version. This problem also appeared when I used a single votenet project before.But I worked it out, and this time it didn't work either way. It was awkward.
I will try mmDection3D 0.14.0 tomorrow, it is almost the third version, master, 0.15.0 are not finished

@Wuziyi616
Copy link
Contributor

Yeah I agree, maybe this is a opencv and mmdet problem.

@Wuziyi616
Copy link
Contributor

For example, since you have installed mmdet, can you try import mmdet and test their demo? If that also fails, then it's not our mmdet3d. Instead, you should raise an issue in their repo.

@lijain
Copy link
Author

lijain commented Jul 25, 2021

I tested the environment:
image

@Wuziyi616
Copy link
Contributor

What about import cv2 and import torch?

@Wuziyi616 Wuziyi616 reopened this Jul 25, 2021
@lijain
Copy link
Author

lijain commented Jul 25, 2021

image
I recompiled it, using the original MMCV. Run python mmdet3d/utils/collect_env. Py
image
is ok ??
but run :python demo/mono_det_demo.py demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525.jpg demo/data/nuscenes/n015-2018-07-24-11-22-45+0800__CAM_BACK__1532402927637525_mono3d.coco.json configs/fcos3d/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune.py weights/pretain/fcos3d_r101_caffe_fpn_gn-head_dcn_2x8_1x_nus-mono3d_finetune_20210427_091419-35aaaad0.pth --out-dir /home/mnt_abc004-data/mq/Project/mmdetection3d-15/result/output
image

@Wuziyi616
Copy link
Contributor

I got the problem! You can see that MMCV CUDA compiler is 10.2, which is incompatible with your 9.2. Maybe you can download a pre-compiled MMCV or compile it with 9.2?

e.g. pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu92/torch1.6.0/index.html

If that doesn't work, you should compile mmcv with your cuda 9.2.

@lijain
Copy link
Author

lijain commented Jul 25, 2021

I changed, or appear the above problem
image

@Wuziyi616
Copy link
Contributor

I really think this is an opencv-related problem, not ours. One last try, can you create a clean conda environment of python 3.7.9, with torch 1.5.0, mmcv 1.3.9, mmdet 2.14.0, mmseg 0.14.1 and mmdet3d 0.15.0 and test if it works? If that fails too, then I am afraid I can't work it out either... Really sorry about that.

@lijain
Copy link
Author

lijain commented Jul 26, 2021

What's your CUDA? Can you cut a picture of the conda environment installation package? I'll install it as you can run it

@lijain
Copy link
Author

lijain commented Jul 26, 2021

First of all, thank you Wuziyi616 for your patience. Finally, after many compilations, it was found that the main reason was that there were many installed libraries and some libraries had version conflicts (such as Numpy, Scikit-Learn, etc.). Share my own library version here, CUDA ==9.2
Package Version Location


absl-py 0.13.0
addict 2.4.0
anyio 3.3.0
appdirs 1.4.4
argon2-cffi 20.1.0
astor 0.8.1
async-generator 1.10
asynctest 0.13.0
attrs 21.2.0
Babel 2.9.1
backcall 0.2.0
black 21.7b0
bleach 3.3.1
cached-property 1.5.2
cachetools 4.2.2
certifi 2021.5.30
cffi 1.14.6
charset-normalizer 2.0.3
click 8.0.1
codecov 2.1.11
colorama 0.4.4
coverage 5.5
cycler 0.10.0
Cython 0.29.24
debugpy 1.4.1
decorator 5.0.9
defusedxml 0.7.1
deprecation 2.1.0
descartes 1.1.0
entrypoints 0.3
fire 0.4.0
flake8 3.9.2
gast 0.2.2
google-auth 1.33.1
google-auth-oauthlib 0.4.4
google-pasta 0.2.0
grpcio 1.39.0
h5py 3.3.0
idna 3.2
imageio 2.9.0
importlib-metadata 3.10.1
iniconfig 1.1.1
interrogate 1.4.0
ipykernel 6.0.3
ipython 7.25.0
ipython-genutils 0.2.0
ipywidgets 7.6.3
isort 5.9.2
jedi 0.18.0
Jinja2 3.0.1
joblib 1.0.1
json5 0.9.6
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.12
jupyter-console 6.4.0
jupyter-core 4.7.1
jupyter-packaging 0.10.4
jupyter-server 1.10.1
jupyterlab 3.0.16
jupyterlab-pygments 0.1.2
jupyterlab-server 2.6.1
jupyterlab-widgets 1.0.0
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
kiwisolver 1.3.1
kwarray 0.5.19
llvmlite 0.31.0
lyft-dataset-sdk 0.0.8
Markdown 3.3.4
MarkupSafe 2.0.1
matplotlib 3.4.2
matplotlib-inline 0.1.2
mccabe 0.6.1
mistune 0.8.4
mkl-fft 1.3.0
mkl-random 1.2.2
mkl-service 2.4.0
mmcv-full 1.3.9 /home/mnt_abc004-data/mq/Project/mmdetection3d-15/mmcv
mmdet 2.14.0
mmdet3d 0.15.0 /home/mnt_abc004-data/mq/Project/mmdetection3d-15
mmsegmentation 0.14.1
mypy-extensions 0.4.3
nbclassic 0.3.1
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
networkx 2.2
notebook 6.4.0
numba 0.48.0
numpy 1.20.3
nuscenes-devkit 1.1.5
oauthlib 3.1.1
olefile 0.46
open3d 0.13.0
opencv-python 4.5.3.56
opt-einsum 3.3.0
ordered-set 4.0.2
packaging 21.0
pandas 1.3.1
pandocfilters 1.4.3
parso 0.8.2
pathspec 0.9.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.3.1
pip 21.1.3
plotly 5.1.0
pluggy 0.13.1
plyfile 0.7.4
prettytable 2.1.0
prometheus-client 0.11.0
prompt-toolkit 3.0.19
protobuf 3.17.3
ptyprocess 0.7.0
py 1.10.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycocotools 2.0.2
pycodestyle 2.7.0
pycparser 2.20
pyflakes 2.3.1
Pygments 2.9.0
pyparsing 2.4.7
pyquaternion 0.9.9
pyrsistent 0.18.0
pytest 6.2.4
pytest-cov 2.12.1
pytest-runner 5.3.1
python-dateutil 2.8.2
pytz 2021.1
PyWavelets 1.1.1
PyYAML 5.4.1
pyzmq 22.1.0
qtconsole 5.1.1
QtPy 1.9.0
regex 2021.7.6
requests 2.26.0
requests-oauthlib 1.3.0
requests-unixsocket 0.2.0
rsa 4.7.2
scikit-image 0.18.2
scikit-learn 0.24.2
scipy 1.6.2
Send2Trash 1.7.1
setuptools 52.0.0.post20210125
Shapely 1.7.1
six 1.16.0
sniffio 1.2.0
tabulate 0.8.9
tenacity 8.0.1
tensorboard 2.1.1
tensorflow-estimator 2.1.0
tensorflow-gpu 2.1.0
termcolor 1.1.0
terminado 0.10.1
terminaltables 3.1.0
testpath 0.5.0
threadpoolctl 2.2.0
tifffile 2021.7.2
toml 0.10.2
tomli 1.1.0
tomlkit 0.7.2
torch 1.5.0
torchvision 0.6.0a0+82fd1c8
tornado 6.1
tqdm 4.61.2
traitlets 5.0.5
trimesh 2.35.39
typed-ast 1.4.3
typing-extensions 3.10.0.0
ubelt 0.9.5
urllib3 1.26.6
waymo-open-dataset-tf-2-1-0 1.2.0
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.1.0
Werkzeug 2.0.1
wheel 0.36.2
widgetsnbextension 3.5.1
wrapt 1.12.1
xdoctest 0.15.5
yapf 0.31.0
zipp 3.5.0

@Wuziyi616
Copy link
Contributor

@lijain So you can successfully run our demo now?

@lijain
Copy link
Author

lijain commented Jul 26, 2021

yes ,thanks you

@Wuziyi616
Copy link
Contributor

Glad it helps!

@FlyingAnt2018
Copy link

yes ,thanks you

hello, where to find *.coco.json files for different images and different dataset ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants