Skip to main content

Generalizable Perception Stack for 3D, 4D, spatial AI and scene understanding

Project description

UniCeption

UniCeption houses modular building blocks for developing and training generalizable perception models for all things related to 3D, 4D, spatial AI and scene understanding. It is designed to be flexible and extensible, allowing researchers to easily experiment with different architectures and configurations.

Please refer to the Developer Guidelines for contributing to the project.

Installation

Install from PyPI

The easiest way to install UniCeption is from PyPI:

# Install with base dependencies
pip install uniception

# Optional: Install with XFormers support
pip install "uniception[xformers]"

# Optional: Install with development tools
pip install "uniception[dev]"

# Optional: Install all optional dependencies
pip install "uniception[all]"

Install from Source

Clone the repository to your local machine by running the following command:

git clone git@github.com:castacks/UniCeption.git
cd UniCeption

Standard Installation

Install the uniception package in development mode by running the following commands:

# Please use Conda or Python Virtual Environment based on your preference
# For Conda Environment
conda create --name uniception python=3.12
conda activate uniception
# For Python Virtual Environment
virtualenv uniception
source uniception/bin/activate

# Install UniCeption with base dependencies (includes PyTorch)
pip install -e .

# Optional: Install with XFormers support
pip install -e ".[xformers]"

# Optional: Install with development tools
pip install -e ".[dev]"

# Optional: Install all optional dependencies
pip install -e ".[all]"

# Setup pre-commit hooks for development
pre-commit install

Optional: CroCo RoPE Extension Installation

To use CroCo models with the custom RoPE kernel:

# Recommended: Use the console script
uniception-install-croco

# Alternative: Set environment variable during installation
INSTALL_CROCO_ROPE=true pip install -e .

# Manual compilation (if needed)
cd uniception/models/libs/croco/curope
python setup.py build_ext --inplace
cd ../../../../../

Installation Validation and Dependency Checking

After installation, use these console scripts to validate your setup:

# Validate installation and check dependencies
uniception-validate

# Check which optional dependencies are available
uniception-check-deps

Advanced Installation Options

Docker Installation (No Internet Access)

If you're working in a Docker container that already has Python dependencies installed but no internet access, you can install UniCeption in development mode without triggering network requests:

# Install only the package structure without dependencies
pip install --no-index --no-deps --no-build-isolation -e .

Note: This command assumes your Docker image already contains all required dependencies (PyTorch, etc.). Use uniception-validate after installation to verify all dependencies are available.

Offline Installation

For environments without internet access:

# 1. On a machine with internet access, prepare offline wheels
uniception-prepare-offline --output-dir offline_wheels --extras all

# 2. Copy the offline_wheels directory to your offline environment
# 3. Run the offline installation
cd offline_wheels
INSTALL_CROCO_ROPE=true INSTALL_XFORMERS=true ./install_offline.sh

Downloading Checkpoints

Download UniCeption format custom checkpoints:

# Download all available checkpoints
uniception-download-checkpoints

# Download specific folders only (e.g., encoders and prediction heads)
uniception-download-checkpoints --folders encoders prediction_heads

# Specify custom destination
uniception-download-checkpoints --destination /path/to/checkpoints

Available options:

  • --folders: Specify which folders to download. Choices: encoders, info_sharing, prediction_heads, examples (default: all folders)
  • --destination: Custom destination folder for downloaded checkpoints (default: current directory)

Currently Supported Components

Encoders

Please refer to the uniception/models/encoders directory for the supported encoders and documentation for adding new encoders. The supported encoders can be listed by running:

python3 -m uniception.models.encoders.list

Information Sharing Blocks

Please refer to the uniception/models/info_sharing directory for the supported information sharing blocks.


Prediction Heads

Please refer to the uniception/models/prediction_heads directory for the supported prediction heads.


Codebases built on top of UniCeption

Check out our following codebases which build on top of UniCeption:

License

The code in this repository is licensed under a fully open-source BSD 3-Clause License.

Acknowledgements

We thank the following projects for their open-source code: DUSt3R, MASt3R, MoGe, HF PyTorch Image Models, and all the other pre-trained image encoders featured in this repo.

Contributing & Developer Guidelines

If you find our work useful, please consider giving it a star ⭐. We welcome contributions to UniCeption! Whether it's fixing bugs, adding new features, or improving documentation, your help is appreciated.

Please follow these guidelines when contributing to UniCeption:

  • Code Style: Follow the Google Python Style Guide for code style.
  • Documentation: Add docstrings to all classes and methods.
  • Unit Tests: Add necessary unit tests to the tests folder.
  • Linting: Run black & isort on your code before committing. For example, you can run black . && isort ..

Please create a pull request for any changes you make, and ensure that all tests pass before merging. We also encourage you to open issues for discussion before starting on larger features or changes. Also please feel free to add further unit tests to the tests folder to ensure the correctness of your changes.

Maintainers

UniCeption is maintained by the AirLab. In particular, feel free to reach out to the following maintainers for any questions or issues (Github issues are preferred):

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uniception-0.1.1.tar.gz (119.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uniception-0.1.1-py3-none-any.whl (167.1 kB view details)

Uploaded Python 3

File details

Details for the file uniception-0.1.1.tar.gz.

File metadata

  • Download URL: uniception-0.1.1.tar.gz
  • Upload date:
  • Size: 119.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uniception-0.1.1.tar.gz
Algorithm Hash digest
SHA256 16b204bc74203f1901c40b8c44b0fa2a022b6e4089428742148e279b120c63c9
MD5 b256aab60fe7da6b9b0ac26b34a695c4
BLAKE2b-256 8811d667fa3bd627615ae0a1a819542fe6495630402c11b8644a32abd0af24f4

See more details on using hashes here.

File details

Details for the file uniception-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: uniception-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 167.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uniception-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5b2eb78f88a015c7dfa82af0e8b668269ec1ea49ecc88e0dd0361da22dcdd2
MD5 d140e3d465eeee21cf10e0a5ac6bbd65
BLAKE2b-256 f5367d4e9714adeb0eb0affe376dbf78103b5936434849a695f3b6bdd38b76ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page