### Running TorchSparse Plugin Demo Container Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/README.md This command starts a Docker container with all necessary dependencies installed for TorchSparse plugins. It mounts the KITTI and NuScenes datasets into the container for use in the demos. ```bash docker run -it --gpus all --mount type=bind,source=,target=/root/data/kitti --mount type=bind,source=,target=/root/data/nuscenes ioeddk/torchsparse_plugin_demo:latest ``` -------------------------------- ### Install TorchSparse using Installation Script Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md Install TorchSparse by running the provided Python script, which automatically handles dependency checks and installation. ```bash python -c "$(curl -fsSL https://raw.githubusercontent.com/mit-han-lab/torchsparse/master/install.py)" ``` -------------------------------- ### Install TorchSparse from Source Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md Install the library directly from the source code using setup.py. This method is useful if pre-built packages are not suitable. ```bash python setup.py install ``` -------------------------------- ### Install TorchSparse using Pip from Git Repository Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md Install TorchSparse directly from its GitHub repository using pip, without needing to clone the repository locally. ```bash pip install git+https://github.com/mit-han-lab/torchsparse.git ``` -------------------------------- ### Check CUDA Installations Source: https://github.com/mit-han-lab/torchsparse/blob/master/docs/FAQ.md Lists directories related to CUDA installations to help identify potential conflicts or multiple versions. ```bash ls /usr/local/cuda* -d ``` -------------------------------- ### Check CUDA Installation for PyTorch Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md Ensure PyTorch was installed with CUDA support if GPU acceleration is required for TorchSparse. ```bash python -c "import torch; print(torch.version.cuda)" >>> 11.3 ``` -------------------------------- ### Check PyTorch Version Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md Verify that PyTorch version 1.9.0 or higher is installed. This is a prerequisite for installing TorchSparse. ```bash python -c "import torch; print(torch.__version__)" >>> 1.10.0 ``` -------------------------------- ### Compile TorchSparse for Specific GPU Architectures Source: https://github.com/mit-han-lab/torchsparse/blob/master/docs/FAQ.md Installs or upgrades TorchSparse, specifying the target CUDA compute architectures using the TORCH_CUDA_ARCH_LIST environment variable. Useful for cross-compilation or targeting specific GPU types. ```bash TORCH_CUDA_ARCH_LIST="7.0;7.5" pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git ``` -------------------------------- ### Verify CUDA and PyTorch Compatibility Source: https://github.com/mit-han-lab/torchsparse/blob/master/docs/FAQ.md Checks if the installed NVCC (CUDA compiler) and PyTorch are using the same CUDA version. ```bash nvcc --version python -c "import torch; print(torch.version.cuda);" ``` -------------------------------- ### Limit Parallel Compilation to Prevent Memory Errors Source: https://github.com/mit-han-lab/torchsparse/blob/master/docs/FAQ.md Installs or upgrades TorchSparse while limiting the number of parallel compilation jobs using the MAX_JOBS environment variable. This helps prevent 'Killed' errors due to out-of-memory issues during compilation. ```bash MAX_JOBS=2 pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git ``` -------------------------------- ### Run SECOND Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Configures and runs the SECOND model demo. Prints standard output from the inference process. ```python second_registry = { 'ckpt_before': 'SECOND/second_7862.pth', 'ckpt_after': 'SECOND/second_7862.pth', 'openpc_cfg_path': 'kitti_models/second.yaml', 'torchsparse_cfg_path': 'kitti_models/second_plugin.yaml', 'v_spconv': 1 } second_results = openpc_single_demo(second_registry, base_paths, convert=True) print(second_results.stdout) ``` -------------------------------- ### Run VoxelNeXt Demo with Conversion Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Prepares paths and runs the VoxelNeXt model demo using a specialized converter. Prints standard error from the inference process. ```python from converter_voxelnext import convert_voxelnext voxelnext_registry = { 'ckpt_before': 'VoxelNeXt/voxelnext_nuscenes_kernel1.pth', 'ckpt_after': 'VoxelNeXt/voxelnext_nuscenes_kernel1.pth', 'openpc_cfg_path': 'nuscenes_models/cbgs_voxel0075_voxelnext.yaml', 'torchsparse_cfg_path': 'nuscenes_models/cbgs_voxel0075_voxelnext.yaml', 'v_spconv': 2 } # pre-process paths openpc_cfg_path = os.path.join(base_paths['openpc_cfg_base_path'], voxelnext_registry['openpc_cfg_path']) torchsparse_cfg_path = os.path.join(base_paths['torchsparse_cfg_base_path'], voxelnext_registry['torchsparse_cfg_path']) test_file_path = os.path.join(base_paths['openpc_path'], "tools/test.py") openpc_model_path = os.path.join(base_paths['openpc_model_base_path'], voxelnext_registry['ckpt_before']) torchsparse_model_path = os.path.join(base_paths['torchsparse_model_base_path'], voxelnext_registry['ckpt_after']) # convert_voxelnext( # ckpt_before=openpc_model_path, # ckpt_after=torchsparse_model_path, # ) command = f'bash -c "conda activate torchsparse; python {test_file_path} --cfg_file {torchsparse_cfg_path} --ckpt {torchsparse_model_path}"' voxelnext_results = subprocess.run(command, capture_output=True, text=True, shell=True, executable='/bin/bash') print(voxelnext_results.stderr) ``` -------------------------------- ### PV-RCNN Configuration and Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Sets up the configuration for the PV-RCNN model and runs a single inference demo. This snippet is useful for performing object detection with PV-RCNN on a dataset. ```python pv_rcnn_config = { "ckpt_before": "PV-RCNN/pv_rcnn_8xb2-80e_kitti-3d-3class_20221117_234428-b384d22f.pth", "ckpt_after": "PV-RCNN/pv_rcnn_8xb2-80e_kitti-3d-3class_20221117_234428-b384d22f.pth", "cfg_path": "pv_rcnn/pv_rcnn_8xb2-80e_kitti-3d-3class.py", "v_spconv": 1, "cfg_options": "--cfg-options test_evaluator.pklfile_prefix=outputs/torchsparse/pv_rcnn --cfg-options model.middle_encoder.type=SparseEncoderTS --cfg-options model.points_encoder.type=VoxelSetAbstractionTS" } pv_rcnn_results = mmdet3d_single_demo(pv_rcnn_config, base_paths, convert=True) print(pv_rcnn_results.stderr) ``` -------------------------------- ### Run MMDetection3D Demo with TorchSparse Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/README.md Execute the MMDetection3D test script with TorchSparse model checkpoints and configuration options. Ensure all paths and options are correctly specified for your model. ```bash python --task lidar_det ``` -------------------------------- ### Run PV-RCNN Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Configures and runs the PV-RCNN model demo. Prints standard output from the inference process. ```python pv_rcnn_registry = { 'ckpt_before': 'PV-RCNN/pv_rcnn_8369.pth', 'ckpt_after': 'PV-RCNN/pv_rcnn_8369.pth', 'openpc_cfg_path': 'kitti_models/pv_rcnn.yaml', 'torchsparse_cfg_path': 'kitti_models/pv_rcnn_plugin.yaml', 'v_spconv': 1 } pv_rcnn_results = openpc_single_demo(pv_rcnn_registry, base_paths, convert=True) print(pv_rcnn_results.stdout) ``` -------------------------------- ### Run OpenPCDet Evaluation with TorchSparse Model Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/README.md Execute the evaluation script after converting weights and setting up the environment. Specify the paths to the OpenPCDet test file, TorchSparse config, and the converted model checkpoint. ```bash python --cfg_file --ckpt ``` -------------------------------- ### Load TorchSparse Weight Conversion Module Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Loads the weight conversion module from a local file. Ensure 'converter.py' is in the parent directory. ```python import importlib.util import sys, os from pathlib import Path import subprocess # Define the relative path to the file relative_path = "../converter.py" file_path = Path().resolve() / relative_path # Add the directory containing the file to sys.path sys.path.append(str(file_path.parent)) # Load the module spec = importlib.util.spec_from_file_location("convert_weights", str(file_path)) converter = importlib.util.module_from_spec(spec) spec.loader.exec_module(converter) converter = getattr(converter, "convert_weights") ``` -------------------------------- ### Define Model Configuration for SECOND Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Configuration dictionary for the SECOND 3D car detection model, specifying checkpoint paths, configuration file, and TorchSparse specific settings. ```python second_3d_car = { 'ckpt_before': 'SECOND/second_hv_secfpn_8xb6-80e_kitti-3d-car-75d9305e.pth', 'ckpt_after': 'SECOND/second_hv_secfpn_8xb6-80e_kitti-3d-car-75d9305e.pth', 'cfg_path': 'second/second_hv_secfpn_8xb6-80e_kitti-3d-car.py', 'v_spconv': 2, 'cfg_options': "--cfg-options test_evaluator.pklfile_prefix=outputs/torchsparse/second --cfg-options model.middle_encoder.type=SparseEncoderTS" } ``` -------------------------------- ### Run Part-A2 Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Configures and runs the Part-A2 model demo. Prints standard error from the inference process. ```python part_a2_registry = { 'ckpt_before': 'Part-A2/PartA2_7940.pth', 'ckpt_after': 'Part-A2/PartA2_7940.pth', 'openpc_cfg_path': 'kitti_models/PartA2.yaml', 'torchsparse_cfg_path': 'kitti_models/PartA2_plugin.yaml', 'v_spconv': 1 } part_a2_results = openpc_single_demo(part_a2_registry, base_paths, convert=True) print(part_a2_results.stderr) ``` -------------------------------- ### Specify Paths and Environment Parameters Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Sets up base paths for MMDetection3D, model weights (input and output), and configuration files, along with the conda environment name. Customize these paths according to your project structure. ```python env_name = "torchsparse" # Please complete the following base paths. base_paths = { 'mmdet3d_path': None, 'mmdet3d_model_base_path': None, 'torchsparse_model_base_path': os.path.join(os.path.abspath(''), "converted_models"), 'mmdet3d_cfg_base_path': None } ``` -------------------------------- ### Run SECOND Model Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Executes the SECOND 3D car detection model demo using the `mmdet3d_single_demo` function. Prints the standard error and standard output from the evaluation process. ```python second_results = mmdet3d_single_demo(second_3d_car, base_paths, convert=True) print(second_results.stderr) print(second_results.stdout) ``` -------------------------------- ### Dummy Check for Weight Converter Loading Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Prints the loaded weight converter object to verify successful loading. ```python # Dummy check for whether the weight converter is successfully loaded. print(converter) ``` -------------------------------- ### Base Paths Dictionary Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb A dictionary containing essential base paths for MMDetection3D and TorchSparse, including paths to the MMDetection3D repository, model directories, and configuration files. ```python base_paths ``` -------------------------------- ### Running Single Model Demo with OpenPCDet and TorchSparse Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb This function handles the conversion of model weights and subsequent evaluation using OpenPCDet's test script. It includes assertions to validate path existence and constructs a bash command to activate a conda environment and run the evaluation. ```python def openpc_single_demo(registry_entry, base_paths, convert=True): assert os.path.isdir(base_paths['openpc_model_base_path']), f"OpenPCDet model base path {base_paths['openpc_model_base_path']} does not exist." assert os.path.isdir(base_paths['torchsparse_model_base_path']), f"TorchSparse model base path {base_paths['torchsparse_model_base_path']} does not exist." assert os.path.isdir(base_paths['openpc_cfg_base_path']), f"OpenPCDet cfg base path {base_paths['openpc_cfg_base_path']} does not exist." assert os.path.isdir(base_paths['torchsparse_cfg_base_path']), f"TorchSparse cfg base path {base_paths['torchsparse_cfg_base_path']} does not exist." assert os.path.isdir(base_paths['openpc_path']), f"OpenPCDet path {base_paths['openpc_path']} does not exist." # pre-process paths openpc_cfg_path = os.path.join(base_paths['openpc_cfg_base_path'], registry_entry['openpc_cfg_path']) torchsparse_cfg_path = os.path.join(base_paths['torchsparse_cfg_base_path'], registry_entry['torchsparse_cfg_path']) test_file_path = os.path.join(base_paths['openpc_path'], "tools/test.py") openpc_model_path = os.path.join(base_paths['openpc_model_base_path'], registry_entry['ckpt_before']) assert os.path.isdir(base_paths['torchsparse_model_base_path']), "Please create the directory for the converted model." torchsparse_model_path = os.path.join(base_paths['torchsparse_model_base_path'], registry_entry['ckpt_after']) # convert the model if convert: parent_dir = os.path.dirname(torchsparse_model_path) if not os.path.exists(parent_dir): os.makedirs(parent_dir) converter( ckpt_before=openpc_model_path, ckpt_after=torchsparse_model_path, cfg_path=openpc_cfg_path, v_spconv = registry_entry['v_spconv'], framework='openpc' ) command = f'bash -c "conda activate {env_name}; python {test_file_path} --cfg_file {torchsparse_cfg_path} --ckpt {torchsparse_model_path}"' print(command) result = subprocess.run(command, capture_output=True, text=True, shell=True, executable='/bin/bash') return result # result have .stdout and .stderr attributes to get the output. ``` -------------------------------- ### CenterPoint Configuration and Demo Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Configures and runs a single inference demo for the CenterPoint model with circular NMS on NuScenes dataset. Ensure the dataset path is correctly set in the mmdetection3d config. ```python centerpoint_config = { "ckpt_before": "CenterPoint/centerpoint_01voxel_second_secfpn_circlenms_4x8_cyclic_20e_nus_20220810_030004-9061688e.pth", "ckpt_after": "CenterPoint/centerpoint_01voxel_second_secfpn_circlenms_4x8_cyclic_20e_nus_20220810_030004-9061688e.pth", "cfg_path": "centerpoint/centerpoint_voxel01_second_secfpn_head-circlenms_8xb4-cyclic-20e_nus-3d.py", "v_spconv": 1, "cfg_options": "--cfg-options model.pts_middle_encoder.type=SparseEncoderTS" } centerpoint_results = mmdet3d_single_demo(centerpoint_config, base_paths, convert=True) print(centerpoint_results.stderr) ``` -------------------------------- ### Convert SpConv Checkpoint to TorchSparse Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/README.md Use this command-line tool to convert model weights from SpConv format to TorchSparse format. Ensure all paths and SpConv version are correctly specified. ```bash python examples/converter.py --ckpt_before ../OpenPCDet/models/SECOND/second_7862.pth --cfg_path ../OpenPCDet/tools/cfgs/kitti_models/second.yaml --ckpt_after ./converted/SECOND/second_7862.pth --v_spconv 1 --framework openpc ``` -------------------------------- ### SECOND Model Configuration Options Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/README.md Specify configuration options for the SECOND model to use TorchSparse layers. This includes setting the evaluation pickle file prefix and the middle encoder type. ```bash --cfg-options test_evaluator.pklfile_prefix=outputs/torchsparse/second --cfg-options model.middle_encoder.type=SparseEncoderTS ``` -------------------------------- ### Setting Base Paths for Model Conversion Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Defines the base directory paths required for OpenPCDet and TorchSparse model conversion and configuration. Ensure these paths are correctly set before running conversion scripts. ```python env_name = "torchsparse" base_paths = { 'openpc_path': None, 'openpc_model_base_path': None, 'torchsparse_model_base_path': os.path.joinin(os.path.abspath(''), "converted_models"), 'openpc_cfg_base_path': None, 'torchsparse_cfg_base_path': os.path.joinin(os.path.abspath(''), "cfgs") } ``` -------------------------------- ### Convert MMDetection3D Model Weights Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/README.md Converts pre-trained MMDetection3D model weights to a format compatible with TorchSparse. Ensure the paths to the checkpoint, config file, and output directory are correct. ```bash python examples/converter.py --ckpt_before ../mmdetection3d/models/PV-RCNN/pv_rcnn_8xb2-80e_kitti-3d-3class_20221117_234428-b384d22f.pth --cfg_path ../mmdetection3d/pv_rcnn/pv_rcnn_8xb2-80e_kitti-3d-3class.py --ckpt_after ./converted/PV-RCNN/pv_rcnn_8xb2-80e_kitti-3d-3class_20221117_234428-b384d22f.pth --v_spconv 1 --framework mmdet3d ``` -------------------------------- ### Verify Model Converter Loading Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Prints the loaded model converter object to verify that the module was successfully imported and is accessible. ```python # Check that the model converter is successfully loaded print(converter) ``` -------------------------------- ### PV-RCNN Model Configuration Options Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/README.md Specify configuration options for the PV-RCNN model to use TorchSparse layers. This includes setting the evaluation pickle file prefix, the middle encoder type, and the points encoder type. ```bash --cfg-options test_evaluator.pklfile_prefix=outputs/torchsparse/pv_rcnn --cfg-options model.middle_encoder.type=SparseEncoderTS --cfg-options model.points_encoder.type=VoxelSetAbstractionTS ``` -------------------------------- ### Result of Base Paths Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb The output showing the resolved base paths for MMDetection3D and TorchSparse, indicating the directory structure for models and configurations. ```python { 'mmdet3d_path': '/home/yingqi/repo/mmdetection3d', 'mmdet3d_model_base_path': '/home/yingqi/repo/mmdetection3d/models', 'torchsparse_model_base_path': '/home/yingqi/repo/torchsparse-dev/examples/mmdetection3d/converted_models', 'mmdet3d_cfg_base_path': '/home/yingqi/repo/mmdetection3d/configs' } ``` -------------------------------- ### PCEngine Citation (MLSys 2023) Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md BibTeX entry for the PCEngine paper accepted by MLSys 2023. This relates to efficient sparse convolution kernels. ```bibtex @inproceedings{hong2023pcengine, title={{Exploiting Hardware Utilization and Adaptive Dataflow for Efficient Sparse Convolution in 3D Point Clouds}}, author={Hong, Ke and Yu, Zhongming and Dai, Guohao and Yang, Xinhao and Lian, Yaoxiu and Liu, Zehao and Xu, Ningyi and Wang, Yu}, booktitle={Sixth Conference on Machine Learning and Systems (MLSys)}, year={2023} } ``` -------------------------------- ### TorchSparse++ Citation (CVPR Workshops 2023) Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md BibTeX entry for the preliminary version of TorchSparse++ presented at CVPR Workshops 2023. This cites an earlier release. ```bibtex @inproceedings{tangandyang2023torchsparse++, title = {{TorchSparse++: Efficient Point Cloud Engine}}, author = {Tang, Haotian and Yang, Shang and Liu, Zhijian and Hong, Ke and Yu, Zhongming and Li, Xiuyu and Dai, Guohao and Wang, Yu and Han, Song}, booktitle = {Computer Vision and Pattern Recognition Workshops (CVPRW)}, year = {2023} } ``` -------------------------------- ### MMDetection3D Single Model Demo Function Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Python function to run a single MMDetection3D model demo. It handles model conversion (optional) and executes the evaluation using `tools/test.py`. ```python def mmdet3d_single_demo(registry_entry, base_paths, convert=True): """Run Single Model Demo :param registry_entry: the model demo registry. :type registry_entry: dict :param base_paths: the base paths. :type base_paths: dict :param convert: whether to convert the model. If set to false, it skip the model conversion and use the provided checkpoint to run model evaluation directly. Defaults to True. :type convert: bool, optional :return: return the process object that used to run the demo. :rtype: CompletedProcess """ assert os.path.isdir(base_paths['mmdet3d_path']), "Please specify the mmdet3d_path in the base_paths." assert os.path.isdir(base_paths['mmdet3d_model_base_path']), "Please specify the mmdet3d_model_base_path in the base_paths." assert os.path.isdir(base_paths['torchsparse_model_base_path']), "Please specify the torchsparse_model_base_path in the base_paths." assert os.path.isdir(base_paths['mmdet3d_cfg_base_path']), "Please specify the mmdet3d_cfg_base_path in the base_paths." # pre-process paths cfg_path = os.path.join(base_paths['mmdet3d_cfg_base_path'], registry_entry['cfg_path']) test_file_path = os.path.join(base_paths['mmdet3d_path'], "tools/test.py") mmdet3d_model_path = os.path.join(base_paths['mmdet3d_model_base_path'], registry_entry['ckpt_before']) assert os.path.isdir(base_paths['torchsparse_model_base_path']), "Please create the directory for the converted model." torchsparse_model_path = os.path.join(base_paths['torchsparse_model_base_path'], registry_entry['ckpt_after']) cfg_options = registry_entry['cfg_options'] # convert the model if convert: parent_dir = os.path.dirname(torchsparse_model_path) if not os.path.exists(parent_dir): os.makedirs(parent_dir) converter( ckpt_before=mmdet3d_model_path, ckpt_after=torchsparse_model_path, cfg_path=cfg_path, v_spconv = registry_entry['v_spconv'] ) command = f'bash -c "conda activate {env_name}; python {test_file_path} {cfg_path} {torchsparse_model_path} {cfg_options} --task lidar_det"' print(command) result = subprocess.run(command, capture_output=True, text=True, shell=True, executable='/bin/bash') return result # result have .stdout and .stderr attributes to get the output. ``` -------------------------------- ### Load Model Converter Module Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Loads a custom model converter module from a relative path, making it available for use in the current environment. Ensure the 'converter.py' file exists in the specified relative path. ```python import importlib.util import sys, os from pathlib import Path import subprocess # Loading the model converter to this notebook. # Define the relative path to the file relative_path = "../converter.py" file_path = Path().resolve() / relative_path # Add the directory containing the file to sys.path sys.path.append(str(file_path.parent)) # Load the module spec = importlib.util.spec_from_file_location("convert_weights", str(file_path)) converter = importlib.util.module_from_spec(spec) spec.loader.exec_module(converter) converter = getattr(converter, "convert_weights") ``` -------------------------------- ### PV-RCNN Demo Output Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Prints the standard output from the PV-RCNN demo, which typically contains detection results or processing information. ```python print(pv_rcnn_results.stdout) ``` -------------------------------- ### Disable PyTorch JIT Compile Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/README.md Add this to your import section if you encounter PyTorch JIT compile errors. ```python import torch torch.jit._state.disable() ``` -------------------------------- ### Print SECOND Demo Stderr Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Prints standard error from the SECOND model inference process. ```python print(second_results.stderr) ``` -------------------------------- ### TorchSparse++ Citation (MICRO 2023) Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md BibTeX entry for the TorchSparse++ paper presented at MICRO 2023. Use this for citing the latest version of the framework. ```bibtex @inproceedings{tangandyang2023torchsparse, title={TorchSparse++: Efficient Training and Inference Framework for Sparse Convolution on GPUs}, author={Tang, Haotian and Yang, Shang and Liu, Zhijian and Hong, Ke and Yu, Zhongming and Li, Xiuyu and Dai, Guohao and Wang, Yu and Han, Song}, booktitle={IEEE/ACM International Symposium on Microarchitecture (MICRO)}, year={2023} } ``` -------------------------------- ### SECOND Model Evaluation Results (AP40) Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Expected output showing AP40 evaluation results for the SECOND model on the Car class, including bounding box, Bird's Eye View (BEV), 3D, and Angle-of-View (AOS) metrics at different IoU thresholds. ```text ----------- AP40 Results ------------ Car AP40@0.70, 0.70, 0.70: bbox AP40:97.4063, 92.4550, 89.2481 bev AP40:92.6387, 88.4049, 85.2355 3d AP40:90.4511, 81.3433, 76.1927 aos AP40:97.13, 91.81, 88.42 Car AP40@0.70, 0.50, 0.50: bbox AP40:97.4063, 92.4550, 89.2481 bev AP40:97.5160, 94.7415, 91.7295 3d AP40:97.3701, 94.5687, 91.4920 aos AP40:97.13, 91.81, 88.42 ``` -------------------------------- ### SECOND Model Evaluation Results (AP11) Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Expected output showing AP11 evaluation results for the SECOND model on the Car class, including bounding box, Bird's Eye View (BEV), 3D, and Angle-of-View (AOS) metrics at different IoU thresholds. ```text ----------- AP11 Results ------------ Car AP11@0.70, 0.70, 0.70: bbox AP11:95.2015, 89.6519, 88.0073 bev AP11:89.9621, 87.2725, 84.2825 3d AP11:88.3629, 78.2199, 76.0327 aos AP11:94.94, 89.08, 87.23 Car AP11@0.70, 0.50, 0.50: bbox AP11:95.2015, 89.6519, 88.0073 bev AP11:95.3329, 89.9520, 88.7400 3d AP11:95.2805, 89.8595, 88.5336 aos AP11:94.94, 89.08, 87.23 ``` -------------------------------- ### CenterPoint Demo Output Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/demo.ipynb Prints the standard output from the CenterPoint demo, which includes evaluation metrics and per-class results. ```python print(centerpoint_results.stdout) ``` -------------------------------- ### TorchSparse Citation (MLSys 2022) Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md BibTeX entry for the TorchSparse paper presented at MLSys 2022. Use this for citing the initial release of the TorchSparse framework. ```bibtex @inproceedings{tang2022torchsparse, title = {{TorchSparse: Efficient Point Cloud Inference Engine}}, author = {Tang, Haotian and Liu, Zhijian and Li, Xiuyu and Lin, Yujun and Han, Song}, booktitle = {Conference on Machine Learning and Systems (MLSys)}, year = {2022} } ``` -------------------------------- ### Print PV-RCNN Demo Stderr Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/openpcdet/demo.ipynb Prints standard error from the PV-RCNN model inference process. ```python print(pv_rcnn_results.stderr) ``` -------------------------------- ### SPVNAS Paper Citation (ECCV 2020) Source: https://github.com/mit-han-lab/torchsparse/blob/master/README.md BibTeX entry for the SPVNAS paper at ECCV 2020, which includes the initial version of TorchSparse. This citation is for the foundational work. ```bibtex @inproceedings{tang2020searching, title = {{Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution}}, author = {Tang, Haotian and Liu, Zhijian and Zhao, Shengyu and Lin, Yujun and Lin, Ji and Wang, Hanrui and Han, Song}, booktitle = {European Conference on Computer Vision (ECCV)}, year = {2020} } ``` -------------------------------- ### CenterPoint Voxel 0.1 Circular NMS Configuration Options Source: https://github.com/mit-han-lab/torchsparse/blob/master/examples/mmdetection3d/README.md Specify configuration options for CenterPoint Voxel 0.1 Circular NMS to use TorchSparse layers. This involves updating the path in the dataset config and setting the points middle encoder type. ```bash --cfg-options model.pts_middle_encoder.type=SparseEncoderTS ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.