Giter Site home page Giter Site logo

eaphan / glenet Goto Github PK

View Code? Open in Web Editor NEW
176.0 176.0 10.0 3.26 MB

GLENet: Boosting 3D Object Detectors with Generative Label Uncertainty Estimation [IJCV2023]

Home Page: https://arxiv.org/abs/2207.02466

License: Apache License 2.0

Python 84.96% Dockerfile 0.13% C++ 5.71% Cuda 8.55% C 0.28% Shell 0.37%
3d-object-detection generative-model machine-learning probabilistic-models uncertainty-estimation

glenet's People

Contributors

eaphan avatar jspisak 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

glenet's Issues

Train on custom dataset?

Hi, I am attempting to use my own dataset to train GLENet. My data is organised in the same way as KITTI however I am having some errors when attempting to modify the kitti code to my own data.
Specifically, I get the error in train.py:

File "train.py", line 205, in <module>
    main()
  File "train.py", line 118, in main
    model = build_network(model_cfg=cfg.MODEL, num_class=len(cfg.CLASS_NAMES), dataset=train_set)
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/__init__.py", line 17, in build_network
    model = build_detector(
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/detectors/__init__.py", line 29, in build_detector
    model = __all__[model_cfg.NAME](
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/detectors/voxel_rcnn.py", line 7, in __init__
    self.module_list = self.build_networks()
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/detectors/detector3d_template.py", line 47, in build_networks
    module, model_info_dict = getattr(self, 'build_%s' % module_name)(
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/detectors/detector3d_template.py", line 129, in build_dense_head
    dense_head_module = dense_heads.__all__[self.model_cfg.DENSE_HEAD.NAME](
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/dense_heads/anchor_head_single.py", line 10, in __init__
    super().__init__(
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/dense_heads/anchor_head_template.py", line 28, in __init__
    anchors, self.num_anchors_per_location = self.generate_anchors(
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/dense_heads/anchor_head_template.py", line 45, in generate_anchors
    anchors_list, num_anchors_per_location_list = anchor_generator.generate_anchors(feature_map_size)
  File "/home/jheaton/PycharmProjects/GLENet/tools/../pcdet/models/dense_heads/target_assigner/anchor_generator.py", line 37, in generate_anchors
    y_shifts = torch.arange(
RuntimeError: upper bound and larger bound inconsistent with step sign

Which I am unsure how to fix.

Would you be able to point me in the right direction as to how I can use my custom dataset?

Specifially, I would like to know how you generated the config files for the different datasets such that I can apply the same process to my dataset.

Thanks in advance

How to use other datasets for training?

I encountered a problem while using other autonomous driving datasets
->Self. prior, mux, logvarx=self. x_ Encoder (x)
(Pdb)
During breakpoint debugging, I found that batch_ There is a null value in dict ['gt'boxes_input '], may I ask why this is
Looking forward to your reply,thank you

python train.py --cfg_file cfgs/kitti_models/GLENet_VR2.yaml

epochs: 0%| | 0/80 [00:05<?, ?it/s]
Traceback (most recent call last): | 0/928 [00:00<?, ?it/s]
File "train.py", line 205, in
main()
File "train.py", line 156, in main
train_model(
File "/home/dell/project/pcdet/GLENet-main/tools/train_utils/train_utils.py", line 133, in train_model
accumulated_iter = train_one_epoch(
File "/home/dell/project/pcdet/GLENet-main/tools/train_utils/train_utils.py", line 47, in train_one_epoch
loss, tb_dict, disp_dict = model_func(model, batch)
File "/home/dell/project/pcdet/GLENet-main/tools/../pcdet/models/init.py", line 42, in model_func
ret_dict, tb_dict, disp_dict = model(batch_dict)
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/dell/project/pcdet/GLENet-main/tools/../pcdet/models/detectors/voxel_rcnn.py", line 14, in forward
loss, tb_dict, disp_dict = self.get_training_loss()
File "/home/dell/project/pcdet/GLENet-main/tools/../pcdet/models/detectors/voxel_rcnn.py", line 29, in get_training_loss
loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict)
File "/home/dell/project/pcdet/GLENet-main/tools/../pcdet/models/roi_heads/roi_head_template.py", line 281, in get_loss
rcnn_loss_reg, reg_tb_dict = self.get_box_reg_layer_loss(self.forward_ret_dict)
File "/home/dell/project/pcdet/GLENet-main/tools/../pcdet/models/roi_heads/voxelrcnn_kl_label_iou_head.py", line 104, in get_box_reg_layer_loss
label_var_log = torch.log(gt_uncertaintys_of_rois + 1e-10)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

Traceback (most recent call last):
File "/home/mi/GLENet/tools/train.py", line 209, in
main()
File "/home/mi/GLENet/tools/train.py", line 177, in main
merge_all_iters_to_one_epoch=args.merge_all_iters_to_one_epoch
File "/home/mi/GLENet/tools/train_utils/train_utils.py", line 140, in train_model
dataloader_iter=dataloader_iter
File "/home/mi/GLENet/tools/train_utils/train_utils.py", line 47, in train_one_epoch
loss, tb_dict, disp_dict = model_func(model, batch)
File "../pcdet/models/init.py", line 42, in model_func
ret_dict, tb_dict, disp_dict = model(batch_dict)
File "/home/mi/miniconda3/envs/pcdet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "../pcdet/models/detectors/voxel_rcnn.py", line 14, in forward
loss, tb_dict, disp_dict = self.get_training_loss()
File "../pcdet/models/detectors/voxel_rcnn.py", line 29, in get_training_loss
loss_rcnn, tb_dict = self.roi_head.get_loss(tb_dict)
File "../pcdet/models/roi_heads/roi_head_template.py", line 281, in get_loss
rcnn_loss_reg, reg_tb_dict = self.get_box_reg_layer_loss(self.forward_ret_dict)
File "../pcdet/models/roi_heads/voxelrcnn_kl_label_iou_head.py", line 105, in get_box_reg_layer_loss
label_var_log = torch.log(gt_uncertaintys_of_rois + 1e-10)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

I wonder why gt_ uncertaintys_ of_ rois returns a none value

how to infer a point cloud data

dear author, thanks for your help and i successfully build this project on ubuntu20.04.
following README.md,this project can train and test on kitti format dataset but how to infer a point cloud data only?
Here is my situation:

  1. prepare a road-traffic image
  2. use depth-anything to generate the estimated depth map
  3. leverage pseudo-lidar with fake parameter ,i generate a pseudo-lidar (point cloud)data.i check the data with python-pcl and its fine
    Here is my confusion: how can we infer this pseudo-lidar data with GLENet?how to visualize the GLENet output?

Generate Label Uncertainty with GLEnet: I reported an error when running step1.1:

Generate Label Uncertainty with GLEnet:

I reported an error when running step1.1:

2023-02-17 10:37:27,087 INFO Start training /exp20_gen(fold_0)
epochs: 0%| | 0/400 [00:05<?, ?it/s]
Traceback (most recent call last): | 0/111 [00:00<?, ?it/s]
File "train.py", line 247, in
main()
File "train.py", line 202, in main
train_model(
File "/home/dell/project/pcdet/GLENet-main/cvae_uncertainty/train_utils/train_utils.py", line 119, in train_model
accumulated_iter = train_one_epoch(
File "/home/dell/project/pcdet/GLENet-main/cvae_uncertainty/train_utils/train_utils.py", line 70, in train_one_epoch
loss.backward()
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/autograd/init.py", line 145, in backward
Variable._execution_engine.run_backward(
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)
Traceback (most recent call last):
File "train.py", line 247, in
main()
File "train.py", line 202, in main
train_model(
File "/home/dell/project/pcdet/GLENet-main/cvae_uncertainty/train_utils/train_utils.py", line 119, in train_model
accumulated_iter = train_one_epoch(
File "/home/dell/project/pcdet/GLENet-main/cvae_uncertainty/train_utils/train_utils.py", line 70, in train_one_epoch
loss.backward()
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/tensor.py", line 245, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/autograd/init.py", line 145, in backward
Variable._execution_engine.run_backward(
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)
Killing subprocess 3121397
Killing subprocess 3121398
Traceback (most recent call last):
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/distributed/launch.py", line 340, in
main()
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/distributed/launch.py", line 326, in main
sigkill_handler(signal.SIGTERM, None) # not coming back
File "/home/dell/anaconda3/envs/glenet/lib/python3.8/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler
raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/dell/anaconda3/envs/glenet/bin/python', '-u', 'train.py', '--local_rank=1', '--launcher', 'pytorch', '--cfg_file', 'cfgs/exp20_gen.yaml', '--tcp_port', '18889', '--max_ckpt_save_num', '10', '--workers', '1', '--extra_tag', 'fold_0']' returned non-zero exit status 1.

How to install spconv with docker

Firstsly, the link to spconv is wrong as it takes you to version 2 which is not compatible with this project.

You say you need to use their dockerfile when using PyTorch > 1.4, which I am.

Going to the correct version of spconv, found here - https://github.com/traveller59/spconv/tree/v1.2.1 - all it says re Docker is to run the command docker pull scrin/dev-spconv.

What do I do after this? There is no documentation for this at all. Any help would be appreciated.

Hello! In addition to generating uncertain labels for cars, I also generated uncertain labels for pedestrians and bicycles. After training, the AP value of the car has not changed much, but the AP value of the pedestrian and bicycle has decreased a lot. I want to ask what causes this?

Hello! In addition to generating uncertain labels for cars, I also generated uncertain labels for pedestrians and bicycles. After training, the AP value of the car has not changed much, but the AP value of the pedestrian and bicycle has decreased a lot. I want to ask what causes this? @Eaphan

FileNotFoundError: [Errno 2] No such file or directory: 'kitti/kitti_infos_train_ori.pkl'

I have an error in the step 1.3: Generate and Save Label Uncertainty
When I run 'change_gt_infos.py ', I cannot find 'kitti_infos_train_ori.pkl'.
Traceback (most recent call last):
File "change_gt_infos.py", line 14, in
with open(file_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'kitti/kitti_infos_train_ori.pkl'
In which step was this file generated?

low-beam LiDAR 3D Detection

Hi! I have try this modle to detect low-beam LiDAR datasets (32,16), but it can't detect any target. Do you have any suggestions for adjusting parameters?
Thanks!

I want to generate the indeterminate label of pedestrians and bicycles. How to do?

I also want to generate the indeterminate label of pedestrians and bicycles
Can you tell me which files need to be modified? Or you can tell me how to modify the following four files:

(1)GLENet/cvae_ uncertainty/cfgs/exp20_ gen_ ori.yaml

(2)GLENet/cvae_ uncertainty/dataset.py

(3)GLENet/cvae_ uncertainty/mapping_ uncertainty.py

(4)GLENet/cvae_ uncertainty/change_ gt_ infos.py

I have also modified these four files myself, and I have contacted you via email. I hope the teacher can see if I have modified them correctly.

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.