Skip to main content

Table 3 The algorithm of CNIFA

From: CICHMKG: a large-scale and comprehensive Chinese intangible cultural heritage multimodal knowledge graph

Algorithm: Noise images filtration algorithm

Input: A dataset \(D=\{{x}_{1},{x}_{2},\dots ,{x}_{i},\dots ,{x}_{n}\}\). K: the optimal K value after K-means clustering, \(n\): the number of data, \(N\): the number of CICH noise images

Output: CICH noise image point set

1:

Extracted representation features \(\,E=\{{e}_{1},{e}_{2},\dots ,{e}_{i},\dots ,{e}_{n}\}= Extractor\left(D\right)\)

2:

Centroid point set \(\,C=\{{c}_{1},{c}_{2},\dots ,{c}_{j},\dots ,{c}_{K}\}=Kmeans(E,K)\)

3:

For each cluster \(\,{Q}_{j}\) in \(\,Q=\{{Q}_{1},{Q}_{2},\dots ,{Q}_{j},\dots ,{Q}_{K}\}\) do

4:

\(\,\,{Radius}_{{Q}_{j}}=radius ({Q}_{j})\)

5:

End for

6:

If the number of points in \(\,{Q}_{j}>N\):

7:

   For each point \({e}_{i}{\in Q}_{j}\) do

8:

     If \(distance\,({e}_{i},{c}_{j})\) > \({Radius}_{{Q}_{j}}\) then

9:

       Add \(\,{e}_{i}\) to \(\,S\)

10:

    Else

11:

      \(Continue\)

12:

   End for

13:

Else

14:

   For each point \(\,{e}_{i}{\in Q}_{j}\) do

15:

     Add \(\,{e}_{i}\) to \(\,S\)

16:

   End for

17:

For each point \(\,{e}_{i}\,\) in \(\,S\,\) do

18:

   Calculate \(\,CBLOF\,({e}_{i})\)

19:

End for

20:

The top-\(N\) points are the noise images based on the \(CBLOF \left({e}_{i}\right)\) value ranking results