Giter VIP home page Giter VIP logo

octattention's Introduction

OctAttention: Octree-Based Large-Scale Contexts Model for Point Cloud Compression. AAAI 2022 Paper.

Branches

There are two branches named obj and lidar that implement Object and LiDAR point cloud coding respectively. They share the same network. Note: the checkpoint file is saved in the corresponding branch separately. The model for LiDAR compression is here.

Requirements

  • python 3.7
  • PyTorch 1.9.0+cu102
  • file/environment.sh to help you build this environment

Download and Prepare Training and Testing Data

  • Download data

    For LiDAR compression

    SemanticKITTI (80G)
    23201/20351 frames in 00-10/11-21 folders for training/testing.

    For Object compression

    MPEG 8iVFBv2 (5.5GB)
    300/300 frames in soldier10 and longdress10 for training.
    300/300 frames in loot10 and redandblack10 for testing.

    MPEG 8iVSLF (100M)
    1/1/1/1 frame in Boxer9/10 and Thaidancer9/10 (quantized from 12bit data) for testing.
    please cite: Maja Krivokuća, Philip A. Chou, and Patrick Savill, “8i Voxelized Surface Light Field (8iVSLF) Dataset,” ISO/IEC JTC1/SC29 WG11 (MPEG) input document m42914, Ljubljana, July 2018.

    JPEG MVUB (8GB)
    318/216/207 frames in andrew10, david10 and sarah10 for training.
    245/245/216/216 frames in Phil9/10 and Ricardo9/10 for testing.
    (Note: We rotated the MVUB data to make it consistent with MPEG 8i. Please set rotation=True in the dataPrepare function when processing MVUB data in training and testing.)

  • Prepare data

Please set oriDir in dataPrepare.py before.

python dataPrepare.py

To prepare train and test data. It will generate *.mat data in the directory Data.

Train

python octAttention.py 

You should set the Network parameters expName,DataRootetc. in networkTool.py. This will output checkpoint in expName folder, e.g. Exp/Kitti. (Note: You should run DataFolder.calcdataLenPerFile() in dataset.py for a new dataset, and you can comment it after you get the parameter dataLenPerFile)

Encode and Decode

You may need to run the following command to provide pc_error and tmc13v14_r(release version) execute permission.

chmod +x file/pc_error file/tmc13v14_r 
  • Encode

python encoder.py  

This will output binary codes saved in .bin format in Exp(expName)/data, and will generate *.mat data in the directory Data/testPly.

  • Decode

python decoder.py 

This will load *.mat data for check and calculate PSNR by pc_error.

Test TMC

We provide the test code for TMC13 v14 (G-PCC) for Object and LiDAR point cloud compression.

python testTMC.py

Citation

If this work is useful for your research, please consider citing :

@article{OctAttention, 
title={OctAttention: Octree-Based Large-Scale Contexts Model for Point Cloud Compression}, volume={36}, 
url={https://ojs.aaai.org/index.php/AAAI/article/view/19942}, DOI={10.1609/aaai.v36i1.19942},
number={1}, journal={Proceedings of the AAAI Conference on Artificial Intelligence}, 
author={Fu, Chunyang and Li, Ge and Song, Rui and Gao, Wei and Liu, Shan}, year={2022}, month={Jun.}, pages={625-633} 
}

octattention's People

Contributors

zb12138 avatar

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.