Eaphan / GLENet

GLENet: Boosting 3D Object Detectors with Generative Label Uncertainty Estimation [IJCV2023]
https://arxiv.org/abs/2207.02466
Apache License 2.0
183 stars 11 forks source link

Train on custom dataset? #12

Closed jamesheatonrdm closed 1 year ago

jamesheatonrdm commented 1 year ago

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

Eaphan commented 1 year ago

Your error seems to occur in the training of a detector. If you want to apply our method to your own dataset: 1) Prepare the data including ino.pkl and gt_database following the way of the KITTI dataset. 2) Train the GLENet and generate new info.pkl including label uncertainty. 3) Train the probabilistic object detectors. You can refer to the details in README.md.