Skip to content

Refactor PLY loader with configurable colors and logging#25

Open
ironman1947 wants to merge 1 commit into
humanai-foundation:mainfrom
ironman1947:fix/configurable-ply-loader
Open

Refactor PLY loader with configurable colors and logging#25
ironman1947 wants to merge 1 commit into
humanai-foundation:mainfrom
ironman1947:fix/configurable-ply-loader

Conversation

@ironman1947

@ironman1947 ironman1947 commented Feb 11, 2026

Copy link
Copy Markdown

Summary

Hello maintainers

While exploring the preprocessing pipeline, I refactored ply_loader.py to improve code quality, maintainability, and robustness. The changes move away from hardcoded values and print debugging to a more production-ready approach.

Key Changes

  • Configurable Color Detection: Replaced hardcoded color thresholds with a DEFAULT_COLOR_CONFIG dictionary and added support for custom configurations in the loader initialization.
  • Logging: Replaced print statements with Python's standard logging module (INFO, WARNING, ERROR, DEBUG) for better output control.
  • Type Safety: Added comprehensive Python type hints (e.g., List, Dict, Optional, o3d.geometry.TriangleMesh) to all methods.
  • Cleanup: Removed unused imports (DBSCAN, matplotlib) and unused utility methods.

Verification

  • Added a reproduction script reproduce_issue.py that generates a dummy PLY file with known colored vertices.
  • Verified that the refactored loader correctly identifies Red, Green, and Blue regions using the new configuration.

Notes

I’m continuing to explore the reconstruction pipeline and would really appreciate feedback on whether this direction aligns with the project goals. Happy to iterate if any changes are preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant