From ef6bbba8e1adb0304fac48ce03ec240232122495 Mon Sep 17 00:00:00 2001 From: Sebastian Herholz Date: Wed, 26 Mar 2025 09:55:15 +0100 Subject: [PATCH 1/3] [vmm] Fixing wrong default value for the initial kappa --- openpgl/include/openpgl/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpgl/include/openpgl/config.h b/openpgl/include/openpgl/config.h index f48bfe70..240333a7 100644 --- a/openpgl/include/openpgl/config.h +++ b/openpgl/include/openpgl/config.h @@ -59,7 +59,7 @@ extern "C" // weighted EM arguments size_t initK{PGL_VMM_MAX_COMPONENTS / 2}; - float initKappa{0.5f}; + float initKappa{5.0f}; size_t maxK{PGL_VMM_MAX_COMPONENTS}; size_t maxEMIterrations{100}; From e69f3422dca123d6bf907ecd447d836fde8421f6 Mon Sep 17 00:00:00 2001 From: Sebastian Herholz Date: Sun, 31 May 2026 21:06:35 +0200 Subject: [PATCH 2/3] [vmm] Syncing default values --- openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h | 4 ++-- .../vmm/ParallaxAwareVonMisesFisherWeightedEMFactory.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h b/openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h index 98e9ef6b..0bea6916 100644 --- a/openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h +++ b/openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h @@ -35,8 +35,8 @@ struct AdaptiveSplitAndMergeFactory { typename WeightedEMFactory::Configuration weightedEMCfg; - float splittingThreshold{0.75f}; - float mergingThreshold{0.00625f}; + float splittingThreshold{0.5f}; + float mergingThreshold{0.025f}; bool useSplitAndMerge{true}; diff --git a/openpgl/directional/vmm/ParallaxAwareVonMisesFisherWeightedEMFactory.h b/openpgl/directional/vmm/ParallaxAwareVonMisesFisherWeightedEMFactory.h index 0e282a0a..25f74d06 100644 --- a/openpgl/directional/vmm/ParallaxAwareVonMisesFisherWeightedEMFactory.h +++ b/openpgl/directional/vmm/ParallaxAwareVonMisesFisherWeightedEMFactory.h @@ -38,14 +38,14 @@ struct ParallaxAwareVonMisesFisherWeightedEMFactory float maxKappa{OPENPGL_MAX_KAPPA}; float maxMeanCosine{KappaToMeanCosine(OPENPGL_MAX_KAPPA)}; - float convergenceThreshold{0.0025f}; + float convergenceThreshold{0.005f}; // MAP prior parameters // weight prior - float weightPrior{0.1f}; + float weightPrior{0.01f}; // concentration/meanCosine prior - float meanCosinePriorStrength{0.1f}; + float meanCosinePriorStrength{0.2f}; float meanCosinePrior{0.0f}; void init(); From 87715c4594af94508e15df123747ee147e2197f7 Mon Sep 17 00:00:00 2001 From: Sebastian Herholz Date: Sun, 31 May 2026 21:10:01 +0200 Subject: [PATCH 3/3] [cleanup] Fixing typo --- .../vmm/VMMChiSquareComponentSplitter.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openpgl/directional/vmm/VMMChiSquareComponentSplitter.h b/openpgl/directional/vmm/VMMChiSquareComponentSplitter.h index 5bbc2eb9..100f2bae 100644 --- a/openpgl/directional/vmm/VMMChiSquareComponentSplitter.h +++ b/openpgl/directional/vmm/VMMChiSquareComponentSplitter.h @@ -252,16 +252,16 @@ void VonMisesFisherChiSquareComponentSplitter::PerformSplitting(VMM { // std::cout << "split[" << k << "]: idx:" << splitComps[k].componentIndex << "\t chi2: " << splitComps[k].chiSquareEst << std::endl; #ifndef OPENPGL_USE_THREE_SPLIT - bool splitSucess = SplitComponent(vmm, splitStatistics, suffStatistics, splitComps[k].componentIndex); + bool splitSuccess = SplitComponent(vmm, splitStatistics, suffStatistics, splitComps[k].componentIndex); mask.setToTrue(splitComps[k].componentIndex); mask.setToTrue(vmm._numComponents - 1); #else - bool splitSucess = SplitComponentIntoThree(vmm, splitStatistics, suffStatistics, splitComps[k].componentIndex); + bool splitSuccess = SplitComponentIntoThree(vmm, splitStatistics, suffStatistics, splitComps[k].componentIndex); mask.setToTrue(splitComps[k].componentIndex); mask.setToTrue(vmm._numComponents - 2); mask.setToTrue(vmm._numComponents - 1); #endif - if (splitSucess) + if (splitSuccess) { stopSplitting = false; } @@ -330,22 +330,22 @@ void VonMisesFisherChiSquareComponentSplitter::PerformRecursiveSpli if (splitComps[k].chiSquareEst > splitThreshold && vmm._numComponents < VMM::MaxComponents) { #ifndef OPENPGL_USE_THREE_SPLIT - bool splitSucess = SplitComponent(vmm, splitStatistics, tempSuffStatistics, splitComps[k].componentIndex); - if (splitSucess) + bool splitSuccess = SplitComponent(vmm, splitStatistics, tempSuffStatistics, splitComps[k].componentIndex); + if (splitSuccess) { mask.setToTrue(splitComps[k].componentIndex); mask.setToTrue(vmm._numComponents - 1); } #else - bool splitSucess = SplitComponentIntoThree(vmm, splitStatistics, tempSuffStatistics, splitComps[k].componentIndex); - if (splitSucess) + bool splitSuccess = SplitComponentIntoThree(vmm, splitStatistics, tempSuffStatistics, splitComps[k].componentIndex); + if (splitSuccess) { mask.setToTrue(splitComps[k].componentIndex); mask.setToTrue(vmm._numComponents - 1); mask.setToTrue(vmm._numComponents - 2); } #endif - if (splitSucess) + if (splitSuccess) { numSplits++; }