Skip to content

Temporal filtering of the camera poses #4068

Temporal filtering of the camera poses

Temporal filtering of the camera poses #4068

name: Continuous Integration
on:
push:
branches:
- master
- develop
# Skip jobs when only documentation files are changed
paths-ignore:
- '**.md'
- '**.rst'
- '**.db'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- '**.db'
- 'docs/**'
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: "alicevision/alicevision-deps:2025.08.05-rocky9-cuda12.1.1"
env:
DEPS_INSTALL_DIR: /opt/AliceVision_install
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
ALICEVISION_ROOT: ${{ github.workspace }}/../AV_install
ALICEVISION_SENSOR_DB: ${{ github.workspace }}/../AV_install/share/aliceVision/cameraSensors.db
ALICEVISION_LENS_PROFILE_INFO: ""
steps:
- uses: actions/checkout@v1
- name: Prepare File Tree
run: |
mkdir ./build
mkdir ./build_as_3rdparty
mkdir ./functional_tests
mkdir ../AV_install
- name: Configure CMake
working-directory: ./build
run: |
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_PREFIX_PATH="${DEPS_INSTALL_DIR}" \
-DCMAKE_INSTALL_PREFIX="${ALICEVISION_ROOT}" \
-DTARGET_ARCHITECTURE=core \
-DALICEVISION_BUILD_TESTS=ON \
-DALICEVISION_BUILD_SWIG_BINDING=ON \
-DALICEVISION_USE_OPENCV=ON \
-DALICEVISION_USE_CUDA=ON \
-DALICEVISION_USE_CCTAG=ON \
-DALICEVISION_USE_POPSIFT=ON \
-DALICEVISION_USE_ALEMBIC=ON \
-DOpenCV_DIR="${DEPS_INSTALL_DIR}/share/OpenCV" \
-DALICEVISION_USE_OPENGV=ON \
-DCeres_DIR="${DEPS_INSTALL_DIR}/share/Ceres" \
-DAlembic_DIR="${DEPS_INSTALL_DIR}/lib/cmake/Alembic" \
-DSWIG_DIR="${DEPS_INSTALL_DIR}/share/swig/4.3.0" \
-DSWIG_EXECUTABLE="${DEPS_INSTALL_DIR}/bin-deps/swig" \
-DPython3_EXECUTABLE=/usr/bin/python
- name: Build
working-directory: ./build
run: |
make -j$(nproc)
- name: Install
working-directory: ./build
run: |
make install
- name: Unit Tests
working-directory: ./build
run: |
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
make test
- name: Build As Third Party
working-directory: ./build_as_3rdparty
run: |
cmake ../src/software/utils/aliceVisionAs3rdParty \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH="$PWD/../../AV_install;${DEPS_INSTALL_DIR}"
make -j$(nproc)
- name: Functional Tests - PanoramaFisheyeHdr Pipeline
working-directory: ./functional_tests
run: |
# Clone required repos
git clone --branch develop https://github.com/alicevision/Meshroom.git
git clone --branch main https://github.com/alicevision/dataset_panoramaFisheyeHdr.git
cd Meshroom/
meshroom_avBranch=$(git ls-remote --heads https://github.com/alicevision/Meshroom.git $GITHUB_HEAD_REF | cut -f 1)
if [ $meshroom_avBranch != "" ]; then git checkout $meshroom_avBranch; echo "Use Meshroom/$GITHUB_HEAD_REF"; fi
# Set environment variables specific to Meshroom
export MESHROOM_INSTALL_DIR=$PWD
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
# Set environment variables to find executables and libraries
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
# Run the test pipeline
python -m pip install psutil
cd bin/
mkdir ./outputData
python meshroom_batch -i $PWD/../../dataset_panoramaFisheyeHdr/RAW -p panoramaFisheyeHdr -o $PWD/../outputData
- name: Functional Tests - SfM Quality Evaluation
working-directory: ./functional_tests
run: |
git clone --branch master https://github.com/alicevision/SfM_quality_evaluation.git
cd SfM_quality_evaluation/
# Checkout a specific commit to ensure repeatability
git checkout 36e3bf2d05c64d1726cb4a0e770923794f203f98
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python$:{PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
python EvaluationLauncher.py -s ${ALICEVISION_ROOT}/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v
- name: Python Binding - Unit Tests
run: |
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
python -m pip install pytest
pytest ./pyTests
- name: Meshroom Plugin - Templates validity
working-directory: ./functional_tests
run: |
# Clone and checkout mrSegmentation, align the branch if necessary
git clone https://github.com/meshroomHub/mrSegmentation.git
cd mrSegmentation
mrSegmentation_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrSegmentation.git $GITHUB_HEAD_REF | cut -f 1)
if [ $mrSegmentation_avBranch != "" ]; then git checkout $mrSegmentation_avBranch; echo "Use mrSegmentation/$GITHUB_HEAD_REF"; fi
cd ..
# Clone and checkout mrBlenderSfmRenderer, align the branch if necessary
git clone https://github.com/meshroomHub/mrBlenderSfmRenderer.git
cd mrBlenderSfmRenderer
mrBlenderSfmRenderer_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrBlenderSfmRenderer.git $GITHUB_HEAD_REF | cut -f 1)
if [ $mrBlenderSfmRenderer_avBranch != "" ]; then git checkout $mrBlenderSfmRenderer_avBranch; echo "Use mrBlenderSfmRenderer/$GITHUB_HEAD_REF"; fi
cd ../Meshroom/
export MESHROOM_INSTALL_DIR=$PWD
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom:$PWD/../mrSegmentation/meshroom:$PWD/../mrBlenderSfmRenderer/meshroom
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
echo "
import sys
from meshroom.core import test
if test.checkAllTemplatesVersions():
sys.exit(0)
sys.exit(1)
" | tee test_templatesVersions.py
python test_templatesVersions.py
build-windows:
runs-on: windows-latest
env:
DEPS_INSTALL_DIR: '${{ github.workspace }}/install'
buildDir: '${{ github.workspace }}/build/'
vcpkgDir: '${{ github.workspace }}\..\vcpkg'
vcpkgArchive: '${{ github.workspace }}\..\vcpkg\installed.zip'
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
ALICEVISION_ROOT: '${{ github.workspace }}/install'
ALICEVISION_LIBPATH: '${{ github.workspace }}/install/bundle/bin'
VCPKG_ROOT: '${{ github.workspace}}\..\vcpkg'
PYTHONPATH: '${{ github.workspace }}/install/bundle/lib/python;${{ github.workspace }}/install/bundle/lib64/python'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install numpy and pytest
run: |
pip install numpy==1.*
pip install pytest
- name: vcpkg - Clone repository
# Uses a specific version of vcpkg
run: |
cd ..
git clone https://github.com/alicevision/vcpkg.git
cd vcpkg
cd ${{ github.workspace }}
- name: vcpkg - Bootstrap
run: |
${{ env.vcpkgDir }}\bootstrap-vcpkg.bat
- name: vcpkg - Download zip file with prebuilt binaries
uses: suisei-cn/[email protected]
id: vcpkgDownload
with:
url: "https://github.com/alicevision/vcpkg/releases/download/2025.07.08/aliceVisionDeps-2025.07.08.zip"
target: "${{ env.vcpkgDir }}"
filename: installed.zip
- name: vcpkg - Unzip prebuilt binaries
run: |
tar -xvzf "${{ env.vcpkgArchive }}" -C "${{ env.vcpkgDir }}"
- name: vcpkg - Display installed packages
run: |
${{ env.vcpkgDir }}\vcpkg list
- name: vcpkg - Remove zip file with prebuilt binaries
run: |
rm ${{ env.vcpkgArchive }}
- name: Get CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.5.0'
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "cusparse", "npp", "npp_dev", "cufft", "cufft_dev"]'
# Install latest CMake.
- uses: lukka/get-cmake@latest
- name: Build
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target install'
cmakeAppendedArgs: -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=x64-windows-release
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-A x64 -T host=x64
-DBUILD_SHARED_LIBS=ON
-DTARGET_ARCHITECTURE=core
-DCMAKE_INSTALL_PREFIX=${{ env.ALICEVISION_ROOT }}
-DALICEVISION_BUILD_TESTS=ON
-DALICEVISION_USE_OPENCV=ON
-DALICEVISION_USE_CUDA=ON
-DALICEVISION_USE_CCTAG=OFF
-DALICEVISION_USE_POPSIFT=OFF
-DALICEVISION_USE_ALEMBIC=ON
-DALICEVISION_USE_OPENGV=OFF
-DALICEVISION_BUILD_PHOTOMETRICSTEREO=OFF
-DALICEVISION_BUILD_SEGMENTATION=OFF
-DALICEVISION_BUILD_SWIG_BINDING=ON
-DALICEVISION_INSTALL_MESHROOM_PLUGIN=OFF
-DPython3_EXECUTABLE=${{ env.pythonLocation }}\python
-DBOOST_NO_CXX11=ON
cmakeBuildType: Release
buildWithCMake: true
- name: Bundle
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target bundle'
cmakeAppendedArgs: -DCMAKE_INSTALL_PREFIX:PATH=${{ env.ALICEVISION_ROOT }}
cmakeBuildType: Release
buildWithCMake: true
- name: Python Binding - Unit Tests
run: |
pytest ./pyTests
- name: Unit Tests
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target RUN_TESTS'
cmakeAppendedArgs: -DCMAKE_INSTALL_PREFIX:PATH=${{ env.ALICEVISION_ROOT }}
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
useVcpkgToolchainFile: true
buildWithCMake: true