v3p 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
v3p/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """v3p - Vuer 3DGS Processing tools."""
2
+
3
+ from pathlib import Path
4
+
5
+ __version__ = (Path(__file__).parent.parent.parent / "VERSION").read_text().strip()
@@ -0,0 +1 @@
1
+ """v3p CLI scripts."""
v3p/scripts/cli.py ADDED
@@ -0,0 +1,40 @@
1
+ """v3p CLI with params-proto subcommands."""
2
+
3
+ import sys
4
+
5
+
6
+ def cli():
7
+ """Main CLI entry point with subcommand routing."""
8
+ if len(sys.argv) < 2:
9
+ print("Usage: v3p <command> [options]")
10
+ print("")
11
+ print("Commands:")
12
+ print(" process Process 3DGS point clouds")
13
+ print(" convert Convert between formats")
14
+ print("")
15
+ print("Run 'v3p <command> --help' for more information.")
16
+ sys.exit(1)
17
+
18
+ command = sys.argv[1]
19
+ sys.argv = [sys.argv[0]] + sys.argv[2:] # Remove subcommand from argv
20
+
21
+ if command == "process":
22
+ # Import triggers CLI parsing with @proto(cli=True)
23
+ from v3p.scripts.process import ProcessConfig, main
24
+
25
+ main()
26
+ elif command == "convert":
27
+ from v3p.scripts.convert import ConvertConfig, main
28
+
29
+ main()
30
+ elif command in ["-h", "--help"]:
31
+ sys.argv = [sys.argv[0]]
32
+ cli() # Show help
33
+ else:
34
+ print(f"Unknown command: {command}")
35
+ print("Run 'v3p --help' for available commands.")
36
+ sys.exit(1)
37
+
38
+
39
+ if __name__ == "__main__":
40
+ cli()
v3p/scripts/convert.py ADDED
@@ -0,0 +1,46 @@
1
+ """Example params-proto subcommand for format conversion."""
2
+
3
+ from params_proto import proto
4
+
5
+
6
+ @proto(cli=True)
7
+ class ConvertConfig:
8
+ """Configuration for format conversion.
9
+
10
+ Args:
11
+ input_path: Path to input file
12
+ output_path: Path to output file
13
+ input_format: Input format (auto, ply, pcd, xyz)
14
+ output_format: Output format (ply, pcd, xyz)
15
+ binary: Write binary format when supported
16
+ verbose: Enable verbose output
17
+ """
18
+
19
+ input_path: str = None
20
+ output_path: str = None
21
+
22
+ # Format options
23
+ input_format: str = "auto"
24
+ output_format: str = "ply"
25
+
26
+ # Options
27
+ binary: bool = True
28
+ verbose: bool = False
29
+
30
+
31
+ def main():
32
+ """Run format conversion with the given configuration."""
33
+ print(f"Converting: {ConvertConfig.input_path}")
34
+ print(f"Output: {ConvertConfig.output_path}")
35
+ print(f"Input format: {ConvertConfig.input_format}")
36
+ print(f"Output format: {ConvertConfig.output_format}")
37
+
38
+ if ConvertConfig.verbose:
39
+ print(f"Binary: {ConvertConfig.binary}")
40
+
41
+ # Placeholder for actual conversion logic
42
+ print("Conversion complete!")
43
+
44
+
45
+ if __name__ == "__main__":
46
+ main()
v3p/scripts/process.py ADDED
@@ -0,0 +1,49 @@
1
+ """Example params-proto subcommand for 3DGS processing."""
2
+
3
+ from params_proto import proto
4
+
5
+
6
+ @proto(cli=True)
7
+ class ProcessConfig:
8
+ """Configuration for 3DGS processing.
9
+
10
+ Args:
11
+ input_path: Path to input PLY or point cloud file
12
+ output_path: Path to output file
13
+ voxel_size: Voxel size for downsampling
14
+ remove_outliers: Remove statistical outliers
15
+ num_neighbors: Number of neighbors for outlier detection
16
+ std_ratio: Standard deviation ratio for outlier removal
17
+ verbose: Enable verbose output
18
+ """
19
+
20
+ input_path: str = None
21
+ output_path: str = "output.ply"
22
+
23
+ # Processing options
24
+ voxel_size: float = 0.01
25
+ remove_outliers: bool = True
26
+ num_neighbors: int = 20
27
+ std_ratio: float = 2.0
28
+
29
+ # Output options
30
+ verbose: bool = False
31
+
32
+
33
+ def main():
34
+ """Run 3DGS processing with the given configuration."""
35
+ print(f"Processing: {ProcessConfig.input_path}")
36
+ print(f"Output: {ProcessConfig.output_path}")
37
+ print(f"Voxel size: {ProcessConfig.voxel_size}")
38
+ print(f"Remove outliers: {ProcessConfig.remove_outliers}")
39
+
40
+ if ProcessConfig.verbose:
41
+ print(f"Neighbors: {ProcessConfig.num_neighbors}")
42
+ print(f"Std ratio: {ProcessConfig.std_ratio}")
43
+
44
+ # Placeholder for actual processing logic
45
+ print("Processing complete!")
46
+
47
+
48
+ if __name__ == "__main__":
49
+ main()
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: v3p
3
+ Version: 0.1.0
4
+ Summary: Vuer 3DGS Processing - Tools for Gaussian Splatting workflows.
5
+ Home-page: https://github.com/vuer-ai/vuer-doc-boilerplate
6
+ Author: Ge Yang<ge.ike.yang@gmail.com>
7
+ Author-email: ge.ike.yang@gmail.com
8
+ License: MIT
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Programming Language :: Python
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: params-proto>=3.1.0
15
+ Requires-Dist: numpy>=1.21
16
+ Provides-Extra: all
17
+ Provides-Extra: dev
18
+ Requires-Dist: pylint==2.13.4; extra == "dev"
19
+ Requires-Dist: pytest==7.1.2; extra == "dev"
20
+ Requires-Dist: sphinx==7.1.2; extra == "dev"
21
+ Requires-Dist: furo; extra == "dev"
22
+ Requires-Dist: sphinx-autobuild; extra == "dev"
23
+ Requires-Dist: sphinx_copybutton; extra == "dev"
24
+ Requires-Dist: sphinxcontrib-video; extra == "dev"
25
+ Requires-Dist: sphinx-design; extra == "dev"
26
+ Requires-Dist: myst_parser; extra == "dev"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: home-page
30
+ Dynamic: license-file
31
+
32
+ # v3p - Vuer 3DGS Processing
33
+
34
+ Tools for Gaussian Splatting (3DGS) processing workflows. Built with [params-proto](https://github.com/geyang/params-proto) for configuration management.
35
+
36
+ [![PyPI version](https://badge.fury.io/py/v3p.svg)](https://badge.fury.io/py/v3p)
37
+ [![Documentation](https://readthedocs.org/projects/v3p/badge/?version=latest)](https://v3p.readthedocs.io/en/latest/)
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ pip install v3p
43
+ ```
44
+
45
+ For development:
46
+
47
+ ```bash
48
+ git clone https://github.com/vuer-ai/vuer-3dgs-processing.git
49
+ cd vuer-3dgs-processing
50
+ pip install -e ".[dev]"
51
+ ```
52
+
53
+ ## Quick Start
54
+
55
+ ### CLI Usage
56
+
57
+ The `v3p` command provides several subcommands for processing 3DGS point clouds:
58
+
59
+ ```bash
60
+ # Show available commands
61
+ v3p
62
+
63
+ # Process a point cloud
64
+ v3p process --input-path input.ply --output-path output.ply
65
+
66
+ # Convert between formats
67
+ v3p convert --input-path input.ply --output-path output.pcd
68
+ ```
69
+
70
+ ### Python API
71
+
72
+ ```python
73
+ import v3p
74
+ print(v3p.__version__)
75
+ ```
76
+
77
+ Using the configuration classes directly:
78
+
79
+ ```python
80
+ from v3p.scripts.process import ProcessConfig, main
81
+
82
+ # Configure via class attributes
83
+ ProcessConfig.input_path = "input.ply"
84
+ ProcessConfig.output_path = "output.ply"
85
+ ProcessConfig.voxel_size = 0.01
86
+ ProcessConfig.verbose = True
87
+
88
+ # Run processing
89
+ main()
90
+ ```
91
+
92
+ ## Commands
93
+
94
+ ### v3p process
95
+
96
+ Process 3DGS point clouds with filtering and downsampling.
97
+
98
+ ```bash
99
+ v3p process --input-path <path> [options]
100
+ ```
101
+
102
+ Options:
103
+ - `--input-path`: Path to input PLY or point cloud file (required)
104
+ - `--output-path`: Path to output file (default: output.ply)
105
+ - `--voxel-size`: Voxel size for downsampling (default: 0.01)
106
+ - `--remove-outliers`: Remove statistical outliers (default: True)
107
+ - `--num-neighbors`: Number of neighbors for outlier detection (default: 20)
108
+ - `--std-ratio`: Standard deviation ratio for outlier removal (default: 2.0)
109
+ - `--verbose`: Enable verbose output
110
+
111
+ ### v3p convert
112
+
113
+ Convert between point cloud formats.
114
+
115
+ ```bash
116
+ v3p convert --input-path <path> --output-path <path> [options]
117
+ ```
118
+
119
+ Options:
120
+ - `--input-path`: Path to input file (required)
121
+ - `--output-path`: Path to output file (required)
122
+ - `--input-format`: Input format - auto, ply, pcd, xyz (default: auto)
123
+ - `--output-format`: Output format - ply, pcd, xyz (default: ply)
124
+ - `--binary`: Write binary format when supported (default: True)
125
+ - `--verbose`: Enable verbose output
126
+
127
+ ## Configuration with params-proto
128
+
129
+ v3p uses [params-proto](https://github.com/geyang/params-proto) for configuration management. This allows you to:
130
+
131
+ 1. **Set parameters via CLI**: All config class attributes become CLI flags
132
+ 2. **Set parameters programmatically**: Modify class attributes directly
133
+ 3. **Use sweep files**: Generate parameter sweeps for batch processing
134
+
135
+ Example sweep file:
136
+
137
+ ```python
138
+ from params_proto import Sweep
139
+ from v3p.scripts.process import ProcessConfig
140
+
141
+ with Sweep(ProcessConfig) as sweep:
142
+ ProcessConfig.input_path = "input.ply"
143
+ with sweep.product:
144
+ ProcessConfig.voxel_size = [0.01, 0.02, 0.05]
145
+
146
+ sweep.save("process_sweep.jsonl")
147
+ ```
148
+
149
+ ## Development
150
+
151
+ ```bash
152
+ # Install dev dependencies
153
+ pip install -e ".[dev]"
154
+
155
+ # Run tests
156
+ make test
157
+
158
+ # Build and preview documentation
159
+ make preview
160
+
161
+ # Build wheel
162
+ make wheel
163
+
164
+ # Publish to PyPI
165
+ make publish
166
+ ```
167
+
168
+ ## Documentation
169
+
170
+ Full documentation: https://v3p.readthedocs.io/en/latest/
171
+
172
+ ## License
173
+
174
+ MIT
@@ -0,0 +1,11 @@
1
+ v3p/__init__.py,sha256=rlCs9rH3_Ad5ONMMEwaF6z3-fZoe5iKy4GBOrQ0CyrA,151
2
+ v3p/scripts/__init__.py,sha256=RY1HbyhfgROTqabREzyOsvdiaLnkYByOJBvjhXV0wUg,23
3
+ v3p/scripts/cli.py,sha256=MrVoxz-zu6mu6X7u4ZiTTczPEQv7ByDgEK9If5pEMr0,1104
4
+ v3p/scripts/convert.py,sha256=kKslOKLSF-vblE_ZDAq2S4PYHjdqo9VD8JU5SvbV4oM,1177
5
+ v3p/scripts/process.py,sha256=PStFgWSDxptP8PWkgvqd46CFNmgtB1NtfRLBQ2FL8g8,1374
6
+ v3p-0.1.0.dist-info/licenses/LICENSE,sha256=ViVJUWot4p3kmGwzBBRu6vqoBFQuLFKyGIR3jzh4X_A,1064
7
+ v3p-0.1.0.dist-info/METADATA,sha256=jklAMqeU_4oxmOa_zg9GEXnzRG6CtArodIHzJoSmVXo,4365
8
+ v3p-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ v3p-0.1.0.dist-info/entry_points.txt,sha256=1ylylWLGt8KrQitXSd5urf_sDCNbbXBaGGtvFKmyl6M,122
10
+ v3p-0.1.0.dist-info/top_level.txt,sha256=wKNNPrpvpbRlZT92HhhBbgwypZosamm3ZaO-WYNbAiQ,4
11
+ v3p-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ v3p = v3p.scripts.cli:cli
3
+ v3p-convert = v3p.scripts.convert:main
4
+ v3p-process = v3p.scripts.process:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ge Yang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ v3p