xharlie / btcdet Goto Github PK
View Code? Open in Web Editor NEWBehind the Curtain: Learning Occluded Shapes for 3D Object Detection
License: Apache License 2.0
Behind the Curtain: Learning Occluded Shapes for 3D Object Detection
License: Apache License 2.0
When you run this statement ,python -m btcdet.datasets.multifindbestfit , the following error occurs FileNotFoundError:
No such file or directory: '/home/z/BtcDet-main/data/kitti/detection3d/gt_database/00003_car_0.bin
i d like to know if this model is enough effeciency or not. is it probably to run in real time? answer will be appreciated!
When you run this statement ,python -m btcdet.datasets.multifindbestfit , the following error occursRuntimeError:expected backend CUDA and dtype Float but got backend CUDA and dtype Long.
Hello, thanks for your open-source code!
I want to know which part of the code is responsible for identifying occlusion and signal miss? I can't find it due to the complexity of this project. And can you give more explaination on the intution of identifying occlusion and signal miss in the spherical coordinate system? I can't understand it well.
Another question is about the process of model inference. Do we need to assemble the approximated complete shape for the test sample or just take the original sample as input and output the shape occupancy probablity?
When you run this statement ,python -m btcdet.datasets.multifindbestfit , the following error occurs FileNotFoundError:
RuntimeError:cuda runtime errror (38) : no cuda-capable device is detected at /pytorch/aten/src/THC
Hello author,
i tried to generate the data infos by running the following command:
python -m btcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml
but I got a traceback:
Traceback (most recent call last):
File "/home/hiepubt/anaconda3/envs/btcdet/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/hiepubt/anaconda3/envs/btcdet/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/hiepubt/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 548, in
save_path=path
File "/home/hiepubt/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 475, in create_kitti_infos
kitti_infos_train = dataset.get_infos(num_workers=workers, has_label=True, count_inside_pts=True)
File "/home/hiepubt/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 200, in get_infos
infos = executor.map(process_single_scene, sample_id_list)
File "/home/hiepubt/anaconda3/envs/btcdet/lib/python3.7/concurrent/futures/_base.py", line 587, in map
fs = [self.submit(fn, *args) for args in zip(*iterables)]
TypeError: zip argument #1 must support iteration
Hi @Xharlie , thank you for your advanced work! When you submit results to KITTI benchmark, do you train the model with the seperated 3712 training samples or use the whole trainval dataset with 7481 samples? Because I do not see the kitti_infos_trainval.pkl like OpenPCDet and also kitti_dbinfos_val.pkl in your provided generated kitti's data zip.
Even though I have installed ptflops using pip, I cannot train by this problem..
~/BtcDet/tools$ python3 train.py --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/ --batch_size 2 --gpu_str "0"
Traceback (most recent call last):
File "train.py", line 6, in
from test import repeat_eval_ckpt
File "/home/server10/BtcDet/tools/test.py", line 17, in
from eval_utils import eval_utils as eval_utils
File "/home/server10/BtcDet/tools/eval_utils/eval_utils.py", line 10, in
from ptflops.flops_counter import add_flops_counting_methods
ImportError: cannot import name 'add_flops_counting_methods' from 'ptflops.flops_counter' (/home/server10/.local/lib/python3.8/site-packages/ptflops/flops_counter.py)
How can I handle this error?
When you run this statement ,python -m btcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml the following error occurs TypeError: load() missing 1 required positional argument: 'Loader'
My question is basically about the codes in 581 lines of detector3d_template.py
rcnn_recalled = (iou3d_rcnn.max(dim=0)[0] > cur_thresh).sum().item()
recall_dict['rcnn_%s' % str(cur_thresh)] += rcnn_recalled
Here the max value in iou3d are used to count the how many predict box can pass the corresponding iou thresholds.
However, for evaluation, the final_box was selected by the cls_score, instead of the IOU between the ground truth and itself.
So this will actually lead to a miss-match for the output, we use the IOU of the best-match proposal to calculate the performance instead of the box selected by cls_score.
I want to know where I went wrong, thanks for any help!
Hello!author, i finally succesfully install the spconv, and my environment is torch1.4, when i run the train.py, it raise:
File "/data1/hx/BtcDet/btcdet/models/occ_pnt/occ_training_targets/occ_targets_template.py", line 88, in point2coords_inrange
coords = torch.minimum(coords, max_grid_tensor)
AttributeError: module 'torch' has no attribute 'minimum'
why??? is the torch version wrong??(i also use torch1.3, it raise the same wrong)
Thanks for sharing.
This is my reproduction results. The experiment is running on 8 gpus and config is not changed.
2022-01-10 21:31:31,266 INFO recall_roi_0.5: 0.964236
INFO:btcdet.utils.common_utils:recall_roi_0.5: 0.964236
2022-01-10 21:31:31,266 INFO recall_rcnn_0.5: 0.967569
INFO:btcdet.utils.common_utils:recall_rcnn_0.5: 0.967569
2022-01-10 21:31:31,266 INFO recall_roi_0.7: 0.816458
INFO:btcdet.utils.common_utils:recall_roi_0.7: 0.816458
2022-01-10 21:31:31,267 INFO recall_rcnn_0.7: 0.868125
INFO:btcdet.utils.common_utils:recall_rcnn_0.7: 0.868125
2022-01-10 21:31:31,267 INFO ***************************
INFO:btcdet.utils.common_utils: ***************************
2022-01-10 21:31:31,267 INFO precision: 0.531, recall: 0.717, f1: 0.599, precision_factored: 0.536 recall_factored: 0.723, f1_factored: 0.604
INFO:btcdet.utils.common_utils:precision: 0.531, recall: 0.717, f1: 0.599, precision_factored: 0.536 recall_factored: 0.723, f1_factored: 0.604
2022-01-10 21:31:31,267 INFO occ thresh 0.1: 0.953, occ thresh 0.2: 0.953, occ thresh 0.3: 0.953, occ thresh 0.4: 0.938, occ thresh 0.5: 0.914, occ thresh 0.6: 0.883, occ thresh 0.7: 0.833, occ thresh 0.8: 0.720, occ thresh 0.9: 0.233,
INFO:btcdet.utils.common_utils:occ thresh 0.1: 0.953, occ thresh 0.2: 0.953, occ thresh 0.3: 0.953, occ thresh 0.4: 0.938, occ thresh 0.5: 0.914, occ thresh 0.6: 0.883, occ thresh 0.7: 0.833, occ thresh 0.8: 0.720, occ thresh 0.9: 0.233,
2022-01-10 21:31:31,267 INFO total_pos_all_portion 0.599
INFO:btcdet.utils.common_utils: total_pos_all_portion 0.599
2022-01-10 21:31:31,269 INFO Average predicted number of objects(3769 samples): 4.237
INFO:btcdet.utils.common_utils:Average predicted number of objects(3769 samples): 4.237
pc, rc (1, 3, 2, 41) (1, 3, 2, 41)
pc, rc (1, 3, 2, 41) (1, 3, 2, 41)
2022-01-10 21:31:37,601 INFO Car [email protected], 0.70, 0.70:
bbox AP:90.6649, 89.7338, 89.2758
bev AP:90.0933, 88.1567, 87.6482
3d AP:89.0296, 85.5022, 78.6749
aos AP:44.18, 44.36, 44.10
Car [email protected], 0.70, 0.70:
bbox AP:96.6044, 95.3285, 92.9333
bev AP:93.5117, 91.5184, 89.2229
3d AP:92.0635, 85.2752, 82.9497
aos AP:45.29, 43.36, 42.14
Car [email protected], 0.50, 0.50:
bbox AP:90.6649, 89.7338, 89.2758
bev AP:90.6736, 89.7183, 89.2712
3d AP:90.6736, 89.7061, 89.2479
aos AP:44.18, 44.36, 44.10
Car [email protected], 0.50, 0.50:
bbox AP:96.6044, 95.3285, 92.9333
bev AP:96.6282, 95.4054, 92.9708
3d AP:96.6199, 95.3687, 92.9303
aos AP:45.29, 43.36, 42.14
Hey @Xharlie :
Thanks for the released code. I'm focusing on how the BtcDet is implemented.
I found a conflict in the generation of spherical voxels between code and paper.
In the code, I found that the point_cloud_range is [2.24, -40.69, -2.6, 69.12, 40.69, 0.64], voxel_size=[0.32, 0.52, 0.36]
but in your paper, the point_cloud_range is [2.24, -40.69, -16.60, 70.72, 40.69, 4.00], voxel_size=[0.32, 0.52, 0.42]
It seems that the range in x and z dimension are absolutely different(especially for z dimension).
Can you explain why such difference appears or it is just a clerical error?
Hi,
Could you tell me which tools you used to visualize the voxel?
I really love the style of your figure in the paper, but I can't find a library that allows the transparent visualization of voxels.(Occ in the paper)
Thanks for any help.
How to visualize the results?
hello
i tried to train btcdet. but error occured.
error message :
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/BtcDet/data/kitti/detection3d/bm_50maxdist_2num_car/1788_0.pkl'
do you know how to create directory and *.pkl files?
Dear author: thanks for your wonderful work!!! my ubuntu is 20.04 and i follow the "spconv" , which say i can use "pip install spconv-cu113" to install spconv, and after this, i run your "python setup.py develop " and there is no wrong. But when i run the train.py, it raise wrong: AttributeError: module 'spconv' has no attribute 'SparseConv3d', this looks like "python setup.py develop" is actually failed (T T). Am i guess right? could you help me? look forward your response!!!!!!~~~~~
Hi!
Thanks for sharing the code. With out any code changes, I only got 79 AP11 on val set as below. It is weird, because the paper can go up to 86 AP11. Is there a trained model, or could you give me some advice for training @Xharlie ?
Car [email protected], 0.70, 0.70:
bbox AP:90.7842, 89.7048, 89.3668
bev AP:90.3260, 88.2499, 88.1178
3d AP:89.5578, 79.5970, 78.9717
aos AP:42.11, 40.24, 40.12
Car [email protected], 0.70, 0.70:
bbox AP:96.9146, 93.4603, 90.9702
bev AP:93.9134, 89.9003, 87.4430
3d AP:92.9308, 84.1075, 81.5648
aos AP:44.93, 41.93, 40.84
after 'python3 setup.py develop'
Traceback (most recent call last):
File "train.py", line 6, in
from test import repeat_eval_ckpt
File "/tmp/BtcDet/tools/test.py", line 14, in
from btcdet.datasets import build_dataloader
File "/usr/local/lib/python3.6/dist-packages/btcdet/datasets/init.py", line 5, in
from btcdet.utils import common_utils
ModuleNotFoundError: No module named 'btcdet.utils'
Thanks for your brilliant work! Do you have plan share results on waymo dataset mentioned in paper?
Hello everyone,
I got an error when I runned this command: python -m btcdet.datasets.multifindbestfit
Its traceback:
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
Traceback (most recent call last):
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/hiepubt/BtcDet/btcdet/datasets/multifindbestfit.py", line 21, in
from ..ops.chamfer_distance import ChamferDistance
File "/home/hiepubt/BtcDet/btcdet/ops/chamfer_distance/init.py", line 1, in
from .chamfer_distance import ChamferDistance
File "/home/hiepubt/BtcDet/btcdet/ops/chamfer_distance/chamfer_distance.py", line 11, in
cd = load(name="cd",sources=[cpp_file,cu_file])
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 980, in load
keep_intermediates=keep_intermediates)
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1185, in _jit_compile
with_cuda=with_cuda)
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1276, in _write_ninja_file_and_build_library
with_cuda=with_cuda)
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1602, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1407, in _get_cuda_arch_flags
capability = torch.cuda.get_device_capability()
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/cuda/init.py", line 291, in get_device_capability
prop = get_device_properties(device)
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/cuda/init.py", line 296, in get_device_properties
_lazy_init() # will define _get_device_properties
File "/home/hiepubt/anaconda3/envs/btc/lib/python3.7/site-packages/torch/cuda/init.py", line 172, in _lazy_init
torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available
Can anyone help me about this issue?
Thanks for your open-source code!
Don’t we identify “shape missing" areas in a spherical coordinate system? Why set COORD_TYPE = cylinder?
Hi,
I have been working on the repository and have reproduced the results for "Car" using "btcdet_kitti_car.yaml". However, since there is no config files available for either "Pedestrians" or "Cyclist", I would request you to please provide for the config files for those classes.
Thank you!
Did anyone face the same issue as below?
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/-/BtcDet/btcdet/datasets/multifindbestfit.py", line 494, in
find_best_match_boxpnts(all_db_infos_lst, box_dims_lst, sorted_iou, pnt_thresh_best_iou_indices, mirrored_pnts_lst, pnts_lst, coords_num, occ_map, bm_dir_save_path, allrange, nx, ny, voxel_size, max_num_bm=max_num_bm_lst[i], num_extra_coords=num_extra_coords_lst[i], iou_thresh=iou_thresh_lst[i], ex_coords_ratio=ex_coords_ratio_lst[i], nearest_dist=nearest_dist_lst[i], vis=vis, save=save)
File "/home/-/BtcDet/btcdet/datasets/multifindbestfit.py", line 330, in find_best_match_boxpnts
bm_pnts, bm_coords_num = find_multi_best_match_boxpnts(selected_sorted_iou, cur_box, cur_mirrored_pnts_lst, cur_pnts_lst, selected_mirrored_pnts_lst, selected_pnts_lst, selected_pnt_thresh_best_iou_indices, cur_occ_map, selected_occ_map, max_num_bm=max_num_bm, num_extra_coords=num_extra_coords, iou_thresh=iou_thresh, ex_coords_ratio=ex_coords_ratio, nearest_dist=nearest_dist, vis=vis)
File "/home/-/BtcDet/btcdet/datasets/multifindbestfit.py", line 375, in find_multi_best_match_boxpnts
mean_instance, min_instance, max_instance = get_batch_stats(dist_l1, box_num_pnts_tensor, box_mask_tensor, box_reversemask_tensor)
File "/home/-/BtcDet/btcdet/datasets/multifindbestfit.py", line 351, in get_batch_stats
addmax_dist = masked_dist - reversemask_arry
RuntimeError: CUDA out of memory. Tried to allocate 198.00 MiB (GPU 0; 10.92 GiB total capacity; 8.94 GiB already allocated; 128.69 MiB free; 9.86 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
How to get the "depth_2" data?
Using 4 GTX 1080 Ti GPUs, how long does it take to train the model on KITTI and WOD, respectively?
Thank you for your sharing, that's amazing job! But I can not reimplement the precision result in your paper, could you give me a favor to provide relative checkpoint file?
When you run this statement ,python -m btcdet.datasets.multifindbestfit , the following error occurs No module named 'vasualize_utils'.
But I have vasualize_utils.py.
I solved this problem by adding a path, but the following problem arose。
[Deleted]
Hi, I've done every step before this and they all works.
When I try to run sudo python3 setup.py develop
it returns no module named torch error but torch is installed and it works. How can I fix this problem.
Thanks in advance
I noticed that you only provide the config for car class, do I miss anything? How can I reproduce the results for pedestrian and cyclist? Looking forward for your reply, thanks!
Hi @Xharlie
Thanks for the released code.
I have a question about this:
# min_instance = min_instance.view(gt_boxnum, candidate_num)
max_instance = max_instance.view(gt_boxnum, candidate_num)
and
heuristic = max_instance + ex_coords_ratio / extra_coord_nums.unsqueeze(0) + (sorted_iou.unsqueeze(0) < iou_thresh) * 2.0 + (extra_coord_nums.unsqueeze(0) < 30) * 1.0
why not use min_instance? I think min_instance is more reasonable
It seems that this repo has many bugs, such as this dbinfos, there is no 'kitti_dbinfos_val.pkl' under the kitti dataset.
So this error will be reported, has anyone encountered the same error?
File "/home/algo-3/work/BtcDet/btcdet/datasets/multifindbestfit.py", line 38, in extract_allpnts
all_db_infos = pickle.load(f)[type]
TypeError: list indices must be integers or slices, not str
Getting an error when I run:
python -m btcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml
/home/cad297/anaconda3/envs/btc/lib/python3.6/runpy.py:125: RuntimeWarning: 'btcdet.datasets.kitti.kitti_dataset' found in sys.modules after import of package 'btcdet.datasets.kitti', but prior to execution of 'btcdet.datasets.kitti.kitti_dataset'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
/home/cad297/projects/BtcDet/btcdet/datasets/kitti/kitti_dataset.py:539: YAMLLoadWarning:calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
dataset_cfg = EasyDict(yaml.load(open(sys.argv[2])))
ROOT_DIR /home/cad297/projects/BtcDet
cur_cfg.NAME mask_points_and_boxes_outside_range
cur_cfg.NAME shuffle_points
cur_cfg.NAME transform_points_to_voxels
self.dataset_cfg.INFO_PATH {'train': ['kitti_infos_train.pkl'], 'test': ['kitti_infos_val.pkl']}
---------------Start to generate data infos---------------
cur_cfg.NAME mask_points_and_boxes_outside_range
cur_cfg.NAME shuffle_points
cur_cfg.NAME transform_points_to_voxels
Traceback (most recent call last):
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/cad297/projects/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 548, in
save_path=path
File "/home/cad297/projects/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 475, in create_kitti_infos
kitti_infos_train = dataset.get_infos(num_workers=workers, has_label=True, count_inside_pts=True)
File "/home/cad297/projects/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 201, in get_infos
return list(infos)
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
yield fs.pop().result()
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/concurrent/futures/_base.py", line 425, in result
return self.__get_result()
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/home/cad297/anaconda3/envs/btc/lib/python3.6/concurrent/futures/thread.py", line56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/cad297/projects/BtcDet/btcdet/datasets/kitti/kitti_dataset.py", line 158, in process_single_scene
annotations['bbox'] = np.concatenate([obj.box2d.reshape(1, 4) for obj in obj_list], axis=0)
File "<array_function internals>", line 6, in concatenate
ValueError: need at least one array to concatenate
Anyone seen the same? Or have been able to fix?
How to visualize the results
Hi!
How to recover the shape miss according to the three types (EO, SM, SO) for producing the results of Figure 2 step by step?
Many thanks,
:)
When I run multifindbestfit.py, It reports an error: CUDA error: invalid configuration argument. How can I fix it ?
Can you provide pedestrian and cyclist config to trian your model?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.