Skip to content

pointcompress3d/pointcompress3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PointCompress3D

PointCompress3D - A Point Cloud Compression Framework for Roadside LiDARs in Intelligent Transportation Systems. We use the TUMTraf Dataset as our benchmark and extend 3 promising methods to adapt and test with it. All the code is adapted to be able to

Compress

The program loads ASCII pcd files from the filesystem, compresses it, and writes out a compressed representation back to the filesystem

Decompress

The program reads the compressed representation from the filesystem, decompress it, and writes back the reconstructed point cloud data in ASCII pcd files to the filesystem

Depoco

We extend code from this depoco. We store the compressed point cloud data in a binary pickle data format. In addition to compressed point cloud data, we also store transformation and scaling attributes in the binary pickle format to be applied later after the decompression. We provide a vscode launch.json file to debug and run, or you can run with the following command to encode

python encode.py --config_cfg network_files/e3/e3.yaml

and decode

python decode.py --config_cfg network_files/e3/e3.yaml

You can tune the configuration files under network_files/e3/e3.yaml, they provide some other configuration files, but we have tuned e3 for our use-case. To change the input folder of the original pcd files to compress you can change /dataset/data_folders/test parameter under the corresponding yaml file being used. In our case you can tune the grid_size and max_nr_points under the same yaml file for better reconstruction performance. The output folder can be changed under /dataset/data_folders/output within the same yaml file and the organized output structure will look like this

data/
│
├── encoded/                         # Compressed PCD in pickle data format
│   └── 5000                         # max_nr_points
|   |   └── 8x8x3                    # grid_size
|   |       └── file_name_1.bin      # compressed binary file from file_name_1.pcd
|   |       └── file_name_2.bin      # compressed binary file from file_name_2.pcd
|   |   └── 16x16x6
|   |   └── ... 
|   └── 150000
|   |   └── 8x8x3
|   |   └── 24x24x9
|   |   └── ...
|   └── ...
├── decoded/                         # Decompressed in ASCII PCD file format
│   ├── 5000/                        # max_nr_points
|   |   └── 8x8x3                    # grid_size
|   |       └── file_name_1.pcd      # decompressed pcd file from file_name_1.bin
|   |       └── file_name_2.pcd      # decompressed pcd file from file_name_2.bin
|   |   └── 16x16x6
|   |   └── ... 
|   └── 150000
|   |   └── 8x8x3
|   |   └── 24x24x9
|   |   └── ...
|   └── ...

3DPCC

We extend this rnn-compress-pointcloud code for our ouster LiDAR. We provide a vscode launch.json file to debug and run. The codes runs as ROS nodes defined in compression.launch file. The novelty here is about transforming 3D point cloud to 2D images (range, azimuth, intensity) and reconstructing them back. We read the original and compressed files from the file system and write out to the file system like in the case of depoco above. You should have ROS and cmake installed to run the program.

Compress

You can modify directory variable inside catkin_ws/src/pointcloud_to_rangeimage/src/pointcloud_to_rangeimage_node.cpp pointing to where your pcd files are located. The range images will be outputed to catkin_ws/images with this structure

catkin_ws/images/
│
├── azimuth/                       
│   └── file_name_1.png                        
|   └── ...
├── range/                        
│   ├── file_name_1.png                       
|   └── ...
├── intensity/                        
│   ├──  file_name_1.png                      
|   └── ...

Decompress

You can modify base_path, azimuth_path, intensity_path, and range_path pointing to where your images are located. You can also modify pcd_filename to choose where the reconstructed pcd files are goint to be written. By default the reconstructed pcd files are under

catkin_ws/images/
│
├── pcd_reconstructed/                       
│   └── file_name_1.pcd                  
|   └── ...

Google Draco

We use python-wrapper-for-draco to utilize this library. We provide compression.py and decompression.py to compress and decompress files respectively

python3 compress.py input_folder/ output_folder/ quant_bits compression_lvl
python3 decompress.py input_folder/ output_folder/

the folder structure looks like this

working_folder/
│
├── compressed/                       
│   └── 16_0
|       └── file_name_1.drc
|       └── file_name_2.drc
|       └── ....           
|   └── 16_1
|   └── ...
├── decompressed/                  
│   └── 16_0                      
|   └── 16_1
|   └── ...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published