file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
pcdet/models/backbones_3d/__init__.py | Python | from pcdet.models.backbones_3d.pointnet2_backbone import PointNet2Backbone, PointNet2MSG
from pcdet.models.backbones_3d.spconv_backbone import (
VoxelBackBone8x,
VoxelResBackBone8x,
)
from pcdet.models.backbones_3d.spconv_unet import UNetV2
__all__ = {
"VoxelBackBone8x": VoxelBackBone8x,
"UNetV2": UNet... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/pfe/__init__.py | Python | from pcdet.models.backbones_3d.pfe.voxel_set_abstraction import VoxelSetAbstraction
__all__ = {"VoxelSetAbstraction": VoxelSetAbstraction}
| yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/pfe/voxel_set_abstraction.py | Python | import torch
import torch.nn as nn
from pcdet.ops.pointnet2.pointnet2_stack import (
pointnet2_modules as pointnet2_stack_modules,
)
from pcdet.ops.pointnet2.pointnet2_stack import pointnet2_utils as pointnet2_stack_utils
from pcdet.utils import common_utils
def bilinear_interpolate_torch(im, x, y):
"""
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/pointnet2_backbone.py | Python | import torch
import torch.nn as nn
from pcdet.ops.pointnet2.pointnet2_batch import pointnet2_modules
from pcdet.ops.pointnet2.pointnet2_stack import (
pointnet2_modules as pointnet2_modules_stack,
)
from pcdet.ops.pointnet2.pointnet2_stack import pointnet2_utils as pointnet2_utils_stack
class PointNet2MSG(nn.Mod... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/spconv_backbone.py | Python | from functools import partial
import spconv
import torch.nn as nn
def post_act_block(
in_channels,
out_channels,
kernel_size,
indice_key=None,
stride=1,
padding=0,
conv_type="subm",
norm_fn=None,
):
if conv_type == "subm":
conv = spconv.SubMConv3d(
in_channels,... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/spconv_unet.py | Python | from functools import partial
import spconv
import torch
import torch.nn as nn
from pcdet.models.backbones_3d.spconv_backbone import post_act_block
from pcdet.utils import common_utils
class SparseBasicBlock(spconv.SparseModule):
expansion = 1
def __init__(
self, inplanes, planes, stride=1, downsam... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/vfe/__init__.py | Python | from pcdet.models.backbones_3d.vfe.mean_vfe import MeanVFE
from pcdet.models.backbones_3d.vfe.pillar_vfe import PillarVFE
from pcdet.models.backbones_3d.vfe.vfe_template import VFETemplate
__all__ = {"VFETemplate": VFETemplate, "MeanVFE": MeanVFE, "PillarVFE": PillarVFE}
| yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/vfe/mean_vfe.py | Python | import torch
from pcdet.models.backbones_3d.vfe.vfe_template import VFETemplate
class MeanVFE(VFETemplate):
def __init__(self, model_cfg, num_point_features, **kwargs):
super().__init__(model_cfg=model_cfg)
self.num_point_features = num_point_features
def get_output_feature_dim(self):
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/vfe/pillar_vfe.py | Python | import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.models.backbones_3d.vfe.vfe_template import VFETemplate
class PFNLayer(nn.Module):
def __init__(self, in_channels, out_channels, use_norm=True, last_layer=False):
super().__init__()
self.last_vfe = last_layer
s... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/backbones_3d/vfe/vfe_template.py | Python | import torch.nn as nn
class VFETemplate(nn.Module):
def __init__(self, model_cfg, **kwargs):
super().__init__()
self.model_cfg = model_cfg
def get_output_feature_dim(self):
raise NotImplementedError
def forward(self, **kwargs):
"""
Args:
**kwargs:
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/__init__.py | Python | from pcdet.models.dense_heads.anchor_head_multi import AnchorHeadMulti
from pcdet.models.dense_heads.anchor_head_single import AnchorHeadSingle
from pcdet.models.dense_heads.anchor_head_template import AnchorHeadTemplate
from pcdet.models.dense_heads.point_head_box import PointHeadBox
from pcdet.models.dense_heads.poin... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/anchor_head_multi.py | Python | import numpy as np
import torch
import torch.nn as nn
from pcdet.models.backbones_2d import BaseBEVBackbone
from pcdet.models.dense_heads.anchor_head_template import AnchorHeadTemplate
class SingleHead(BaseBEVBackbone):
def __init__(
self,
model_cfg,
input_channels,
num_class,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/anchor_head_single.py | Python | import numpy as np
import torch.nn as nn
from pcdet.models.dense_heads.anchor_head_template import AnchorHeadTemplate
class AnchorHeadSingle(AnchorHeadTemplate):
def __init__(
self,
model_cfg,
input_channels,
num_class,
class_names,
grid_size,
point_cloud_r... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/anchor_head_template.py | Python | import numpy as np
import torch
import torch.nn as nn
from pcdet.models.dense_heads.target_assigner.anchor_generator import AnchorGenerator
from pcdet.models.dense_heads.target_assigner.atss_target_assigner import (
ATSSTargetAssigner,
)
from pcdet.models.dense_heads.target_assigner.axis_aligned_target_assigner im... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/point_head_box.py | Python | import torch
from pcdet.models.dense_heads.point_head_template import PointHeadTemplate
from pcdet.utils import box_coder_utils, box_utils
class PointHeadBox(PointHeadTemplate):
"""
A simple point-based segmentation head, which are used for PointRCNN.
Reference Paper: https://arxiv.org/abs/1812.04244
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/point_head_simple.py | Python | import torch
from pcdet.models.dense_heads.point_head_template import PointHeadTemplate
from pcdet.utils import box_utils
class PointHeadSimple(PointHeadTemplate):
"""
A simple point-based segmentation head, which are used for PV-RCNN keypoint segmentaion.
Reference Paper: https://arxiv.org/abs/1912.1319... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/point_head_template.py | Python | import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.ops.roiaware_pool3d import roiaware_pool3d_utils
from pcdet.utils import common_utils, loss_utils
class PointHeadTemplate(nn.Module):
def __init__(self, model_cfg, num_class):
super().__init__()
self.model_cfg = model_c... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/point_intra_part_head.py | Python | import torch
from pcdet.models.dense_heads.point_head_template import PointHeadTemplate
from pcdet.utils import box_coder_utils, box_utils
class PointIntraPartOffsetHead(PointHeadTemplate):
"""
Point-based head for predicting the intra-object part locations.
Reference Paper: https://arxiv.org/abs/1907.03... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/target_assigner/anchor_generator.py | Python | import torch
class AnchorGenerator(object):
def __init__(self, anchor_range, anchor_generator_config):
super().__init__()
self.anchor_generator_cfg = anchor_generator_config
self.anchor_range = anchor_range
self.anchor_sizes = [
config["anchor_sizes"] for config in anch... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/target_assigner/atss_target_assigner.py | Python | import torch
from pcdet.ops.iou3d_nms import iou3d_nms_utils
from pcdet.utils import common_utils
class ATSSTargetAssigner(object):
"""
Reference: https://arxiv.org/abs/1912.02424
"""
def __init__(self, topk, box_coder, match_height=False):
self.topk = topk
self.box_coder = box_coder... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/dense_heads/target_assigner/axis_aligned_target_assigner.py | Python | import numpy as np
import torch
from pcdet.ops.iou3d_nms import iou3d_nms_utils
from pcdet.utils import box_utils
class AxisAlignedTargetAssigner(object):
def __init__(self, model_cfg, class_names, box_coder, match_height=False):
super().__init__()
anchor_generator_cfg = model_cfg.ANCHOR_GENERAT... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/PartA2_net.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
class PartA2Net(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(se... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/__init__.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
from pcdet.models.detectors.PartA2_net import PartA2Net
from pcdet.models.detectors.point_rcnn import PointRCNN
from pcdet.models.detectors.pointpillar import PointPillar
from pcdet.models.detectors.pv_rcnn import PVRCNN
from pcdet.models.detecto... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/detector3d_template.py | Python | import os
import torch
import torch.nn as nn
from pcdet.config import cfg
from pcdet.models import backbones_2d, backbones_3d, dense_heads, roi_heads
from pcdet.models.backbones_2d import map_to_bev
from pcdet.models.backbones_3d import pfe, vfe
from pcdet.models.model_utils import model_nms_utils
from pcdet.ops.iou3... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/point_rcnn.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
class PointRCNN(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(se... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/pointpillar.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
class PointPillar(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/pv_rcnn.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
class PVRCNN(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(self,... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/second_net.py | Python | from pcdet.models.detectors.detector3d_template import Detector3DTemplate
class SECONDNet(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(se... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/detectors/second_net_iou.py | Python | import torch
from pcdet.models.detectors.detector3d_template import Detector3DTemplate
from pcdet.models.model_utils.model_nms_utils import class_agnostic_nms
from pcdet.ops.roiaware_pool3d import roiaware_pool3d_utils
class SECONDNetIoU(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/model_utils/dsnorm.py | Python | """
This is implemented refer to https://github.com/thuml/TransNorm
Copyright: Jihan Yang from 2020 - present
"""
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter
import torch
import itertools
class DSNorm(Module):
def __ini... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/model_utils/model_nms_utils.py | Python | import torch
from pcdet.ops.iou3d_nms import iou3d_nms_utils
def class_agnostic_nms(box_scores, box_preds, nms_config, score_thresh=None):
src_box_scores = box_scores
if score_thresh is not None:
scores_mask = box_scores >= score_thresh
box_scores = box_scores[scores_mask]
box_preds =... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/__init__.py | Python | from pcdet.models.roi_heads.partA2_head import PartA2FCHead
from pcdet.models.roi_heads.pointrcnn_head import PointRCNNHead
from pcdet.models.roi_heads.pvrcnn_head import PVRCNNHead
from pcdet.models.roi_heads.roi_head_template import RoIHeadTemplate
from pcdet.models.roi_heads.second_head import SECONDHead
__all__ = ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/partA2_head.py | Python | import numpy as np
import spconv
import torch
import torch.nn as nn
from pcdet.models.roi_heads.roi_head_template import RoIHeadTemplate
from pcdet.ops.roiaware_pool3d import roiaware_pool3d_utils
class PartA2FCHead(RoIHeadTemplate):
def __init__(self, input_channels, model_cfg, num_class=1):
super().__i... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/pointrcnn_head.py | Python | import torch
import torch.nn as nn
from pcdet.models.roi_heads.roi_head_template import RoIHeadTemplate
from pcdet.ops.pointnet2.pointnet2_batch import pointnet2_modules
from pcdet.ops.roipoint_pool3d import roipoint_pool3d_utils
from pcdet.utils import common_utils
class PointRCNNHead(RoIHeadTemplate):
def __in... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/pvrcnn_head.py | Python | import torch.nn as nn
from pcdet.models.roi_heads.roi_head_template import RoIHeadTemplate
from pcdet.ops.pointnet2.pointnet2_stack import (
pointnet2_modules as pointnet2_stack_modules,
)
from pcdet.utils import common_utils
class PVRCNNHead(RoIHeadTemplate):
def __init__(self, input_channels, model_cfg, nu... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/roi_head_template.py | Python | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.models.model_utils.model_nms_utils import class_agnostic_nms
from pcdet.models.roi_heads.target_assigner.proposal_target_layer import (
ProposalTargetLayer,
)
from pcdet.utils import box_coder_utils, common_utils, loss... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/second_head.py | Python | import torch
import torch.nn as nn
from pcdet.models.roi_heads.roi_head_template import RoIHeadTemplate
from pcdet.utils import common_utils, loss_utils
class SECONDHead(RoIHeadTemplate):
def __init__(self, input_channels, model_cfg, num_class=1):
super().__init__(num_class=num_class, model_cfg=model_cfg... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/models/roi_heads/target_assigner/proposal_target_layer.py | Python | import numpy as np
import torch
import torch.nn as nn
from pcdet.ops.iou3d_nms import iou3d_nms_utils
class ProposalTargetLayer(nn.Module):
def __init__(self, roi_sampler_cfg):
super().__init__()
self.roi_sampler_cfg = roi_sampler_cfg
def forward(self, batch_dict):
"""
Args:
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/iou3d_nms_utils.py | Python | """
3D IoU Calculation and Rotated NMS
Written by Shaoshuai Shi
All Rights Reserved 2019-2020.
"""
import torch
from pcdet.ops.iou3d_nms import iou3d_nms_cuda
from pcdet.utils import common_utils
def boxes_bev_iou_cpu(boxes_a, boxes_b):
"""
Args:
boxes_a: (N, 7) [x, y, z, dx, dy, dz, heading]
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_cpu.cpp | C++ | /*
3D Rotated IoU Calculation (CPU)
Written by Shaoshuai Shi
All Rights Reserved 2020.
*/
#include "iou3d_cpu.h"
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <math.h>
#include <stdio.h>
#include <torch/extension.h>
#include <torch/serialize/tensor.h>
#include <vector>
#define CHECK_CUDA(x) ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_cpu.h | C/C++ Header | #ifndef IOU3D_CPU_H
#define IOU3D_CPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
int boxes_iou_bev_cpu(at::Tensor boxes_a_tensor,
at::Tensor boxes_b_tensor,
at::Tensor ans_iou_tensor);
#endif
| yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_nms.cpp | C++ | /*
3D IoU Calculation and Rotated NMS(modified from 2D NMS written by others)
Written by Shaoshuai Shi
All Rights Reserved 2019-2020.
*/
#include "iou3d_nms.h"
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/extension.h>
#include <torch/serialize/tensor.h>
#include <vector>
#define CHECK_CUDA(x) ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_nms.h | C/C++ Header | #ifndef IOU3D_NMS_H
#define IOU3D_NMS_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
int boxes_overlap_bev_gpu(at::Tensor boxes_a,
at::Tensor boxes_b,
at::Tensor ans_overlap);
int boxes_iou_bev_gpu(at::Tensor... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_nms_api.cpp | C++ | #include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/extension.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "iou3d_cpu.h"
#include "iou3d_nms.h"
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("boxes_overlap_bev_gpu", &boxes_overlap_bev_gpu,
"oriented boxes overlap");
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/iou3d_nms/src/iou3d_nms_kernel.cu | CUDA | /*
3D IoU Calculation and Rotated NMS(modified from 2D NMS written by others)
Written by Shaoshuai Shi
All Rights Reserved 2019-2020.
*/
#include <stdio.h>
#define THREADS_PER_BLOCK 16
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DEBUG
const int THREADS_PER_BLOCK_NMS = sizeof(unsigned long long) * 8;
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/pointnet2_modules.py | Python | from typing import List
import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.ops.pointnet2.pointnet2_batch import pointnet2_utils
class _PointnetSAModuleBase(nn.Module):
def __init__(self):
super().__init__()
self.npoint = None
self.groupers = None
self.m... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/pointnet2_utils.py | Python | from typing import Tuple
import torch
import torch.nn as nn
from torch.autograd import Function, Variable
from pcdet.ops.pointnet2.pointnet2_batch import pointnet2_batch_cuda as pointnet2
class FurthestPointSampling(Function):
@staticmethod
def forward(ctx, xyz: torch.Tensor, npoint: int) -> torch.Tensor:
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/ball_query.cpp | C++ | /*
batch version of ball query, modified from the original implementation of
official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "ball_query_gpu.h"
#define CHECK_CUDA(x) ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/ball_query_gpu.cu | CUDA | /*
batch version of ball query, modified from the original implementation of
official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "ball_query_gpu.h"
#include "cuda_utils.h"
__global__ void ball_query_kernel_fast(int b,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/ball_query_gpu.h | C/C++ Header | #ifndef _BALL_QUERY_GPU_H
#define _BALL_QUERY_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
int ball_query_wrapper_fast(int b,
int n,
int m,
float radius,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/cuda_utils.h | C/C++ Header | #ifndef _CUDA_UTILS_H
#define _CUDA_UTILS_H
#include <cmath>
#define TOTAL_THREADS 1024
#define THREADS_PER_BLOCK 256
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
inline int opt_n_threads(int work_size) {
const int pow_2 = std::log(static_cast<double>(work_size)) / std::log(2.0);
return max(min(1 << po... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/group_points.cpp | C++ | /*
batch version of point grouping, modified from the original implementation of
official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "group_points_gpu.h"
int group_points_grad_... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/group_points_gpu.cu | CUDA | /*
batch version of point grouping, modified from the original implementation of
official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "group_points_gpu.h"
__global__ void group_points_grad_kernel_fast(
int b,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/group_points_gpu.h | C/C++ Header | #ifndef _GROUP_POINTS_GPU_H
#define _GROUP_POINTS_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
int group_points_wrapper_fast(int b,
int c,
int n,
int npoints,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/interpolate.cpp | C++ | /*
batch version of point interpolation, modified from the original implementation
of official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <torch/serialize/tensor.h>
#include <... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/interpolate_gpu.cu | CUDA | /*
batch version of point interpolation, modified from the original implementation
of official PointNet++ codes. Written by Shaoshuai Shi All Rights Reserved 2018.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "interpolate_gpu.h"
__global__ void three_nn_kernel_fast(int... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/interpolate_gpu.h | C/C++ Header | #ifndef _INTERPOLATE_GPU_H
#define _INTERPOLATE_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
void three_nn_wrapper_fast(int b,
int n,
int m,
at::Tensor unknown_tensor,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/pointnet2_api.cpp | C++ | #include <torch/extension.h>
#include <torch/serialize/tensor.h>
#include "ball_query_gpu.h"
#include "group_points_gpu.h"
#include "interpolate_gpu.h"
#include "sampling_gpu.h"
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("ball_query_wrapper", &ball_query_wrapper_fast,
"ball_query_wrapper_fast");
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/sampling.cpp | C++ | /*
batch version of point sampling and gathering, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2018.
*/
#include <ATen/cuda/CUDAContext.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "sampling_gpu.h"
int gather_points_wrapper... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/sampling_gpu.cu | CUDA | /*
batch version of point sampling and gathering, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2018.
*/
#include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "sampling_gpu.h"
__global__ void gather_points_kernel_fast(int b,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_batch/src/sampling_gpu.h | C/C++ Header | #ifndef _SAMPLING_GPU_H
#define _SAMPLING_GPU_H
#include <ATen/cuda/CUDAContext.h>
#include <torch/serialize/tensor.h>
#include <vector>
int gather_points_wrapper_fast(int b,
int c,
int n,
int npoints,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_modules.py | Python | from typing import List
import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.ops.pointnet2.pointnet2_stack import pointnet2_utils
class StackSAModuleMSG(nn.Module):
def __init__(
self,
*,
radii: List[float],
nsamples: List[int],
mlps: List[List[in... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/pointnet2_utils.py | Python | import torch
import torch.nn as nn
from torch.autograd import Function, Variable
from pcdet.ops.pointnet2.pointnet2_stack import pointnet2_stack_cuda as pointnet2
class BallQuery(Function):
@staticmethod
def forward(
ctx,
radius: float,
nsample: int,
xyz: torch.Tensor,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/ball_query.cpp | C++ | /*
Stacked-batch-data version of ball query, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "ball_query_gpu.h"
#define CH... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/ball_query_gpu.cu | CUDA | /*
Stacked-batch-data version of ball query, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "ball_query_gpu.h"
#include "cuda_utils.h"
__global__ void ball_query_kerne... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/ball_query_gpu.h | C/C++ Header | /*
Stacked-batch-data version of ball query, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#ifndef _STACK_BALL_QUERY_GPU_H
#define _STACK_BALL_QUERY_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tens... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/cuda_utils.h | C/C++ Header | #ifndef _STACK_CUDA_UTILS_H
#define _STACK_CUDA_UTILS_H
#include <cmath>
#define THREADS_PER_BLOCK 256
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
#endif
| yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/group_points.cpp | C++ | /*
Stacked-batch-data version of point grouping, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "group_points_gpu.h"
#def... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/group_points_gpu.cu | CUDA | /*
Stacked-batch-data version of point grouping, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "group_points_gpu.h"
__global__ void group_points_grad_kernel_sta... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/group_points_gpu.h | C/C++ Header | /*
Stacked-batch-data version of point grouping, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#ifndef _STACK_GROUP_POINTS_GPU_H
#define _STACK_GROUP_POINTS_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serial... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp | C++ | /*
Stacked-batch-data version of point interpolation, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <torch/serialize/ten... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.cu | CUDA | /*
Stacked-batch-data version of point interpolation, modified from the original
implementation of official PointNet++ codes. Written by Shaoshuai Shi All Rights
Reserved 2019-2020.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "interpolate_gpu.h"
__global__ void three_... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate_gpu.h | C/C++ Header | #ifndef _INTERPOLATE_GPU_H
#define _INTERPOLATE_GPU_H
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <torch/serialize/tensor.h>
#include <vector>
void three_nn_wrapper_stack(at::Tensor unknown_tensor,
at::Tensor unknown_batch_cnt_tensor,
at::Tensor kn... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/pointnet2_api.cpp | C++ | #include <torch/extension.h>
#include <torch/serialize/tensor.h>
#include "ball_query_gpu.h"
#include "group_points_gpu.h"
#include "interpolate_gpu.h"
#include "sampling_gpu.h"
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("ball_query_wrapper", &ball_query_wrapper_stack,
"ball_query_wrapper_stack");... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/sampling.cpp | C++ | #include <ATen/cuda/CUDAContext.h>
#include <torch/serialize/tensor.h>
#include <vector>
#include "sampling_gpu.h"
#define CHECK_CUDA(x) \
do { \
if (!x.type().is_cuda()) { ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/sampling_gpu.cu | CUDA | #include <stdio.h>
#include <stdlib.h>
#include "cuda_utils.h"
#include "sampling_gpu.h"
#define TOTAL_THREADS 1024
inline int opt_n_threads(int work_size) {
const int pow_2 = std::log(static_cast<double>(work_size)) / std::log(2.0);
return max(min(1 << pow_2, TOTAL_THREADS), 1);
}
__device__ void __update(... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/pointnet2/pointnet2_stack/src/sampling_gpu.h | C/C++ Header | #ifndef _SAMPLING_GPU_H
#define _SAMPLING_GPU_H
#include <ATen/cuda/CUDAContext.h>
#include <torch/serialize/tensor.h>
#include <vector>
int furthest_point_sampling_wrapper(int b,
int n,
int m,
at::Tensor poin... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roiaware_pool3d/roiaware_pool3d_utils.py | Python | import torch
import torch.nn as nn
from torch.autograd import Function
from pcdet.ops.roiaware_pool3d import roiaware_pool3d_cuda
from pcdet.utils import common_utils
def points_in_boxes_cpu(points, boxes):
"""
Args:
points: (num_points, 3)
boxes: [x, y, z, dx, dy, dz, heading], (x, y, z) is ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roiaware_pool3d/src/roiaware_pool3d.cpp | C++ | /*
RoI-aware point cloud feature pooling
Reference paper: https://arxiv.org/abs/1907.03670
Written by Shaoshuai Shi
All Rights Reserved 2019-2020.
*/
#include <assert.h>
#include <torch/extension.h>
#include <torch/serialize/tensor.h>
//#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor
//... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roiaware_pool3d/src/roiaware_pool3d_kernel.cu | CUDA | /*
RoI-aware point cloud feature pooling
Written by Shaoshuai Shi
All Rights Reserved 2019-2020.
*/
#include <math.h>
#include <stdio.h>
#define THREADS_PER_BLOCK 256
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DEBUG
__device__ inline void lidar_to_local_coords(float shift_x,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roipoint_pool3d/roipoint_pool3d_utils.py | Python | import torch
import torch.nn as nn
from torch.autograd import Function
from pcdet.ops.roipoint_pool3d import roipoint_pool3d_cuda
from pcdet.utils import box_utils
class RoIPointPool3d(nn.Module):
def __init__(self, num_sampled_points=512, pool_extra_width=1.0):
super().__init__()
self.num_sample... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roipoint_pool3d/src/roipoint_pool3d.cpp | C++ | #include <torch/extension.h>
#include <torch/serialize/tensor.h>
#define CHECK_CUDA(x) \
do { \
if (!x.type().is_cuda()) { \
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/ops/roipoint_pool3d/src/roipoint_pool3d_kernel.cu | CUDA | /*
Point cloud feature pooling
Written by Shaoshuai Shi
All Rights Reserved 2018.
*/
#include <math.h>
#include <stdio.h>
#define THREADS_PER_BLOCK 256
#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
// #define DEBUG
__device__ inline void lidar_to_local_coords(float shift_x,
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/box_coder_utils.py | Python | import numpy as np
import torch
class ResidualCoder(object):
def __init__(self, code_size=7, encode_angle_by_sincos=False, **kwargs):
super().__init__()
self.code_size = code_size
self.encode_angle_by_sincos = encode_angle_by_sincos
if self.encode_angle_by_sincos:
self.... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/box_utils.py | Python | import copy
import numpy as np
import scipy
import torch
from scipy.spatial import Delaunay
from pcdet.ops.roiaware_pool3d import roiaware_pool3d_utils
from pcdet.utils import common_utils
def in_hull(p, hull):
"""
:param p: (N, K) test points
:param hull: (M, K) M corners of a box
:return (N) bool
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/cal_quality_utils.py | Python | import copy
import os
import torch
import argparse
import pickle
import glob
from pcdet.datasets.kitti.kitti_object_eval_python import eval as kitti_eval
import numpy as np
from pcdet.utils import common_utils, box_utils
from pcdet.ops.iou3d_nms import iou3d_nms_utils
class QualityMetric(object):
def __init__(se... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/calibration_kitti.py | Python | import numpy as np
def get_calib_from_file(calib_file):
with open(calib_file) as f:
lines = f.readlines()
obj = lines[2].strip().split(" ")[1:]
P2 = np.array(obj, dtype=np.float32)
obj = lines[3].strip().split(" ")[1:]
P3 = np.array(obj, dtype=np.float32)
obj = lines[4].strip().split(... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/common_utils.py | Python | import copy
import logging
import os
import pickle
import random
import shutil
import subprocess
import numpy as np
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
def seed_everything():
random.seed(0)
np.random.seed(0)
torch.manual_seed(0)
torch.cuda.manual_seed(0)
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/commu_utils.py | Python | """
This file contains primitives for multi-gpu communication.
This is useful when doing distributed training.
deeply borrow from maskrcnn-benchmark
"""
import pickle
import time
import torch
import torch.distributed as dist
def get_world_size():
if not dist.is_available():
return 1
if not dist.is_... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/loss_utils.py | Python | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from pcdet.utils import box_utils
class SigmoidFocalClassificationLoss(nn.Module):
"""
Sigmoid focal cross entropy loss.
"""
def __init__(self, gamma: float = 2.0, alpha: float = 0.25):
"""
Args:
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/memory_ensemble_utils.py | Python | import torch
import numpy as np
from scipy.optimize import linear_sum_assignment
from pcdet.utils import common_utils
from pcdet.ops.iou3d_nms import iou3d_nms_utils
from pcdet.models.model_utils.model_nms_utils import class_agnostic_nms
def consistency_ensemble(gt_infos_a, gt_infos_b, memory_ensemble_cfg):
"""
... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/object3d_kitti.py | Python | import numpy as np
def get_objects_from_label(label_file):
with open(label_file, "r") as f:
lines = f.readlines()
objects = [Object3d(line) for line in lines]
return objects
def cls_type_to_id(cls_type):
type_to_id = {"Car": 1, "Pedestrian": 2, "Cyclist": 3, "Van": 4}
if cls_type not in ... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
pcdet/utils/self_training_utils.py | Python | import torch
import os
import glob
import tqdm
import numpy as np
import torch.distributed as dist
from pcdet.config import cfg
from pcdet.models import load_data_to_gpu
from pcdet.utils import common_utils, commu_utils, memory_ensemble_utils
import pickle as pkl
import re
from pcdet.models.model_utils.dsnorm import se... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
setup.py | Python | import os
import subprocess
from pathlib import Path
from setuptools import find_packages, setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
def make_cuda_ext(name, module, sources):
print(f"Making CUDA extension: {name}...")
cuda_ext = CUDAExtension(
name="%s.%s" % (module, n... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/eval/summerize_json.py | Python | import json
import re
from pathlib import Path
_pwd = Path(__file__).parent.absolute()
_project_root = _pwd.parent.parent
_eval_root = _project_root / "eval"
config_to_json_names = {
"mini_translator_none": [
"da_waymo_nuscenes_mini_max_sweeps_1_translator_None.json",
"da_waymo_nuscenes_mini_max_s... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/eval_utils/eval_utils.py | Python | import pickle
import time
import numpy as np
import torch
import tqdm
from pcdet.models import load_data_to_gpu
from pcdet.models.model_utils.dsnorm import set_ds_target
from pcdet.utils import common_utils
def statistics_info(cfg, ret_dict, metric, disp_dict):
for cur_thresh in cfg.MODEL.POST_PROCESSING.RECALL... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/eval_utils/eval_utils_with_copypaste.py | Python | import copy
import pickle
import time
from pathlib import Path
import camtools as ct
import numpy as np
import open3d as o3d
import torch
import tqdm
from lit.copy_paste_utils import copy_paste_nuscenes_to_kitti, recompute_voxels
from lit.recon_utils import bboxes_to_lineset
from pcdet.datasets.kitti.kitti_dataset im... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/eval_utils/eval_utils_with_translation.py | Python | import pickle
import time
import numpy as np
import torch
import tqdm
from visual_utils import open3d_vis_utils as V
from lidartranslator.api import nuscenes_to_waymo
from pcdet.models import load_data_to_gpu
from pcdet.models.model_utils.dsnorm import set_ds_target
from pcdet.utils import common_utils
def statisti... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/eval_utils/model_key_mapping.py | Python | import os, sys
import torch
src = torch.load(sys.argv[1]) # source
src = src["model_state"]
def second_key_mapping():
src = torch.load(sys.argv[1])
src = src["model_state"]
key_mapping = {
"rpn_net.conv": "backbone_3d.conv",
"rpn_head.deblocks.": "backbone_2d.deblocks.",
"rpn_h... | yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
tools/scripts/dist_test.sh | Shell | #!/usr/bin/env bash
set -x
NGPUS=$1
PY_ARGS=${@:2}
torchrun --nproc_per_node=${NGPUS} test.py --launcher pytorch ${PY_ARGS}
| yxlao/lit | 24 | (NeurIPS 2024) LiT: Unifying LiDAR "Languages" with LiDAR Translator | Python | yxlao | Yixing Lao | HKU-CS |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.