Code Monkey home page Code Monkey logo

3dssd's Introduction

3DSSD

Point-based 3D Single Stage Object Detector (CVPR 2020 Oral)

This is the official implementation of 3DSSD: Point-based 3D Single Stage Object Detector  (CVPR 2020 Oral), a single-stage 3D point-based object detector.

Introduction

Currently, there have been many kinds of voxel-based 3D single stage detectors, while point-based single stage methods are still underexplored. In this paper, we first present a lightweight and effective point-based 3D single stage object detector, named 3DSSD, achieving a good balance between accuracy and efficiency. In this paradigm, all upsampling layers and refinement stage, which are indispensable in all existing point-based methods, are abandoned to reduce the large computation cost. We novelly propose a fusion sampling strategy in downsampling process to make detection on less representative points feasible. A delicate box prediction network including a candidate generation layer, an anchor-free regression head with a 3D center-ness assignment strategy is designed to meet with our demand of accuracy and speed. Our paradigm is an elegant single stage anchor-free framework, showing great superiority to other existing methods. We evaluate 3DSSD on widely used KITTI dataset and more challenging nuScenes dataset. Our method outperforms all state-of-the-art voxel-based single stage methods by a large margin, and has comparable performance to two stage point-based methods as well, with inference speed more than 25 FPS, 2x faster than former state-of-the-art point-based methods.

Overall Pipeline

3DSSD consists of three components. (a) Backbone network. It takes the raw point cloud as input, and generates global features for all representative points through several SA layers with fusion sampling (FS) strategy. (b) Candidate generation layer (CG). It downsamples, shifts and extracts features for representative points after SA layers. (c) Anchor-free prediction head.

Comparison between F-FPS and D-FPS

Requirements

All the codes are tested in the following environment:

  • Ubuntu 16.04
  • Python 3.6
  • tensorflow 1.4.0
  • CUDA 9.0 & CuDNN 7.0.0

Performance and Model Zoo

Some pretrained models including 3DSSD and PointRCNN are listed below with their performance, which are trained on 3,717 training samples and evaluated on 3,769 testing samples.

Methods Easy AP Moderate AP Hard AP Models
3DSSD 91.71 83.30 80.44 model
PointRCNN 88.91 79.88 78.37 model

Installation

(1) Clone this repository.

git clone https://github.com/tomztyang/3DSSD
cd 3DSSD

(2) Setup Python environment.

conda create -n 3dssd python=3.6
source activate 3dssd
pip install -r requirements.txt

Download and install tensorflow-1.4.0 here which is compiled with CUDA-9.0 and CuDNN-7.0.0.

pip install tensorflow-1.4.0-cp36-cp36m-linux_x86_64.whl

(3) Compile and install 3DSSD library. Note that only GCC no later than version 5.0 can compile CUDA-9.0 code, make sure you install gcc-5.

bash compile_all.sh /path/to/tensorflow /path/to/cuda

(4) Add 3DSSD/lib to PYTHONPATH.

export PYTHONPATH=$PYTHONPATH:/path/to/3DSSD/lib:/path/to/3DSSD/mayavi

Data Preparation

Currently we only support KITTI dataset, and NuScenes dataset will be supported as soon as possible.

(1) Please download the KITTI dataset and arrange it as below (please also download road planes at here, which are useful in data augmentation).

.                                           (root directory)
|-- lib                                     (3DSSD library file)
|-- configs                                 (model configurations folder)
|-- ...
|-- dataset
    |-- KITTI                               (dataset directory)
    |   |-- object
    |       |-- train.txt                   (KITTI train images list (3712 samples))                              
    |       |-- val.txt                     (KITTI val images list (3769 samples))
    |       |-- test.txt                    (KITTI test images list (7518 samples))
    |       |-- trainval.txt                (KITTI images list (7481 samples))
    |       |-- training
    |       |   |-- calib
    |       |   |-- image_2
    |       |   |-- label_2
    |       |   |-- planes
    |       |   |-- velodyne
    |       |-- testing
    |-- NuScenes
    |   |-- ...
    |-- ...

(2) Choose the target configure file in configs directory (i.e., configs/kitti/3dssd/3dssd.yaml) and preprocess original dataset by

python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list train

python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list val

python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split testing --img_list test

The preprocessed data will be saved in directory data/KITTI. You can also modify the dataset path and saving path in configure file:

DATASET:
  TYPE: 'DATASET_NAME'           
  ...
  KITTI:
    CLS_LIST: ('Car', )
    ...
    BASE_DIR_PATH: 'PATH/TO/DATASET'
    TRAIN_LIST: 'PATH/TO/DATASET/train.txt'
    VAL_LIST: 'PATH/TO/DATASET/val.txt'
    ...
    SAVE_NUMPY_PATH: 'PATH/TO/SAVE_PATH'

Training a model

To train a model with multiple GPU, you have to set the available GPU number and batch size for each GPU in configure files.

TRAIN:          
  ...
  CONFIG:
    # totally 8 batch
    BATCH_SIZE: 4
    GPU_NUM: 2
    ...

Then run

python lib/core/trainer.py --cfg configs/kitti/3dssd/3dssd.yaml

The trained models, configuration and logs will be saved in the log folder, which can also be assigned in configure files.

To load a pretrained model, you can use --restore_model_path.

python lib/core/trainer.py --cfg configs/kitti/3dssd/3dssd.yaml --restore_model_path /path/to/model

Inference and Evaluation

Evaluating a trained weight by

python lib/core/evaluator.py --cfg configs/kitti/3dssd/3dssd.yaml --restore_model_path /path/to/weight

To evaluate all weights produced in the training process, run

python lib/core/evaluator.py --cfg configs/kitti/3dssd/3dssd.yaml --restore_model_path /path/to/weight_dir

KITTI Detection results and evaluation results will be saved in the result folder.

In order to test a model and store its prediction results, run

python lib/core/tester.py --cfg configs/kitti/3dssd/3dssd.yaml --restore_model_path /path/to/weight

These results will be saved at /path/to/weight/kitti_result.

TODO List

  • Multiple GPUs for training
  • Reduce training GPU memory usage
  • Support PointRCNN (CVPR2019)
  • Visualization tools
  • Support STD (ICCV2019)
  • Add NuScenes dataset
  • Still in progress

Citations

If you find our work useful in your research, please consider citing:

@article{Yang2020ssd,
  author    = {Yang, Zetong and Sun, Yanan and Liu, Shu and Jia, Jiaya}
  title     = {3DSSD: Point-based 3D Single Stage Object Detector},
  journal   = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  year      = {2020},
}

and / or

@inproceedings{Yang2019std,
  author    = {Yang, Zetong and Sun, Yanan and Liu, Shu and Shen, Xiaoyong and Jia, Jiaya}
  title     = {{STD:} Sparse-to-Dense 3D Object Detector for Point Cloud},
  booktitle = {2019 {IEEE/CVF} International Conference on Computer Vision, {ICCV}
               2019, Seoul, Korea (South), October 27 - November 2, 2019},
  year      = {2019},
}

Acknowledgment

This repo borrows code from several repos, like second.pytorch and F-PointNet.

Contact

If you have any questions or suggestions about this repo, please feel free to contact me ([email protected]).

3dssd's People

Contributors

nowsyn avatar onlyfans424 avatar tomztyang 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

3dssd's Issues

pedestrian config

Hi, thanks for your great work, but could you please share your pedestrian config for training, as I only got 42.22 % 35.14 % 32.92% accuracy.
I just wonder how you achieve 54.64 % 44.27 % 40.23 % results on KITTI.

Many thanks for your help.

About the planes for test dataset

Thanks for your excellent work.
I have already trained the model but could you please provide the plane files for test dataset?
I wonder whether the planes influence the result a lot.

mixup database in preprocessing

Hello,

https://github.com/Jia-Research-Lab/3DSSD/blob/master/lib/dataset/dataloader/kitti_dataloader.py#L292

Should

if cfg.TRAIN.AUGMENTATIONS.MIXUP.OPEN

be

if cfg.TRAIN.AUGMENTATIONS.MIXUP.OPEN and self.img_list in ['train', 'val', 'trainval'] ?

If else, running command

$ python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split testing --img_list test

would generate following error:

File "/path/to/3DSSD/lib/dataset/dataloader/kitti_dataloader.py", line 293, in preprocess_batch
mixup_label_dict = dict([(cls, []) for cls in self.mixup_db_class])
AttributeError: 'KittiDataset' object has no attribute 'mixup_db_class'

Numba Error: TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'

Hello, I tried to reproduce your result on KITTI and got this bug:

  File "/home/cwman/work/nets/PCmodelsSurveyed/3DSSD/lib/builder/data_augmentor.py", line 9, in <module>
    from utils.voxelnet_aug import *
  File "/home/cwman/work/nets/PCmodelsSurveyed/3DSSD/lib/utils/voxelnet_aug.py", line 402, in <module>
    @numba.njit
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/decorators.py", line 221, in njit
    return jit(*args, **kws)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/decorators.py", line 158, in jit
    return wrapper(pyfunc)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/decorators.py", line 174, in wrapper
    **dispatcher_args)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/dispatcher.py", line 541, in __init__
    self.targetctx = self.targetdescr.target_context
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/registry.py", line 50, in target_context
    return self._toplevel_target_context
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/utils.py", line 357, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/registry.py", line 34, in _toplevel_target_context
    return cpu.CPUContext(self.typing_context)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/base.py", line 250, in __init__
    self.init()
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/cpu.py", line 47, in init
    self._internal_codegen = codegen.JITCPUCodegen("numba.exec")
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/codegen.py", line 608, in __init__
    self._init(self._llvm_module)
  File "/home/cwman/software/Anaconda3/envs/cu9tf1/lib/python3.6/site-packages/numba/targets/codegen.py", line 617, in _init
    tm = target.create_target_machine(**tm_options)
TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'

Performance and Model Zoo in ReadMe

You mentioned that Some pretrained models including 3DSSD and PointRCNN are listed below with their performance, which are trained on 3,717 training samples and evaluated on 3,769 testing samples.

This is inconsistent with the result on KITTI benchmark. Is this the result on the val samples?
 

FPS method issue in your code

Hi, thanks for your impressive work. I noticed in your code that you use "FS" method for FPS downsampling in Layer 2, but why did you separate and use "F-FPS, D-FPS" in Layer 3? Is there any difference for both methods?

When you use "FS" in Layer 2, you downsample 4096 points to 512 points separately by F-FPS and D-FPS, and then concatenate them together.
But when you use "F-FPS, D-FPS" in Layer 3, you firstly split 1024 points to two parts, each of which has 512 points. And then you respectively use F-FPS and D-FPS to downsample corresponding 512 points to 256 points, and finally concatenate to 512 points.

I am confused that why you didn't just use "FS" directly?

Thanks for your help.

Best Regards
Frank

Detail config for multi-class model

Hi, I'm going to reproduce the multi-class model on the KITTI dataset. I set the class list as ('Car,' 'Pedestrian,' 'Cyclist') and even add some smaller spherical radius in every SA layer. However, I got worse results under pedestrian and cyclist. It's that correct? What is your configuration on a multi-class model? And how is the result of it?

Some problem about convert model to .pb

I am a new TensorFlow user. I cannot understand the output node of your network in TensorBoard. I want to migrate the algorithm to the hardware. During the printing of node.name, a key error occurs on the 'FathestPointSample' node, do you have anything to tell me? Thx : )

Is anchor free method only applicable to single class detection?

in lib/np_functions/gt_sampler.py mask_assign_targets_anchors_np:

if cls_num == 1: # anchor_free
    label_mask = np.ones([pts_num, cls_num], dtype=np.float32)

and in lib/builder/anchor_builder.py:

    def generate_anchors_free(self, points):
        """
        generate anchors based on points
        bs, npoint, 1, 3 -> bs, npoint, cls_num, 7
        """
        return tf.expand_dims(points, axis=2)

Do these mean if use anchor free, the number of classes is 1? And if the number of classes is larger than 1, the anchor-based method should be used?

can not generate mixup_dataset

**** Saving configure file in log/2022-05-17 11:28:29.440447 ****
Traceback (most recent call last):
File "lib/core/trainer.py", line 216, in
cur_trainer = trainer(args)
File "lib/core/trainer.py", line 64, in init
self.dataset = dataset_func('loading', split=args.split, img_list=args.img_list, is_training=self.is_training, workers_num=self.num_workers)
File "/home/sara/3DSSD/lib/dataset/dataloader/kitti_dataloader.py", line 69, in init
self.data_augmentor = DataAugmentor('KITTI', workers_num=self.workers_num)
File "/home/sara/3DSSD/lib/builder/data_augmentor.py", line 38, in init
mixup_sampler = MixupSampler()
File "/home/sara/3DSSD/lib/builder/mixup_sampler.py", line 31, in init
with open(self.sv_npy_cls_trainlist_path[cls], 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/sara/3DSSD/data/KITTI/mixup_database/KITTI/train/Car/train_list.txt'

how to generate testing dataset and realize testing inference

In previous issues, it seems impossible to run data_preprocessor.py to generate testing mixup datasets. I'd like to figure out how to generate testing samples and just inference on test set instead of validation set, to get corresponding testing inference result.

Thanks for your answer!

Can this run with cuda 10.0?

Hello. I see your code has been tested with cuda 9.0 and I wanted to know whether it could also be run on cuda 10.0? Please let me know, thanks!

Loss Weightings

Hi, thanks for your great job. I wonder the loss weighting value of $\lambda$1 and $\lambda$2.

No module named 'core'

When executing a command:python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list train

Traceback (most recent call last):
File "lib/core/data_preprocessor.py", line 7, in
from core.config import cfg, cfg_from_file, cfg_from_list, assert_and_infer_cfg
ModuleNotFoundError: No module named 'core' No module named 'core'

Performance on val split

I wonder why is the AP mentioned here different from the AP mentioned in the paper, regardless of whether the AP here is the result on the validation set or the test set?If you know the answer to this question, could you please answer it?Thanks!

Assertion `groundtruth.size() == detections.size()' failed.

I have trained a model and want to evaluate the trained weight. When I run lib/core/evaluator.py,I meet issues as follows:

**** Saving Evaluation results to the path /home/oiv/chenyanbin/3DSSD/lib/core/log/2020-11-25 00:36:59.354264 ****
**** Dataset length is 3384 ****
numpy applys seed 4209039388
Start data provider ipc://@dataflow-map-pipe-e02df190-b'0'
Starting Evaluation at 2020-11-25-17:37:24
2020-11-26 01:37:24.466919: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-11-26 01:37:24.686002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1105] Found device 0 with properties:
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:0a:00.0
totalMemory: 11.91GiB freeMemory: 11.76GiB
2020-11-26 01:37:24.686036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1195] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: TITAN Xp, pci bus id: 0000:0a:00.0, compute capability: 6.1)
**** Evluation New Result ****
Assign From checkpoint: /home/oiv/chenyanbin/3DSSD/lib/core/log/2020-11-25 00:36:59.354264/model-79893
100%|██████████| 3384/3384 [06:13<00:00, 9.05it/s]
loadGroundtruth: no error!
loadDetections: no error!
python /home/oiv/chenyanbin/3DSSD/lib/core/evaluator.py: evaluate.cpp:842: bool eval_class(FILE, FILE, CLASSES, const std::vector<std::vector >&, const std::vector<std::vector >&, bool, bool, double (*)(tDetection, tGroundtruth, int32_t), std::vector&, std::vector&, std::vector&, DIFFICULTY, METRIC): Assertion `groundtruth.size() == detections.size()' failed.**

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I have no idea about groundtruth.size() and detections.size(). Could you give me some advice?

ERROR: Could not install packages due to an OSError

Hello, I met this problem when compiling the 3dsd library. I hope to get your answer:

ERROR: Could not install packages due to an OSError: [Errno 2] 没有那个文件或目录: '/home/huang/.local/share/Trash/files/3DSSD/lib/builder/voxel_generator/points2voxel-0.0.1-cp36-cp36m-linux_x86_64.whl'

3DSSD training loss

Hi, thanks for sharing this fantastic work!

I'm trying to implement 3DSSD in pytorch, but the loss of vote layer didn't seem to converge (4e4~5e4), while the loss of head is 0.5. I'm trying to figure out what I have done wrong, could anyone provide a log file or a tensorboard file of the 3DSSD training process. Thanks a lot!

CGlayer about the fps

Hi, thanks for your impressive work. I noticed some question about the code.
Firstly, layer3 gengerate F-fps with 256 points and D-Fps with 256 points. Then, layer3-vote turn the F-fps 256 points into the voted 256 points. right? In CGlayer, using D-FPs obtain 256 points index which range (0, 512) from F-fps with 256 points and D-Fps with 256 points which total 512 points generated by layer3. But I see the code "new_xyz = gather_point(vote_ctr, fps_idx)" . this means network will seek 256 points from voted points through 256 points index. However the 256 points index range (0, 512). this is impoeesible. I think it would I don't understand the code. But I can't find the wrong place which I understand.
image

Some error occured when I use your pretrained model of 3DSSD

Hi @tomztyang

root@53da94df9c78:~/3DSSD# python lib/core/evaluator.py --cfg configs/kitti/3dssd/3dssd.yaml --restore_model_path /root/data/3dssd
/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
/root/3DSSD/lib/core/config.py:514: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = AttrDict(yaml.load(f))
**** Saving Evaluation results to the path /root/data/3dssd ****
**** Dataset length is 3384 ****
numpy applys seed 2387376643
Start data provider ipc://@dataflow-map-pipe-b2d27482-b'0'
Starting Evaluation at 2020-04-29-06:14:36
No model found in /root/data/3dssd. Will try again in 300 seconds

In /root/data/3dssd/ is the pretrained models.
root@53da94df9c78:~/3DSSD# ls -l /root/data/3dssd/
total 36064
-rw-r--r-- 1 1000 1000 384 Apr 29 06:14 log_train.txt
drwxr-xr-x 2 root root 4096 Apr 29 06:08 model-75051
-rw-r--r-- 1 1000 1000 30222888 Apr 8 07:22 model-75051.data-00000-of-00001
-rw-r--r-- 1 1000 1000 20145 Apr 8 07:22 model-75051.index
-rw-r--r-- 1 1000 1000 6674647 Apr 8 07:22 model-75051.meta

Should I train my own model for testing?

About Inference time

I have trained and tested the 3DSSD model, the map is cool but the inference time is over 110 ms not matching the paper 25FPS (I tested on GTX 1080Ti and the approach is like in tester.py).
How to do to get 25 FPS? Thanks!

some path errors occur when running data_preprocesser.py

python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list train
Traceback (most recent call last):
File "lib/core/data_preprocessor.py", line 11, in
from lib.dataset.dataloader import choose_dataset
File "/home/sara/3DSSD/lib/dataset/dataloader/init.py", line 5, in
from .kitti_dataloader import KittiDataset
File "/home/sara/3DSSD/lib/dataset/dataloader/kitti_dataloader.py", line 21, in
from utils.tf_ops.evaluation.tf_evaluate import evaluate, calc_iou
File "/home/sara/3DSSD/lib/utils/tf_ops/evaluation/tf_evaluate.py", line 7, in
evaluate_module=tf.load_op_library(os.path.join(BASE_DIR, 'tf_evaluate_so.so'))
File "/home/sara/anaconda3/envs/3dssd/lib/python3.6/site-packages/tensorflow_core/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: libtensorflow_framework.so.2: cannot open shared object file: No such file or directory

Configuration for the nuScenes dataset

Thank you for the great work.

Will you plan to provide the configuration or the pretrained model for the nuScenes dataset to reproduce the reported results in your paper?

Thank you.

Filtering Point Cloud Range

Hi, looking at the Point cloud range here:
https://github.com/Jia-Research-Lab/3DSSD/blob/8bc7605d4d3a6ec9051e7689e96a23bdac4c4cd9/configs/kitti/3dssd/3dssd.yaml#L3
I saw that the vertical filter was set to include point cloud -5 ~ 3, which I found is generally the range for kitti lidar in velodyne coordinates. However in here:
https://github.com/Jia-Research-Lab/3DSSD/blob/8bc7605d4d3a6ec9051e7689e96a23bdac4c4cd9/lib/dataset/dataloader/kitti_dataloader.py#L192
the point cloud is filtered after transforming to rect. camera coordinates, and I found that the vertical range in rect camera coordinate is -3 ~ 5.

Is it intentional for the kitti_dataloader to filter after transforming to rect. camera coords?

What does evaluator.py 's result 'precision_image/ground/3d' mean?

Hi guys, i am new to the 3d object detection, can anybody explain the result output by evaluator.py on validation means?

precision_image:
[[ 0.964873   0.9521195  0.9267832]
 [-1.        -1.        -1.       ]
 [-1.        -1.        -1.       ]]
precision_ground:
[[ 0.9278019  0.8908308  0.8651091]
 [-1.        -1.        -1.       ]
 [-1.        -1.        -1.       ]]
precision_3d:
[[ 0.9127641   0.82593334  0.79932135]
 [-1.         -1.         -1.        ]
 [-1.         -1.         -1.        ]]

I don't know what exactly precision_image/ground/3d means, and what the difference are they?

Use 3DSSD without images

Hello, i have a set of pointclouds and labels, but i don't have any images related to these pointcloud.
Is there a way to ignore calibration or is it required for this algorithm?

Differences between 3DSSD and VoteNet

Hi all, thanks for releasing this great work.

I'm wondering what are the main differences between 3DSSD and VoteNet on the architecture level, besides removing FP layers, fusion sampling strategy in SA layers and 3D Center-ness Assignment Strategy. Since I noticed that VoteNet works poorly on KITTI https://github.com/facebookresearch/votenet/issues/53#issuecomment-584548785, but 3DSSD works just great. I think the two methods share many similarities but why the results are so different.

Looking forward to your insight~

Detailed config for NUSCENES dataset

Hi, I'm going to reproduce the performance of 3DSSD on NUSCENES dataset. However, the config is not released and I'm trying to finish the config according to the paper.
I have some questions about the detailed config of the backbone on NUSCENES dataset:

  1. For the first two SA module, are different FPS methods applied to current sweep points and previous separately?
  2. As for the third SA module, only using FS cannot generate two subsets of points(1024 and 2048, because the current code base do not support different size of subset), could you specify the detailed config of this stage?
  3. As for the fourth SA module, are FS methods applied to all points?

I will be deeply appreciated that you have done for me and look forward to your reply. 

about PRCNN training

Hi,

Thanks for open-sourcing this work and it is really a great work! I have been trying to use the code to train a PRCNN model, but I did not find instructions in readme. The way I am using is as follows:

train first stage:
python lib/core/trainer.py --cfg configs/kitti/pointrcnn/tiny_pointrcnn_stage1.yaml
then train the second stage:
python lib/core/trainer.py --cfg configs/kitti/pointrcnn/tiny_pointrcnn_stage2.yaml --restore_model_path <the ckpt from the first stage>

is this the intended way to train PRCNN model? But I found in the second stage it will get NaN after a few steps. Could you help me with this? Thanks!

Best,
Yurong

points_to_voxel operation not working

Hello, regarding the points_to_voxel function in https://github.com/Jia-Research-Lab/3DSSD/blob/8bc7605d4d3a6ec9051e7689e96a23bdac4c4cd9/lib/builder/voxel_generator/point_cloud_ops.py#L65 the returned voxel array seems to just be an array of zeros.

To test this, I simply ran:

import numpy as np
from lib.builder.voxel_generator.point_cloud_ops import points_to_voxel

points = np.array([
    [1, 1, 1, 0],
    [2, 2, 2, 0],
    [2.1, 2, 2, 0]
])
voxel_size = np.array([0.5, 0.5, 0.5])
coors_range = np.array([-5, -5, -5, 5, 5, 5])
max_points = 3
max_voxels = 10
voxels, num_points_per_voxel = points_to_voxel(
                                    points=points,
                                    voxel_size=voxel_size,
                                    coors_range=coors_range,
                                    max_points=max_points,
                                    max_voxels=max_voxels
                                )
print("Voxels shape:", voxels.shape)
print("Voxels:", voxels)
print("num_points_per_voxel shape:", num_points_per_voxel.shape)
print("num_points_per_voxel:", num_points_per_voxel)

and got the result:

Voxels shape: (2, 3, 4)
Voxels: [[[0. 0. 0. 0.]
  [0. 0. 0. 0.]
  [0. 0. 0. 0.]]

 [[0. 0. 0. 0.]
  [0. 0. 0. 0.]
  [0. 0. 0. 0.]]]
num_points_per_voxel shape: (2,)
num_points_per_voxel: [1 2]

which is not correct. However, it does seem to have correctly figured out the num_points_per_voxel, so it seems to be doing some work at least. How might I fix this issue?

Thank you for your help.

About nuscenes dataset

Dear author: I have tried to train your code on nuscenes datset but got very low mAP, only around 20%. Could you please publish the detail parameters or the pretrained model?

Error when preprocess test dataset

When I use the command "python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split testing --img_list test", I got the following error.
AttributeError: 'KittiDataset' object has no attribute 'mixup_db_class'

With debugging, I found that mixup_db_class only will be activated by ['train', 'val', 'trainval'] modes. So May I ask for how to fix this and what is the intension of using mixup_db_class? Code reading is painful, please help out.

Training on pedestrian and cyclist

Hello,

First, Thanks for this great work. My question is how to train the model on pedestrian and cyclist, because i want to match the results reported by the paper for the three classes (car, pedestrian, cyclist)

some question about preprocess original dataset

Hi, thanks for your impressive work, i use tensorflow1.4.0 according to your tutorial ,but i meet some errors when i try to preprocess original dataset.
when i use commmad "python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list train" it works.
and i also try to use command"python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split training --img_list val" it works

however, when i try to prepare test set and i use "python lib/core/data_preprocessor.py --cfg configs/kitti/3dssd/3dssd.yaml --split testing --img_list test"

图片
it seems that AttributeError: 'KittiDataset' object has no attribute 'mixup_db_class' . Could you help me fix up it,thanks a lot.

Rationale behind deciding the radii of ball query based groupers.

Hello,

This is my first time raising an issue, so please let me know if this is not the right place to ask questions like these.

My question is regarding a model that involves N1 points and a D-FPS layer that produces N2 points. From these N2 points, we construct several balls of radii 0.2, 0.4, and 0.8. What is the rationale behind choosing these radii? Is there a rule of thumb or point distribution statistic that was used to determine these values?

I am asking this because I am curious if this is a significant factor when fine-tuning the model on a different dataset that uses different sensors and therefore different point densities.

Thank you for your help!

Valid Checkpoint Path

Hello,
I apologize if this is an overly simplistic question, but I have trained the model and generated the log files. When I go to run evaluator or tester, it says model not found or please "provide valid checkpoint path", respectively. May I know which path I should give exactly, if not the log path?

Exception has occurred: ValueError - Error during the execution of train.py script

Hello I tried to reproduce the result of this method and got this bug :
Exception has occurred: ValueError
No variables provided.
File "/home/kevin/3DSSD/lib/core/trainer.py", line 87, in __init__
self.update_op = [self.optimizer.apply_gradients(zip(self.grads, self.params), global_step=self.global_step)]
File "/home/kevin/3DSSD/lib/core/trainer.py", line 216, in <module>
cur_trainer = trainer(args)

I'm on Ubuntu16.04, using python3.6 with tensorflow1.4. I also would like adding, I added these 2 lines in _build_model_list function to overcome an UnboundLocalError.
params = []
extra_update_ops = []

When I search to found this exception, I notice that self.params and self.extra_update_ops are respectively linked with cfg.TRAIN.CONFIG.TRAIN_PARAM_PREFIX and cfg.TRAIN.CONFIG.TRAIN_LOSS_PREFIX. These 2 parameters are not indicated in the 3dssd.yaml file. I tried to add them but I have no idea of their value and nothing changed when I add them ithout value. So how can I overcome this exception ?

problem for cyclist evaulation

Hi, thanks for your impressive work, but when I run evaluator.py to evaluate cyclist class, the results are as below. But the car and pedestrian evaluations have no any problem, I don't understand why only the cyclist evaluation has the strange results.

I also wonder if there is anyone who meet the similar problem, thanks.

Cyclist Evaluation:
precision_image:
[[-1.0000000e+00 -1.0000000e+00 -1.0000000e+00]
[ 2.9914529e-04 3.1887757e-04 4.1296062e-04]
[-1.0000000e+00 -1.0000000e+00 -1.0000000e+00]]
precision_ground:
[[-1.0000000e+00 -1.0000000e+00 -1.0000000e+00]
[ 1.2820514e-04 1.3192612e-04 1.3192612e-04]
[-1.0000000e+00 -1.0000000e+00 -1.0000000e+00]]
precision_3d:
[[-1. -1. -1.]
[ 0. 0. 0.]
[-1. -1. -1.]]

Many thanks for your help.

Data file download

How can I download these files?
train.txt val.txt test.txt trainval.txt

Some questions about splitting data sets

Hello author, I followed python3.6.0 and tensorflow-1.4.0 according to your tutorial and successfully completed import tensorflow in python. There was no error in the next compilation, but when I run the split data set The same error occurred in all three lines of code.

tensorflow.python.framework.errors_impl.NotFoundError: /data/lidar/test_one/3DSSD/lib/utils/tf_ops/evaluation/tf_evaluate_so.so: undefined symbol: _ZN10tensorflow15OpKernelContext21CtxFailureWithWarningENS_6StatusE

I don't know which step of my operation my error occurred, because I strictly followed the tutorial to configure the environment, I hope you can give me some help

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.