Skip to content

Repository analysis: Document CityGaussian functionality and identify 8 critical bugs#199

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-hidden-bugs
Draft

Repository analysis: Document CityGaussian functionality and identify 8 critical bugs#199
Copilot wants to merge 3 commits intomainfrom
copilot/fix-hidden-bugs

Conversation

Copy link

Copilot AI commented Feb 7, 2026

Comprehensive analysis of the CityGaussian large-scale 3D reconstruction framework, documenting architecture, identifying critical bugs, and providing fix recommendations.

Repository Functionality

CityGaussian implements ECCV 2024/ICLR 2025 papers for large-scale urban scene reconstruction using Gaussian Splatting:

  • Scale: 5-10M Gaussians, 500m+ scenes, multi-GPU distributed training
  • Architecture: Modular pipeline with 15+ dataset parsers, 30+ renderers, 10+ model variants
  • Features: Real-time rendering, geometric evaluation, mesh extraction, appearance optimization

Critical Bugs Identified (8)

🔴 Training Crashes (3)

1. Division by zero in gradient normalization (gaussian_splatting.py:404)

# Current - crashes when visibility_filter is empty
grad_norm_avg_final / grad_norm_avg  # ZeroDivisionError

# Fix: Add epsilon clamp
grad_norm_avg_safe = torch.clamp(grad_norm_avg, min=1e-10)

2. Index out of bounds in density controller (vanilla_density_controller.py:198)

# Current - crashes after Gaussian cloning
padded_grad[:grads.shape[0]] = grads.squeeze()  # IndexError

# Fix: Bounds checking
valid_size = min(grads.shape[0], n_init_points)
padded_grad[:valid_size] = grads.squeeze()[:valid_size]

3. SH channel indexing error (vanilla_gaussian.py:116)

# Current - incorrect indexing
shs[:, 3:, 1:] = 0.0  # RGB only has 3 channels

# Fix: Index all channels
shs[:, :, 1:] = 0.0

🟠 Functionality Issues (3)

4. Tensor type error - torch.zeros(N * tensor) requires int(tensor.sum())
5. RGBA uint8 failure - Missing alpha blending in uint8 code path
6. Distributed data bias - Uneven splitting causes duplicate training samples

🟡 Code Quality (2)

7. Bare except clause - Masks MemoryError/KeyboardInterrupt
8. Thread safety - Async caching accesses shared state without locks

Documentation

  • SUMMARY.md: Quick reference (bilingual)
  • REPOSITORY_ANALYSIS.md: Full English analysis (20KB)
  • REPOSITORY_ANALYSIS_CN.md: Full Chinese analysis (18KB)

Each bug includes file location, impact analysis, and fix recommendation with code examples.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 7, 2026 12:47
…nese)

Co-authored-by: DekuLiuTesla <48622392+DekuLiuTesla@users.noreply.github.com>
Co-authored-by: DekuLiuTesla <48622392+DekuLiuTesla@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix hidden bugs in code repository Repository analysis: Document CityGaussian functionality and identify 8 critical bugs Feb 7, 2026
Copilot AI requested a review from DekuLiuTesla February 7, 2026 12:50
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.

2 participants