An error occurred while creating data:TypeError: expected dtype object, got 'numpy.dtype[float64]'
See original GitHub issue@Tai-Wang Hi, I have organized the data as required, but an error was reported when creating the data. I am currently not sure what the reason is.
open-mmlab) shl@zhihui-mint:~/shl_res/MMlab/mmdetection3d$ python tools/create_data.py kitti --root-path ./data/kitti --out-dir ./data/kitti --extra-tag kitti
Generate info. this may take several minutes.
[ ] 0/3712, elapsed: 0s, ETA:Traceback (most recent call last):
File "tools/create_data.py", line 243, in <module>
out_dir=args.out_dir)
File "tools/create_data.py", line 23, in kitti_data_prep
kitti.create_kitti_info_file(root_path, info_prefix)
File "/home/shl/shl_res/MMlab/mmdetection3d/tools/data_converter/kitti_converter.py", line 117, in create_kitti_info_file
_calculate_num_points_in_gt(data_path, kitti_infos_train, relative_path)
File "/home/shl/shl_res/MMlab/mmdetection3d/tools/data_converter/kitti_converter.py", line 65, in _calculate_num_points_in_gt
points_v, rect, Trv2c, P2, image_info['image_shape'])
File "/home/shl/shl_res/MMlab/mmdetection3d/mmdet3d/core/bbox/box_np_ops.py", line 639, in remove_outside_points
frustum_surfaces = corner_to_surfaces_3d_jit(frustum[np.newaxis, ...])
TypeError: expected dtype object, got 'numpy.dtype[float64]'
Below are some versions of the library package I instlled.
(open-mmlab) shl@zhihui-mint:~/shl_res/MMlab/mmdetection3d$ conda list mmcv
# packages in environment at /home/shl/anaconda3/envs/open-mmlab:
#
# Name Version Build Channel
mmcv-full 1.3.1 pypi_0 pypi
(open-mmlab) shl@zhihui-mint:~/shl_res/MMlab/mmdetection3d$ conda list mmdet
# packages in environment at /home/shl/anaconda3/envs/open-mmlab:
#
# Name Version Build Channel
mmdet 2.11.0 dev_0 <develop>
mmdet3d 0.12.0 dev_0 <develop>
(open-mmlab) shl@zhihui-mint:~/shl_res/MMlab/mmdetection3d$
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Expected dtype object, got 'numpy.dtype[float64]' - MNE Forum
But it did not work today when I try to run the same code again. it rased the error"expected dtype object, got 'numpy.dtype[float64]'"....
Read more >What am I doing wrong with Numba here? - Stack Overflow
I know from some searching that this was or is a known error somewhat recently and had something to do with new builds...
Read more >FAQ — MMDetection3D 0.12.0 documentation
MMCV/MMDet/MMDet3D Installation¶. If you faced the error shown below when importing open3d: ... TypeError: expected dtype object, got 'numpy.dtype[bool_]'.
Read more >Structured arrays — NumPy v1.24 Manual
Manipulating and Displaying Structured Datatypes#. The list of field names of a structured datatype can be found in the names attribute of the...
Read more >Input contains infinity or a value too large for dtype('float64').
This tutorial explains how to fix the following error in Python: Input ... import pandas as pd import numpy as np #create DataFrame...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We may need to be cautious about that because MMDet3D may not rely on MMDet 2.12.0 in our next release. I still suggest installing numpy<1.20.0 at first to avoid such issues.
Thank you very much. I have solved this problem. I deleted the conda virtual environment that I built, and then re-created a new virtual environment, and then first installed the numpy==1.18.0 version in the virtual environment. I suggest that you can specify the numpy version in mmdetection, because the latest version is installed by default.