• Keine Ergebnisse gefunden

4.2 Assembly Localization

4.2.4 Weighting Function Manipulation

parame-4.2 Assembly Localization

ters with large variance. After whitening, the particles undergo a mean shift as indicated in line 5. Note that the bandwidth parameter bis decreased by 0 < λ < 1 at each of theIiterations. The decrease aims at changing the smoothing behavior of kernelK. We will discuss this heuristic in Chap. 4.2.5 and present an alternative and theoretically more promising approach. Line 6 of the algorithm transforms the shifted samples back to their original parameter space. Additionally, the particle positions are perturbed by some small random noise, in order to push them away from local density plateaus. Afterwards, the particle weights are updated according to Eqn. (4.24) and normalized such that they sum up to 1.

Formally, kernel particle filtering is strongly related to SIR particle filtering. In fact, we have seen that kernel particle filtering is mean shift guided CONDENSATION. The fast conversion of the mean shift to local modes of the posterior estimate explains why, compared to SIR particle filtering, the KPF algorithm successfully increases the particle survival rate α from (4.14). However, Chang & Ansari restrict the evaluation of their algorithm to state spaces of dimension3≤d≤9. And in our application context, kernel particle filtering still needs intractably many particles to localize even simple assemblies with competitive accuracy and precision. This thesis therefore contributes several exten-sions to Alg. 2. The extended kernel particle filter (EKPF) facilitates the computationally tractable localization of multi-part assemblies with competitive accuracy and precision.

4 Assembly Inspection

(a) (b)

Figure 4.7: The effects of weighting function manipulation. a) Typical posterior pdfs exhibit narrow peaks and regions of near zero density. The vertical bars denote particle po-sitions (a 1D state space was chosen for illustrative purposes). For the particle high-lighted in red, an exemplary kernel range is indicated. A mean shift with this band-width wouldn’t move the highlighted particle because no density gradient is detectable within its kernel range. b) The posterior after weighting function manipulation, with the same set of particles. A mean shift step would now shift the highlighted particle towards the nearest density mode

Such peaks occur because the standard deviationsσcof the Gaussian cue weighting func-tions (4.10) are typically chosen close to zero. As a result, very narrow peaks are induced to the observation density, which in turn leads to narrow peaks in the estimated poste-rior. An illustrative example is given with the highest peak at the figure’s left side. Note that the particles completely miss the peak. Therefore, a mean shift step doesn’t detect density gradients towards it.

For assemblies with many DOF, sparse sampling is inevitable because the associated par-ticle state space is extremely large. The question thus is how to deal with the problem of narrow peaks and density plateaus. Chang & Ansari [CA03] proceed by using a large initial kernel bandwidth b0. The largerb0 is, the more likely particles of non-zero den-sity fall into the kernel range and draw other particles away from plateaus. However, the problem of missed narrow peaks remains. Also, the posterior pdf is now grossly oversmoothed. This flattens out peaks and blends them together. As a result, the KDE variance is decreased and the oversmoothed density yields a coarse indication of state space regions with density peaks. On the other hand side, oversmoothing increases the KDE bias. Chang & Ansari thus decrease the kernel bandwidth after each iteration of mean shift by a constant factor.

In this thesis, it was decided to decouple the bandwidth selection from the problems of dealing with density plateaus and narrow peaks. The solution to the former problem is

4.2 Assembly Localization

discussed in Chap. 4.2.5. Regarding the latter problem, the heuristic that is used in the following manipulates the Gaussian cue weighting functions from (4.10). The manipula-tion reshapes the peaks of the estimated observamanipula-tion density from (4.12) such that they are widened. The estimated posterior is affected likewise which is illustrated in Fig. 4.7(b).

Here, the left-most peak is no longer missed. What is more, when applying the depicted example bandwidth, a non-zero posterior gradient can be determined for all particles.

Thus, a mean shift step now moves more particles towards the nearest local modes of the estimated posterior density.

Our approach is related to the annealed particle filteringconcept of Deutscher and col-leagues [DBR00]. In their setting, estimates ˆp(yt|snt)of the observation density are ob-tained by evaluating a weighting function w(yt,snt) that arises from the evaluation of simple image features and yields values in the range of[0,1]. In order to successively re-shape the peaks ofw(yt,snt), the authors exponentiate the weighting function by defining ˆ

p(yt|snt) = w(yt,snt)β. Starting with a value of β close to zero, the authors perform up to 10 iterations of CONDENSATION. For each iteration,βis increased which gradually narrows down the peaks of the estimated observation density and the associated estimate of the posterior.

In our case, the observation density is estimated by combining multiple cues as defined in (4.12) and (4.10), i.e.

ˆ

p(yt|snt) = Ncues−1

j

Y

k=1

X

c∈{fw,bw,col}

exp

−(fc(zkt,yt))2c2

, (4.26)

whereNcues is the number of cues and fc(zkt,yt)denotes a cue response that is assumed to be normally distributed. As indicated above, the cue specific standard deviation σc is typically chosen to be close to zero. In other words, each of the summed cue likelihoods is very sensitive to small deviations of the cue response fc(zkt,yt) from its optimum at 1. By artificially increasing σc, the sensitivity can be lowered in a controlled fashion.

Noting this, we enhanceσcin (4.26) with a rescale factorrc ≥1that is varied for each of thei= 1. . .I iterations of mean shift. From this we obtain

ˆ

p(yt|snt) = Ncues−1

j

Y

k=1

X

c∈{fw,bw,col}

exp

−(fc(zkt,yt))2 2(rcσc)2

. (4.27)

The KPF Algorithm is altered in the following way. For the first iterationi= 1of mean shift, the rc are assigned large values. Consequently, ˆp(yt|snt) exhibits comparatively broad peaks for the first application of mean shift. For the following iterations, the rc are decreased by a constant factor. Furthermore, the initial value of therc is chosen such

4 Assembly Inspection

(a) (b)

Figure 4.8: The effects of weighting function manipulation. a) An example image of an oil cap (courtesy of DaimlerChrysler AG). b) The posterior density of an oil cap model and the example image is estimated with one iteration of CONDENSATION, using the observation density estimate from (4.27) and varying scale factorsrc. The survival rateαof the resulting particle set is plotted against the scale factorsrc. The survival rate clearly increases with increasing values ofrc

that they converge to 1 at the final iteration i= Iof mean shift. At this final iteration of mean shift, the observation density estimate is thus determined from the original equation (4.26).

In contrast to Deutscher et al., our approach has the advantage that we can control the sen-sitivity of each cue independently. Another major difference between our KPF and their particle filter is the fact that we don’t need to perform intermediate CONDENSATION iterations on the particle sets in order to migrate particles to local modes in the posterior.

Our mean shift approach allows to do this much more efficiently. Typically, 2 or 3 ite-rations of mean shift are sufficient to locate the posterior modes while, in [DBR00], 10 annealing iterations are proposed.

The concept of weighting function manipulation is a heuristic that leads to initially broadly peaked estimates of the observation density and the posterior. The effect of this manipulation on the particle survival rate α is exercised in Fig. 4.8. It can be seen that the particle survival rate increases with increasing scale factors rc. However, with increasingly large scale factors, the bias of the estimated posterior grows rapidly. The scale factorsrc are therefore forced to converge to 1 at the final iteration of mean shift, as stated above, in order to translate the particles gradually to the true modes of the esti-mated posterior pdf. The heuristic is evaluated in the second experimental investigation of the following chapter. The evaluation yields empirical evidence that the heuristic

suc-4.2 Assembly Localization

Figure 4.9: Antagonal driving forces of bandwidth selection. The true density (solid line) is esti-mated with a small (dotted line) and a large kernel bandwidth (dashed line). The small bandwidth yields a reasonable estimate of the density peak but induces strong false local modes at the sparsely sampled density tail. The large bandwidth yields better approximation of the tail but grossly oversmooths the peak

cessfully increases the particle survival rate and thus improves the assembly localization accuracy and precision.