GithubHelp home page GithubHelp logo

rayguan97 / m3detr Goto Github PK

View Code? Open in Web Editor NEW
94.0 8.0 12.0 23.39 MB

Code base for M3DeTR: Multi-representation, Multi-scale, Mutual-relation 3D Object Detection with Transformers

License: Apache License 2.0

Python 82.45% C++ 6.27% Cuda 10.65% C 0.42% Shell 0.20%
point-cloud object-detection 3d-object-detection transformer deep-learning waymo-open-dataset kitti-dataset

m3detr's People

Contributors

rayguan97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m3detr's Issues

KeyError: 'batch_cls_preds'

Hey Guys,

  • I am trying to train the model using the given config file link_config_file just for 1 class.
  • but I am getting this key error in the voxel_set_abstraction.py file.
  • error message:
  • File "..../tools/../pcdet/models/__init__.py", line 30, in model_func ret_dict, tb_dict, disp_dict = model(batch_dict) File "....../.pyenv/versions/3.7.7/envs/rp/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "............../tools/../pcdet/models/detectors/ours_3d.py", line 11, in forward batch_dict = cur_module(batch_dict) File "............../.pyenv/versions/3.7.7/envs/rp/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "............../tools/../pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py", line 593, in forward batch_dict = self.reduce_points(batch_dict) File "............/tools/../pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py", line 542, in reduce_points for bs_idx, roi in enumerate(batch_dict['batch_cls_preds']): KeyError: 'batch_cls_preds'
  • I tried to print the batch_dict before the function call for reduce_points, and there is no key named as batch_cls_preds
  • the dict I got is this BATCH_DICT: dict_keys(['points', 'frame_id', 'sample_idx', 'gt_boxes', 'use_lead_xyz', 'voxels', 'voxel_coords', 'voxel_num_points', 'metadata', 'batch_size', 'voxel_features', 'encoded_spconv_tensor', 'encoded_spconv_tensor_stride', 'multi_scale_3d_features', 'multi_scale_3d_strides', 'spatial_features', 'spatial_features_stride'])
  • what could be the cause for this error? how can I solve this error?

Thanks in Advance!!

No key word batch_cls_preds

When training the M3DETR, there is an error which is : No key word batch_cls_preds happened in VoxelSetAbstractionTransFusionv5.

The specific code is as follows:

def reduce_points(self, batch_dict):

    batch_indices = batch_dict['points'][:, 0].long()

    masks = []
    for bs_idx, roi in enumerate(batch_dict['batch_cls_preds']):
        bs_mask = (batch_indices == bs_idx)
        pts = batch_dict['points'][bs_mask].unsqueeze(dim=1)[:, :, 1: 4]  # (N, 1, 3)
        s, _ = torch.max(batch_dict['batch_cls_preds'][bs_idx], dim=1)
        top, idx = torch.topk(s, self.topks)
        c = batch_dict['batch_box_preds'][bs_idx][idx][:, :3].unsqueeze(dim=0)
        dist = (pts - c)**2       

        dist, _ = dist.sum(dim=-1).min(dim=1)
        mask = (dist <= self.reduce_radius)
        masks.extend(mask)

    batch_dict['points'] = batch_dict['points'][masks]
    return batch_dict

It seems to me that the training phase should not be present: "batch_cls_preds," which should only be present in the inference phase. I would like to ask your opinion.

Kitti result

hello, I am very interested in your work. So I do exp. on KITTI dataset, but I found the result is lower than PV-RCNN and don't reproduce the same / close results as your paper both on R11 and R40 metrics. Could you please share the checkpoint? Thank you for your reply.

ERROR: Could not build wheels for SharedArray, which is required to install pyproject.toml-based projects

When I install SharedArray, it give me error below:

Building wheels for collected packages: SharedArray
Building wheel for SharedArray (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: 'F:\OutSourcing\3d_object_detection\M3DETR\venv\Scripts\python.exe' 'F:\OutSourcing\3d_object_detection\M3DETR\venv\lib\site-packages\pip_vendor\pep517\in_process_in_process.py' build_wheel 'C:\Users\CAIFEN~1\AppData\Local\Temp\tmpnoay6_36'
cwd: C:\Users\Cai Feng Lin\AppData\Local\Temp\pip-install-gc0uej1o\sharedarray_a6aff881d25c4fab845553e526ed24db
Complete output (12 lines):
running bdist_wheel
running build
running build_ext
building 'SharedArray' extension
creating build
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
creating build\temp.win-amd64-cpython-38\Release\src
D:\Tools\VisualStudio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-I
C:\Users\Cai Feng Lin\AppData\Local\Temp\pip-build-env-cqhwb4q3\overlay\Lib\site-packages\numpy\core\include" -IF:\OutSourcing\3d_
object_detection\M3DETR\venv\include -ID:\Tools\Python\Python38\include -ID:\Tools\Python\Python38\Include -ID:\Tools\VisualStudio
\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include -ID:\Tools\VisualStudio\2019\Professional\VC\Tools\MSVC\14.29.30133\in
clude "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-ID:\Windows Kits\10\include\10.0.19041.0\ucrt" "-ID:\Windo
ws Kits\10\include\10.0.19041.0\shared" "-ID:\Windows Kits\10\include\10.0.19041.0\um" "-ID:\Windows Kits\10\include\10.0.19041.0
winrt" "-ID:\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tc.\src\map_owner.c /Fobuild\temp.win-amd64-cpython-38\Release.\src\map_owner.obj
map_owner.c
.\src\map_owner.c(19): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
error: command 'D:\Tools\VisualStudio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
ERROR: Failed building wheel for SharedArray
Failed to build SharedArray
ERROR: Could not build wheels for SharedArray, which is required to install pyproject.toml-based projects

So, how can I solve it?

Questions on positional embeddings

Hi! Can you help with a few questions on positional embeddings:

  1. Did you apply any positional embedding in the Transformer attention?
  2. If so, how did you design the positional embeddings for different types of representation and multi-scale features, and how did you apply them (i.e. how the formula should write)?
  3. If not, what's the consideration behind? Why is it not needed?

Thank you! I look forward to your reply and the code release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.