--- title: 3dpartsegmentation emoji: 👁 colorFrom: gray colorTo: gray sdk: gradio sdk_version: 6.13.0 app_file: app.py pinned: false license: mit short_description: Clifford-Dirac 3D Point Cloud Segmentation --- # 🚀 Clifford-Dirac 3D Point Cloud Segmentation Welcome to the **Clifford-Dirac 3D Segmentation** Space! This project demonstrates a highly optimized, mathematically elegant approach to 3D point cloud part segmentation using **Geometric Algebra**. Instead of relying on brute-force parameter scaling (like massive Transformers or dense CNNs), this model understands 3D spatial rotations, orientations, and structural invariants natively through $Cl(3,0)$ Clifford multivectors. ## 🌟 Key Innovations 1. **Extreme Parameter Efficiency (~0.15M Parameters):** While modern State-of-the-Art (SOTA) models use anywhere from 7 to 15 Million parameters, this architecture achieves highly competitive results using only **~157,000 parameters**. It proves that mathematically correct priors (Geometric Algebra) can replace millions of redundant weights. 2. **$Cl(3,0)$ Clifford Algebra Native:** The model processes data not just as $(x, y, z)$ coordinates, but as 8-dimensional multivectors (1 scalar, 3 vectors, 3 bivectors, 1 pseudoscalar). This allows the network to "reason" about areas, volumes, and geometric alignments naturally. 3. **Hardware-Level Triton Optimization:** The core geometric products are typically extremely slow to compute in standard PyTorch. To solve this during training, custom **C++ level Triton JIT Kernels** were written to fuse operations and zero-out VRAM padding overhead. *(Note: This HF Space uses a smart CPU-fallback for inference on the free tier).* ## 📊 Performance & Efficiency Benchmark (ShapeNet Part) How does a 150K parameter geometric model stack up against industry standards? | Model | mIoU (Instance) | Parameters | Reference | | :--- | :--- | :--- | :--- | | **PointNet++** | 85.1% | 1.48 M | [Qi et al., NeurIPS 2017](https://arxiv.org/abs/1706.02413) | | **PointMLP** | 85.4% | 12.60 M | [Ma et al., ICLR 2022](https://arxiv.org/abs/2202.07123) | | **PointNeXt-L** | 87.1% | 7.10 M | [Qian et al., NeurIPS 2022](https://arxiv.org/abs/2206.04670) | | **Our Clifford-Dirac Net** | **81.2%** | **0.15 M** | - | > **Deployability Note:** During inference, the Clifford-Dirac Net requires **fewer than 20 MB of VRAM** for a standard point cloud, completely bypassing the quadratic memory bottlenecks ($O(N^2)$) of Transformer-based models. This makes it an ideal, drop-in solution for real-time Edge AI processing on LiDAR, AR/VR headsets, and low-power robotic systems. ## ⚙️ Architecture Under the Hood - **Message Passing via Dirac Layers:** Nodes communicate by mapping Euclidean directional vectors into multivectors, applying custom geometric products. - **Clifford Self-Attention:** A global manager that aligns spatial features using geometric resonance (scalar and bivector alignment). - **Lightweight Bottleneck Head:** A minimal `(64, 64)` dense structure that fuses local, global, and categorical contexts into semantic part logits without exploding the parameter count. ## 🎮 How to Use the Demo 1. Select an example 3D object from the examples below, or upload your own `.obj` or `.ply` point cloud file. 2. Select the object category (e.g., Airplane, Chair, Guitar). 3. Click **"Tahmin Et" (Predict)**. 4. Interact with the 3D Plotly graph! You can rotate, zoom, and explore the segmented parts natively in your browser. --- *Built with PyTorch, PyTorch Geometric, Triton, and Gradio.*