Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ build
devel
provision/ansible/.password
.catkin_tools
kamera.egg-info
# uv lock file (optional, but can be committed for reproducible builds)
uv.lock
**.DS_Store
61 changes: 55 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,69 @@ KAMERA, or the **K**nowledge-guided Image **A**cquisition **M**anag**ER** and **

## Installation

### Recommended: Micromamba (Cross-Platform)

For best cross-platform support, especially for GDAL and pycolmap:

1. **Install micromamba**:
```bash
# Linux/macOS
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba

# Windows: See https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html
```

2. **Create environment** (uses conda-forge only):
```bash
git clone https://github.com/Kitware/kamera.git
cd kamera
micromamba env create -f environment.yml
micromamba activate kamera
pip install -e .
```

This automatically handles GDAL and pycolmap cross-platform without any platform-specific setup.

### Alternative: Pip/uv Installation

If you prefer pip-only installation (Linux/MacOS only):

1. **Install uv** (fast Python package manager):
```bash
# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
```

2. **Install the package**:
```bash
git clone https://github.com/Kitware/kamera.git
cd kamera
uv pip install -e .
```

**Platform-specific notes:**
- **Linux**: GDAL via system packages: `sudo apt-get install libgdal-dev python3-gdal`
- **macOS**: Install GDAL: `brew install gdal`

3. **Lint code** (optional):
```bash
uv pip install ruff
ruff check .
```

### Docker Images

```bash
git clone https://github.com/Kitware/kamera.git
cd kamera
# For the pure post-processing and generating flight summary, you can install
# the requirements in requirements.txt, or use the provided dockerfile
# For the pure post-processing and generating flight summary
make postflight
# Builds the core docker images for use in the onboard sytems
# Builds the core docker images for use in the onboard systems
make nuvo
# if using VIAME for the DL detectors
make viame
# if using the real-time GUI
make gui
```
Note that these images take up a large amount of disk space, especially the VIAME image which is 30Gb, and it can take several hours to builds. The core images are faster and lighter weight.
Note that these images take up a large amount of disk space, especially the VIAME image which is 30Gb, and it can take several hours to build. The core images are faster and lighter weight.

## Partners and Acknowledgements
KAMERA was developed in collaboration with:
Expand Down
6 changes: 5 additions & 1 deletion docker/core.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ FROM kamera/base/core-deps:latest
COPY . /root/kamera
WORKDIR /root/kamera

# Install uv for Python package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

# use the exec form of run because we need bash syntax
RUN [ "/bin/bash", "-c", "source /entry/project.sh && catkin build -s backend"]
# python package is currently only supported for python3.10+, not on ubuntu20.04
# RUN [ "/bin/bash", "-c", "pip install ."]
# When Python 3.10+ is available, uncomment:
# RUN [ "/bin/bash", "-c", "uv pip install --system -e ."]



Expand Down
5 changes: 4 additions & 1 deletion docker/gui.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ RUN find /home/user -not -user user -execdir chown user {} \+

# use the exec form of run because we need bash syntax
USER user
# Install uv for Python package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

RUN [ "/bin/bash", "-c", "source /entry/project.sh && catkin build wxpython_gui "]
RUN [ "/bin/bash", "-c", "source /entry/project.sh && catkin build ins_driver "]
RUN [ "/bin/bash", "-c", "pip install -e ."]
RUN [ "/bin/bash", "-c", "uv pip install --system -e ."]
USER root
RUN find /home/user -not -user user -execdir chown user {} \+
USER user
Expand Down
14 changes: 10 additions & 4 deletions docker/kamerapy.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ RUN apt-get update && apt-get install -yq \
libxext6 \
redis \
dnsutils \
gdal-bin
gdal-bin \
curl \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip
RUN pip install setuptools==57.0.0
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

COPY ./ /src/kamera
WORKDIR /src/kamera
RUN pip install -e .

# Install kamera package using uv
# Note: GDAL is handled via system package (python3-gdal) on Linux
# For Windows, use: uv pip install -e .[windows]
RUN uv pip install --system -e .

ENTRYPOINT ["bash"]
45 changes: 45 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: kamera
channels:
- conda-forge
dependencies:
# Python version
- python>=3.10,<3.12

# Core scientific computing
- numpy>=2.1.1
- scipy>=1.14.1
- matplotlib>=3.9.2

# Image processing
- opencv>=4.10.0
- pillow>=10.4.0

# Geospatial libraries (conda-forge is best for cross-platform support)
- gdal>=3.9.2 # Cross-platform GDAL with all drivers
- shapely>=2.0.6

# Computer vision / 3D reconstruction
- pycolmap>=3.13.0 # Pre-built binaries work cross-platform
# Note: If you encounter Qt5/Qt6 conflicts, run: ./fix_qt_conflict.sh
# or manually remove Qt6: micromamba remove qt-main qt6-* -n kamera

# Utilities
- pyyaml>=6.0.2
- rich>=13.9.1

# Pip-only packages (install via pip after conda)
# These packages are not available in conda-forge or are better maintained on PyPI
- pip
- pip:
- pygeodesy>=24.9.29
- pyshp>=2.3.1
- simplekml>=1.3.6
- transformations>=2024.5.24
- scriptconfig>=0.8.0
- ubelt>=1.3.6
- exifread>=3.0.0
- ipdb>=0.13.13
- bottle>=0.13.2
# After creating this environment, install the kamera package itself:
# pip install -e . (from the project root directory)

Loading