pangsu0613 / CLOCs

CLOCs: Camera-LiDAR Object Candidates Fusion for 3D Object Detection
MIT License
346 stars 68 forks source link

RTX3080 cuda out of memory #37

Closed Yaonian72 closed 3 years ago

Yaonian72 commented 3 years ago

When I run

python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir=/home/yao/clocs/model_dir/

Environment Ubuntu20.04 GTX3080 Conda environment:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge blas 1.0 mkl
ca-certificates 2021.5.30 ha878542_0 conda-forge certifi 2021.5.30 py37h89c1867_0 conda-forge cudatoolkit 11.0.221 h6bb024c_0 anaconda cycler 0.10.0 pypi_0 pypi dataclasses 0.6 pypi_0 pypi decorator 4.4.2 pypi_0 pypi easydict 1.9 pypi_0 pypi fire 0.4.0 pypi_0 pypi freetype 2.10.4 h0708190_1 conda-forge future 0.18.2 pypi_0 pypi imageio 2.9.0 pypi_0 pypi intel-openmp 2021.2.0 h06a4308_610
jpeg 9b h024ee3a_2
kiwisolver 1.3.1 pypi_0 pypi kornia 0.5.4 pypi_0 pypi lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.35.1 hea4e1c9_2 conda-forge libffi 3.3 h58526e2_2 conda-forge libgcc-ng 9.3.0 h2828fa1_19 conda-forge libgomp 9.3.0 h2828fa1_19 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libstdcxx-ng 9.3.0 h6de172a_19 conda-forge libtiff 4.2.0 h85742a9_0
libuv 1.41.0 h7f98852_0 conda-forge libwebp-base 1.2.0 h7f98852_2 conda-forge llvmlite 0.36.0 pypi_0 pypi lz4-c 1.9.3 h9c3ff4c_0 conda-forge matplotlib 3.4.2 pypi_0 pypi mkl 2021.2.0 h06a4308_296
mkl-service 2.4.0 py37h5e8e339_0 conda-forge mkl_fft 1.3.0 py37h42c9631_2
mkl_random 1.2.2 py37h219a48f_0 conda-forge ncurses 6.2 h58526e2_4 conda-forge networkx 2.5.1 pypi_0 pypi ninja 1.10.2 h4bd325d_0 conda-forge numba 0.53.1 pypi_0 pypi numpy 1.21.0 pypi_0 pypi numpy-base 1.20.2 py37hfae3a4d_0
olefile 0.46 pyh9f0ad1d_1 conda-forge opencv-python 4.5.2.54 pypi_0 pypi openssl 1.1.1k h7f98852_0 conda-forge pcdet 0.3.0+65bd4cd dev_0 pillow 8.2.0 py37he98fc37_0
pip 21.1.2 pyhd8ed1ab_0 conda-forge protobuf 3.17.3 pypi_0 pypi pybind11 2.6.2 pypi_0 pypi pyparsing 2.4.7 pypi_0 pypi python 3.7.10 hffdb5ce_100_cpython conda-forge python-dateutil 2.8.1 pypi_0 pypi python_abi 3.7 1_cp37m conda-forge pywavelets 1.1.1 pypi_0 pypi pyyaml 5.4.1 pypi_0 pypi readline 8.1 h46c0cb4_0 conda-forge scikit-image 0.18.1 pypi_0 pypi scipy 1.7.0 pypi_0 pypi setuptools 49.6.0 py37h89c1867_3 conda-forge shapely 1.7.1 pypi_0 pypi six 1.16.0 pyh6c4a22f_0 conda-forge spconv 1.0 pypi_0 pypi sqlite 3.36.0 h9cd32fc_0 conda-forge tensorboardx 2.2 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi tifffile 2021.6.14 pypi_0 pypi tk 8.6.10 h21135ba_1 conda-forge torch 1.7.0 pypi_0 pypi torchaudio 0.9.0 pypi_0 pypi torchvision 0.8.1+cu101 pypi_0 pypi tqdm 4.61.1 pypi_0 pypi typing_extensions 3.10.0.0 pyha770c72_0 conda-forge wheel 0.36.2 pyhd3deb0d_0 conda-forge xz 5.2.5 h516909a_1 conda-forge zlib 1.2.11 h516909a_1010 conda-forge zstd 1.4.9 ha95c52a_0 conda-forge

Error: 2d detection path: /home/yao/clocs/d2_detection_data sparse_shape: [ 41 1600 1408] num_class is : 1 load existing model Restoring parameters from ../model_dir/voxelnet-30950.tckpt Restoring parameters from /home/yao/clocs/model_dir/adam_optimizer-1.tckpt {'Car': 5} [-1] load 14357 Car database infos load 2207 Pedestrian database infos load 734 Cyclist database infos load 1297 Van database infos load 56 Person_sitting database infos load 488 Truck database infos load 224 Tram database infos load 337 Misc database infos After filter database: load 10520 Car database infos load 2104 Pedestrian database infos load 594 Cyclist database infos load 826 Van database infos load 53 Person_sitting database infos load 321 Truck database infos load 199 Tram database infos load 259 Misc database infos remain number of infos: 3712 remain number of infos: 3769 WORKER 0 seed: 1624653928 WORKER 1 seed: 1624653929 WORKER 2 seed: 1624653930 /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/typed_passes.py:327: NumbaPerformanceWarning: The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.

To find out why, try turning on parallel diagnostics, see https://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.

File "utils/eval.py", line 127: @numba.jit(nopython=True,parallel=True) def build_stage2_training(boxes, query_boxes, criterion, scores_3d, scores_2d, dis_to_lidar_3d,overlaps,tensor_index): ^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/typed_passes.py:327: NumbaPerformanceWarning: The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.

To find out why, try turning on parallel diagnostics, see https://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.

File "utils/eval.py", line 231: @numba.jit(nopython=True, parallel=True) def d3_box_overlap_kernel(boxes, qboxes, rinc, criterion=-1): ^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) Traceback (most recent call last): File "./pytorch/train.py", line 918, in fire.Fire() File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, kwargs) File "./pytorch/train.py", line 371, in train raise e File "./pytorch/train.py", line 240, in train all_3d_output_camera_dict, all_3d_output, top_predictions, fusion_input,tensor_index = net(example_torch,detection_2d_path) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/yao/clocs/second/pytorch/models/voxelnet.py", line 310, in forward preds_dict = self.rpn(spatial_features) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/yao/clocs/second/pytorch/models/rpn.py", line 312, in forward x = self.blocksi File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/yao/clocs/torchplus/nn/modules/common.py", line 89, in forward input = module(input) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, **kwargs) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/modules/batchnorm.py", line 178, in forward self.eps, File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/functional.py", line 2282, in batch_norm input, weight, bias, running_mean, running_var, training, momentum, eps, torch.backends.cudnn.enabled RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 9.78 GiB total capacity; 1.54 GiB already allocated; 36.44 MiB free; 1.57 GiB reserved in total by PyTorch)

pangsu0613 commented 3 years ago

Hello @Yaonian72, I have tested CLOCs on RTX 3080, RTX 3080 has 10GB GPU memory, which is sufficient for running CLOCs (we only run SECOND online, no 2D detectors running online). I believe there are other applications on your machine that takes too much GPU memory, I suggest close them or reboot then run CLOCs.

Yaonian72 commented 3 years ago

Hello @Yaonian72, I have tested CLOCs on RTX 3080, RTX 3080 has 10GB GPU memory, which is sufficient for running CLOCs (we only run SECOND online, no 2D detectors running online). I believe there are other applications on your machine that takes too much GPU memory, I suggest close them or reboot then run CLOCs.

Thank you for replying promptly. The Nvidia-smi show that no memory is occupied Fri Jun 25 18:00:08 2021
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 460.80 Driver Version: 460.80 CUDA Version: 11.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 GeForce RTX 3080 Off | 00000000:0B:00.0 On | N/A | | 0% 38C P8 26W / 320W | 280MiB / 10010MiB | 2% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1280 G /usr/lib/xorg/Xorg 176MiB | | 0 N/A N/A 1583 G /usr/bin/gnome-shell 32MiB | | 0 N/A N/A 6916 G ...AAAAAAAAA= --shared-files 68MiB | +-----------------------------------------------------------------------------+

However,after changing the batch size from 1 to 2, the issue disappears, but another issue raised o/clocs/model_dir/ 2d detection path: /home/yao/clocs/d2_detection_data sparse_shape: [ 41 1600 1408] num_class is : 1 load existing model Restoring parameters from ../model_dir/voxelnet-30950.tckpt Restoring parameters from /home/yao/clocs/model_dir/adam_optimizer-0.tckpt {'Car': 5} [-1] load 14357 Car database infos load 2207 Pedestrian database infos load 734 Cyclist database infos load 1297 Van database infos load 56 Person_sitting database infos load 488 Truck database infos load 224 Tram database infos load 337 Misc database infos After filter database: load 10520 Car database infos load 2104 Pedestrian database infos load 594 Cyclist database infos load 826 Van database infos load 53 Person_sitting database infos load 321 Truck database infos load 199 Tram database infos load 259 Misc database infos remain number of infos: 3712 remain number of infos: 3769 WORKER 0 seed: 1624657916 WORKER 1 seed: 1624657917 WORKER 2 seed: 1624657918 /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) Traceback (most recent call last): File "./pytorch/train.py", line 918, in fire.Fire() File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "./pytorch/train.py", line 371, in train raise e File "./pytorch/train.py", line 231, in train example = next(data_iter) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data return self._process_data(data) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data data.reraise() File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/_utils.py", line 425, in reraise raise self.exc_type(msg) ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/yao/clocs/second/data/preprocess.py", line 53, in merge_second_batch ret[key] = np.stack(elems, axis=0) File "<__array_function__ internals>", line 6, in stack File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numpy/core/shape_base.py", line 427, in stack raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape

pangsu0613 commented 3 years ago

Current version of CLOCs only supports batch_size=1. Are you using the same commit of spconv that I mentioned in the readme? I heard newer version of spconv requires much more memories.

Yaonian72 commented 3 years ago

7342772

Current version of CLOCs only supports batch_size=1. Are you using the same commit of spconv that I mentioned in the readme? I heard newer version of spconv requires much more memories.

Thank you! It works after changing the version of spconv. Before that, I used spconv1.2 and spconv1.0 7342772. They can not work.

Yaonian72 commented 3 years ago

Current version of CLOCs only supports batch_size=1. Are you using the same commit of spconv that I mentioned in the readme? I heard newer version of spconv requires much more memories.

Another issue raised.It's that normal? 2d detection path: /home/yao/clocs/d2_detection_data sparse_shape: [ 41 1600 1408] num_class is : 1 load existing model Restoring parameters from ../model_dir/voxelnet-30950.tckpt Restoring parameters from /home/yao/clocs/model_dir/adam_optimizer-0.tckpt {'Car': 5} [-1] load 14357 Car database infos load 2207 Pedestrian database infos load 734 Cyclist database infos load 1297 Van database infos load 56 Person_sitting database infos load 488 Truck database infos load 224 Tram database infos load 337 Misc database infos After filter database: load 10520 Car database infos load 2104 Pedestrian database infos load 594 Cyclist database infos load 826 Van database infos load 53 Person_sitting database infos load 321 Truck database infos load 199 Tram database infos load 259 Misc database infos remain number of infos: 3712 remain number of infos: 3769 WORKER 0 seed: 1624659846 WORKER 1 seed: 1624659847 WORKER 2 seed: 1624659848 /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/typed_passes.py:327: NumbaPerformanceWarning: The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.

To find out why, try turning on parallel diagnostics, see https://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.

File "utils/eval.py", line 127: @numba.jit(nopython=True,parallel=True) def build_stage2_training(boxes, query_boxes, criterion, scores_3d, scores_2d, dis_to_lidar_3d,overlaps,tensor_index): ^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/typed_passes.py:327: NumbaPerformanceWarning: The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.

To find out why, try turning on parallel diagnostics, see https://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for help.

File "utils/eval.py", line 231: @numba.jit(nopython=True, parallel=True) def d3_box_overlap_kernel(boxes, qboxes, rinc, criterion=-1): ^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) now it is 50 steps and the cls_loss is : tensor(942.4833, device='cuda:0', grad_fn=) learning_rate: 0.0003000725556911313 now it is 100 steps and the cls_loss is : tensor(615.5116, device='cuda:0', grad_fn=) learning_rate: 0.000300296159683897 now it is 150 steps and the cls_loss is : tensor(380.7066, device='cuda:0', grad_fn=) learning_rate: 0.0003006708197788306 now it is 200 steps and the cls_loss is : tensor(254.9541, device='cuda:0', grad_fn=) learning_rate: 0.0003011964940447371 now it is 250 steps and the cls_loss is : tensor(261.1347, device='cuda:0', grad_fn=) learning_rate: 0.0003018731236492261 now it is 300 steps and the cls_loss is : tensor(155.3546, device='cuda:0', grad_fn=) learning_rate: 0.0003027006328652909 now it is 350 steps and the cls_loss is : tensor(188.2481, device='cuda:0', grad_fn=) learning_rate: 0.0003036789290797896 now it is 400 steps and the cls_loss is : tensor(77.1434, device='cuda:0', grad_fn=) learning_rate: 0.0003048079028038046 now it is 450 steps and the cls_loss is : tensor(79.5819, device='cuda:0', grad_fn=) learning_rate: 0.00030608742768490054 now it is 500 steps and the cls_loss is : tensor(53.7182, device='cuda:0', grad_fn=) learning_rate: 0.0003075173605212619 now it is 550 steps and the cls_loss is : tensor(28.6513, device='cuda:0', grad_fn=) learning_rate: 0.0003090975412777231 now it is 600 steps and the cls_loss is : tensor(32.6780, device='cuda:0', grad_fn=) learning_rate: 0.000310827793103677 now it is 650 steps and the cls_loss is : tensor(18.7370, device='cuda:0', grad_fn=) learning_rate: 0.00031270792235286874 now it is 700 steps and the cls_loss is : tensor(8.3792, device='cuda:0', grad_fn=) learning_rate: 0.0003147377186050681 now it is 750 steps and the cls_loss is : tensor(9.4324, device='cuda:0', grad_fn=) learning_rate: 0.00031691695468961945 now it is 800 steps and the cls_loss is : tensor(3.6693, device='cuda:0', grad_fn=) learning_rate: 0.00031924538671086484 now it is 850 steps and the cls_loss is : tensor(3.0882, device='cuda:0', grad_fn=) learning_rate: 0.0003217227540754427 now it is 900 steps and the cls_loss is : tensor(2.1409, device='cuda:0', grad_fn=) learning_rate: 0.0003243487795214512 now it is 950 steps and the cls_loss is : tensor(1.6784, device='cuda:0', grad_fn=) learning_rate: 0.00032712316914947906 now it is 1000 steps and the cls_loss is : tensor(1.5176, device='cuda:0', grad_fn=) learning_rate: 0.0003300456124554988 now it is 1050 steps and the cls_loss is : tensor(1.2148, device='cuda:0', grad_fn=) learning_rate: 0.0003331157823656169 now it is 1100 steps and the cls_loss is : tensor(1.4302, device='cuda:0', grad_fn=) learning_rate: 0.00033633333527267927 now it is 1150 steps and the cls_loss is : tensor(0.9895, device='cuda:0', grad_fn=) learning_rate: 0.00033969791107472903 now it is 1200 steps and the cls_loss is : tensor(0.8879, device='cuda:0', grad_fn=) learning_rate: 0.0003432091332153048 now it is 1250 steps and the cls_loss is : tensor(0.8423, device='cuda:0', grad_fn=) learning_rate: 0.0003468666087255885 now it is 1300 steps and the cls_loss is : tensor(0.7894, device='cuda:0', grad_fn=) learning_rate: 0.00035066992826837977 now it is 1350 steps and the cls_loss is : tensor(0.7718, device='cuda:0', grad_fn=) learning_rate: 0.00035461866618391544 now it is 1400 steps and the cls_loss is : tensor(0.7266, device='cuda:0', grad_fn=) learning_rate: 0.0003587123805375023 now it is 1450 steps and the cls_loss is : tensor(0.6718, device='cuda:0', grad_fn=) learning_rate: 0.0003629506131689812 now it is 1500 steps and the cls_loss is : tensor(0.5960, device='cuda:0', grad_fn=) learning_rate: 0.0003673328897440013 now it is 1550 steps and the cls_loss is : tensor(0.5256, device='cuda:0', grad_fn=) learning_rate: 0.0003718587198071068 now it is 1600 steps and the cls_loss is : tensor(0.5297, device='cuda:0', grad_fn=) learning_rate: 0.00037652759683663023 now it is 1650 steps and the cls_loss is : tensor(0.4153, device='cuda:0', grad_fn=) learning_rate: 0.0003813389983013779 now it is 1700 steps and the cls_loss is : tensor(0.4104, device='cuda:0', grad_fn=) learning_rate: 0.0003862923857191132 now it is 1750 steps and the cls_loss is : tensor(0.2922, device='cuda:0', grad_fn=) learning_rate: 0.0003913872047168203 now it is 1800 steps and the cls_loss is : tensor(0.2994, device='cuda:0', grad_fn=) learning_rate: 0.0003966228850927501 now it is 1850 steps and the cls_loss is : tensor(0.2143, device='cuda:0', grad_fn=) learning_rate: 0.00040199884088023413 now it is 1900 steps and the cls_loss is : tensor(0.2420, device='cuda:0', grad_fn=) learning_rate: 0.00040751447041326855 now it is 1950 steps and the cls_loss is : tensor(0.1689, device='cuda:0', grad_fn=) learning_rate: 0.00041316915639384635 now it is 2000 steps and the cls_loss is : tensor(0.1644, device='cuda:0', grad_fn=) learning_rate: 0.0004189622659610476 now it is 2050 steps and the cls_loss is : tensor(0.1280, device='cuda:0', grad_fn=) learning_rate: 0.00042489315076186694 now it is 2100 steps and the cls_loss is : tensor(0.1532, device='cuda:0', grad_fn=) learning_rate: 0.00043096114702377607 now it is 2150 steps and the cls_loss is : tensor(0.2392, device='cuda:0', grad_fn=) learning_rate: 0.00043716557562901125 now it is 2200 steps and the cls_loss is : tensor(0.1788, device='cuda:0', grad_fn=) learning_rate: 0.00044350574219057925 now it is 2250 steps and the cls_loss is : tensor(0.0977, device='cuda:0', grad_fn=) learning_rate: 0.0004499809371299713 now it is 2300 steps and the cls_loss is : tensor(0.1168, device='cuda:0', grad_fn=) learning_rate: 0.00045659043575657903 now it is 2350 steps and the cls_loss is : tensor(0.1326, device='cuda:0', grad_fn=) learning_rate: 0.00046333349834879866 now it is 2400 steps and the cls_loss is : tensor(0.0882, device='cuda:0', grad_fn=) learning_rate: 0.00047020937023682 now it is 2450 steps and the cls_loss is : tensor(0.1496, device='cuda:0', grad_fn=) learning_rate: 0.0004772172818870873 now it is 2500 steps and the cls_loss is : tensor(0.1339, device='cuda:0', grad_fn=) learning_rate: 0.00048435644898842415 now it is 2550 steps and the cls_loss is : tensor(0.1689, device='cuda:0', grad_fn=) learning_rate: 0.0004916260725398116 now it is 2600 steps and the cls_loss is : tensor(0.1735, device='cuda:0', grad_fn=) learning_rate: 0.0004990253389398113 now it is 2650 steps and the cls_loss is : tensor(0.1194, device='cuda:0', grad_fn=) learning_rate: 0.0005065534200776206 now it is 2700 steps and the cls_loss is : tensor(0.0834, device='cuda:0', grad_fn=) learning_rate: 0.0005142094734257559 now it is 2750 steps and the cls_loss is : tensor(0.2217, device='cuda:0', grad_fn=) learning_rate: 0.0005219926421343433 now it is 2800 steps and the cls_loss is : tensor(0.2361, device='cuda:0', grad_fn=) learning_rate: 0.0005299020551270185 now it is 2850 steps and the cls_loss is : tensor(0.1776, device='cuda:0', grad_fn=) learning_rate: 0.0005379368271984128 now it is 2900 steps and the cls_loss is : tensor(0.1761, device='cuda:0', grad_fn=) learning_rate: 0.0005460960591132263 now it is 2950 steps and the cls_loss is : tensor(0.1185, device='cuda:0', grad_fn=) learning_rate: 0.0005543788377068678 now it is 3000 steps and the cls_loss is : tensor(0.0914, device='cuda:0', grad_fn=) learning_rate: 0.0005627842359876515 now it is 3050 steps and the cls_loss is : tensor(0.1353, device='cuda:0', grad_fn=) learning_rate: 0.0005713113132405499 now it is 3100 steps and the cls_loss is : tensor(0.0912, device='cuda:0', grad_fn=) learning_rate: 0.0005799591151324696 now it is 3150 steps and the cls_loss is : tensor(0.0994, device='cuda:0', grad_fn=) learning_rate: 0.0005887266738190643 now it is 3200 steps and the cls_loss is : tensor(0.1253, device='cuda:0', grad_fn=) learning_rate: 0.0005976130080530494 now it is 3250 steps and the cls_loss is : tensor(0.0843, device='cuda:0', grad_fn=) learning_rate: 0.0006066171232940259 now it is 3300 steps and the cls_loss is : tensor(0.0988, device='cuda:0', grad_fn=) learning_rate: 0.0006157380118197828 now it is 3350 steps and the cls_loss is : tensor(0.1662, device='cuda:0', grad_fn=) learning_rate: 0.0006249746528390822 now it is 3400 steps and the cls_loss is : tensor(0.1017, device='cuda:0', grad_fn=) learning_rate: 0.0006343260126059026 now it is 3450 steps and the cls_loss is : tensor(0.1235, device='cuda:0', grad_fn=) learning_rate: 0.0006437910445351355 now it is 3500 steps and the cls_loss is : tensor(0.2912, device='cuda:0', grad_fn=) learning_rate: 0.0006533686893197138 now it is 3550 steps and the cls_loss is : tensor(0.1867, device='cuda:0', grad_fn=) learning_rate: 0.000663057875049171 now it is 3600 steps and the cls_loss is : tensor(0.1214, device='cuda:0', grad_fn=) learning_rate: 0.0006728575173296052 now it is 3650 steps and the cls_loss is : tensor(0.0836, device='cuda:0', grad_fn=) learning_rate: 0.0006827665194050424 now it is 3700 steps and the cls_loss is : tensor(0.1173, device='cuda:0', grad_fn=) learning_rate: 0.000692783772280184 #################################

EVAL

################################# Generate output labels... /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: No implementation of function Function() found for signature:

getitem(array(float32, 3d, C), Tuple(slice, list(int64), slice))

There are 22 candidate implementations:

During: typing of intrinsic-call at /home/yao/clocs/second/core/geometry.py (162)

File "core/geometry.py", line 162: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

    vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
                             list(range(num_points_of_polygon - 1)), :]
                             ^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/clocs/second/core/geometry.py:146: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Cannot determine Numba type of <class 'numba.core.dispatcher.LiftedLoop'>

File "core/geometry.py", line 170: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

cross = 0.0
for i in range(num_points):
^

@numba.jit /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:152: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) /home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/numba/core/object_mode_passes.py:162: NumbaDeprecationWarning: Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.

For more information visit https://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "core/geometry.py", line 157: def points_in_convex_polygon_jit(points, polygon, clockwise=True):

# first convert polygon to directed lines
num_points_of_polygon = polygon.shape[1]
^

state.func_ir.loc)) Traceback (most recent call last): File "./pytorch/train.py", line 918, in fire.Fire() File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 471, in _Fire target=component.name) File "/home/yao/Documents/anaconda3/envs/3d/lib/python3.7/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "./pytorch/train.py", line 371, in train raise e File "./pytorch/train.py", line 329, in train model_cfg.lidar_input) File "./pytorch/train.py", line 467, in predict_kitti_to_anno predictions_dicts = predict_v2(net,example, all_3d_output) File "./pytorch/train.py", line 871, in predict_v2 opp_labels = (box_preds[..., -1] > 0) ^ dir_labels.byte() RuntimeError: result type Byte can't be cast to the desired output type Bool

pangsu0613 commented 3 years ago

Refer here: https://github.com/pangsu0613/CLOCs#common-errors--solutions

Yaonian72 commented 3 years ago

Refer here: https://github.com/pangsu0613/CLOCs#common-errors--solutions

OK I saw it. BTW, do you think is it possible to use clocs architecture to fuse centerfusion and 3dssd ,and then trained by nuscene dataset?

Yaonian72 commented 3 years ago

Refer here: https://github.com/pangsu0613/CLOCs#common-errors--solutions

It is there any recommendation for the torch version? Because sometimes GeForce RTX 3080 with CUDA capability sm_86 is not compatible with the PyTorch version

pangsu0613 commented 3 years ago

https://github.com/pangsu0613/CLOCs/issues/33#issuecomment-860574933, this guy test CenterPoint with CLOCs. Yes, CLOCs works for any 2D and 3D detector pairs. CenterFusion and 3DSSD are both 3D detectors, I am not sure how you would like to use them, using CLOCs to fuse two 3D detectors is possible but I have not tested. You need to change 2D IoU association into 3D IoU. And yes, you can definitely use nuScenes, but need modifications. On my RTX 3080, I use python3.7 and pytorch 1.7.1.

Yaonian72 commented 3 years ago

#33 (comment), this guy test CenterPoint with CLOCs. Yes, CLOCs works for any 2D and 3D detector pairs. CenterFusion and 3DSSD are both 3D detectors, I am not sure how you would like to use them, using CLOCs to fuse two 3D detectors is possible but I have not tested. You need to change 2D IoU association into 3D IoU. And yes, you can definitely use nuScenes, but need modifications. On my RTX 3080, I use python3.7 and pytorch 1.7.1.

Thank you for telling me this, I will read it carefully. Sorry may I ask your Cuda version,I try several times to install 1.7.1 and1.7.0, it still appears the same issue.

pangsu0613 commented 3 years ago

I have CUDA 11.0.221, I did it in a conda environment.

zijianh4 commented 2 years ago

Current version of CLOCs only supports batch_size=1. Are you using the same commit of spconv that I mentioned in the readme? I heard newer version of spconv requires much more memories.

Is there any plan to update the current implementation to support batch_size > 1? Thanks!