Skip to content

yuanhui0325/PCAC_GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

PCAC_GAN

During the process of machine updates and migration, the original code was unfortunately lost. This version is a re-implemented codebase based on the original design concepts and experimental results. While we have made every effort to maintain consistency with the original code, there may be slight discrepancies in the results due to differences in certain implementation details.

Code Structure

β”œβ”€β”€ configs/ # Configuration files

β”‚ └── base.yaml # Main training configuration

β”œβ”€β”€ core/ # Core compression components

β”‚ β”œβ”€β”€ entropy_coder.py # Arithmetic coding implementation

β”‚ β”œβ”€β”€ hyper_prior.py # Hyperprior network

β”‚ └── avrpm.py # Adaptive voxel residual prediction module

β”œβ”€β”€ data/

β”‚ β”œβ”€β”€ ivfb_loader.py # IVFBDataset implementation

β”‚ └── preprocess.py # PLY to NPZ conversion

β”œβ”€β”€ models/

β”‚ β”œβ”€β”€ generator.py # PCACGenerator (main compression network)

β”‚ └── discriminator.py # PointCloudDiscriminator

β”œβ”€β”€ losses/ # Loss functions

β”‚ β”œβ”€β”€ adversarial.py # GAN implementation

β”‚ └── rate_distortion.py # Rate-distortion loss

β”œβ”€β”€ utils/

β”‚ β”œβ”€β”€ metrics.py # PSNR/SSIM/BPP calculations

β”‚ └── transforms.py # Color space conversions

β”œβ”€β”€ train.py # Main training script

└── evaluate.py # Model evaluation script

└── dataset_gen.py # Shapenet+CoCo

Getting Started

Installation

# Base environment
conda create -n pcac python=3.8
conda activate pcac

# Install PyTorch
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113

# Install MinkowskiEngine
pip install -U git+https://github.com/NVIDIA/MinkowskiEngine -v \
    --install-option="--blas=openblas" \
    --install-option="--force_cuda"

# Install other dependencies
pip install open3d plyfile pycocotools tqdm

Training
Prepare dataset in PLY format under /data/yourpath/
Update dataset.root_dir in configs/base.yaml
Start training:

python train.py --config configs/base.yaml \
    --batch_size 32 \
    --lr_g 0.0001 \
    --lr_d 0.0004

Evaluation


models: https://pan.baidu.com/s/1-5TRTShyW5pYBSNiDRGNoA  8a97 


python evaluate.py \
    --weights path/to/checkpoint \
    --output results.json \
    --batch_size 8

About

PCAC-GAN published in CVMJ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages