Add macOS Compatibility with CPU Support and Interactive CLI #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
macOS Compatibility Update for DepthCrafter
Summary
This PR adds full macOS support (Apple Silicon & Intel) to DepthCrafter with CPU-based processing, enhanced video handling, and an interactive CLI interface.
Key Changes
1. 🍎 macOS Compatibility
2. 🎬 Enhanced Video Processing
3. 🖥️ Interactive CLI Interface
4. 📁 Files Modified
Core Processing Files:
run.py- Added macOS device detection, FP32 support, frame limiting optionsapp.py- Updated for CPU/MPS compatibilitydepthcrafter/depth_crafter_ppl.py- Fixed device detection, removed CUDA dependenciesdepthcrafter/unet.py- Updated comments for FP32depthcrafter/utils.py- Added FFmpeg fallback, video trimming, progress trackingNew Files:
interactive_cli.py- Complete interactive CLI interfacedepthcrafter_ui- Quick launcher scriptREADME_macOS.md- Comprehensive macOS documentationCLAUDE.md- Project documentation for AI assistantsUpdated:
requirements.txt- Added opencv-python for video processingbenchmark/demo.sh- Removed CUDA_VISIBLE_DEVICESFeatures Added
Video Trimming
Interactive CLI
# Launch interactive interface python interactive_cli.pyRobust Video Handling
Performance
Memory Requirements
Processing Times (M1 MacBook Pro, 150 frames)
Testing
Tested on:
Breaking Changes
None - Original CUDA functionality preserved when available
Migration Guide
For macOS users:
brew install ffmpegDocumentation
README_macOS.mdDependencies
opencv-pythonas optional dependencyFuture Improvements
Screenshots/Demo
Interactive CLI
Video Processing
Checklist
Related Issues
Addresses common macOS user requests for:
This PR makes DepthCrafter accessible to the entire macOS community while maintaining full compatibility with the original CUDA implementation.