From 9986986f8f954719ff789ebd2091152f46a84ca3 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Mon, 4 Apr 2022 21:22:31 +0200 Subject: [PATCH] People: Add info on the kind of face to improve matching #2182 This commit also fixes of other potential issues and improves logging. --- frontend/src/pages/people.vue | 2 +- internal/entity/{save.go => entity_save.go} | 24 ++--- internal/entity/entity_save_test.go | 64 +++++++++++ internal/entity/face.go | 78 ++++++++++---- internal/entity/face_test.go | 63 ++++++++--- internal/entity/marker.go | 16 +-- internal/entity/string_values.go | 19 +++- internal/entity/subject.go | 14 ++- internal/face/embedding.go | 33 +++--- internal/face/embedding_test.go | 31 ++++-- ...ddings_ignore.go => embeddings_ignored.go} | 29 +++-- ...ore_test.go => embeddings_ignored_test.go} | 102 +++++++++--------- internal/face/embeddings_kids.go | 11 ++ internal/face/embeddings_random.go | 98 +++++++++++++++++ internal/face/embeddings_random_test.go | 40 +++++++ internal/face/embeddings_test.go | 8 +- internal/photoprism/faces_audit.go | 18 ++-- internal/photoprism/faces_cluster.go | 4 +- internal/photoprism/faces_optimize.go | 2 +- internal/query/faces.go | 3 +- internal/query/faces_test.go | 4 +- pkg/clusters/clusters.go | 2 +- 22 files changed, 490 insertions(+), 175 deletions(-) rename internal/entity/{save.go => entity_save.go} (56%) create mode 100644 internal/entity/entity_save_test.go rename internal/face/{embeddings_ignore.go => embeddings_ignored.go} (99%) rename internal/face/{embeddings_ignore_test.go => embeddings_ignored_test.go} (99%) create mode 100644 internal/face/embeddings_random.go create mode 100644 internal/face/embeddings_random_test.go diff --git a/frontend/src/pages/people.vue b/frontend/src/pages/people.vue index 2da779d39..8e40c9c7a 100644 --- a/frontend/src/pages/people.vue +++ b/frontend/src/pages/people.vue @@ -23,7 +23,7 @@ - + diff --git a/internal/entity/save.go b/internal/entity/entity_save.go similarity index 56% rename from internal/entity/save.go rename to internal/entity/entity_save.go index 7ef71fd1a..f63923e5d 100644 --- a/internal/entity/save.go +++ b/internal/entity/entity_save.go @@ -3,6 +3,7 @@ package entity import ( "fmt" "reflect" + "runtime/debug" "strings" ) @@ -10,7 +11,7 @@ import ( func Save(m interface{}, primaryKeys ...string) (err error) { defer func() { if r := recover(); r != nil { - err = fmt.Errorf("save: %s (panic)", r) + err = fmt.Errorf("index: save failed (%s)\nstack: %s", r, debug.Stack()) log.Error(err) } }() @@ -32,29 +33,20 @@ func Save(m interface{}, primaryKeys ...string) (err error) { func Update(m interface{}, primaryKeys ...string) (err error) { defer func() { if r := recover(); r != nil { - err = fmt.Errorf("update: %s (panic)", r) + err = fmt.Errorf("index: update failed (%s)\nstack: %s", r, debug.Stack()) log.Error(err) } }() + // Return with error if a primary key is empty. v := reflect.ValueOf(m).Elem() - - // Abort if a primary key is zero. for _, k := range primaryKeys { - if field := v.FieldByName(k); field.IsZero() { - return fmt.Errorf("key '%s' not found", k) + if field := v.FieldByName(k); !field.CanSet() || field.IsZero() { + return fmt.Errorf("empty primary key '%s'", k) } } - // Update all values except primary keys. - if res := UnscopedDb().Model(m).Updates(GetValues(m, primaryKeys...)); res.Error != nil { - return res.Error - } else if res.RowsAffected > 1 { - log.Warnf("update: more than one row affected") - } else if res.RowsAffected == 0 { - // MariaDB may report zero rows in case no data was actually changed, even though the row exists. - log.Tracef("update: no rows affected") - } + err = UnscopedDb().FirstOrCreate(m, GetValues(m)).Error - return nil + return err } diff --git a/internal/entity/entity_save_test.go b/internal/entity/entity_save_test.go new file mode 100644 index 000000000..05a1cd785 --- /dev/null +++ b/internal/entity/entity_save_test.go @@ -0,0 +1,64 @@ +package entity + +import ( + "testing" + "time" + + "github.com/photoprism/photoprism/internal/face" + "github.com/photoprism/photoprism/pkg/rnd" + "github.com/stretchr/testify/assert" +) + +func TestUpdate(t *testing.T) { + t.Run("HasCreatedUpdatedAt", func(t *testing.T) { + m := NewFace(rnd.PPID('j'), SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) + id := m.ID + + m.CreatedAt = time.Now() + m.UpdatedAt = time.Now() + + if err := m.Save(); err != nil { + t.Fatal(err) + return + } + + found := FindFace(id) + + assert.NotNil(t, found) + assert.Equal(t, id, found.ID) + assert.Greater(t, time.Now(), m.UpdatedAt) + assert.Equal(t, found.CreatedAt.UTC(), m.CreatedAt.UTC()) + }) + t.Run("HasCreatedAt", func(t *testing.T) { + m := NewFace(rnd.PPID('j'), SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) + id := m.ID + + m.CreatedAt = time.Now() + + if err := m.Save(); err != nil { + t.Fatal(err) + return + } + + found := FindFace(id) + assert.NotNil(t, found) + assert.Equal(t, id, found.ID) + assert.Greater(t, time.Now().UTC(), m.UpdatedAt.UTC()) + assert.Equal(t, found.CreatedAt.UTC(), m.CreatedAt.UTC()) + }) + t.Run("NoCreatedAt", func(t *testing.T) { + m := NewFace(rnd.PPID('j'), SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) + id := m.ID + + if err := m.Save(); err != nil { + t.Fatal(err) + return + } + + found := FindFace(id) + assert.NotNil(t, found) + assert.Equal(t, id, found.ID) + assert.Greater(t, time.Now(), m.UpdatedAt.UTC()) + assert.Equal(t, found.CreatedAt.UTC(), m.CreatedAt.UTC()) + }) +} diff --git a/internal/entity/face.go b/internal/entity/face.go index 672db6179..40912d91c 100644 --- a/internal/entity/face.go +++ b/internal/entity/face.go @@ -19,6 +19,7 @@ var faceMutex = sync.Mutex{} type Face struct { ID string `gorm:"type:VARBINARY(42);primary_key;auto_increment:false;" json:"ID" yaml:"ID"` FaceSrc string `gorm:"type:VARBINARY(8);" json:"Src" yaml:"Src,omitempty"` + FaceKind int `json:"Kind" yaml:"Kind,omitempty"` FaceHidden bool `json:"Hidden" yaml:"Hidden,omitempty"` SubjUID string `gorm:"type:VARBINARY(42);index;default:'';" json:"SubjUID" yaml:"SubjUID,omitempty"` Samples int `json:"Samples" yaml:"Samples,omitempty"` @@ -54,15 +55,23 @@ func NewFace(subjUID, faceSrc string, embeddings face.Embeddings) *Face { return result } -// OmitMatch checks whether the face should be skipped when matching. -func (m *Face) OmitMatch() bool { - return m.Embedding().OmitMatch() +// SkipMatching checks whether the face should be skipped when matching. +func (m *Face) SkipMatching() bool { + return m.Embedding().SkipMatching() } // SetEmbeddings assigns face embeddings. func (m *Face) SetEmbeddings(embeddings face.Embeddings) (err error) { + if len(embeddings) == 0 { + return fmt.Errorf("empty") + } + m.embedding, m.SampleRadius, m.Samples = face.EmbeddingsMidpoint(embeddings) + if len(m.embedding) != len(face.NullEmbedding) { + return fmt.Errorf("invalid number of values") + } + // Limit sample radius to reduce false positives. if m.SampleRadius > 0.35 { m.SampleRadius = 0.35 @@ -75,16 +84,12 @@ func (m *Face) SetEmbeddings(embeddings face.Embeddings) (err error) { } s := sha1.Sum(m.EmbeddingJSON) + + // Update Face ID, Kind, and reset match timestamp, m.ID = base32.StdEncoding.EncodeToString(s[:]) - m.UpdatedAt = TimeStamp() - - // Reset match timestamp. + m.FaceKind = int(m.embedding.Kind()) m.MatchedAt = nil - if m.CreatedAt.IsZero() { - m.CreatedAt = m.UpdatedAt - } - return nil } @@ -187,7 +192,7 @@ func (m *Face) ResolveCollision(embeddings face.Embeddings) (resolved bool, err if revised, err := m.ReviseMatches(); err != nil { return true, err } else if r := len(revised); r > 0 { - log.Infof("faces: revised %d matches after conflict", r) + log.Infof("faces: resolved %d conflicts", r) } return true, nil @@ -203,13 +208,13 @@ func (m *Face) ReviseMatches() (revised Markers, err error) { if err := Db().Where("face_id = ?", m.ID).Where("marker_type = ?", MarkerFace). Find(&matches).Error; err != nil { - log.Debugf("faces: %s (revise matches)", err) + log.Debugf("faces: found no matching markers for conflict resolution (%s)", err) return revised, err } else { for _, marker := range matches { if ok, _ := m.Match(marker.Embeddings()); !ok { if updated, err := marker.ClearFace(); err != nil { - log.Debugf("faces: %s (revise matches)", err) + log.Debugf("faces: failed to remove match with marker (%s)", err) // Conflict resolution return revised, err } else if updated { revised = append(revised, marker) @@ -230,7 +235,7 @@ func (m *Face) MatchMarkers(faceIds []string) error { Find(&markers).Error if err != nil { - log.Debugf("faces: %s (match markers)", err) + log.Debugf("faces: failed fetching markers matching face id %s (%s)", strings.Join(faceIds, ", "), err) return err } @@ -300,6 +305,10 @@ func (m *Face) Show() (err error) { // Save updates the existing or inserts a new face. func (m *Face) Save() error { + if m.ID == "" { + return fmt.Errorf("empty id") + } + faceMutex.Lock() defer faceMutex.Unlock() @@ -308,6 +317,10 @@ func (m *Face) Save() error { // Create inserts the face to the database. func (m *Face) Create() error { + if m.ID == "" { + return fmt.Errorf("empty id") + } + faceMutex.Lock() defer faceMutex.Unlock() @@ -316,6 +329,10 @@ func (m *Face) Create() error { // Delete removes the face from the database. func (m *Face) Delete() error { + if m.ID == "" { + return fmt.Errorf("empty id") + } + // Remove face id from markers before deleting. if err := Db().Model(&Marker{}). Where("face_id = ?", m.ID). @@ -328,28 +345,49 @@ func (m *Face) Delete() error { // Update a face property in the database. func (m *Face) Update(attr string, value interface{}) error { + if m.ID == "" { + return fmt.Errorf("empty id") + } + return UnscopedDb().Model(m).Update(attr, value).Error } // Updates face properties in the database. func (m *Face) Updates(values interface{}) error { + if m.ID == "" { + return fmt.Errorf("empty id") + } + return UnscopedDb().Model(m).Updates(values).Error } // FirstOrCreateFace returns the existing entity, inserts a new entity or nil in case of errors. func FirstOrCreateFace(m *Face) *Face { + if m == nil { + return nil + } + + if m.ID == "" { + return nil + } + result := Face{} - if err := UnscopedDb().Where("id = ?", m.ID).First(&result).Error; err == nil { - log.Warnf("faces: %s has ambiguous subject %s", m.ID, SubjNames.Log(m.SubjUID)) + // Search existing face with the same ID. Report if found and it belongs to another person. + if findErr := UnscopedDb().Where("id = ?", m.ID).First(&result).Error; findErr == nil && result.ID != "" { + if m.SubjUID != result.SubjUID { + log.Warnf("faces: %s has ambiguous subjects %s and %s", m.ID, SubjNames.Log(m.SubjUID), SubjNames.Log(result.SubjUID)) + } return &result - } else if createErr := m.Create(); createErr == nil { + } else if err := m.Create(); err == nil { return m - } else if err := UnscopedDb().Where("id = ?", m.ID).First(&result).Error; err == nil { - log.Warnf("faces: %s has ambiguous subject %s", m.ID, SubjNames.Log(m.SubjUID)) + } else if findErr = UnscopedDb().Where("id = ?", m.ID).First(&result).Error; findErr == nil && result.ID != "" { + if m.SubjUID != result.SubjUID { + log.Warnf("faces: %s has ambiguous subjects %s and %s", m.ID, SubjNames.Log(m.SubjUID), SubjNames.Log(result.SubjUID)) + } return &result } else { - log.Errorf("faces: %s when trying to create %s", createErr, m.ID) + log.Errorf("faces: failed adding %s (%s)", m.ID, err) } return nil diff --git a/internal/entity/face_test.go b/internal/entity/face_test.go index 264a23e52..0310df6ad 100644 --- a/internal/entity/face_test.go +++ b/internal/entity/face_test.go @@ -2,6 +2,7 @@ package entity import ( "testing" + "time" "github.com/photoprism/photoprism/internal/face" @@ -88,7 +89,7 @@ func TestFace_ResolveCollision(t *testing.T) { assert.Less(t, m.CollisionRadius, 1.272) }) t.Run("subject id empty", func(t *testing.T) { - m := NewFace("", SrcAuto, face.Embeddings{}) + m := NewFace("", SrcAuto, face.KidsEmbeddings) if reported, err := m.ResolveCollision(MarkerFixtures.Pointer("1000003-4").Embeddings()); err != nil { t.Fatal(err) } else { @@ -108,6 +109,7 @@ func TestFace_ResolveCollision(t *testing.T) { t.Run("embedding empty", func(t *testing.T) { m := NewFace("123", SrcAuto, face.Embeddings{}) m.EmbeddingJSON = []byte("") + m.ID = "foo" if reported, err := m.ResolveCollision(MarkerFixtures.Pointer("1000003-4").Embeddings()); err == nil { t.Fatal(err) } else { @@ -142,11 +144,11 @@ func TestNewFace(t *testing.T) { func TestFace_Unsuitable(t *testing.T) { t.Run("True", func(t *testing.T) { m := FaceFixtures.Get("joe-biden") - assert.False(t, m.OmitMatch()) + assert.False(t, m.SkipMatching()) }) t.Run("False", func(t *testing.T) { m := NewFace("", SrcImage, face.Embeddings{{-0.00959064718335867, 0.03787063807249069, -0.0030881548300385475, 0.02789853885769844, 0.017454572021961212, 0.0396987721323967, -0.03091704286634922, 0.005318029318004847, 0.021617550402879715, -0.08214963972568512, -0.003952134400606155, 0.0269720908254385, 0.048880551010370255, -0.03537372127175331, -0.042236171662807465, 0.021553633734583855, 0.03937383368611336, 0.01815507560968399, 0.08373168110847473, -0.11838400363922119, -0.038254253566265106, -0.04993032291531563, 0.07148619741201401, 0.006384310312569141, 0.05344310402870178, -0.027579499408602715, 0.021648988127708435, -0.07013172656297684, -0.06400937587022781, 0.10622639954090118, -0.01507984846830368, -0.02844894863665104, -0.013048898428678513, -0.03571505844593048, -0.022063886746764183, 0.022826166823506355, 0.01703103445470333, 0.00679031852632761, -0.09583312273025513, 0.03446732088923454, -0.045221585780382156, 0.03292521834373474, -0.012820744886994362, 0.06122862547636032, 0.01973198726773262, -0.013975882902741432, 0.027514882385730743, 0.12478502094745636, -0.09630053490400314, -0.008597812615334988, -0.019534612074494362, 0.03927983343601227, 0.04311678186058998, 0.025297729298472404, -0.035719674080610275, 0.05421024188399315, 0.07541341334581375, 0.040334682911634445, -0.0632546916604042, -0.004164006095379591, 0.027950556948781013, 0.017827920615673065, 0.02774866297841072, -0.025094853714108467, 0.00012262807285878807, 0.04165732488036156, -0.03155842795968056, 0.03801475837826729, 0.0031508952379226685, -0.011753040365874767, 0.06262513995170593, 0.05895991623401642, -0.02384188584983349, -0.025149181485176086, -0.016906173899769783, -0.03138834610581398, -0.06759334355592728, 0.018074069172143936, 0.028748946264386177, 0.03350280225276947, 0.001738330232910812, -0.035873714834451675, 0.0050230612978339195, -0.005394259933382273, -0.035111431032419205, 0.005703517701476812, -0.060869812965393066, 0.044046416878700256, 0.05451945215463638, -0.0012109529925510287, 0.04929054155945778, 0.03312966600060463, -0.02503111958503723, -0.0699458047747612, 0.09152142703533173, -0.035196661949157715, -0.02000804804265499, 0.003603762947022915, -0.0549810416996479, 0.041149843484163284, 0.019640415906906128, -0.06913350522518158, -0.08494774252176285, 0.047828249633312225, 0.011485084891319275, 0.11441357433795929, 0.012079037725925446, 0.026444999501109123, 0.008605830371379852, -0.014796323142945766, 0.042191699147224426, 0.0360623262822628, -0.01067506056278944, -0.02117612026631832, -0.0003311904729343951, 0.020912105217576027, 0.02051572874188423, 0.04119933396577835, 0.011461400426924229, 0.02468070574104786, -0.030830683186650276, -0.024522947147488594, 0.07760800421237946, -0.044838037341833115, 0.007875975221395493, 0.03662760183215141, -0.031315844506025314, 0.028968002647161484, -0.007360775955021381, -0.052097514271736145, 0.004892056342214346, 0.0051552411168813705, 0.058972474187612534, -0.05307154729962349, -0.02330617979168892, 0.0560041144490242, -0.06173492223024368, 0.00004632262425730005, 0.007912986911833286, 0.0031768144108355045, -0.08211413770914078, -0.02641596458852291, -0.07240095734596252, -0.04998013749718666, 0.016048355028033257, -0.023686233907938004, 0.08416120707988739, 0.002466161735355854, 0.0017551603959873319, 0.000651281327009201, 0.018105899915099144, -0.05974912270903587, -0.03980677202343941, 0.019075721502304077, 0.0014616637490689754, 0.06682229787111282, 0.02257758192718029, 0.04021807014942169, 0.09144134074449539, 0.020396307110786438, 0.055604636669158936, 0.026022544130682945, -0.03050902672111988, 0.011569516733288765, -0.014519683085381985, 0.0038184933364391327, -0.03115340694785118, 0.029596896842122078, -0.055038318037986755, -0.005584381986409426, -0.015937503427267075, -0.01591162569820881, 0.034234486520290375, 0.010233158245682716, 0.0364360548555851, 0.02957785315811634, 0.038372594863176346, -0.04782934859395027, -0.03462134674191475, -0.0432763509452343, -0.041607096791267395, 0.019871780648827553, -0.026665959507226944, 0.046689242124557495, 0.020541366189718246, 0.03362491726875305, 0.04561452195048332, 0.12613892555236816, 0.02306310087442398, 0.0048497817479074, -0.027223020792007446, -0.0762500986456871, 0.06465625762939453, -0.020680397748947144, -0.02472679689526558, -0.0469549298286438, 0.05494922026991844, 0.011157477274537086, -0.05097919702529907, 0.05126889795064926, 0.03758222982287407, -0.06554574519395828, 0.00288044149056077, 0.014015591703355312, 0.013589163310825825, 0.03634551167488098, 0.0031862170435488224, -0.03541851416230202, -0.011984468437731266, -0.04591989517211914, -0.04950973764061928, 0.014266318641602993, 0.014613134786486626, 0.004269343335181475, 0.0013365329941734672, -0.010044350288808346, 0.025745976716279984, 0.029322613030672073, 0.08641400188207626, 0.00042273724102415144, -0.1199660375714302, -0.11129316687583923, -0.03984867036342621, -0.05681384354829788, 0.009998883120715618, 0.030147377401590347, -0.0286977831274271, -0.0003513149276841432, -0.08627857267856598, -0.023915421217679977, 0.025925707072019577, 0.08490575850009918, 0.031879108399152756, -0.0023629055358469486, 0.0480312779545784, 0.0021763548720628023, 0.020024623721837997, -0.01996619999408722, -0.001396739506162703, -0.026282500475645065, -0.040633674710989, -0.019956767559051514, 0.004316484089940786, -0.031683146953582764, 0.06379353255033493, 0.03608919307589531, 0.008245682343840599, 0.02868475206196308, -0.0009207205730490386, -0.0003780983679462224, 0.02880168706178665, -0.04014896973967552, 0.017292466014623642, 0.049382057040929794, -0.015038374811410904, 0.024192562326788902, 0.03517518192529678, 0.019119804725050926, 0.021942559629678726, 0.07587131857872009, 0.0005678452434949577, -0.04390380531549454, 0.030292486771941185, 0.042298778891563416, -0.06521622836589813, 0.02252770960330963, -0.00466647045686841, -0.024906277656555176, -0.026186272501945496, 0.07858474552631378, -0.05505937710404396, -0.0008577461121603847, 0.00968341063708067, -0.036743391305208206, -0.08478125929832458, -0.025725962594151497, 0.07145383208990097, 0.029407603666186333, -0.0001950680452864617, -0.1292036920785904, 0.02494245208799839, -0.008491290733218193, 0.050918228924274445, -0.011559431441128254, -0.04706485942006111, -0.013783150352537632, 0.009277299977838993, -0.07522283494472504, -0.036186907440423965, -0.06634241342544556, 0.010219116695225239, -0.08408123254776001, -0.014987781643867493, 0.010251465253531933, -0.01592072658240795, -0.035617098212242126, 0.020554568618535995, 0.05061344802379608, 0.0494505874812603, 0.02590356394648552, 0.01528799906373024, -0.00029076842474751174, 0.02353300340473652, 0.0015167297096922994, 0.05400843173265457, 0.04550565034151077, -0.04259566590189934, -0.0060416329652071, -0.00677477428689599, 0.05933074653148651, -0.005193949677050114, 0.014253835193812847, 0.042284123599529266, 0.06695422530174255, 0.04029611125588417, 0.015430709347128868, -0.06947603821754456, 0.0339425727725029, -0.06005615368485451, 0.01404648832976818, 0.06008269265294075, -0.011060234159231186, -0.04977267608046532, 0.05691606178879738, -0.013345426879823208, 0.10078923404216766, 0.08031554520130157, 0.0425117127597332, 0.09008562564849854, 0.04609135910868645, 0.06102297827601433, 0.022890515625476837, -0.03089219331741333, 0.0332498624920845, -0.031279049813747406, -0.009156256914138794, 0.027170570567250252, 0.04901871085166931, 0.07207565009593964, 0.04074881598353386, -0.027857864275574684, -0.025717025622725487, 0.032386474311351776, 0.036552079021930695, -0.055537834763526917, -0.0229702889919281, 0.03349658474326134, 0.03683074936270714, 0.015133108012378216, -0.0632123202085495, -0.030310358852148056, 0.09408748149871826, 0.011012745089828968, -0.10027626156806946, -0.056098587810993195, 0.007266550324857235, 0.09435073286294937, -0.005252359434962273, 0.0414881557226181, -0.07797796279191971, 0.0054626669734716415, -0.027152489870786667, -0.06476820260286331, -0.04554128646850586, -0.020997364073991776, 0.03704288229346275, -0.0041465735994279385, -0.08224689960479736, 0.019587524235248566, 0.05182863399386406, -0.09750733524560928, 0.012806789949536324, 0.014560981653630733, -0.012063717469573021, 0.10477723181247711, 0.04364655539393425, 0.05573931708931923, -0.08249012380838394, 0.002664536237716675, 0.016965137794613838, 0.016157248988747597, -0.07265286147594452, -0.0025825295597314835, -0.011157424189150333, -0.053293049335479736, 0.01613083854317665, 0.003192639909684658, -0.02518875151872635, 0.025411557406187057, -0.04756153002381325, -0.008369989693164825, 0.0018538516014814377, -0.001305201556533575, 0.006403622217476368, 0.020627789199352264, -0.024054545909166336, 0.05217380076646805, 0.0469573549926281, 0.01885838247835636, 0.020833401009440422, -0.04654202610254288, 0.044648706912994385, -0.004453012719750404, -0.021127738058567047, 0.007881376892328262, -0.04722931608557701, -0.009467313066124916, 0.013864696025848389, 0.014279618859291077, 0.01670973189175129, 0.006757605355232954, 0.03243840113282204, -0.08637244999408722, 0.014409483410418034, 0.014930488541722298, -0.021012697368860245, -0.00746690621599555, 0.04036633297801018, 0.0766197144985199, -0.002925584791228175, -0.037694621831178665, 0.01753336563706398, -0.0129204411059618, 0.058751046657562256, -0.003414733335375786, 0.009327893145382404, 0.006946941372007132, 0.036547087132930756, 0.01600072905421257, 0.027991879731416702, -0.024807672947645187, 0.013996168039739132, -0.024033015593886375, 0.020035816356539726, -0.06689176708459854, -0.021769963204860687, 0.019834108650684357, 0.007396597880870104, -0.03514741361141205, -0.038449011743068695, -0.0027228370308876038, -0.060723625123500824, 0.05235403776168823, 0.005773501005023718, 0.022514579817652702, 0.03794749826192856, -0.06979167461395264, -0.0036482769064605236, -0.011913052760064602, -0.01920865662395954, -0.04111270606517792, 0.05357895419001579, -0.023412834852933884, -0.0893779918551445, -0.02306830696761608, -0.03236269950866699, 0.007966117933392525, 0.10357413440942764, 0.02653438411653042, 0.004998756106942892, -0.015604768879711628, -0.022902334108948708, -0.10633908212184906, 0.03903093561530113, 0.05978463217616081, -0.011735391803085804, -0.06194228678941727, 0.03223072364926338, 0.04556537792086601, 0.007720542140305042, 0.039454445242881775, -0.04189905524253845, -0.004674337804317474, -0.01275805663317442, -0.12497187405824661, -0.07940814644098282, 0.023411696776747704, 0.02147858962416649, -0.03503002971410751, 0.016921473667025566, -0.016184881329536438, -0.045962586998939514, 0.08095240592956543, -0.004070675931870937, -0.05266023054718971, 0.13639050722122192, -0.02151007391512394, 0.006739250384271145, 0.03182916343212128, -0.027000118046998978, -0.0030197608284652233, 0.031326163560152054, -0.10159225016832352, -0.06630226224660873, 0.0699416846036911, 0.01672203093767166, -0.04788779094815254, 0.039929479360580444, 0.027769070118665695, 0.01937052048742771, -0.06442618370056152, -0.06701736897230148, 0.039595261216163635, 0.05279085412621498, 0.007269475143402815, 0.06969842314720154, 0.048928432166576385, 0.0164470374584198, -0.014216633513569832, -0.015720434486865997, -0.007112122140824795, -0.10834096372127533}}) - assert.True(t, m.OmitMatch()) + assert.True(t, m.SkipMatching()) }) } @@ -186,30 +188,59 @@ func TestFace_Embedding(t *testing.T) { } func TestFace_UpdateMatchTime(t *testing.T) { - m := NewFace("12345", SrcAuto, face.Embeddings{}) + m := NewFace("12345", SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) initialMatchTime := m.MatchedAt assert.Equal(t, initialMatchTime, m.MatchedAt) - m.Matched() + if err := m.Matched(); err != nil { + t.Fatal(err) + } assert.NotEqual(t, initialMatchTime, m.MatchedAt) } func TestFace_Save(t *testing.T) { - m := NewFace("12345fde", SrcAuto, face.Embeddings{face.Embedding{1}, face.Embedding{2}}) - assert.Nil(t, FindFace(m.ID)) - m.Save() - assert.NotNil(t, FindFace(m.ID)) - assert.Equal(t, "12345fde", FindFace(m.ID).SubjUID) + t.Run("Ok", func(t *testing.T) { + m := NewFace("dhsthrdst", SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) + + assert.Nil(t, FindFace(m.ID)) + + if err := m.Save(); err != nil { + t.Fatal(err) + } + + assert.NotNil(t, FindFace(m.ID)) + assert.Equal(t, "dhsthrdst", FindFace(m.ID).SubjUID) + }) + t.Run("Error", func(t *testing.T) { + m := NewFace("12345fde", SrcAuto, face.Embeddings{face.Embedding{1}, face.Embedding{2}}) + assert.Nil(t, FindFace(m.ID)) + assert.Error(t, m.Save()) + assert.Nil(t, FindFace(m.ID)) + }) } func TestFace_Update(t *testing.T) { - m := NewFace("12345fdef", SrcAuto, face.Embeddings{face.Embedding{8}, face.Embedding{16}}) - assert.Nil(t, FindFace(m.ID)) - m.Save() - assert.NotNil(t, FindFace(m.ID)) + m := NewFace("12345fdef", SrcAuto, face.RandomEmbeddings(2, face.RegularFace)) + id := m.ID + + m.CreatedAt = time.Now() + t.Logf("FaceID: %s", id) + + assert.Nil(t, FindFace(id)) + + if err := m.Save(); err != nil { + t.Fatal(err) + return + } + + assert.NotNil(t, FindFace(id)) assert.Equal(t, "12345fdef", FindFace(m.ID).SubjUID) m2 := FindFace(m.ID) - m2.Update("SubjUID", "new") + + if err := m2.Update("SubjUID", "new"); err != nil { + t.Fatal(err) + } + assert.Equal(t, "new", FindFace(m.ID).SubjUID) } @@ -223,7 +254,7 @@ func TestFace_RefreshPhotos(t *testing.T) { func TestFirstOrCreateFace(t *testing.T) { t.Run("create new face", func(t *testing.T) { - m := NewFace("12345unique", SrcAuto, face.Embeddings{face.Embedding{99}, face.Embedding{2}}) + m := NewFace("12345unique", SrcAuto, face.RandomEmbeddings(1, face.RegularFace)) r := FirstOrCreateFace(m) assert.Equal(t, "12345unique", r.SubjUID) }) diff --git a/internal/entity/marker.go b/internal/entity/marker.go index 96bdf710d..5697633e9 100644 --- a/internal/entity/marker.go +++ b/internal/entity/marker.go @@ -500,19 +500,21 @@ func (m *Marker) Face() (f *Face) { if m.Size < face.ClusterSizeThreshold || m.Score < face.ClusterScoreThreshold { log.Debugf("marker %s: skipped adding face due to low-quality (size %d, score %d)", sanitize.Log(m.MarkerUID), m.Size, m.Score) return nil - } else if emb := m.Embeddings(); emb.Empty() { - log.Warnf("marker %s: found no face embeddings", sanitize.Log(m.MarkerUID)) + } + + if emb := m.Embeddings(); emb.Empty() { + log.Warnf("faces: marker %s has no face embeddings", sanitize.Log(m.MarkerUID)) return nil } else if f = NewFace(m.SubjUID, m.SubjSrc, emb); f == nil { - log.Warnf("marker %s: failed assigning face", sanitize.Log(m.MarkerUID)) + log.Warnf("faces: failed assigning face to marker %s", sanitize.Log(m.MarkerUID)) return nil - } else if f.OmitMatch() { - log.Infof("marker %s: face %s is unsuitable for clustering and matching", sanitize.Log(m.MarkerUID), f.ID) + } else if f.SkipMatching() { + log.Infof("faces: skipped matching marker %s, embedding %s not distinct enough", sanitize.Log(m.MarkerUID), f.ID) } else if f = FirstOrCreateFace(f); f == nil { - log.Warnf("marker %s: failed assigning face", sanitize.Log(m.MarkerUID)) + log.Warnf("faces: failed matching marker %s with subject %s", sanitize.Log(m.MarkerUID), SubjNames.Log(m.SubjUID)) return nil } else if err := f.MatchMarkers(Faceless); err != nil { - log.Errorf("marker %s: %s while matching with faces", sanitize.Log(m.MarkerUID), err) + log.Errorf("faces: failed matching marker %s with subject %s (%s)", sanitize.Log(m.MarkerUID), SubjNames.Log(m.SubjUID), err) } m.face = f diff --git a/internal/entity/string_values.go b/internal/entity/string_values.go index 2d5add301..8771e65c0 100644 --- a/internal/entity/string_values.go +++ b/internal/entity/string_values.go @@ -10,6 +10,10 @@ type Values map[string]interface{} // GetValues extracts entity Values. func GetValues(m interface{}, omit ...string) (result Values) { skip := func(name string) bool { + if name == "" || name == "UpdatedAt" || name == "CreatedAt" { + return true + } + for _, s := range omit { if name == s { return true @@ -23,15 +27,22 @@ func GetValues(m interface{}, omit ...string) (result Values) { elem := reflect.ValueOf(m).Elem() relType := elem.Type() + num := relType.NumField() - for i := 0; i < relType.NumField(); i++ { - name := relType.Field(i).Name + result = make(map[string]interface{}, num) - if skip(name) { + // Add exported fields to result. + for i := 0; i < num; i++ { + n := relType.Field(i).Name + v := elem.Field(i) + + if !v.CanSet() { + continue + } else if skip(n) { continue } - result[name] = elem.Field(i).Interface() + result[n] = elem.Field(i).Interface() } return result diff --git a/internal/entity/subject.go b/internal/entity/subject.go index 34c3d1eda..583796842 100644 --- a/internal/entity/subject.go +++ b/internal/entity/subject.go @@ -208,7 +208,7 @@ func FirstOrCreateSubject(m *Subject) *Subject { } else if found = FindSubjectByName(m.SubjName); found != nil { return found } else { - log.Errorf("subject: %s while creating %s", err, sanitize.Log(m.SubjName)) + log.Errorf("subject: failed adding %s (%s)", sanitize.Log(m.SubjName), err) } return nil @@ -245,14 +245,18 @@ func FindSubjectByName(name string) (result *Subject) { // Restore if currently deleted. if result = FindSubject(uid); result == nil { + log.Debugf("subject: could not find %s", sanitize.Log(result.SubjName)) return nil - } else if err := result.Restore(); err != nil { - log.Errorf("subject: %s could not be restored", sanitize.Log(result.SubjName)) + } else if !result.Deleted() { + return result + } else if err := result.Restore(); err == nil { + log.Debugf("subject: restored %s", sanitize.Log(result.SubjName)) + return result } else { - log.Debugf("subject: %s restored", sanitize.Log(result.SubjName)) + log.Errorf("subject: failed restoring %s (%s)", sanitize.Log(result.SubjName), err) } - return result + return nil } // IsPerson tests if the subject is a person. diff --git a/internal/face/embedding.go b/internal/face/embedding.go index 94c0b9096..e180b12ae 100644 --- a/internal/face/embedding.go +++ b/internal/face/embedding.go @@ -27,36 +27,33 @@ func NewEmbedding(inference []float32) Embedding { return result } -// IgnoreFace tests whether the embedding is generally unsuitable for matching. -func (m Embedding) IgnoreFace() bool { - if IgnoreDist <= 0 { - return false +// Kind returns the type of face e.g. regular, kids, or ignored. +func (m Embedding) Kind() Kind { + if m.KidsFace() { + return KidsFace + } else if m.Ignored() { + return IgnoredFace } - return IgnoreEmbeddings.Contains(m, IgnoreDist) + return RegularFace } -// KidsFace tests if the embedded face belongs to a baby or young child. -func (m Embedding) KidsFace() bool { - if KidsDist <= 0 { - return false - } - - return KidsEmbeddings.Contains(m, KidsDist) -} - -// OmitMatch tests if the face embedding is unsuitable for matching. -func (m Embedding) OmitMatch() bool { - return m.KidsFace() || m.IgnoreFace() +// SkipMatching checks if the face embedding seems unsuitable for matching. +func (m Embedding) SkipMatching() bool { + return m.KidsFace() || m.Ignored() } // CanMatch tests if the face embedding is not blacklisted. func (m Embedding) CanMatch() bool { - return !m.IgnoreFace() + return !m.Ignored() } // Dist calculates the distance to another face embedding. func (m Embedding) Dist(other Embedding) float64 { + if len(other) == 0 || len(m) != len(other) { + return -1 + } + return clusters.EuclideanDist(m, other) } diff --git a/internal/face/embedding_test.go b/internal/face/embedding_test.go index 7aa5af0cf..8dd135ca2 100644 --- a/internal/face/embedding_test.go +++ b/internal/face/embedding_test.go @@ -6,18 +6,33 @@ import ( "github.com/stretchr/testify/assert" ) -func TestEmbedding_IgnoreFace(t *testing.T) { +func TestEmbedding_Kind(t *testing.T) { + t.Run("Kids", func(t *testing.T) { + e := Embedding{0.00956450719281242, 0.017594281506414216, 0.0034308274819826088, 0.024433304607454274, 0.03652508157150199, 0.01116447955266469, -0.0006183593003596696, -0.0010943688685074449, 0.012357249196308354, 0.07457883842289448, 0.11295248899194929, -0.02418406752662526, -0.03966302269448837, -0.029571157983607717, 0.012989095386324657, -0.01884545675582356, -0.0069224719061619705, 0.03909949171874258, -0.02592672230417116, 0.013062778420539366, 0.015368576777594475, -0.009386404443325268, 0.038085957161254354, -0.07454640790820122, -0.08851962122652265, 0.03059599507186148, -0.002311327417070667, -0.026430425544579823, -0.06707751088672215, 0.02089460481268664, -0.01521601515479334, 0.030341569748189714, -0.0012923568590647644, 0.06852907459768984, 0.00929470748330156, 0.0015921768240837587, 0.01932051172479987, -0.005583951042758094, -0.028357081613244697, -0.015834319405257702, -0.007910402310598228, -0.010658817055324713, 0.01000140067966034, 0.053078942828708224, -0.030584194386998814, 0.015025267015314765, -0.013891826978781156, -0.006699096670167314, -0.060938968426651426, -0.053249146375391215, 0.02276569032013261, -0.04673161241225898, 0.016461304233719904, 0.045863549328512616, -0.04880381665296025, -0.034031555263532534, -0.026937679646329746, 0.03530077305104998, -0.05340263620018959, 0.04798200478156408, -0.025280179145435493, 0.02274432245434986, -0.07815711489982075, -0.00208588682128013, -0.020324266308711633, -0.04560547932568523, -0.026446496395187244, -0.04672709583408303, 0.03089646663930681, 0.0329096753978067, -0.0031386990772767197, 0.0030701529855529466, 0.01198785288983749, -0.0720665372080273, 0.016065222754453618, -0.008565091230492625, -0.06524603068828583, 0.014324400331436967, 0.012642266590976052, 0.03916913395126661, 0.017239611298363242, -0.0022940708117352594, -0.00000737705785367224, -0.013188478122982714, 0.023865339604930744, 0.08236957093079884, -0.019251494202762842, 0.05471697532468372, 0.005972680687490437, 0.040493461613853775, -0.0688300368686517, 0.004474718201284607, -0.04370514086137215, 0.008753968299263053, 0.07228374770945972, 0.007629580582336833, 0.03886009587181939, 0.08576714330249363, -0.021909458562731743, -0.010310174200438067, 0.011320573885718154, 0.05167221174471908, -0.011920124732164873, 0.09136995921532313, 0.07861344681845771, -0.02466051270150476, 0.03293021395802498, -0.031370491824216314, -0.006256768428203132, -0.028057354321289394, -0.001464772762523757, 0.015254409194716977, -0.02345223191918598, -0.11720789555046293, -0.03956084408693843, 0.017618920240137313, 0.02171551130918993, 0.000804237904958427, 0.0040997833841376835, 0.05092603630489773, 0.010734342167981796, -0.024763399010731116, -0.05916011126505004, 0.013965856510266248, -0.015584999747160409, -0.07232196339302593, 0.00037505472492840554, -0.004479492106636624, 0.006297527954706715, -0.043400421945585146, -0.02631447795364592, 0.06060819741752413, 0.06364250307281812, -0.014363453361309238, 0.0452708558489879, 0.02589565556910303, 0.010107092559337616, -0.04670443137486776, -0.054579869016177125, 0.1046515769428677, 0.029628220428195264, 0.019528768439259794, -0.05553832401831945, 0.07381440409355694, -0.06197152224679788, -0.03346837612075938, -0.028401009428004425, 0.045492336774865784, -0.014222729860598015, 0.052605656906962395, 0.028711968515482213, -0.006189175881445408, -0.039265539290176496, 0.017252425456212625, 0.018786909783052072, 0.013216451851702813, -0.07228060687581699, 0.06143035077386432, -0.029247661742071312, -0.07368612289428711, 0.06836203527119425, 0.045540636819269925, -0.06008780002593994, 0.053936791916688286, 0.016778231805397406, -0.006840274158296072, -0.053641265258193016, -0.027871736118363008, 0.025869831843819056, 0.071573406457901, 0.014396547469206981, -0.009195981288535727, -0.07452616840600967, 0.013345200232935086, -0.016935504455533292, 0.049057218349642225, -0.01680893502715561, -0.014038488268852234, -0.022829299352856144, -0.059434341887633, -0.012434359924453828, 0.04231061150009433, 0.01735861397658785, 0.052751378466685615, 0.035937425990899406, 0.0220693277919458, 0.09581007974015342, 0.052584730088710785, 0.04224762465390894, 0.03516049683094025, 0.05461937189102173, 0.027251388049787946, 0.04605957410401768, -0.05316027129689852, 0.07284069102671412, -0.03601164950264825, -0.03515230264100763, 0.024848973895940516, 0.018131214219869837, -0.0005673166467911667, 0.09281168133020401, -0.01841116055018372, 0.04431105674140983, -0.022182180391003687, -0.0011550109031506712, 0.1312924474477768, 0.01592384051117632, 0.011137459174885104, 0.024446219205856323, 0.007765962380088038, -0.043042239215638906, -0.054043336460987725, 0.026125866919755936, -0.05938888258404202, -0.01505894141478671, -0.07235014769766066, 0.025598893976873822, 0.06189072959952884, 0.010129067490601705, 0.0798807301455074, -0.011724631618967073, -0.027017276161738362, 0.04092693328857422, -0.015599953812650509, 0.045602697051233716, -0.018599940256939992, 0.010273827201065918, 0.03422223191915287, -0.06518438417050573, 0.03480341430339548, 0.010534410752976934, 0.05929994355473253, -0.1059915026028951, -0.004690915671138403, 0.0176001051440835, -0.028789587318897247, -0.0008820632776607656, -0.01912516790131728, -0.03659702175193363, 0.02925850057767497, -0.006651972692149381, 0.03585423529148102, 0.004146564590175533, 0.07956291197074784, 0.011424321487235526, 0.06981112021538946, -0.012405176181346178, 0.045626538081301585, 0.03736268056349622, 0.04791162866685125, -0.00340089900419116, 0.024297866853885353, 0.10473044878906673, -0.058053700460328, -0.0478491158121162, 0.02280241163033578, -0.04503581734995047, 0.05154827834727863, 0.04939925236006578, -0.0032965411535567707, 0.024689303762796853, -0.03474749873081843, 0.04177183575100369, 0.0612266067829397, -0.017530236755394273, -0.002992505000697242, 0.038245580780009426, 0.029071697654823463, -0.0017085750199233491, -0.06656611462434132, 0.017400852262249425, -0.032034329863058195, 0.01248814820105003, 0.038716979428297944, 0.026905361666447587, 0.028665946796536446, -0.029912837884492345, 0.0011884293182649547, -0.07279362322555648, -0.018983382317754958, -0.0682681186331643, 0.10368894537289937, -0.006382284530748923, -0.04440281209018496, -0.08117666881945398, -0.030362199578020308, 0.0378638267931011, 0.008926777194978463, -0.008873912919726636, -0.018600086940245494, 0.039435300769077405, -0.04833844924966494, -0.005534950776361964, 0.04187685540980763, -0.00920979937331544, -0.06032300740480423, 0.04529076235161887, -0.017920835289664358, -0.009011213628885647, -0.04398277898629507, -0.011301302079421779, 0.03356585796508524, -0.06062525371089578, 0.010255272189776102, 0.029481254854343004, -0.0019921630672696563, -0.03161581791937351, 0.018223024904727936, 0.028269319277670648, -0.01717748982708953, 0.003151409237438606, 0.03445811424818304, 0.013116849948548608, -0.03361893124464485, 0.11243294345008002, -0.02414778031137151, 0.0009398051123652193, 0.03513648216095236, 0.07822070995138751, -0.06039799335930082, -0.046241684506336846, 0.01664898373888314, -0.022302107587974105, 0.023223551197184458, -0.03896974565254317, 0.02107381272233195, 0.014257466317050986, 0.08389275272687276, 0.06136741447779867, 0.02696629727466239, 0.025725652567214437, 0.03333099941826529, -0.06944898805684513, 0.03385308446983496, 0.03951059985491964, 0.05811662061346902, 0.04349600813455052, -0.02805554157950812, -0.05582492627824346, -0.05247949043081866, 0.04473223413030306, -0.0070410499400976635, 0.01720123179256916, -0.021176138970380027, -0.03261649919052919, -0.02008709663318263, -0.02541356365610328, 0.030320773625539407, -0.02636879589408636, -0.02746961617635356, 0.004731823146964113, 0.05784605319301287, -0.008771000119547049, 0.002482125690827767, 0.03873592014941904, 0.013244514612274038, 0.016256491776504036, 0.039643339812755585, -0.04349886460436715, -0.024448473394537967, -0.025856203503078885, 0.021381820138129923, -0.04026743065979746, -0.07614113349053594, -0.024597936309874058, -0.025117785876823798, -0.007596029369677935, 0.01889244622240464, 0.00006782920617196296, -0.027720228872365422, -0.04852603831224971, -0.045822552094856896, -0.004668864376273834, 0.04860494968791803, -0.00599650407416953, 0.029392837443285517, 0.07024536571568912, 0.046713153935141034, -0.03505657706409693, 0.032767738836507, 0.03666515834629536, -0.06098963278863165, -0.02862372797810369, 0.010534445004951622, 0.05224730529718929, -0.043354966367284455, 0.021389764681872394, 0.020172426477074623, -0.0013402456663445467, 0.03145651849141965, -0.015751932592441637, 0.039305776771571904, -0.024094444130443864, 0.023116414435207844, 0.0010459598803815122, -0.03311869822856453, -0.04304084005869097, 0.035308302380144596, 0.02648943393594689, -0.0433658417314291, -0.030366347067885928, -0.03036927328341537, 0.09163435217407015, -0.007137416861951351, 0.04118875631441673, 0.04462467837664816, 0.0186937279585335, -0.03797590256565147, 0.04514540338681804, -0.008639660534552403, 0.0762030142876837, -0.0134583566751745, 0.022655908277051315, 0.004643273462230961, -0.08652641003330548, 0.013738796567647822, -0.01377079894559251, -0.024995700663162604, -0.030371163143879838, -0.030448109946317144, 0.10791386249992582, -0.030183505473865405, -0.005543621140532196, 0.008693856497605642, -0.04184898133907053, 0.08765134463707606, -0.02371981895218293, -0.06641878601577547, 0.03483888072272142, -0.03773280315928989, -0.0074731065089710886, 0.003471121376302714, 0.023200226844184928, -0.01573064975026581, 0.04564601777949267, 0.021612754712502163, -0.060529693961143494, -0.013140015716392858, -0.07159835886624125, -0.02568271808559075, -0.11435804019371669, 0.06617429562740856, 0.01995501708653238, 0.06415391175283326, 0.008545574770929912, -0.018575870121518772, -0.03251912569006284, 0.016798952232218452, -0.018335888563241396, -0.06809450437625249, -0.019734525406319234, -0.00015986069209045835, 0.061214266137944326, -0.020642005088221695, -0.04399915991557969, 0.0065624537463817335, -0.033284927614861064, 0.116939311226209, 0.06487316679623392, -0.0008064880967140198, 0.0827075880434778, 0.1045238475004832, 0.08511008736160067, -0.02596275084134605, 0.011347602431972822, 0.014439393759756867, -0.038869811635878354, -0.032146183508707, -0.008580799059321484, -0.0341539511250125, 0.011072635081493191, -0.1035624932911661, -0.029690628353920247, -0.0640309527516365, -0.05696413459049331, 0.042117324036856495, 0.07128431068526374, 0.040064464840624064, 0.005983394088010148, -0.00667726600335704, 0.047270469160543546, 0.005897726627558263, -0.0368763098700179, -0.023564390579445496, 0.006459848179171483, 0.009426389351978691, -0.047467888643344246, 0.03504645437674804, -0.005881637114928001, -0.09620188259416157, -0.025261664763092995, -0.04608574716581239, -0.0177506600610084, 0.06423448212444782, 0.03958735977196031, 0.011297762950157953, -0.004669215297326446, -0.002415396169655853, 0.06259037305911382, -0.029752894615133602, -0.0592656247317791, -0.01600239688478824, 0.04226608822743098, -0.011972974494306577, -0.012937591902704703, -0.006532240995309419, 0.014907695611731874, -0.002943116544176721, 0.03677781733373801, -0.04577133432030678, -0.011399532060345842, 0.029993985469142597} + assert.Equal(t, KidsFace, e.Kind()) + }) + t.Run("Ignored", func(t *testing.T) { + e := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.007879496, 0.01986026, -0.019533899, 0.0405012, 0.015047856, 0.04601962, 0.080275685, 0.017424034, -0.032671392, 0.024088044, -0.021807125, 0.010775311, 0.094901696, 0.0048406925, 0.013086048, 0.04339756, -0.0069915624, 0.019183818, 0.0624931, 0.019509323, 0.07727781, 0.071851335, 0.046544127, 0.040363774, -0.027118236, 0.06800823, -0.01851149, 0.039025713, -0.037301723, 0.05617681, 0.027737545, -0.0011841523, 0.034742635, 0.006083848, 0.033872508, 0.012025738, -0.02354928, -0.07461171, 0.0027702893, 0.04646551, 0.06590462, -0.00794524, -0.011096932, 0.031695057, -0.06732352, -0.051879242, -0.0773121, -0.000517982, 0.08113213, -0.015312499, 0.018544769, -0.023654874, -0.01689197, 0.026425209, -0.08191027, 0.03139842, -0.011997609, 0.059896134, 0.07505033, -0.012907369, 0.008597082, 0.007715897, -0.07062183, -0.027084265, 0.0028182073, 0.03769887, 0.034299187, 0.046780333, -0.007847023, -0.051446356, 0.007982996, -0.034917314, -0.0038174198, -0.05954771, -0.044208106, 0.04685703, -0.0199229, -0.0032713648, 0.009684984, -0.050678924, 0.007356914, -0.06628045, 0.042982273, 0.0055478252, 0.011330174, -0.082057334, 0.026437566, -0.015942575, 0.048285805, -0.003856138, 0.04399534, 0.01741405, -0.059217025, 0.056499016, -0.03459506, 0.030366927, 0.016147505, -0.021027595, -0.013333387, -0.035330992, 0.0445699, -0.03483558, 0.02072434, -0.019552084, -0.0043943045, -0.03957101, 0.0041682394, 0.006047565, 0.03504845, 0.04675005, -0.021805461, -0.0033183587, -0.0017508261, 0.033419013, 0.008266579, 0.067113, -0.026226636, -0.020189233, 0.029219048, 0.031028047, 0.021648621, -0.055164326, -0.008505359, 0.05173594, 0.016450783, -0.017234024, -0.10492493, -0.04954522, 0.024168914, -0.008840458, -0.078473605, -0.042714797, -0.040692057, -0.05446264, 0.0148880705, 0.057658363, 0.005458192, 0.02171352, -0.04556389, 0.017333247, -0.10342444, -0.06159851, -0.03170678, 0.08064648, 0.024460033, -0.07185376, -0.0019515441, -0.026248276, 0.034460787, 0.08695437, 0.06363327, 0.012909266, 0.00093975884, 0.03682474, -0.041370448, -0.0070990156, 0.058603138, -0.038166087, -0.039693672, 0.025385896, 0.0035452761, -0.015794974, 0.019059189, -0.028707229, 0.038948998, -0.032039847, -0.07992934, -0.05482927, 0.048767164, -0.03186542, 0.059099294, 0.063702375, 0.01810526, -0.019284561, 0.036313917, 0.0006970895, 0.020730797, 0.08630282, -0.10650717, 0.0017196184, 0.023258938, -0.021214833, 0.015206377, -0.027243242, -0.021319263, -0.054438062, 0.066603355, -0.047786396, 0.018822387, -0.031346995, -0.0049103773, -0.020732613, -0.0841506, 0.00707288, -0.0033278253, 0.068160556, -0.011127404, 0.05533654, 0.0046188673, 0.039132893, 0.008633137, -0.057081457, -0.030337824, -0.0721918} + assert.Equal(t, IgnoredFace, e.Kind()) + }) + t.Run("Regular", func(t *testing.T) { + e := Embedding{-0.037731018, -0.005501065, 0.04339579, 0.050818004, -0.059338734, 0.033849984, -0.006599584, -0.0017643301, 0.049746443, -0.103716515, 0.037138782, -0.0064612515, 0.071909964, 0.013218528, -0.065359734, 0.11057091, 0.031195551, 0.025612833, 0.0075477255, -0.034973715, -0.013490629, -0.08104751, -0.022038054, -0.05304818, 0.008366317, -0.056096837, -0.008484318, 0.049539477, 0.019540254, 0.067417614, -0.027856546, -0.008532138, -0.017063588, -0.00016265438, -0.106199585, 0.03904082, 0.030587498, 0.043008707, -0.015111545, -0.022849092, 0.0025588698, -0.012814152, 0.037556626, -0.0086288145, 0.05265788, 0.011832273, 0.00015048613, -0.0081366515, 0.0013409692, 0.028389124, 0.022627315, -0.015008434, -0.0007749727, 0.013927345, -0.012275729, -0.0090859635, 0.019502806, -0.011900984, 0.016286656, 0.08094661, 0.000306613, -0.06327904, 0.018552454, 0.08885108, -0.07583091, 0.09275318, -0.018484656, 0.074180886, -0.039385945, -0.08063905, -0.05360434, -0.037074074, 0.09909196, 0.025063906, -0.009406389, -0.029612983, -0.018644262, 0.08433939, -0.04466277, -0.07118042, -0.0053266245, -0.07471344, 0.06739151, -0.05399609, 0.03125197, -0.00007781149, -0.04214992, -0.044316035, 0.025013437, 0.031466946, 0.0023496088, 0.042693187, -0.046198968, 0.026152546, -0.017578958, 0.023763098, 0.027511515, -0.05229892, -0.005204117, 0.035853546, -0.031919815, -0.027175877, -0.033706605, 0.018576957, -0.0010251165, -0.006808904, 0.009910016, -0.046926413, -0.02833718, 0.0132687995, -0.033933964, 0.06434295, 0.046245363, 0.044698197, 0.041076522, 0.04224362, -0.050834127, 0.0037004466, 0.061506275, -0.018232772, 0.067569405, 0.048701495, 0.042266034, -0.11045008, 0.03627151, -0.07259142, -0.0027725939, 0.040572345, 0.010365194, -0.018683784, 0.004533848, 0.037213936, -0.050944775, 0.07134523, 0.004012727, 0.036228556, -0.013853831, -0.06910639, -0.011394227, -0.012075533, 0.036311198, -0.02587341, -0.04086224, -0.024498813, -0.019423751, -0.022674281, 0.052483488, 0.026303312, -0.051178075, 0.008410645, 0.039851066, -0.028721321, -0.027934253, -0.029567441, 0.054549955, 0.07423011, -0.07211806, 0.015979288, 0.002092099, 0.049062036, 0.025120452, 0.045975365, 0.025024865, -0.04019101, 0.0013054911, -0.0049644294, 0.0065203104, -0.03237452, -0.020704443, 0.028736785, -0.027353559, 0.07551169, 0.0842262, 0.019992182, 0.11138123, -0.028617613, 0.06700691, -0.048681036, -0.008201593, -0.058066163, 0.027867565, 0.07693089, -0.033642102, -0.05855467, -0.08575646, -0.019721355, 0.018443357, -0.0037373751, 0.032450553, -0.0074002664, -0.028135147, 0.046631414, 0.0192969, -0.0071076434, -0.004898368, 0.011896125, -0.026020564, 0.074016415, -0.033884488, -0.07919758, 0.021606326, -0.0142197255, 0.0807476, 0.03722956, -0.0015949347, 0.008076167, -0.009640628, 0.02341143, 0.015375526, -0.059428506, 0.051759534, 0.028049389, 0.07790443, 0.0478649, 0.09191913, -0.055882096, -0.026637457, 0.01236174, -0.0033003334, 0.008522798, 0.027216703, -0.033221588, -0.028086975, -0.11505473, -0.044336796, 0.013873659, 0.03982099, 0.060988583, -0.07439005, 0.01333661, -0.004818605, 0.02561305, -0.059055943, 0.0081638545, -0.032278564, 0.046092775, 0.025316834, -0.046857174, -0.0341012, 0.04379944, -0.029710777, 0.09238533, 0.009769442, 0.018552538, -0.02632421, 0.033739865, -0.022547472, 0.016400741, -0.05336998, -0.012623122, -0.08303054, -0.010368709, 0.01690871, 0.0014627968, -0.050720602, 0.038742293, -0.065664165, -0.10676187, -0.013403239, 0.075702645, -0.055623896, -0.03871971, -0.042371742, 0.03794916, -0.0590573, -0.002583715, -0.029995736, -0.08144537, -0.043295015, -0.034286328, -0.026538746, 0.01953962, 0.08203153, 0.036415525, 0.045531306, 0.004713152, 0.026550433, -0.0055336948, -0.031087596, -0.01923592, -0.1047651, 0.051826596, -0.009522955, 0.0023846119, -0.030824797, 0.0011774554, 0.03384506, 0.010090165, -0.033521466, -0.052155476, 0.0032979914, -0.004305921, -0.08622774, 0.03262125, 0.06332183, 0.00067599304, 0.01989574, 0.04406689, 0.019945903, -0.003796719, 0.00025200442, -0.010055775, 0.04070448, -0.004082432, -0.026942603, 0.110138796, -0.029453337, 0.015611174, 0.08778206, -0.027199872, -0.014513782, 0.021546016, 0.01706933, -0.01365763, 0.026393317, -0.029974515, 0.0050973813, 0.00732006, 0.034644503, 0.03125295, -0.01563078, -0.041023903, -0.04566191, -0.00013489528, 0.04253813, 0.045907266, -0.011943533, 0.031480506, -0.0034109016, -0.035025172, 0.028193155, -0.06832476, -0.0019371725, -0.049427234, -0.0061696135, 0.051213425, 0.07832765, -0.01894849, 0.0290217, 0.031639505, -0.045830216, -0.048976466, 0.052241277, -0.026111973, 0.037248738, -0.07693719, -0.00020981894, 0.030037824, -0.041687537, -0.015251262, 0.041234106, 0.031005232, 0.024838371, 0.0020733695, -0.038252156, -0.026375879, 0.03495583, 0.018539391, -0.07203285, 0.006305707, -0.004792029, -0.05153865, 0.0072443904, -0.017075827, 0.013596034, -0.0054885144, -0.052320853, -0.033805914, -0.038080305, -0.010182737, 0.012953395, 0.014565793, -0.023107765, 0.030313661, 0.011124675, 0.018100796, 0.1074551, -0.074430406, -0.04017658, -0.002058053, -0.07340946, 0.0033503077, 0.04565434, -0.033483636, -0.029218825, -0.05245377, -0.059680052, 0.017752757, -0.05493096, -0.10746678, 0.08623605, 0.014577705, 0.0044184765, -0.025559181, -0.015846781, -0.006661373, 0.09459266, 0.036481388, 0.030402042, -0.0152169075, 0.0037343376, 0.024195764, -0.01859682, -0.0022416788, 0.0056786016, -0.06771737, 0.02364697, 0.021247962, 0.05002757, 0.083975114, 0.011197936, 0.0035017033, -0.0014220127, -0.024415374, 0.023921741, -0.0108229555, -0.06622103, -0.00024976654, 0.06549428, -0.004968772, -0.011665843, 0.03409593, 0.028397659, -0.086434126, -0.074232705, 0.041721817, -0.034767248, -0.014432104, 0.006313255, 0.04040112, -0.0050085387, -0.0023618732, -0.02225774, 0.02383989, 0.061036374, 0.058602326, 0.04343989, -0.029145751, 0.0369256, -0.054843802, -0.017078603, 0.047091234, 0.050245833, -0.04615808, -0.02404996, 0.02584908, -0.006215116, -0.016719814, 0.052097827, 0.01908364, -0.07564805, -0.11024787, -0.036854018, -0.0056766514, -0.007618422, 0.034403287, 0.056957226, -0.03565076, -0.0365251, 0.040833052, 0.008173664, -0.04300709, 0.0028465139, -0.020792698, 0.020321466, -0.002447697, 0.019681728, -0.08843341, -0.042670425, 0.014576458, 0.009701015, -0.12435015, -0.025056241, 0.03084893, -0.031128377, 0.006784327, 0.052201632, 0.06773422, 0.015289244, 0.009421969, 0.0725144, -0.07110377, -0.05183192, -0.008816121, -0.11178569, 0.079700254, -0.0110752955, 0.0046521816, -0.07299747, 0.10732809, -0.06012486, 0.057736155, -0.02227576, -0.063017495, 0.085292354, 0.037407015, -0.07368719, 0.033426613, 0.062104296, -0.016089993, -0.023178348, -0.064638525, 0.028132388, -0.049967688, 0.053581465, 0.031400185, 0.0712773, -0.012665878, 0.0760322, 0.030081542, -0.022147592, 0.009422989} + assert.Equal(t, RegularFace, e.Kind()) + }) +} + +func TestEmbedding_Ignored(t *testing.T) { t.Run("Blur1", func(t *testing.T) { e := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.007879496, 0.01986026, -0.019533899, 0.0405012, 0.015047856, 0.04601962, 0.080275685, 0.017424034, -0.032671392, 0.024088044, -0.021807125, 0.010775311, 0.094901696, 0.0048406925, 0.013086048, 0.04339756, -0.0069915624, 0.019183818, 0.0624931, 0.019509323, 0.07727781, 0.071851335, 0.046544127, 0.040363774, -0.027118236, 0.06800823, -0.01851149, 0.039025713, -0.037301723, 0.05617681, 0.027737545, -0.0011841523, 0.034742635, 0.006083848, 0.033872508, 0.012025738, -0.02354928, -0.07461171, 0.0027702893, 0.04646551, 0.06590462, -0.00794524, -0.011096932, 0.031695057, -0.06732352, -0.051879242, -0.0773121, -0.000517982, 0.08113213, -0.015312499, 0.018544769, -0.023654874, -0.01689197, 0.026425209, -0.08191027, 0.03139842, -0.011997609, 0.059896134, 0.07505033, -0.012907369, 0.008597082, 0.007715897, -0.07062183, -0.027084265, 0.0028182073, 0.03769887, 0.034299187, 0.046780333, -0.007847023, -0.051446356, 0.007982996, -0.034917314, -0.0038174198, -0.05954771, -0.044208106, 0.04685703, -0.0199229, -0.0032713648, 0.009684984, -0.050678924, 0.007356914, -0.06628045, 0.042982273, 0.0055478252, 0.011330174, -0.082057334, 0.026437566, -0.015942575, 0.048285805, -0.003856138, 0.04399534, 0.01741405, -0.059217025, 0.056499016, -0.03459506, 0.030366927, 0.016147505, -0.021027595, -0.013333387, -0.035330992, 0.0445699, -0.03483558, 0.02072434, -0.019552084, -0.0043943045, -0.03957101, 0.0041682394, 0.006047565, 0.03504845, 0.04675005, -0.021805461, -0.0033183587, -0.0017508261, 0.033419013, 0.008266579, 0.067113, -0.026226636, -0.020189233, 0.029219048, 0.031028047, 0.021648621, -0.055164326, -0.008505359, 0.05173594, 0.016450783, -0.017234024, -0.10492493, -0.04954522, 0.024168914, -0.008840458, -0.078473605, -0.042714797, -0.040692057, -0.05446264, 0.0148880705, 0.057658363, 0.005458192, 0.02171352, -0.04556389, 0.017333247, -0.10342444, -0.06159851, -0.03170678, 0.08064648, 0.024460033, -0.07185376, -0.0019515441, -0.026248276, 0.034460787, 0.08695437, 0.06363327, 0.012909266, 0.00093975884, 0.03682474, -0.041370448, -0.0070990156, 0.058603138, -0.038166087, -0.039693672, 0.025385896, 0.0035452761, -0.015794974, 0.019059189, -0.028707229, 0.038948998, -0.032039847, -0.07992934, -0.05482927, 0.048767164, -0.03186542, 0.059099294, 0.063702375, 0.01810526, -0.019284561, 0.036313917, 0.0006970895, 0.020730797, 0.08630282, -0.10650717, 0.0017196184, 0.023258938, -0.021214833, 0.015206377, -0.027243242, -0.021319263, -0.054438062, 0.066603355, -0.047786396, 0.018822387, -0.031346995, -0.0049103773, -0.020732613, -0.0841506, 0.00707288, -0.0033278253, 0.068160556, -0.011127404, 0.05533654, 0.0046188673, 0.039132893, 0.008633137, -0.057081457, -0.030337824, -0.0721918} t.Logf("Blur1 magnitude: %f", e.Magnitude()) - t.Logf("Blur1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Blur1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Blur2", func(t *testing.T) { e := Embedding{-0.040659550577402115, -0.03220542520284653, 0.05863650515675545, 0.07900159806013107, -0.03954162076115608, -0.03830844908952713, -0.09981349855661392, -0.03843552619218826, 0.021984204649925232, 0.021209893748164177, 0.05058338865637779, 0.026279529556632042, -0.037386082112789154, 0.019860034808516502, 0.01779518648982048, 0.029238300397992134, 0.025665590539574623, 0.053838297724723816, 0.01769574172794819, 0.04497014731168747, -0.0034581704530864954, 0.05082075297832489, 0.00983431376516819, -0.055299241095781326, -0.08863261342048645, 0.026919297873973846, -0.003238844918087125, 0.06171567738056183, -0.006652790121734142, 0.03024955280125141, -0.07668674737215042, 0.02599654719233513, 0.03656956925988197, -0.040286894887685776, -0.07485620677471161, 0.007622404955327511, 0.004450628533959389, 0.022175054997205734, 0.024441875517368317, 0.02038322575390339, -0.008045016787946224, 0.02700800821185112, 0.037923432886600494, 0.037730343639850616, 0.0019298223778605461, -0.025241704657673836, 0.07439867407083511, 0.025373654440045357, -0.062184471637010574, 0.019462162628769875, 0.011163688264787197, 0.05711067467927933, -0.007787591777741909, 0.006090524140745401, -0.01247440930455923, -0.0002892761258408427, -0.022054091095924377, 0.09874352067708969, 0.02230732887983322, -0.03625740855932236, 0.01047681737691164, 0.023006660863757133, -0.03572215884923935, -0.047631122171878815, -0.004130185581743717, 0.13868559896945953, 0.004021449480205774, 0.0056119272485375404, -0.03055204637348652, 0.03540297970175743, 0.08558189123868942, 0.04478949308395386, 0.08267980813980103, 0.0001782427862053737, -0.09348706901073456, 0.01561333891004324, -0.012885896489024162, 0.01995423436164856, -0.06154691055417061, -0.021583547815680504, 0.07658854871988297, 0.03818646818399429, 0.019400358200073242, 0.048004768788814545, 0.03896840661764145, 0.007684631273150444, 0.006036552134901285, 0.061359286308288574, -0.06359504908323288, 0.06033588945865631, 0.003095539752393961, 0.01086103729903698, 0.024172229692339897, 0.035893380641937256, -0.015560186468064785, 0.0011388470884412527, 0.01351285818964243, 0.05575203895568848, -0.006037220358848572, -0.04045598953962326, 0.001389052253216505, -0.02900969795882702, -0.044179223477840424, -0.012978514656424522, 0.036748431622982025, 0.009548956528306007, 0.12157998234033585, -0.027398979291319847, -0.028363993391394615, 0.03085082396864891, -0.03142939507961273, -0.033452536910772324, -0.062204647809267044, 0.03741671144962311, -0.037081167101860046, 0.005499409511685371, 0.042599402368068695, 0.026988882571458817, 0.037901923060417175, 0.026043692603707314, -0.02773086354136467, -0.07317446917295456, 0.000101863632153254, 0.01806195266544819, -0.03163762018084526, -0.049250949174165726, 0.017383672297000885, 0.06737986952066422, -0.018057355657219887, -0.03998659923672676, 0.005807057488709688, -0.028374463319778442, 0.026576239615678787, -0.01071916613727808, -0.05852247774600983, 0.01768427900969982, -0.04401516914367676, 0.0035484740510582924, 0.01177794486284256, 0.029788490384817123, 0.0022414580453187227, 0.012311144731938839, 0.014886411838233471, 0.060596615076065063, -0.00679460633546114, -0.01986791379749775, 0.017852429300546646, -0.03839694708585739, -0.010994594544172287, 0.0516304187476635, 0.06284306943416595, -0.009843732230365276, -0.033825311809778214, 0.010088239796459675, 0.002782990923151374, -0.007669741753488779, 0.0036510066129267216, -0.0347248837351799, -0.034374918788671494, -0.015334841795265675, 0.06460481137037277, -0.01482471451163292, -0.022562984377145767, 0.0660383328795433, 0.039143770933151245, -0.04959432780742645, -0.04688224941492081, -0.08884536474943161, 0.035801686346530914, -0.011035206727683544, -0.048159871250391006, -0.012846723198890686, -0.08550407737493515, -0.02462676912546158, -0.05736429616808891, -0.023693742230534554, 0.06937230378389359, 0.008348439820110798, 0.046880267560482025, -0.007452292367815971, -0.026880638673901558, -0.02645084448158741, -0.008707266300916672, 0.039963752031326294, -0.039603643119335175, 0.015119479969143867, -0.001705334521830082, 0.07568509131669998, 0.007083678152412176, 0.03451305627822876, 0.08042848855257034, 0.01654256135225296, -0.027564499527215958, 0.09245218336582184, 0.07642299681901932, 0.049259401857852936, -0.043418038636446, 0.02720213122665882, -0.051213305443525314, 0.10580828785896301, 0.04973253980278969, 0.027844952419400215, -0.06973676383495331, -0.002782640513032675, -0.05002935230731964, 0.03786781430244446, 0.012268701568245888, 0.03857699781656265, -0.03049379587173462, -0.02773997187614441, 0.0324966236948967, 0.007138446904718876, 0.045148178935050964, 0.03304283693432808, -0.08195831626653671, -0.0658479630947113, -0.03167840093374252, 0.0785706415772438, -0.0540161207318306, 0.08956210315227509, -0.01385448407381773, -0.03099009394645691, 0.018756408244371414, -0.06490232050418854, -0.017304886132478714, 0.024655258283019066, -0.02960297279059887, 0.01074492558836937, -0.01565052568912506, 0.04490678757429123, 0.056525640189647675, -0.06037742644548416, -0.00036496517714112997, -0.015667423605918884, -0.0717754065990448, 0.01312245149165392, 0.04692285135388374, 0.009900979697704315, -0.06392915546894073, 0.0317864790558815, 0.015916356816887856, 0.02110808528959751, 0.039608780294656754, 0.09377234429121017, -0.05484704673290253, 0.05391034856438637, -0.0788193866610527, 0.10010083019733429, 0.011118135415017605, -0.00004653222640627064, -0.04172910004854202, -0.02035870961844921, -0.030938807874917984, 0.003754222998395562, -0.04063389077782631, 0.11299732327461243, -0.02142464555799961, -0.008394543081521988, 0.08152930438518524, -0.0008909814641810954, -0.05258719623088837, -0.05761850252747536, 0.009006860665977001, 0.06501699984073639, -0.01597391627728939, 0.08522436022758484, 0.03371994569897652, -0.045805223286151886, 0.032167356461286545, 0.08392851054668427, -0.016528621315956116, -0.06503161042928696, 0.019590284675359726, 0.03115348517894745, 0.03043849766254425, 0.014987046830356121, -0.055867355316877365, -0.0032457816414535046, -0.015822168439626694, -0.005734337959438562, 0.0071865590289235115, -0.015463619492948055, -0.025871464982628822, -0.07001885026693344, 0.024963589385151863, 0.01097678393125534, -0.035117257386446, 0.03467186540365219, 0.06086552515625954, -0.03848052769899368, 0.07273925840854645, -0.004646539222449064, -0.001109645119868219, -0.005088613834232092, -0.0974913015961647, -0.08384663611650467, 0.025186428800225258, -0.0006411857320927083, 0.030254928395152092, 0.006322708446532488, -0.0502672903239727, 0.02300260402262211, 0.030662409961223602, 0.018212566152215004, 0.06359684467315674, -0.009071605280041695, -0.015119871124625206, 0.040699902921915054, -0.03850189968943596, -0.05171874910593033, 0.10410609096288681, 0.10507630556821823, -0.02125021629035473, -0.009639402851462364, 0.012288953177630901, 0.008919070474803448, -0.024553585797548294, 0.014904174953699112, 0.023295167833566666, 0.05103684216737747, -0.00450109550729394, 0.002307947026565671, 0.014376292005181313, 0.11136122792959213, 0.0014088694006204605, 0.0022693064529448748, 0.05170426890254021, 0.04981289431452751, 0.07373254001140594, 0.049386415630578995, -0.014806983061134815, -0.05833027511835098, -0.03190769627690315, -0.008523926138877869, 0.04702630639076233, 0.029194114729762077, 0.004517692141234875, -0.09024124592542648, 0.003329969011247158, -0.08030996471643448, 0.019111910834908485, 0.09198802709579468, -0.0310179702937603, -0.018719222396612167, -0.02182493731379509, 0.017477037385106087, -0.038689568638801575, 0.011723000556230545, 0.041695673018693924, 0.057853586971759796, 0.06979171931743622, 0.00011747673124773428, -0.03506821393966675, 0.05103304982185364, -0.028120825067162514, -0.005008046515285969, -0.02852008491754532, 0.046975843608379364, 0.031390246003866196, 0.07648137956857681, -0.04007460176944733, 0.05367399379611015, -0.007463269867002964, -0.008238906040787697, 0.016662007197737694, -0.027663614600896835, 0.01993817463517189, -0.04393567517399788, -0.031136782839894295, -0.05139624699950218, -0.07834076136350632, -0.042914580553770065, -0.019670458510518074, 0.03316812217235565, 0.09591887146234512, 0.06848528981208801, -0.02773074246942997, 0.02855822816491127, -0.018690742552280426, 0.011006012558937073, 0.054826073348522186, -0.009247495792806149, 0.003375179599970579, 0.04311295971274376, 0.03586158901453018, 0.0018443106673657894, 0.009209017269313335, -0.023508505895733833, 0.005245110485702753, -0.03597981482744217, 0.00041601891280151904, -0.05553282052278519, 0.010633128695189953, -0.12370350956916809, 0.03224118798971176, 0.005466188304126263, -0.016138294711709023, -0.048258986324071884, -0.046113520860672, 0.0055899592116475105, 0.014022012241184711, -0.023494740948081017, 0.002998130861669779, -0.03219323977828026, -0.007386348210275173, -0.025029350072145462, 0.02161424607038498, -0.02605803869664669, 0.03477400168776512, -0.02827581763267517, 0.015608449466526508, -0.06077265739440918, 0.1015695258975029, 0.05589430034160614, 0.019551506265997887, 0.08917868137359619, -0.017507141456007957, 0.07259833812713623, -0.0648856982588768, 0.006342224311083555, 0.03585096821188927, 0.0037353287916630507, 0.04381411895155907, 0.004948670044541359, -0.05632920190691948, -0.05978763476014137, -0.024755241349339485, 0.020523933693766594, 0.0029942821711301804, -0.016245706006884575, 0.0073024132288992405, -0.012954101897776127, 0.014015593566000462, 0.011097325012087822, -0.0729522556066513, 0.07186494767665863, -0.0016607641009613872, 0.0026961045805364847, -0.005763839930295944, -0.026096666231751442, 0.02687499113380909, 0.04582877829670906, -0.0176797304302454, 0.015226836316287518, -0.025522204115986824, 0.005290484055876732, 0.018956126645207405, 0.005492339376360178, -0.05386399105191231, 0.040570177137851715, -0.003739845473319292, 0.10603580623865128, 0.004780937451869249, 0.011396643705666065, 0.036971934139728546, -0.041815534234046936, 0.02744169346988201, -0.004168000537902117, 0.0145946703851223, 0.03126026317477226, 0.01925659365952015, -0.09751059114933014, -0.006547612603753805, -0.03389118239283562, 0.05320596322417259, 0.01183426845818758, -0.06129913404583931, 0.02740320935845375, 0.017650293186306953, 0.03780294209718704, -0.00009194338781526312, 0.0404474213719368, 0.07070805132389069, -0.0999426394701004, -0.03244980424642563, -0.06469535827636719, 0.02357516996562481, 0.013541318476200104, -0.010025718249380589, 0.07540664821863174, 0.0028972753789275885, -0.008960247039794922, -0.012603504583239555, 0.05121699348092079, 0.020327046513557434, 0.03936949744820595, 0.001988647971302271, 0.03354545310139656, 0.024581555277109146, -0.015217097476124763, 0.02889206074178219, 0.02085159160196781, -0.06294527649879456, 0.022404003888368607, -0.034289367496967316, -0.0674518421292305, 0.07663356512784958, 0.010276293382048607, -0.018306201323866844, -0.05057809129357338, -0.09850548207759857, 0.09915852546691895, -0.08300632983446121, 0.10919290035963058, -0.04569940268993378, -0.03762957453727722, 0.0034436392597854137, -0.0632016733288765, -0.0400751493871212, 0.07686466723680496, 0.05905047059059143, 0.004703994374722242} t.Logf("Blur2 magnitude: %f", e.Magnitude()) - t.Logf("Blur2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Blur2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) } @@ -39,14 +54,14 @@ func TestEmbedding_CanMatch(t *testing.T) { }) } -func TestEmbedding_OmitMatch(t *testing.T) { +func TestEmbedding_SkipMatching(t *testing.T) { t.Run("True", func(t *testing.T) { e := Embedding{-0.00959064718335867, 0.03787063807249069, -0.0030881548300385475, 0.02789853885769844, 0.017454572021961212, 0.0396987721323967, -0.03091704286634922, 0.005318029318004847, 0.021617550402879715, -0.08214963972568512, -0.003952134400606155, 0.0269720908254385, 0.048880551010370255, -0.03537372127175331, -0.042236171662807465, 0.021553633734583855, 0.03937383368611336, 0.01815507560968399, 0.08373168110847473, -0.11838400363922119, -0.038254253566265106, -0.04993032291531563, 0.07148619741201401, 0.006384310312569141, 0.05344310402870178, -0.027579499408602715, 0.021648988127708435, -0.07013172656297684, -0.06400937587022781, 0.10622639954090118, -0.01507984846830368, -0.02844894863665104, -0.013048898428678513, -0.03571505844593048, -0.022063886746764183, 0.022826166823506355, 0.01703103445470333, 0.00679031852632761, -0.09583312273025513, 0.03446732088923454, -0.045221585780382156, 0.03292521834373474, -0.012820744886994362, 0.06122862547636032, 0.01973198726773262, -0.013975882902741432, 0.027514882385730743, 0.12478502094745636, -0.09630053490400314, -0.008597812615334988, -0.019534612074494362, 0.03927983343601227, 0.04311678186058998, 0.025297729298472404, -0.035719674080610275, 0.05421024188399315, 0.07541341334581375, 0.040334682911634445, -0.0632546916604042, -0.004164006095379591, 0.027950556948781013, 0.017827920615673065, 0.02774866297841072, -0.025094853714108467, 0.00012262807285878807, 0.04165732488036156, -0.03155842795968056, 0.03801475837826729, 0.0031508952379226685, -0.011753040365874767, 0.06262513995170593, 0.05895991623401642, -0.02384188584983349, -0.025149181485176086, -0.016906173899769783, -0.03138834610581398, -0.06759334355592728, 0.018074069172143936, 0.028748946264386177, 0.03350280225276947, 0.001738330232910812, -0.035873714834451675, 0.0050230612978339195, -0.005394259933382273, -0.035111431032419205, 0.005703517701476812, -0.060869812965393066, 0.044046416878700256, 0.05451945215463638, -0.0012109529925510287, 0.04929054155945778, 0.03312966600060463, -0.02503111958503723, -0.0699458047747612, 0.09152142703533173, -0.035196661949157715, -0.02000804804265499, 0.003603762947022915, -0.0549810416996479, 0.041149843484163284, 0.019640415906906128, -0.06913350522518158, -0.08494774252176285, 0.047828249633312225, 0.011485084891319275, 0.11441357433795929, 0.012079037725925446, 0.026444999501109123, 0.008605830371379852, -0.014796323142945766, 0.042191699147224426, 0.0360623262822628, -0.01067506056278944, -0.02117612026631832, -0.0003311904729343951, 0.020912105217576027, 0.02051572874188423, 0.04119933396577835, 0.011461400426924229, 0.02468070574104786, -0.030830683186650276, -0.024522947147488594, 0.07760800421237946, -0.044838037341833115, 0.007875975221395493, 0.03662760183215141, -0.031315844506025314, 0.028968002647161484, -0.007360775955021381, -0.052097514271736145, 0.004892056342214346, 0.0051552411168813705, 0.058972474187612534, -0.05307154729962349, -0.02330617979168892, 0.0560041144490242, -0.06173492223024368, 0.00004632262425730005, 0.007912986911833286, 0.0031768144108355045, -0.08211413770914078, -0.02641596458852291, -0.07240095734596252, -0.04998013749718666, 0.016048355028033257, -0.023686233907938004, 0.08416120707988739, 0.002466161735355854, 0.0017551603959873319, 0.000651281327009201, 0.018105899915099144, -0.05974912270903587, -0.03980677202343941, 0.019075721502304077, 0.0014616637490689754, 0.06682229787111282, 0.02257758192718029, 0.04021807014942169, 0.09144134074449539, 0.020396307110786438, 0.055604636669158936, 0.026022544130682945, -0.03050902672111988, 0.011569516733288765, -0.014519683085381985, 0.0038184933364391327, -0.03115340694785118, 0.029596896842122078, -0.055038318037986755, -0.005584381986409426, -0.015937503427267075, -0.01591162569820881, 0.034234486520290375, 0.010233158245682716, 0.0364360548555851, 0.02957785315811634, 0.038372594863176346, -0.04782934859395027, -0.03462134674191475, -0.0432763509452343, -0.041607096791267395, 0.019871780648827553, -0.026665959507226944, 0.046689242124557495, 0.020541366189718246, 0.03362491726875305, 0.04561452195048332, 0.12613892555236816, 0.02306310087442398, 0.0048497817479074, -0.027223020792007446, -0.0762500986456871, 0.06465625762939453, -0.020680397748947144, -0.02472679689526558, -0.0469549298286438, 0.05494922026991844, 0.011157477274537086, -0.05097919702529907, 0.05126889795064926, 0.03758222982287407, -0.06554574519395828, 0.00288044149056077, 0.014015591703355312, 0.013589163310825825, 0.03634551167488098, 0.0031862170435488224, -0.03541851416230202, -0.011984468437731266, -0.04591989517211914, -0.04950973764061928, 0.014266318641602993, 0.014613134786486626, 0.004269343335181475, 0.0013365329941734672, -0.010044350288808346, 0.025745976716279984, 0.029322613030672073, 0.08641400188207626, 0.00042273724102415144, -0.1199660375714302, -0.11129316687583923, -0.03984867036342621, -0.05681384354829788, 0.009998883120715618, 0.030147377401590347, -0.0286977831274271, -0.0003513149276841432, -0.08627857267856598, -0.023915421217679977, 0.025925707072019577, 0.08490575850009918, 0.031879108399152756, -0.0023629055358469486, 0.0480312779545784, 0.0021763548720628023, 0.020024623721837997, -0.01996619999408722, -0.001396739506162703, -0.026282500475645065, -0.040633674710989, -0.019956767559051514, 0.004316484089940786, -0.031683146953582764, 0.06379353255033493, 0.03608919307589531, 0.008245682343840599, 0.02868475206196308, -0.0009207205730490386, -0.0003780983679462224, 0.02880168706178665, -0.04014896973967552, 0.017292466014623642, 0.049382057040929794, -0.015038374811410904, 0.024192562326788902, 0.03517518192529678, 0.019119804725050926, 0.021942559629678726, 0.07587131857872009, 0.0005678452434949577, -0.04390380531549454, 0.030292486771941185, 0.042298778891563416, -0.06521622836589813, 0.02252770960330963, -0.00466647045686841, -0.024906277656555176, -0.026186272501945496, 0.07858474552631378, -0.05505937710404396, -0.0008577461121603847, 0.00968341063708067, -0.036743391305208206, -0.08478125929832458, -0.025725962594151497, 0.07145383208990097, 0.029407603666186333, -0.0001950680452864617, -0.1292036920785904, 0.02494245208799839, -0.008491290733218193, 0.050918228924274445, -0.011559431441128254, -0.04706485942006111, -0.013783150352537632, 0.009277299977838993, -0.07522283494472504, -0.036186907440423965, -0.06634241342544556, 0.010219116695225239, -0.08408123254776001, -0.014987781643867493, 0.010251465253531933, -0.01592072658240795, -0.035617098212242126, 0.020554568618535995, 0.05061344802379608, 0.0494505874812603, 0.02590356394648552, 0.01528799906373024, -0.00029076842474751174, 0.02353300340473652, 0.0015167297096922994, 0.05400843173265457, 0.04550565034151077, -0.04259566590189934, -0.0060416329652071, -0.00677477428689599, 0.05933074653148651, -0.005193949677050114, 0.014253835193812847, 0.042284123599529266, 0.06695422530174255, 0.04029611125588417, 0.015430709347128868, -0.06947603821754456, 0.0339425727725029, -0.06005615368485451, 0.01404648832976818, 0.06008269265294075, -0.011060234159231186, -0.04977267608046532, 0.05691606178879738, -0.013345426879823208, 0.10078923404216766, 0.08031554520130157, 0.0425117127597332, 0.09008562564849854, 0.04609135910868645, 0.06102297827601433, 0.022890515625476837, -0.03089219331741333, 0.0332498624920845, -0.031279049813747406, -0.009156256914138794, 0.027170570567250252, 0.04901871085166931, 0.07207565009593964, 0.04074881598353386, -0.027857864275574684, -0.025717025622725487, 0.032386474311351776, 0.036552079021930695, -0.055537834763526917, -0.0229702889919281, 0.03349658474326134, 0.03683074936270714, 0.015133108012378216, -0.0632123202085495, -0.030310358852148056, 0.09408748149871826, 0.011012745089828968, -0.10027626156806946, -0.056098587810993195, 0.007266550324857235, 0.09435073286294937, -0.005252359434962273, 0.0414881557226181, -0.07797796279191971, 0.0054626669734716415, -0.027152489870786667, -0.06476820260286331, -0.04554128646850586, -0.020997364073991776, 0.03704288229346275, -0.0041465735994279385, -0.08224689960479736, 0.019587524235248566, 0.05182863399386406, -0.09750733524560928, 0.012806789949536324, 0.014560981653630733, -0.012063717469573021, 0.10477723181247711, 0.04364655539393425, 0.05573931708931923, -0.08249012380838394, 0.002664536237716675, 0.016965137794613838, 0.016157248988747597, -0.07265286147594452, -0.0025825295597314835, -0.011157424189150333, -0.053293049335479736, 0.01613083854317665, 0.003192639909684658, -0.02518875151872635, 0.025411557406187057, -0.04756153002381325, -0.008369989693164825, 0.0018538516014814377, -0.001305201556533575, 0.006403622217476368, 0.020627789199352264, -0.024054545909166336, 0.05217380076646805, 0.0469573549926281, 0.01885838247835636, 0.020833401009440422, -0.04654202610254288, 0.044648706912994385, -0.004453012719750404, -0.021127738058567047, 0.007881376892328262, -0.04722931608557701, -0.009467313066124916, 0.013864696025848389, 0.014279618859291077, 0.01670973189175129, 0.006757605355232954, 0.03243840113282204, -0.08637244999408722, 0.014409483410418034, 0.014930488541722298, -0.021012697368860245, -0.00746690621599555, 0.04036633297801018, 0.0766197144985199, -0.002925584791228175, -0.037694621831178665, 0.01753336563706398, -0.0129204411059618, 0.058751046657562256, -0.003414733335375786, 0.009327893145382404, 0.006946941372007132, 0.036547087132930756, 0.01600072905421257, 0.027991879731416702, -0.024807672947645187, 0.013996168039739132, -0.024033015593886375, 0.020035816356539726, -0.06689176708459854, -0.021769963204860687, 0.019834108650684357, 0.007396597880870104, -0.03514741361141205, -0.038449011743068695, -0.0027228370308876038, -0.060723625123500824, 0.05235403776168823, 0.005773501005023718, 0.022514579817652702, 0.03794749826192856, -0.06979167461395264, -0.0036482769064605236, -0.011913052760064602, -0.01920865662395954, -0.04111270606517792, 0.05357895419001579, -0.023412834852933884, -0.0893779918551445, -0.02306830696761608, -0.03236269950866699, 0.007966117933392525, 0.10357413440942764, 0.02653438411653042, 0.004998756106942892, -0.015604768879711628, -0.022902334108948708, -0.10633908212184906, 0.03903093561530113, 0.05978463217616081, -0.011735391803085804, -0.06194228678941727, 0.03223072364926338, 0.04556537792086601, 0.007720542140305042, 0.039454445242881775, -0.04189905524253845, -0.004674337804317474, -0.01275805663317442, -0.12497187405824661, -0.07940814644098282, 0.023411696776747704, 0.02147858962416649, -0.03503002971410751, 0.016921473667025566, -0.016184881329536438, -0.045962586998939514, 0.08095240592956543, -0.004070675931870937, -0.05266023054718971, 0.13639050722122192, -0.02151007391512394, 0.006739250384271145, 0.03182916343212128, -0.027000118046998978, -0.0030197608284652233, 0.031326163560152054, -0.10159225016832352, -0.06630226224660873, 0.0699416846036911, 0.01672203093767166, -0.04788779094815254, 0.039929479360580444, 0.027769070118665695, 0.01937052048742771, -0.06442618370056152, -0.06701736897230148, 0.039595261216163635, 0.05279085412621498, 0.007269475143402815, 0.06969842314720154, 0.048928432166576385, 0.0164470374584198, -0.014216633513569832, -0.015720434486865997, -0.007112122140824795, -0.10834096372127533} - assert.True(t, e.OmitMatch()) + assert.True(t, e.SkipMatching()) }) t.Run("False", func(t *testing.T) { e := Embedding{0.004882930312305689, -0.028871430084109306, -0.014925234951078892, 0.042015232145786285, 0.03289106860756874, 0.00047218144754879177, -0.04626072198152542, 0.08869951218366623, -0.08738508075475693, 0.041352055966854095, 0.025143291801214218, 0.027804607525467873, 0.03851303085684776, 0.059128664433956146, 0.029246464371681213, -0.01177206914871931, -0.055604543536901474, 0.04581688344478607, -0.021625488996505737, 0.014038625173270702, 0.04526897147297859, -0.003151113400235772, 0.01755913719534874, -0.016582749783992767, -0.04034445434808731, 0.03751881793141365, 0.11246222257614136, 0.025973817333579063, 0.046221256256103516, -0.03560330346226692, 0.010319976136088371, -0.06042899936437607, -0.02092718705534935, -0.015790656208992004, -0.015058585442602634, -0.031521182507276535, -0.014863084070384502, 0.09852202981710434, -0.026713669300079346, -0.09230262786149979, -0.0645485445857048, 0.03376315161585808, -0.016680343076586723, -0.0032860636711120605, 0.0289445947855711, -0.04086116701364517, 0.01185047347098589, -0.03036908246576786, -0.050068069249391556, 0.0013629610184580088, -0.10402216762304306, 0.020886534824967384, 0.06360501796007156, -0.038404129445552826, -0.10402511060237885, 0.019234996289014816, -0.0301763117313385, 0.04926493763923645, -0.014555397443473339, 0.023388627916574478, 0.045102808624506, -0.07065623998641968, 0.01779104769229889, 0.04318133369088173, 0.006222338881343603, -0.03631843626499176, 0.005155006889253855, -0.03126167878508568, 0.02961049973964691, 0.042098451405763626, -0.05473579093813896, -0.030505038797855377, 0.05462753400206566, -0.018857350572943687, -0.013100373558700085, 0.024632159620523453, -0.029910949990153313, -0.06632661819458008, 0.04453831911087036, -0.050670187920331955, 0.037967462092638016, 0.07036780565977097, 0.07603567838668823, 0.02958795428276062, -0.06687693297863007, 0.030427396297454834, 0.040562309324741364, 0.081810861825943, -0.01210289727896452, -0.027030745521187782, -0.08186805993318558, 0.017522599548101425, -0.07442684471607208, 0.032609228044748306, -0.008241117000579834, -0.02420344017446041, 0.010065721347928047, -0.07006815820932388, -0.023965315893292427, -0.095053531229496, -0.0066795386373996735, -0.007384734693914652, 0.017342889681458473, 0.048182494938373566, -0.007601919583976269, -0.034079138189554214, -0.06012185662984848, -0.048203855752944946, -0.00012411877105478197, -0.0702674463391304, -0.053258661180734634, 0.09610331803560257, -0.08409681171178818, 0.0006605522357858717, 0.09284624457359314, -0.003066445467993617, -0.01669788733124733, 0.07133719325065613, -0.001136226230300963, -0.038388170301914215, 0.036363981664180756, -0.03186909109354019, -0.011004592292010784, -0.04703499376773834, -0.033754657953977585, 0.009894444607198238, -0.0651240348815918, 0.07229526340961456, 0.018740307539701462, -0.021803900599479675, 0.012212129309773445, 0.022386791184544563, 0.05509564280509949, -0.002009343821555376, 0.052710991352796555, -0.03911963477730751, 0.0037262304686009884, 0.04576747119426727, -0.06396473199129105, 0.016327453777194023, -0.01841137744486332, 0.08133656531572342, 0.027454890310764313, 0.017934516072273254, -0.05057291314005852, 0.05975693091750145, -0.007352042011916637, 0.00653004040941596, 0.045967090874910355, 0.0636090412735939, -0.04789235070347786, 0.020336657762527466, 0.003387229749932885, -0.036981452256441116, -0.005459815263748169, -0.015007982961833477, -0.046427641063928604, -0.0265751201659441, -0.02166137658059597, -0.04442169517278671, -0.0388776957988739, 0.014315947890281677, 0.07145505398511887, 0.023914091289043427, -0.009579996578395367, 0.000555231177713722, -0.07929696887731552, -0.04671946167945862, 0.04548916965723038, 0.04007089138031006, 0.0777222141623497, -0.05238672345876694, -0.03217660263180733, 0.010117340832948685, -0.07449944317340851, -0.021306153386831284, -0.041546110063791275, 0.004237184766680002, 0.009483197703957558, 0.06297741830348969, -0.000040676473872736096, -0.0072582196444272995, 0.027166014537215233, -0.03531072288751602, 0.04809935390949249, -0.047254230827093124, -0.035896413028240204, 0.001353008090518415, -0.006516282446682453, -0.12176339328289032, 0.003468466456979513, 0.03414403647184372, -0.005717947147786617, -0.013245332054793835, 0.050411250442266464, 0.060794975608587265, -0.033848684281110764, -0.0411624014377594, 0.004714736714959145, 0.07038156688213348, 0.03152059018611908, 0.0032927212305366993, -0.06656128913164139, -0.02337886579334736, -0.06524009257555008, 0.10044806450605392, -0.022327493876218796, -0.011950562708079815, -0.009763725101947784, -0.11933285742998123, 0.008748459629714489, 0.017833517864346504, -0.02984185330569744, 0.06127692759037018, 0.02242015302181244, -0.003635581349954009, -0.019167892634868622, 0.10762561112642288, 0.006600579246878624, 0.015260499902069569, -0.0540555864572525, 0.09029702097177505, -0.033669471740722656, 0.011766647920012474, 0.1104455515742302, 0.01904078759253025, -0.020095430314540863, 0.01835247315466404, -0.0018705067923292518, -0.033028945326805115, -0.048259615898132324, 0.030004244297742844, 0.07956615835428238, -0.0642324686050415, -0.04139978811144829, 0.03843799605965614, 0.06650455296039581, -0.020038694143295288, 0.02672666683793068, -0.04095584899187088, -0.03936886042356491, 0.0063452632166445255, -0.015512409619987011, 0.014523478224873543, -0.018992457538843155, 0.025680938735604286, -0.01937483437359333, -0.021194742992520332, -0.003287843195721507, 0.0517817921936512, -0.04542914032936096, -0.024611888453364372, -0.020536299794912338, 0.07575392723083496, 0.00509954709559679, -0.025987792760133743, -0.006120736710727215, 0.09092006087303162, -0.0213322751224041, -0.060274362564086914, 0.07494226098060608, -0.07354876399040222, -0.04971634969115257, 0.028758447617292404, -0.03872194141149521, -0.05081532895565033, 0.08855368942022324, -0.08159982413053513, 0.06338321417570114, 0.06456979364156723, 0.04353044182062149, 0.005764496512711048, 0.0600232258439064, 0.0014271264662966132, -0.00789173785597086, -0.005119846668094397, -0.011158729903399944, -0.018335465341806412, 0.023802103474736214, 0.013924619182944298, -0.022950127720832825, -0.05804508179426193, -0.03638503700494766, -0.033681925386190414, 0.0033610588870942593, 0.12201116234064102, 0.07830760627985, -0.01918034814298153, 0.034231945872306824, -0.07167097181081772, 0.03948679193854332, -0.028818128630518913, 0.039063021540641785, 0.07101557403802872, -0.0439496748149395, -0.04144040122628212, 0.012664629146456718, 0.030000725761055946, 0.04847702756524086, 0.02541559748351574, 0.07345808297395706, 0.0031921358313411474, 0.038445696234703064, 0.014779598452150822, 0.006091540213674307, -0.03244377300143242, -0.03608289733529091, -0.006579521112143993, -0.10094884037971497, 0.04581669345498085, 0.04587441310286522, 0.020043063908815384, -0.031375154852867126, 0.024461230263113976, 0.020627979189157486, 0.07001999020576477, 0.06002703309059143, -0.005296268034726381, -0.0010267249308526516, 0.004162963014096022, -0.013901745900511742, -0.034833602607250214, -0.054472003132104874, -0.03190429508686066, 0.017492398619651794, -0.008733944967389107, 0.04404545947909355, 0.007761085871607065, 0.07122837752103806, -0.03194647282361984, 0.08522669970989227, -0.041125934571027756, -0.0437992662191391, -0.055396996438503265, 0.008446729741990566, -0.0015191518468782306, -0.004613490775227547, -0.008796783164143562, -0.07657443732023239, -0.025113390758633614, 0.03673252835869789, 0.024203898385167122, 0.0446786992251873, 0.057171277701854706, -0.02174237184226513, 0.024808600544929504, -0.0902457907795906, 0.04720025509595871, 0.03271157667040825, 0.040548402816057205, -0.01177565660327673, -0.07541719824075699, 0.0008427884895354509, 0.018812336027622223, -0.02686868980526924, 0.031025780364871025, -0.0320693664252758, 0.021994752809405327, -0.0313553512096405, 0.016101595014333725, 0.025550907477736473, 0.014734489843249321, -0.009737599641084671, 0.03791225329041481, -0.010784100741147995, -0.06483308225870132, 0.061101265251636505, 0.047953490167856216, 0.07685820013284683, -0.029196662828326225, 0.046947311609983444, 0.09235607832670212, 0.07800130546092987, -0.006302011199295521, -0.0009652888402342796, -0.04047642648220062, 0.0128366993740201, -0.016137035563588142, -0.027006659656763077, -0.07809395343065262, -0.0027403784915804863, 0.036186158657073975, 0.07656095176935196, -0.0588720478117466, 0.04771272838115692, -0.05424800142645836, 0.045116785913705826, -0.06117294356226921, 0.0027035644743591547, -0.043144844472408295, 0.0031507040839642286, 0.01032280270010233, -0.007943928241729736, -0.08487361669540405, 0.008270769380033016, 0.061124444007873535, -0.009561609476804733, 0.06284376233816147, -0.032546862959861755, 0.024209581315517426, -0.0521618016064167, 0.0478111207485199, 0.05224037915468216, 0.0170973502099514, -0.00025255916989408433, 0.06748030334711075, 0.01784381829202175, 0.03854576125741005, -0.01574527658522129, 0.05557435005903244, 0.021215081214904785, 0.05812590941786766, -0.03631983697414398, 0.08400305360555649, 0.0049048843793570995, 0.022299831733107567, -0.04361032694578171, -0.018518105149269104, -0.05738044157624245, -0.011229591444134712, 0.054556168615818024, -0.01502198725938797, 0.036758773028850555, -0.012393850833177567, -0.07132650911808014, 0.009787950664758682, 0.006903296802192926, -0.03457719460129738, 0.01849413849413395, -0.019653771072626114, -0.010154089890420437, -0.017175186425447464, 0.004869726486504078, 0.03835383802652359, -0.03213905915617943, 0.002602529712021351, -0.06274056434631348, -0.007503214757889509, 0.07436785846948624, 0.029922567307949066, 0.0009115976863540709, 0.017791228368878365, -0.03598189353942871, -0.020124219357967377, -0.014733386225998402, 0.03255683556199074, -0.054067034274339676, 0.03698976710438728, 0.018945612013339996, 0.014479481615126133, 0.039849475026130676, 0.05157710611820221, 0.05078873783349991, 0.04381692782044411, 0.07326473295688629, 0.049577221274375916, -0.02244976907968521, 0.011073237285017967, -0.018045062199234962, -0.028601769357919693, 0.06952143460512161, 0.012588117271661758, 0.07383841276168823, 0.01095567550510168, 0.036695171147584915, 0.0011989291524514556, 0.0230939369648695, 0.039475031197071075, -0.06824479252099991, -0.0026624430902302265, -0.05834323540329933, -0.04346811771392822, 0.05579526722431183, -0.04245881736278534, 0.005693354178220034, 0.07567716389894485, 0.015919022262096405, 0.00976553838700056, -0.04408392310142517, -0.07399055361747742, 0.00877323653548956, -0.01970025524497032, -0.024491161108016968, -0.056170303374528885, 0.023915015161037445, 0.009995318949222565, -0.015454757958650589, -0.06276282668113708, 0.022573459893465042, 0.010586137883365154, -0.02963177300989628, -0.003725990653038025, -0.03391940891742706, 0.015885692089796066, 0.014557999558746815, -0.09824249893426895, 0.05735061690211296, -0.01336715929210186, -0.027765728533267975, -0.003085816977545619, 0.01335026603192091, 0.05057735741138458, -0.04743257910013199, -0.06328471750020981, -0.04051382839679718, -0.03455459699034691, 0.00980006530880928, -0.0031241802498698235, -0.03639649972319603, 0.059599846601486206, 0.04718916490674019, 0.026290176436305046} - assert.False(t, e.OmitMatch()) + assert.False(t, e.SkipMatching()) }) } diff --git a/internal/face/embeddings_ignore.go b/internal/face/embeddings_ignored.go similarity index 99% rename from internal/face/embeddings_ignore.go rename to internal/face/embeddings_ignored.go index ec04e50d4..107ef93fe 100644 --- a/internal/face/embeddings_ignore.go +++ b/internal/face/embeddings_ignored.go @@ -5,25 +5,36 @@ import ( "strconv" ) -// IgnoreDist is the distance threshold for matching IgnoreEmbeddings. -var IgnoreDist = 0.86 +// IgnoredDist is the distance threshold for matching IgnoredEmbeddings. +var IgnoredDist = 0.86 func init() { - if s := os.Getenv("PHOTOPRISM_FACE_IGNORE_DIST"); s == "" { + if s := os.Getenv("PHOTOPRISM_FACE_IGNORED_DIST"); s == "" { // Keep default. } else if f, err := strconv.ParseFloat(s, 32); err != nil { - log.Warnf("faces: PHOTOPRISM_FACE_IGNORE_DIST can not be parsed (0.1-1.5; -1 to disable)") + log.Warnf("faces: PHOTOPRISM_FACE_IGNORED_DIST can not be parsed (0.1-1.5; -1 to disable)") } else if f < 0 { - IgnoreDist = -1 + IgnoredDist = -1 + log.Debugf("faces: enabled matching of all ignored embeddings") } else if f >= 0.1 && f <= 1.5 { - IgnoreDist = f + IgnoredDist = f + log.Debugf("faces: changed matching distance for ignored embeddings to %f", IgnoredDist) } else { - log.Warnf("faces: PHOTOPRISM_FACE_IGNORE_DIST is out of range (0.1-1.5; -1 to disable)") + log.Warnf("faces: PHOTOPRISM_FACE_IGNORED_DIST is out of range (0.1-1.5; -1 to disable)") } } -// IgnoreEmbeddings contains known bad embeddings to be excluded from results. -var IgnoreEmbeddings = Embeddings{ +// Ignored tests whether the embedding is generally unsuitable for matching. +func (m Embedding) Ignored() bool { + if IgnoredDist <= 0 { + return false + } + + return IgnoredEmbeddings.Contains(m, IgnoredDist) +} + +// IgnoredEmbeddings contains known bad embeddings to be excluded from results. +var IgnoredEmbeddings = Embeddings{ {0.0001326936762779951, 0.010595318133709952, -0.025556722866895143, 0.0469118170440197, -0.006627591326832771, 0.05271399952471256, -0.04542037146165967, 0.027480189339257777, -0.004917271726299077, -0.07468410208821297, 0.02064464334398508, 0.027222666889429092, 0.07686506863683462, -0.03543879697099328, -0.06587888672947884, 0.00656710215844214, 0.0468103364109993, 0.026114298962056637, 0.09671456180512905, -0.10109077207744122, -0.00781591737177223, -0.03552762418985367, 0.06885470915585756, -0.012004591058939695, 0.08148624002933502, -0.028154293075203896, 0.04417960252612829, -0.04447614587843418, -0.02476067957468331, 0.08517011441290379, 0.002213838277384639, -0.04421043721958995, -0.030782480724155903, -0.022004681872203946, 0.0009286352433264256, 0.010065821232274175, -0.02192891761660576, -0.012186611769720912, -0.08409351948648691, 0.03493268555030227, -0.044278232380747795, 0.028376419097185135, 0.0037802220904268324, 0.04365090653300285, 0.020489776856265962, 0.0062931065913289785, 0.012816649512387812, 0.08537860121577978, -0.08391124662011862, -0.0074469012033659965, 0.007379985763691366, 0.010717783472500741, 0.05138006154447794, 0.03530120011419058, -0.0252615287899971, 0.048870823346078396, 0.051952130161225796, 0.05130995064973831, -0.07164964452385902, 0.008358421036973596, 0.07212860928848386, 0.023144953418523073, 0.016010764054954052, -0.0020557132083922625, 0.0006047732058505062, 0.05894300062209368, 0.018385239876806736, 0.013549384311772883, 0.013471916783601046, -0.026798027334734797, 0.055714783258736134, 0.056760589592158794, -0.03564274637028575, 0.006639213301241398, -0.010688409092836082, -0.014488881919533014, -0.041894917376339436, 0.027378612896427512, 0.04120381874963641, 0.026110727107152343, 0.014362117013661191, -0.015710897743701935, 0.01369841955602169, -0.013755762134678662, -0.025898753898218274, 0.03539643401745707, -0.02275478537194431, 0.044916168320924044, 0.06104293651878834, 0.020197266509057954, 0.03360230568796396, 0.0005524924490600824, -0.03635450592264533, -0.04944554786197841, 0.07170013058930635, -0.0030192392878234386, 0.0010193748748861253, -0.010943924076855183, -0.06179766729474068, 0.056694529950618744, 0.004520991584286094, -0.09191464446485043, -0.02631867417949252, 0.03776269545778632, -0.00876810192130506, 0.10884877666831017, 0.005137963918969035, 0.014990123057032179, -0.012330824043601751, -0.007994036190211773, 0.04028965998440981, 0.030694966204464436, 0.013997081900015473, -0.027155806310474873, 0.008769600055529736, 0.0038997385127004236, -0.003813096962403506, 0.06714510265737772, 0.006777862668968737, 0.061618989799171686, -0.016695198486559093, -0.014862070740491617, 0.047256719786673784, -0.030920962191885337, -0.010902314214035869, 0.029649023665115237, -0.03882072772830725, 0.037115989718586206, -0.00044789700768887997, -0.050685918889939785, 0.023225090000778437, 0.005942594725638628, 0.03058242436964065, -0.05067136138677597, -0.013880123384296894, 0.0521021569147706, -0.03878975426778197, 0.0057146906128764385, 0.01622107159346342, 0.0286275401012972, -0.07171816006302834, -0.024164889007806778, -0.036472175968810916, -0.06874032877385616, -0.013022568658925593, -0.02637113118544221, 0.061983236111700535, 0.0328070695977658, 0.004039793537231162, -0.022473737597465515, 0.017253196332603693, -0.04853619821369648, -0.053010642528533936, 0.04317591618746519, 0.00835538915998768, 0.015444972610566765, 0.04270970821380615, 0.028640874341363087, 0.06504016369581223, 0.03173913527280092, 0.05225925333797932, 0.03651800798252225, -0.022531148977577686, -0.0032108076702570543, 0.030786060029640794, 0.01946059288457036, -0.020198959624394774, -0.010514225577935576, -0.04853967670351267, 0.02134396170731634, -0.05255058314651251, 0.016728751827031374, 0.0456616897135973, -0.021495807450264692, 0.03207355597987771, 0.010148180415853858, 0.03585670003667474, -0.02635771268978715, -0.04969983361661434, -0.034095218405127525, -0.02873873570933938, 0.020237101707607508, -0.026095976354554296, 0.06887094769626856, 0.010905503178946674, 0.05485152825713158, 0.03837144002318382, 0.07052317541092634, 0.006913394434377551, 0.010285209049470723, -0.03990606777369976, -0.05088027101010084, 0.0778753962367773, -0.0213193167001009, -0.03161718975752592, -0.02693262230604887, 0.0435414626263082, 0.01335046417079866, -0.036178333684802055, 0.037226798478513956, 0.052575312089174986, -0.0522100068628788, -0.009666121564805508, 0.009881116129690781, -0.0037592697190120816, 0.017672576592303813, -0.039784221327863634, -0.023527713026851416, -0.020135456696152687, -0.04171011736616492, -0.03752618143334985, 0.011444047326222062, 0.0015834929654374719, 0.008812893531285226, -0.023482086980948225, 0.006552054779604077, -0.0058590869884938, 0.04283139808103442, 0.052830352913588285, -0.0008150241555995308, -0.08346264809370041, -0.10364211909472942, -0.025862343376502395, -0.037633945466950536, -0.00131333211902529, 0.04283250030130148, -0.02747755730524659, -0.022013332003552932, -0.05700004659593105, -0.057958067394793034, 0.04643791541457176, 0.09375700354576111, 0.044992691837251186, -0.025699439109303057, 0.03685394627973437, 0.039113527920562774, -0.004286542231056956, -0.050266037695109844, 0.006167740881210193, 0.009338066913187504, -0.05799494404345751, 0.011283616302534938, -0.021689202752895653, -0.022013561276253313, 0.06421529594808817, 0.037321062409318984, -0.022122669965028763, 0.03338781511411071, 0.004881134445895441, -0.005090652208309621, -0.005954607389867306, -0.003857724070257973, 0.013872599869500846, 0.040445003658533096, 0.0030193766724551097, 0.020781447528861463, 0.04388184240087867, -0.00434388080611825, 0.014594015898182988, 0.07954355143010616, -0.003253952323575504, -0.05893095303326845, 0.012250101892277598, 0.029312842525541782, -0.08140432462096214, 0.024246320594102144, 0.006364793865941465, -0.012409177725203335, -0.022765739355236292, 0.07083966210484505, -0.0560477483086288, 0.02344445328344591, 0.025518586859107018, -0.038515486754477024, -0.040526574943214655, 0.0033363434486091137, 0.07186504639685154, -0.007116460474207997, -0.027830936181999277, -0.11900371685624123, 0.036241024266928434, -0.019209803780540824, 0.016880312585271895, -0.020635713124647737, -0.012299022404477, -0.012887225369922817, 0.013467759592458606, -0.056274086236953735, -0.07062955480068922, -0.047921731136739254, 0.050967195304110646, -0.09523350931704044, -0.01923635500133969, 0.0018940714071504772, -0.025784526020288467, 0.004750739550217986, 0.001268803607672453, 0.08276346698403358, 0.0475466912612319, 0.0204452850157395, 0.04777416866272688, 0.004511475046456326, 0.05325452284887433, -0.00824436274706386, 0.04315535444766283, 0.01829960517352447, -0.03411059989593923, 0.011709870072081685, -0.022576917544938624, 0.04093322320841253, -0.03366286098025739, 0.00007134396582841873, 0.0672286506742239, 0.057760706171393394, 0.05040881037712097, 0.019016009813640267, -0.07006099820137024, 0.011889255285495892, -0.035422834334895015, 0.03638885170221329, 0.0601487485691905, -0.03319359011948109, -0.045506994472816586, 0.019405824947170913, -0.00514926778851077, 0.07637834828346968, 0.07720410358160734, 0.022179096937179565, 0.09868652559816837, 0.06108273658901453, 0.0493094720877707, 0.03135237097740173, -0.04882502695545554, 0.0584859773516655, 0.030338898301124573, 0.003376852720975876, 0.01842997614585329, 0.046141053549945354, 0.03998812031932175, 0.06666938867419958, 0.021333562210202217, -0.024483966641128063, 0.04871886316686869, 0.02728640241548419, -0.05634338594973087, -0.007101567229256034, 0.027000208385288715, 0.03502309508621693, 0.011526696383953094, -0.03697758028283715, -0.010898058622842655, 0.056068443693220615, 0.029542725766077638, -0.06271603982895613, -0.05443012993782759, -0.0007829638198018074, 0.11164804548025131, -0.02070094458758831, 0.006636139118199935, -0.0727179991081357, 0.021099978126585484, -0.03498802054673433, -0.06967776361852884, -0.04527123365551233, -0.015574883203953505, 0.024440275970846415, 0.024940682807937264, -0.0767935961484909, -0.02395771024748683, 0.028084914898499846, -0.0915510281920433, 0.02133126324042678, 0.013071146167021652, 0.004649237322155386, 0.08952618017792702, 0.03991545923054218, 0.0416784998960793, -0.06148885563015938, -0.01432584528811276, 0.008203202858567238, 0.020670469384640455, -0.027112244328236557, 0.0039047824539011344, -0.024497278966009617, -0.043294325936585665, -0.025314603466540575, -0.0067777622025460005, -0.040093651972711086, 0.009956442285329103, -0.03299230616539717, -0.01792255137115717, 0.012778022966813296, -0.03521473368164152, -0.010197664145380259, 0.01715578866424039, -0.008158075157552958, 0.04854840412735939, 0.07429435942322016, 0.040353764314204454, 0.034050410613417625, -0.06899271160364151, 0.05916056968271732, 0.009034074377268553, -0.015106763457879424, -0.00039310590364038944, -0.01474015589337796, 0.0068119101342745125, 0.030776663683354855, 0.04403356648981571, -0.03385453065857291, 0.013438114430755377, 0.017026713234372437, -0.05315904412418604, 0.002748164813965559, -0.002453066874295473, -0.04506317153573036, 0.012577373650856316, 0.057200564071536064, 0.06909130979329348, -0.0031225606217049062, -0.003926296718418598, 0.048229482024908066, -0.008486846985761076, 0.0746435010805726, -0.000002196320565417409, 0.001961063011549413, 0.012371355667710304, -0.00031584547832608223, 0.03543752012774348, -0.009082387339731213, -0.019061634404351935, 0.018139481428079307, -0.0034449175582267344, 0.02569328702520579, -0.06800238601863384, -0.010652570286765695, 0.04442033916711807, 0.0008707062224857509, -0.03791629173792899, -0.01974694279488176, -0.012471344787627459, -0.05222656764090061, 0.027658848877763376, 0.0261795298429206, 0.03837209613993764, 0.03547914605587721, -0.065070073120296, 0.015463256451766938, 0.004419506039994303, -0.02969307790044695, -0.012613456230610609, 0.03048483419115655, 0.007312143221497536, -0.08750566467642784, -0.017710077576339245, -0.03023367328569293, 0.021140164230018854, 0.10436926037073135, 0.011926733888685703, 0.009961859206669033, -0.029476960422471166, -0.020159751875326037, -0.07790366746485233, 0.06886674929410219, 0.07955041993409395, -0.009233276476152241, -0.0632511768490076, 0.003533775918185711, 0.03217921918258071, -0.0017657459757174365, 0.0499554630368948, -0.022411202546209097, 0.00822790467645973, 0.007166558876633644, -0.13091474398970604, -0.06948660034686327, 0.031344231218099594, -0.010657696751877666, -0.025052876735571772, 0.009426685981452465, -0.000860230065882206, -0.04037135327234864, 0.06806340254843235, 0.02604401228018105, -0.07262456882745028, 0.10524584539234638, -0.017017694772221148, 0.03847663733176887, 0.015304135085898452, -0.022285677026957273, -0.0003880725707858801, 0.03794682491570711, -0.06800171174108982, -0.039943912997841835, 0.08338448591530323, 0.012431795010343194, -0.004205749952234328, 0.01789577683666721, 0.02100188471376896, 0.0023398662451654673, -0.03323878743685782, -0.06432780250906944, 0.03639972861856222, 0.011190281802555546, 0.002120053926773835, 0.06202080566436052, 0.05974051542580128, 0.024543930077925324, -0.0370339029468596, -0.020636610919609666, -0.0005317113827914, -0.07742119580507278}, {0.0327663520971934, -0.053845446556806564, -0.05707313741246859, 0.05418369794885317, -0.016575023376693327, 0.07586786895990372, -0.011894008581293747, 0.03213278731952111, -0.019047670376797516, -0.07918274402618408, -0.027129175296674173, 0.03049199717740218, 0.03999617137014866, -0.01233853108715266, 0.002354073648651441, 0.019806059387822945, 0.019059747457504272, 0.007097184658050537, -0.009740786937375864, -0.0742135966817538, -0.04447511894007524, -0.01156774659951528, 0.026554833942403395, -0.011456894067426523, 0.02326338365674019, -0.002170067202920715, -0.023243185132741928, -0.045633370677630104, 0.010032289661467075, 0.07101119309663773, -0.01111836095030109, -0.01317097533804675, -0.01071018942942222, -0.007659738262494405, -0.041848028699556984, 0.05637223273515701, -0.0005383305251598358, -0.00047993411620457965, -0.07783383876085281, 0.04431606767078241, 0.013222892846291264, 0.02315475543340047, -0.04844338446855545, -0.038302931313713394, 0.012286104572316011, 0.033848170191049576, 0.0607793889939785, 0.05929198985298475, -0.04828081155816714, -0.030138582301636536, -0.0008151950314640999, 0.010465693504860004, 0.030983740463852882, 0.014716617452601591, -0.05217174937327703, 0.04472110172112783, 0.07369629169503848, 0.004621044485854024, 0.03860501945018768, 0.03243941503266493, -0.009245039274295172, 0.0094682223473986, 0.002253897488117218, -0.02766571876903375, -0.029085627912233274, 0.09092402458190918, 0.04405333225925764, 0.006249493919312954, 0.011019680804262558, -0.05271036302049955, -0.020144034099454682, 0.04252264400323232, 0.020118261377016704, 0.0066599417477846146, 0.019955224512765806, -0.030812010169029236, -0.07943902909755707, 0.004865555092692375, -0.018480427252749603, 0.03859849087893963, 0.029368844348937273, -0.06468151261409123, 0.057924263179302216, 0.04452625848352909, -0.004612380114849657, -0.019503936724504456, -0.022144774285455544, 0.020180392389496166, -0.0036934524153669677, -0.00817108825625231, 0.04684015146146218, 0.027527477592229843, 0.0000234996162665387, -0.040867398182551064, 0.07498943681518237, -0.016031226531292003, -0.0142232496291399, -0.03092440062512954, -0.0733401042719682, 0.049119154612223305, 0.044415900929986186, -0.049593775222698845, 0.025402150427301724, 0.04645886396368345, 0.028176133520901203, 0.031110845506191254, 0.005135397310368717, -0.0652049829562505, -0.03906955569982529, -0.03944321380307277, 0.013215408912704637, 0.07676231116056442, -0.03677951047817866, -0.05746128658453623, 0.008993810100946575, -0.04006600876649221, 0.0056327579853435355, -0.047140272334218025, 0.007215746445581317, 0.01272638279867048, -0.031125043518841267, 0.008156926836818457, 0.014624582914014658, -0.08018169055382411, -0.010347155931716165, -0.03993860756357511, -0.030042496199409168, -0.017330172161261242, 0.03742165925602118, -0.06329154906173547, 0.04176180933912595, 0.01088601816445589, -0.01839067282465597, -0.007899532249818245, -0.061363790184259415, 0.028725143522024155, -0.011393082949022451, 0.020038410710791748, 0.060640341291824974, 0.06147734820842743, -0.009908444325750073, 0.015835629776120186, -0.018333483176926773, -0.009320063516497612, 0.11075516790151596, -0.04011899481217066, -0.022975423218061525, -0.032005954533815384, -0.024099246521169942, 0.004424336055914561, 0.05590283746520678, -0.06936633338530858, -0.04602960000435511, 0.010102467975229956, 0.0157876821855704, 0.003178671778490146, 0.04222795243064562, 0.03120248547444741, -0.02395591834404816, -0.01582871945962931, 0.0331509243696928, 0.01590028963983059, -0.04261753708124161, -0.03523123264312744, 0.01318650832399726, 0.06125791991750399, -0.042884253586332, -0.008270528012265762, -0.04808752362926801, -0.002350894889483849, -0.023675092806418736, 0.0371870311597983, 0.07454113413890202, -0.004328026746710141, 0.09499754011631012, 0.007518639167149861, 0.06646326060096423, -0.08756361653407414, -0.026751136931125075, -0.03292279628415903, -0.0348881707371523, 0.00505902028332154, -0.03732505471756061, 0.005635660762588183, -0.005981698942681153, 0.06490544105569522, 0.0646795096496741, 0.01883844891563058, 0.011062141818304857, -0.03932255754868189, -0.027195397143562634, -0.051022835075855255, 0.08389552930990855, -0.010162213196357092, 0.0012941518798470497, -0.027620659675449133, 0.022856707219034433, 0.0502279307693243, -0.04731373737255732, 0.03211799884835879, -0.04591728001832962, 0.027679957449436188, 0.004147492504368226, -0.007831209028760592, -0.003697681240737438, -0.0019100040663033724, -0.003983906431434055, 0.008387343802799782, 0.03889203816652298, 0.025709071196615696, -0.03535808351201316, 0.009004350130756697, -0.03247236103440324, 0.04680949697891871, 0.009527718784132352, 0.04663687199354172, -0.0553225502371788, 0.01342997207151105, 0.019706541672348976, -0.0080035524830843, -0.07933334509531657, -0.09834698339303334, -0.09717061618963878, -0.0797893355290095, -0.015568722505122423, 0.010471337552492818, -0.039825571700930595, -0.006423743752141793, -0.03221334392825762, 0.033133322993914284, 0.011495557186814645, 0.05027165450155735, -0.029540843640764553, -0.07439143334825833, 0.0069667700833330555, -0.05424636974930763, 0.01974008255638182, -0.0004425545533498128, -0.003674370857576529, -0.06117587288220724, 0.026247045025229454, -0.003799903051306804, 0.0417054183781147, -0.042911539475123085, 0.03947247906277577, 0.04090055202444395, -0.0033328191687663398, 0.029528638658424217, -0.04306782471636931, -0.03281791011492411, 0.06351448719700177, 0.01982164786507686, -0.02087733110723396, 0.015963503470023472, 0.0372940885523955, 0.02728983076910178, 0.021422462227443855, -0.0014731232076883316, 0.0648433988293012, 0.10704148809115092, 0.0048057570432623225, -0.04342664095262686, 0.007605661017199357, -0.02249815609926979, -0.04588155200084051, -0.006067057644637923, 0.046898980935414634, 0.021457349726309378, -0.037909623235464096, -0.01239320496097207, -0.061378322541713715, -0.023157987433175247, 0.007181654684245586, -0.029933686678608257, -0.01715274667367339, -0.03682110210259756, 0.030735051880280178, 0.009573639215280613, -0.04762778307000796, -0.0383126400411129, 0.03486318079133829, 0.03219085621337096, -0.03043725931396087, -0.015520545634596298, -0.10278631001710892, -0.003898749748865763, -0.03746892915417751, -0.05545622482895851, -0.02157492737751454, -0.016251571166018646, -0.00008085245887438457, -0.07128728181123734, -0.0014216315976227634, 0.00011120767643054326, -0.020412804714093607, -0.0010518231429159641, 0.0004908333842953047, 0.020814547625680763, -0.02526458584300902, 0.008339403274779519, 0.06614271303017934, -0.07462537537018459, 0.09281724443038304, -0.0038561843490848937, -0.03147560264915228, -0.019493032557268936, -0.0054331339585284395, -0.03695216712852319, 0.01574130744362871, 0.003473173206051191, -0.03505755557368199, -0.03778290251890818, 0.020682273044561345, 0.04281369224190712, -0.020661582394192617, -0.006482251609365146, -0.11288622518380483, 0.017689133004751056, -0.007102235530813535, 0.0727708749473095, 0.010616112500429153, -0.008945338117579619, -0.019065127708017826, 0.026331313730527956, 0.01319553672025601, 0.014937257704635462, 0.02679603546857834, -0.001499791513197124, 0.026438268056760233, 0.07602815702557564, 0.06418483704328537, -0.03376601946850618, -0.01003131146232287, -0.03555965982377529, -0.03427346299091975, -0.046278017883499466, 0.06043859198689461, 0.0011921149368087451, 0.06300157556931178, 0.05577578395605087, 0.006206482105577986, -0.0755367564658324, 0.04909140942618251, -0.021035172045230865, -0.01721115503460169, -0.06813419610261917, -0.0018442399644603331, 0.029525946204861004, -0.009601137018762529, -0.01598271106680234, 0.02861011338730653, 0.059175100177526474, 0.004313578557533522, -0.0908130630850792, -0.042131178081035614, -0.004681010420123736, 0.03328718679646651, 0.022554288307825725, -0.0497133806347847, -0.03299647088473042, -0.034490001698335014, -0.02354559030694266, -0.043377275889118515, -0.03148135636001825, -0.013394722482189536, 0.06102305899063746, 0.03236200908819834, -0.0014068676779667537, -0.05872942879796028, 0.019253793094928067, -0.027984758839011192, -0.03945269932349523, 0.006597959281255801, -0.03229363386829694, 0.03983605156342188, 0.007889852548638979, 0.035518414340913296, -0.04719743008414904, -0.004681067298709725, 0.012333313934504986, -0.08126712838808696, -0.09062452365954717, -0.058449054757754006, -0.008303903664151827, -0.0469160849849383, 0.0009175478480756283, -0.011974672476450602, -0.07190390179554622, -0.005035029666032642, -0.016753533855080605, 0.0512022872765859, 0.03356873306135336, -0.04942495624224345, -0.01517834203938643, -0.009064020278553167, 0.05782030522823334, 0.07525423169136047, 0.017181416352589924, 0.05221620947122574, 0.021342197433114052, -0.08822738627592723, 0.09850046286980312, -0.02874075248837471, 0.044962591802080475, -0.014662654139101505, -0.01062466601918762, -0.009910673834383488, -0.0471939438333114, -0.027514696431656677, 0.0346583587427934, -0.0005823158038159212, -0.05178466811776161, 0.03405679172525803, -0.013175081306447586, -0.03183119433621565, -0.029138939455151558, 0.025369923717031877, -0.006153167535861333, 0.08111272503932317, -0.06005008518695831, -0.06457017982999484, 0.0376698262989521, -0.03393493903179964, -0.008829008787870407, -0.03899565587441126, 0.01681015733629465, 0.007045013830065727, 0.01807176290700833, 0.02152458787895739, -0.00783424467469255, 0.05499828110138575, 0.03550824336707592, -0.0204995172098279, 0.012347282453750571, -0.0607320728401343, -0.006074296000103156, 0.046070499966541924, 0.08201716095209122, 0.016877263163526852, -0.013451040411988894, -0.0605434775352478, -0.0015703793615102768, -0.015691607259213924, 0.00585336796939373, 0.024016112710038822, 0.0706626648704211, -0.0549457756181558, -0.04329218901693821, -0.0441284766420722, -0.08027415846784909, -0.025431391084566712, -0.011559057049453259, 0.02983098477125168, -0.028809846534083288, 0.014129214105196297, -0.04697954716781775, 0.09022987633943558, 0.06705611571669579, 0.04185771197080612, 0.048378208031256996, -0.05598160748680433, -0.00969384734829267, -0.016646243010958035, -0.016660502452092867, 0.04492351909478506, -0.021450788403550785, -0.06095413863658905, -0.033897467578450836, 0.017015081830322742, -0.005315835277239482, 0.0037565110251307487, -0.04666102180878321, 0.031349167227745056, 0.03441261313855648, -0.05507169415553411, -0.06511674573024114, 0.0682350570956866, -0.04358017506698767, 0.01746108631292979, 0.0939426173766454, 0.06810124839345615, -0.006636342033743858, 0.031302296090871096, -0.04496904710928599, 0.01981431944295764, 0.069267222036918, -0.0726029599706332, -0.043986971179644264, 0.025093998449544113, 0.03124888737996419, -0.09820013990004857, -0.042447978630661964, -0.0156706419462959, -0.028533382962147396, 0.04610630124807358, 0.003601434155522535, -0.010802838330467543, 0.03701960605879625, 0.05564974372585615, 0.027666799103220303, -0.02779372160633405, -0.07744763791561127, 0.052350763231515884, 0.008655071180934707, -0.03955463568369547, 0.03766112464169661, 0.10806569953759511, 0.05969218288858732, 0.04568152936796347, 0.009722917340695858, -0.011708746509005627, -0.06255517527461052}, {0.06284434720873833, -0.029005179181694984, -0.03338434803299606, 0.10753171890974045, -0.06678501889109612, 0.013823650602716953, -0.054488491266965866, 0.015267021022737026, -0.001607629470527172, -0.027108099311590195, -0.010922957328148186, 0.011491326382383704, -0.029895958490669727, -0.039416585117578506, 0.003221828257665038, -0.0516958013176918, 0.036409951746463776, 0.0642534252256155, 0.006178052630275488, -0.04038401413708925, -0.017292845295742154, 0.032974570989608765, 0.022641491144895554, 0.054155679419636726, -0.05263303592801094, 0.09158674627542496, 0.011043895734474063, 0.041833650320768356, 0.027214172761887312, 0.05076630786061287, -0.05231144279241562, 0.019811385311186314, 0.0071494486182928085, -0.06681914068758488, -0.036001428961753845, 0.034029265865683556, -0.060627423226833344, 0.041873970068991184, 0.002339374739676714, 0.023297208361327648, -0.012815226335078478, 0.028754040133208036, -0.04538220912218094, -0.08598921075463295, -0.004218232585117221, 0.023868812946602702, -0.01993870735168457, 0.019581496017053723, -0.024058961309492588, 0.01147145638242364, -0.006139506585896015, 0.049974434077739716, -0.005606737919151783, 0.0209476500749588, -0.06977502815425396, 0.035624900832772255, 0.061094606295228004, 0.0352944303303957, 0.07281191274523735, 0.032145775854587555, -0.04481622390449047, 0.029217765666544437, -0.001363090705126524, -0.01460540876723826, 0.022599920397624373, 0.06880874000489712, 0.007515969220548868, -0.011570601083803922, -0.021237500477582216, 0.005821897881105542, 0.013093767687678337, 0.10394420847296715, 0.007080500712618232, 0.027991384267807007, 0.022274050395935774, -0.05769101902842522, -0.12874369695782661, 0.009702189359813929, -0.056481173262000084, 0.00775888713542372, 0.05582956783473492, -0.032633671537041664, 0.05638475902378559, 0.04173892084509134, 0.017206672113388777, -0.01748755807057023, 0.01763427979312837, 0.01716906193178147, -0.024634858244098723, -0.014180597849190235, 0.021366480737924576, 0.0025194708723574877, 0.0248795123770833, 0.0033854031935334206, 0.05419327691197395, 0.016019640723243356, 0.018457471393048763, -0.03547860775142908, -0.06435636803507805, 0.032412354834377766, 0.007596640847623348, -0.06320723704993725, -0.036953581497073174, 0.04706245847046375, 0.04867929220199585, -0.021725776605308056, 0.019065342494286597, -0.016973395366221666, 0.0020397594198584557, -0.011587840650463477, 0.056068647652864456, 0.04459729790687561, -0.074042409658432, -0.036817656829953194, 0.01024631131440401, -0.07118164747953415, 0.0015259636857081205, -0.04870235174894333, -0.04596330039203167, 0.03759562782943249, -0.04011621791869402, 0.02938012615777552, -0.06474276073276997, -0.08711721003055573, -0.03223537281155586, -0.0755549967288971, -0.010331481229513884, 0.014598480118365842, -0.01853354601189494, -0.04022553563117981, -0.02665607165545225, -0.043833816424012184, 0.02459111507050693, -0.0032769072568044066, -0.09750592336058617, 0.055337026715278625, -0.03156999126076698, 0.02946186065673828, 0.048305440694093704, 0.10537771880626678, 0.04212689492851496, 0.057555193081498146, 0.04458703938871622, 0.05203840509057045, 0.044123150408267975, -0.04238804057240486, -0.039660708513110876, -0.006910159019753337, -0.03443789854645729, 0.030163869261741638, 0.0470982501283288, 0.010832795000169426, -0.009893766371533275, 0.012644675560295582, 0.04670959431678057, 0.006958661891985685, -0.007198214530944824, 0.02869612816721201, -0.03218511585146189, -0.06024360470473766, 0.050968676805496216, 0.038949725683778524, -0.04715594742447138, 0.051940057426691055, 0.005458215018734336, 0.026816319674253464, -0.005027822568081319, -0.050826288759708405, -0.045323437079787254, 0.044193622656166553, -0.04270204156637192, 0.004402732476592064, 0.004379211633931845, -0.033005948178470135, 0.057790303602814674, 0.04602821543812752, 0.025322407018393278, -0.04138457402586937, 0.0034240318927913904, -0.04023834317922592, -0.04534284211695194, -0.07740027084946632, -0.013416164554655552, 0.023366138339042664, -0.009700523689389229, 0.028630109503865242, 0.011211608536541462, 0.01002666592830792, 0.011118833906948566, 0.010780369862914085, 0.03572958707809448, -0.007703072391450405, 0.0653779897838831, -0.04295694641768932, 0.03403735440224409, -0.018303112126886845, -0.040228962898254395, 0.014755043899640441, -0.009400202659890056, 0.021197274327278137, -0.008628773619420826, 0.10251527652144432, -0.05394446291029453, 0.008249665377661586, 0.04287607781589031, 0.0050901168724521995, -0.010972746415063739, -0.0420376043766737, 0.013937449315562844, 0.001916247303597629, 0.03874814696609974, -0.008996941527584568, -0.02201005187816918, 0.0396783072501421, 0.003941061440855265, -0.002396055031567812, -0.0333055155351758, 0.0435702851973474, -0.03975132945924997, 0.03690537717193365, -0.0031976422760635614, -0.07074861600995064, -0.1018105261027813, -0.06137466989457607, -0.03522000182420015, -0.04629768989980221, -0.037211105693131685, 0.061564160510897636, -0.02545832423493266, 0.011777242878451943, 0.05948108807206154, 0.032512219971977174, -0.03990997467190027, -0.13376321643590927, -0.032053982838988304, -0.016708021517843008, 0.011349802312906832, 0.08894631266593933, -0.04262389801442623, -0.06923616491258144, 0.00873589573893696, 0.007375554647296667, 0.03285858919844031, 0.039600128307938576, 0.03422589972615242, 0.0868966206908226, 0.012104087509214878, 0.058597175404429436, -0.011182685382664204, 0.0021341773099265993, -0.015253305435180664, 0.0006458887364715338, 0.033158416859805584, 0.07877303659915924, 0.010923713445663452, 0.04008904006332159, -0.031842035590671, -0.006067322567105293, 0.056666482239961624, 0.09222240000963211, 0.014480480924248695, -0.03989860136061907, 0.012391543947160244, -0.039715107530355453, -0.040793413296341896, -0.06036018021404743, 0.026831793366000056, 0.028570874594151974, -0.05866600573062897, -0.0142747201025486, 0.008264209376648068, -0.014437143225222826, 0.060466233640909195, 0.04145735502243042, 0.058779943734407425, -0.015319256577640772, -0.04460429027676582, -0.01687918654351961, -0.048234415240585804, -0.010065980488434434, -0.005043374840170145, 0.004571503435727209, -0.09162242338061333, -0.08108650147914886, -0.1015215553343296, 0.03543127328157425, 0.0077894971473142505, 0.020733556244522333, -0.04853038117289543, -0.03475812170654535, -0.006749107094947249, -0.09373877197504044, 0.027081307023763657, 0.0007799278246238828, -0.036063493229448795, -0.11988408118486404, 0.02495977282524109, 0.008544044569134712, -0.0042711428832262754, -0.02035700809210539, 0.05908088944852352, -0.09643584489822388, 0.07077866606414318, 0.004769423045217991, -0.03567556291818619, -0.03286297246813774, -0.014741006772965193, -0.006264572133659385, 0.08308903872966766, -0.004534213338047266, 0.032167703844606876, -0.011168432421982288, 0.0013152547180652618, 0.04381400719285011, 0.01726419711485505, 0.018180158454924822, -0.018767723464407027, -0.008563847397454083, 0.018286147620528936, 0.0072136406088247895, 0.012085753958672285, -0.011311979964375496, -0.004469092265935615, 0.050337616354227066, -0.011535174038726836, -0.021048872265964746, -0.0004620607942342758, -0.013419216498732567, 0.03384028468281031, 0.0312425522133708, 0.029729142785072327, -0.04264961741864681, 0.014195500873029232, 0.01840238249860704, 0.031068642623722553, 0.011247138027101755, -0.03272712882608175, -0.017486378317698836, 0.006378842168487608, -0.008520457427948713, 0.030439751222729683, -0.025434451759792864, 0.0385387297719717, -0.05956453084945679, 0.028284684754908085, -0.08489835262298584, 0.001083902083337307, 0.07093309238553047, 0.05549091473221779, 0.024792246520519257, 0.00461159460246563, 0.03302551060914993, -0.0863029919564724, -0.0011300056939944625, -0.09712794423103333, 0.0356176495552063, 0.031631761230528355, 0.021910092793405056, 0.0021829877514392138, 0.03604079782962799, -0.05116119608283043, 0.0619150847196579, 0.004551296355202794, 0.0007035229355096817, -0.021020963322371244, 0.038651254028081894, 0.07365263253450394, 0.005798443919047713, -0.024576224386692047, -0.0327049195766449, -0.029532729648053646, -0.005691976752132177, 0.005983200971968472, 0.007890335051342845, 0.05804747715592384, 0.03335856134071946, 0.0340453777462244, 0.016827119688969105, -0.051441559568047523, -0.031406105088535696, -0.03898142836987972, -0.01819296012399718, -0.04955337196588516, 0.07978951185941696, 0.05701897852122784, -0.030178208835422993, -0.011562229134142399, -0.061790358275175095, -0.015636960044503212, -0.003559209406375885, 0.05061437003314495, 0.041266925632953644, -0.018667110831302125, -0.08620843291282654, -0.03809763491153717, 0.023378479294478893, 0.03969094716012478, -0.002554500475525856, -0.01953190565109253, 0.010712880641222, -0.02738435659557581, 0.0331451203674078, -0.04686147719621658, 0.09629445150494576, 0.005550550762563944, -0.039622269570827484, -0.033173130825161934, -0.02324953768402338, -0.017771519487723708, 0.027312133461236954, 0.03201628569513559, -0.03014825191348791, 0.04467751085758209, 0.024144459515810013, -0.008051008335314691, -0.019498403184115887, 0.029907324351370335, 0.0189849731978029, -0.04994681850075722, -0.032236842438578606, 0.025659749750047922, 0.02933890838176012, -0.004370095790363848, -0.03840358927845955, -0.07478417083621025, -0.03030145727097988, 0.06305948831140995, -0.02779281698167324, 0.0042512097279541194, -0.022434307262301445, 0.03378946240991354, 0.029051520861685276, -0.01775280386209488, -0.031743119936436415, -0.07152446359395981, 0.0476363692432642, -0.03444810304790735, 0.0317333173006773, 0.07772262021899223, -0.00783982197754085, -0.040827227756381035, 0.10645576938986778, -0.03403943311423063, -0.00003911386011168361, -0.0072786344680935144, -0.004941684193909168, -0.05215170048177242, 0.055917855352163315, -0.10195506364107132, -0.04286576993763447, -0.024570084642618895, -0.004506888217292726, 0.05776744708418846, 0.01992187136784196, 0.02558760717511177, 0.002704308368265629, 0.056887367740273476, 0.04725263640284538, 0.0832991749048233, 0.04872505180537701, -0.03253069892525673, 0.021064328961074352, 0.005837380304001272, -0.027768009342253208, 0.067010298371315, 0.02306288853287697, -0.02134238975122571, -0.045129356905817986, 0.02761551085859537, -0.02426028437912464, 0.017020956380292773, -0.07461177185177803, 0.08725648745894432, -0.05555969662964344, -0.02693602629005909, 0.0035479205835144967, 0.07287386059761047, -0.035161109641194344, 0.0418214350938797, 0.044551726430654526, 0.11209195107221603, 0.025584499817341566, 0.030002903193235397, 0.011082121403887868, 0.02441284991800785, 0.0005726749077439308, -0.09323468431830406, 0.03473459556698799, -0.002290771808475256, -0.0009947330690920353, 0.000989026390016079, -0.018519603880122304, 0.0064489132491871715, -0.032896545715630054, 0.08339690044522285, -0.006982204504311085, -0.024755993857979774, 0.015755719039589167, 0.007564055034890771, -0.06307012028992176, -0.015144840581342578, 0.026440367102622986, 0.04021630994975567, 0.025752345798537135, 0.0001518742647022009, -0.02138493419624865, 0.00871993793407455, 0.05766548216342926, 0.033777027390897274, 0.00018209824338555336, 0.008516786096151918, -0.03685404174029827}, diff --git a/internal/face/embeddings_ignore_test.go b/internal/face/embeddings_ignored_test.go similarity index 99% rename from internal/face/embeddings_ignore_test.go rename to internal/face/embeddings_ignored_test.go index 98d116e07..0bdbd931d 100644 --- a/internal/face/embeddings_ignore_test.go +++ b/internal/face/embeddings_ignored_test.go @@ -10,85 +10,85 @@ func TestIgnoreEmbeddings(t *testing.T) { t.Run("Blur1", func(t *testing.T) { e := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.007879496, 0.01986026, -0.019533899, 0.0405012, 0.015047856, 0.04601962, 0.080275685, 0.017424034, -0.032671392, 0.024088044, -0.021807125, 0.010775311, 0.094901696, 0.0048406925, 0.013086048, 0.04339756, -0.0069915624, 0.019183818, 0.0624931, 0.019509323, 0.07727781, 0.071851335, 0.046544127, 0.040363774, -0.027118236, 0.06800823, -0.01851149, 0.039025713, -0.037301723, 0.05617681, 0.027737545, -0.0011841523, 0.034742635, 0.006083848, 0.033872508, 0.012025738, -0.02354928, -0.07461171, 0.0027702893, 0.04646551, 0.06590462, -0.00794524, -0.011096932, 0.031695057, -0.06732352, -0.051879242, -0.0773121, -0.000517982, 0.08113213, -0.015312499, 0.018544769, -0.023654874, -0.01689197, 0.026425209, -0.08191027, 0.03139842, -0.011997609, 0.059896134, 0.07505033, -0.012907369, 0.008597082, 0.007715897, -0.07062183, -0.027084265, 0.0028182073, 0.03769887, 0.034299187, 0.046780333, -0.007847023, -0.051446356, 0.007982996, -0.034917314, -0.0038174198, -0.05954771, -0.044208106, 0.04685703, -0.0199229, -0.0032713648, 0.009684984, -0.050678924, 0.007356914, -0.06628045, 0.042982273, 0.0055478252, 0.011330174, -0.082057334, 0.026437566, -0.015942575, 0.048285805, -0.003856138, 0.04399534, 0.01741405, -0.059217025, 0.056499016, -0.03459506, 0.030366927, 0.016147505, -0.021027595, -0.013333387, -0.035330992, 0.0445699, -0.03483558, 0.02072434, -0.019552084, -0.0043943045, -0.03957101, 0.0041682394, 0.006047565, 0.03504845, 0.04675005, -0.021805461, -0.0033183587, -0.0017508261, 0.033419013, 0.008266579, 0.067113, -0.026226636, -0.020189233, 0.029219048, 0.031028047, 0.021648621, -0.055164326, -0.008505359, 0.05173594, 0.016450783, -0.017234024, -0.10492493, -0.04954522, 0.024168914, -0.008840458, -0.078473605, -0.042714797, -0.040692057, -0.05446264, 0.0148880705, 0.057658363, 0.005458192, 0.02171352, -0.04556389, 0.017333247, -0.10342444, -0.06159851, -0.03170678, 0.08064648, 0.024460033, -0.07185376, -0.0019515441, -0.026248276, 0.034460787, 0.08695437, 0.06363327, 0.012909266, 0.00093975884, 0.03682474, -0.041370448, -0.0070990156, 0.058603138, -0.038166087, -0.039693672, 0.025385896, 0.0035452761, -0.015794974, 0.019059189, -0.028707229, 0.038948998, -0.032039847, -0.07992934, -0.05482927, 0.048767164, -0.03186542, 0.059099294, 0.063702375, 0.01810526, -0.019284561, 0.036313917, 0.0006970895, 0.020730797, 0.08630282, -0.10650717, 0.0017196184, 0.023258938, -0.021214833, 0.015206377, -0.027243242, -0.021319263, -0.054438062, 0.066603355, -0.047786396, 0.018822387, -0.031346995, -0.0049103773, -0.020732613, -0.0841506, 0.00707288, -0.0033278253, 0.068160556, -0.011127404, 0.05533654, 0.0046188673, 0.039132893, 0.008633137, -0.057081457, -0.030337824, -0.0721918} t.Logf("Blur1 magnitude: %f", e.Magnitude()) - t.Logf("Blur1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Blur1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Blur2", func(t *testing.T) { e := Embedding{-0.040659550577402115, -0.03220542520284653, 0.05863650515675545, 0.07900159806013107, -0.03954162076115608, -0.03830844908952713, -0.09981349855661392, -0.03843552619218826, 0.021984204649925232, 0.021209893748164177, 0.05058338865637779, 0.026279529556632042, -0.037386082112789154, 0.019860034808516502, 0.01779518648982048, 0.029238300397992134, 0.025665590539574623, 0.053838297724723816, 0.01769574172794819, 0.04497014731168747, -0.0034581704530864954, 0.05082075297832489, 0.00983431376516819, -0.055299241095781326, -0.08863261342048645, 0.026919297873973846, -0.003238844918087125, 0.06171567738056183, -0.006652790121734142, 0.03024955280125141, -0.07668674737215042, 0.02599654719233513, 0.03656956925988197, -0.040286894887685776, -0.07485620677471161, 0.007622404955327511, 0.004450628533959389, 0.022175054997205734, 0.024441875517368317, 0.02038322575390339, -0.008045016787946224, 0.02700800821185112, 0.037923432886600494, 0.037730343639850616, 0.0019298223778605461, -0.025241704657673836, 0.07439867407083511, 0.025373654440045357, -0.062184471637010574, 0.019462162628769875, 0.011163688264787197, 0.05711067467927933, -0.007787591777741909, 0.006090524140745401, -0.01247440930455923, -0.0002892761258408427, -0.022054091095924377, 0.09874352067708969, 0.02230732887983322, -0.03625740855932236, 0.01047681737691164, 0.023006660863757133, -0.03572215884923935, -0.047631122171878815, -0.004130185581743717, 0.13868559896945953, 0.004021449480205774, 0.0056119272485375404, -0.03055204637348652, 0.03540297970175743, 0.08558189123868942, 0.04478949308395386, 0.08267980813980103, 0.0001782427862053737, -0.09348706901073456, 0.01561333891004324, -0.012885896489024162, 0.01995423436164856, -0.06154691055417061, -0.021583547815680504, 0.07658854871988297, 0.03818646818399429, 0.019400358200073242, 0.048004768788814545, 0.03896840661764145, 0.007684631273150444, 0.006036552134901285, 0.061359286308288574, -0.06359504908323288, 0.06033588945865631, 0.003095539752393961, 0.01086103729903698, 0.024172229692339897, 0.035893380641937256, -0.015560186468064785, 0.0011388470884412527, 0.01351285818964243, 0.05575203895568848, -0.006037220358848572, -0.04045598953962326, 0.001389052253216505, -0.02900969795882702, -0.044179223477840424, -0.012978514656424522, 0.036748431622982025, 0.009548956528306007, 0.12157998234033585, -0.027398979291319847, -0.028363993391394615, 0.03085082396864891, -0.03142939507961273, -0.033452536910772324, -0.062204647809267044, 0.03741671144962311, -0.037081167101860046, 0.005499409511685371, 0.042599402368068695, 0.026988882571458817, 0.037901923060417175, 0.026043692603707314, -0.02773086354136467, -0.07317446917295456, 0.000101863632153254, 0.01806195266544819, -0.03163762018084526, -0.049250949174165726, 0.017383672297000885, 0.06737986952066422, -0.018057355657219887, -0.03998659923672676, 0.005807057488709688, -0.028374463319778442, 0.026576239615678787, -0.01071916613727808, -0.05852247774600983, 0.01768427900969982, -0.04401516914367676, 0.0035484740510582924, 0.01177794486284256, 0.029788490384817123, 0.0022414580453187227, 0.012311144731938839, 0.014886411838233471, 0.060596615076065063, -0.00679460633546114, -0.01986791379749775, 0.017852429300546646, -0.03839694708585739, -0.010994594544172287, 0.0516304187476635, 0.06284306943416595, -0.009843732230365276, -0.033825311809778214, 0.010088239796459675, 0.002782990923151374, -0.007669741753488779, 0.0036510066129267216, -0.0347248837351799, -0.034374918788671494, -0.015334841795265675, 0.06460481137037277, -0.01482471451163292, -0.022562984377145767, 0.0660383328795433, 0.039143770933151245, -0.04959432780742645, -0.04688224941492081, -0.08884536474943161, 0.035801686346530914, -0.011035206727683544, -0.048159871250391006, -0.012846723198890686, -0.08550407737493515, -0.02462676912546158, -0.05736429616808891, -0.023693742230534554, 0.06937230378389359, 0.008348439820110798, 0.046880267560482025, -0.007452292367815971, -0.026880638673901558, -0.02645084448158741, -0.008707266300916672, 0.039963752031326294, -0.039603643119335175, 0.015119479969143867, -0.001705334521830082, 0.07568509131669998, 0.007083678152412176, 0.03451305627822876, 0.08042848855257034, 0.01654256135225296, -0.027564499527215958, 0.09245218336582184, 0.07642299681901932, 0.049259401857852936, -0.043418038636446, 0.02720213122665882, -0.051213305443525314, 0.10580828785896301, 0.04973253980278969, 0.027844952419400215, -0.06973676383495331, -0.002782640513032675, -0.05002935230731964, 0.03786781430244446, 0.012268701568245888, 0.03857699781656265, -0.03049379587173462, -0.02773997187614441, 0.0324966236948967, 0.007138446904718876, 0.045148178935050964, 0.03304283693432808, -0.08195831626653671, -0.0658479630947113, -0.03167840093374252, 0.0785706415772438, -0.0540161207318306, 0.08956210315227509, -0.01385448407381773, -0.03099009394645691, 0.018756408244371414, -0.06490232050418854, -0.017304886132478714, 0.024655258283019066, -0.02960297279059887, 0.01074492558836937, -0.01565052568912506, 0.04490678757429123, 0.056525640189647675, -0.06037742644548416, -0.00036496517714112997, -0.015667423605918884, -0.0717754065990448, 0.01312245149165392, 0.04692285135388374, 0.009900979697704315, -0.06392915546894073, 0.0317864790558815, 0.015916356816887856, 0.02110808528959751, 0.039608780294656754, 0.09377234429121017, -0.05484704673290253, 0.05391034856438637, -0.0788193866610527, 0.10010083019733429, 0.011118135415017605, -0.00004653222640627064, -0.04172910004854202, -0.02035870961844921, -0.030938807874917984, 0.003754222998395562, -0.04063389077782631, 0.11299732327461243, -0.02142464555799961, -0.008394543081521988, 0.08152930438518524, -0.0008909814641810954, -0.05258719623088837, -0.05761850252747536, 0.009006860665977001, 0.06501699984073639, -0.01597391627728939, 0.08522436022758484, 0.03371994569897652, -0.045805223286151886, 0.032167356461286545, 0.08392851054668427, -0.016528621315956116, -0.06503161042928696, 0.019590284675359726, 0.03115348517894745, 0.03043849766254425, 0.014987046830356121, -0.055867355316877365, -0.0032457816414535046, -0.015822168439626694, -0.005734337959438562, 0.0071865590289235115, -0.015463619492948055, -0.025871464982628822, -0.07001885026693344, 0.024963589385151863, 0.01097678393125534, -0.035117257386446, 0.03467186540365219, 0.06086552515625954, -0.03848052769899368, 0.07273925840854645, -0.004646539222449064, -0.001109645119868219, -0.005088613834232092, -0.0974913015961647, -0.08384663611650467, 0.025186428800225258, -0.0006411857320927083, 0.030254928395152092, 0.006322708446532488, -0.0502672903239727, 0.02300260402262211, 0.030662409961223602, 0.018212566152215004, 0.06359684467315674, -0.009071605280041695, -0.015119871124625206, 0.040699902921915054, -0.03850189968943596, -0.05171874910593033, 0.10410609096288681, 0.10507630556821823, -0.02125021629035473, -0.009639402851462364, 0.012288953177630901, 0.008919070474803448, -0.024553585797548294, 0.014904174953699112, 0.023295167833566666, 0.05103684216737747, -0.00450109550729394, 0.002307947026565671, 0.014376292005181313, 0.11136122792959213, 0.0014088694006204605, 0.0022693064529448748, 0.05170426890254021, 0.04981289431452751, 0.07373254001140594, 0.049386415630578995, -0.014806983061134815, -0.05833027511835098, -0.03190769627690315, -0.008523926138877869, 0.04702630639076233, 0.029194114729762077, 0.004517692141234875, -0.09024124592542648, 0.003329969011247158, -0.08030996471643448, 0.019111910834908485, 0.09198802709579468, -0.0310179702937603, -0.018719222396612167, -0.02182493731379509, 0.017477037385106087, -0.038689568638801575, 0.011723000556230545, 0.041695673018693924, 0.057853586971759796, 0.06979171931743622, 0.00011747673124773428, -0.03506821393966675, 0.05103304982185364, -0.028120825067162514, -0.005008046515285969, -0.02852008491754532, 0.046975843608379364, 0.031390246003866196, 0.07648137956857681, -0.04007460176944733, 0.05367399379611015, -0.007463269867002964, -0.008238906040787697, 0.016662007197737694, -0.027663614600896835, 0.01993817463517189, -0.04393567517399788, -0.031136782839894295, -0.05139624699950218, -0.07834076136350632, -0.042914580553770065, -0.019670458510518074, 0.03316812217235565, 0.09591887146234512, 0.06848528981208801, -0.02773074246942997, 0.02855822816491127, -0.018690742552280426, 0.011006012558937073, 0.054826073348522186, -0.009247495792806149, 0.003375179599970579, 0.04311295971274376, 0.03586158901453018, 0.0018443106673657894, 0.009209017269313335, -0.023508505895733833, 0.005245110485702753, -0.03597981482744217, 0.00041601891280151904, -0.05553282052278519, 0.010633128695189953, -0.12370350956916809, 0.03224118798971176, 0.005466188304126263, -0.016138294711709023, -0.048258986324071884, -0.046113520860672, 0.0055899592116475105, 0.014022012241184711, -0.023494740948081017, 0.002998130861669779, -0.03219323977828026, -0.007386348210275173, -0.025029350072145462, 0.02161424607038498, -0.02605803869664669, 0.03477400168776512, -0.02827581763267517, 0.015608449466526508, -0.06077265739440918, 0.1015695258975029, 0.05589430034160614, 0.019551506265997887, 0.08917868137359619, -0.017507141456007957, 0.07259833812713623, -0.0648856982588768, 0.006342224311083555, 0.03585096821188927, 0.0037353287916630507, 0.04381411895155907, 0.004948670044541359, -0.05632920190691948, -0.05978763476014137, -0.024755241349339485, 0.020523933693766594, 0.0029942821711301804, -0.016245706006884575, 0.0073024132288992405, -0.012954101897776127, 0.014015593566000462, 0.011097325012087822, -0.0729522556066513, 0.07186494767665863, -0.0016607641009613872, 0.0026961045805364847, -0.005763839930295944, -0.026096666231751442, 0.02687499113380909, 0.04582877829670906, -0.0176797304302454, 0.015226836316287518, -0.025522204115986824, 0.005290484055876732, 0.018956126645207405, 0.005492339376360178, -0.05386399105191231, 0.040570177137851715, -0.003739845473319292, 0.10603580623865128, 0.004780937451869249, 0.011396643705666065, 0.036971934139728546, -0.041815534234046936, 0.02744169346988201, -0.004168000537902117, 0.0145946703851223, 0.03126026317477226, 0.01925659365952015, -0.09751059114933014, -0.006547612603753805, -0.03389118239283562, 0.05320596322417259, 0.01183426845818758, -0.06129913404583931, 0.02740320935845375, 0.017650293186306953, 0.03780294209718704, -0.00009194338781526312, 0.0404474213719368, 0.07070805132389069, -0.0999426394701004, -0.03244980424642563, -0.06469535827636719, 0.02357516996562481, 0.013541318476200104, -0.010025718249380589, 0.07540664821863174, 0.0028972753789275885, -0.008960247039794922, -0.012603504583239555, 0.05121699348092079, 0.020327046513557434, 0.03936949744820595, 0.001988647971302271, 0.03354545310139656, 0.024581555277109146, -0.015217097476124763, 0.02889206074178219, 0.02085159160196781, -0.06294527649879456, 0.022404003888368607, -0.034289367496967316, -0.0674518421292305, 0.07663356512784958, 0.010276293382048607, -0.018306201323866844, -0.05057809129357338, -0.09850548207759857, 0.09915852546691895, -0.08300632983446121, 0.10919290035963058, -0.04569940268993378, -0.03762957453727722, 0.0034436392597854137, -0.0632016733288765, -0.0400751493871212, 0.07686466723680496, 0.05905047059059143, 0.004703994374722242} t.Logf("Blur2 magnitude: %f", e.Magnitude()) - t.Logf("Blur2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Blur2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Blossom", func(t *testing.T) { e := Embedding{0.01821020431816578, -0.023437567055225372, 0.02064298279583454, 0.03490285202860832, -0.0062901671044528484, -0.0064063891768455505, -0.06233056262135506, 0.07121828943490982, -0.055571429431438446, 0.029558930546045303, 0.02178776264190674, 0.0220812875777483, -0.027457213029265404, -0.025004200637340546, -0.051860060542821884, -0.030478717759251595, 0.014104194939136505, 0.014726600609719753, -0.016185864806175232, -0.05630311742424965, -0.0007384912460111082, 0.017833851277828217, 0.007466004230082035, -0.018245164304971695, -0.04465140774846077, -0.05149618908762932, 0.04039151966571808, 0.017037857323884964, -0.015094432048499584, 0.06189686432480812, -0.05963028967380524, -0.07761456072330475, 0.034639403223991394, -0.028443966060876846, 0.01655958592891693, -0.005933939013630152, -0.08745292574167252, -0.02694937400519848, -0.014408857561647892, -0.010446715168654919, -0.023589249700307846, 0.0663442462682724, 0.04909157380461693, -0.0023503690026700497, -0.008410140872001648, 0.12164326012134552, -0.010511402040719986, -0.0047544874250888824, -0.023863354697823524, 0.010045552626252174, 0.018847299739718437, 0.010298987850546837, 0.05359936133027077, 0.052733056247234344, -0.01727156713604927, 0.0053423019126057625, 0.08065354824066162, 0.01277188304811716, -0.01914011314511299, 0.02162299118936062, -0.04849407821893692, 0.0037366875912994146, 0.032514866441488266, 0.011288965120911598, 0.013276362791657448, 0.03930341452360153, 0.029594801366329193, -0.01013986300677061, 0.07746551930904388, -0.0016483333893120289, 0.04333961382508278, 0.03994179517030716, 0.03702109307050705, -0.01800084114074707, -0.049653515219688416, 0.05364584922790527, -0.0504317507147789, -0.03479231148958206, 0.004587068222463131, 0.09297594428062439, 0.044500891119241714, -0.018745509907603264, 0.08215191960334778, 0.06747566908597946, 0.020649220794439316, 0.028046701103448868, 0.01492240559309721, -0.022446198388934135, 0.07280460745096207, 0.008448442444205284, -0.03950385004281998, 0.032330770045518875, -0.013169591315090656, -0.04713238403201103, -0.00909704715013504, 0.015205003321170807, -0.067038394510746, 0.03143712505698204, -0.01801210083067417, 0.005371224135160446, 0.04291990026831627, -0.00790275726467371, -0.003694827202707529, 0.1136225163936615, 0.008553439751267433, 0.054057661443948746, 0.0502188578248024, -0.024207832291722298, -0.00015020646969787776, -0.052836786955595016, -0.04804473742842674, 0.05141591280698776, -0.038935597985982895, -0.04706438630819321, -0.05428919941186905, -0.022000353783369064, -0.023962095379829407, 0.0426950640976429, 0.0559995099902153, 0.004074506461620331, -0.023693080991506577, -0.06507810205221176, -0.04261104762554169, -0.0970754623413086, 0.04138507321476936, 0.03040129691362381, -0.015875818207859993, 0.03040211647748947, -0.010607944801449776, -0.03460313007235527, -0.045270007103681564, 0.00034321434213779867, -0.030485179275274277, 0.014731010422110558, 0.004268650896847248, 0.04292090982198715, -0.07705771178007126, 0.056689731776714325, -0.020848767831921577, 0.08218804746866226, -0.021235274150967598, 0.06583341956138611, -0.002099075121805072, -0.03269239515066147, -0.005792548414319754, 0.03422548994421959, -0.01988036558032036, 0.012263544835150242, -0.03256846219301224, 0.07840777188539505, 0.06540852040052414, -0.05114790052175522, -0.07009473443031311, 0.07534696906805038, -0.04867268726229668, 0.027016332373023033, -0.021471483632922173, -0.012011591345071793, -0.08289984613656998, -0.03958273306488991, 0.055009711533784866, -0.014064125716686249, -0.08779940754175186, 0.026738431304693222, 0.01273905299603939, 0.0124049698933959, 0.008448999375104904, -0.011322328820824623, -0.0634634867310524, 0.016120076179504395, -0.01175830326974392, -0.015636304393410683, -0.03191705048084259, -0.02122354879975319, -0.008227435871958733, 0.05059107020497322, 0.09470821171998978, -0.044920746237039566, -0.027742912992835045, -0.0996212437748909, -0.01948167383670807, -0.025936149060726166, 0.032206397503614426, 0.01575576327741146, 0.0009050318039953709, 0.021731873974204063, 0.027130762115120888, -0.0069421264342963696, -0.012411588802933693, -0.05900553613901138, 0.03785979002714157, 0.05428299307823181, 0.053576093167066574, -0.052544835954904556, 0.06508063524961472, -0.032598063349723816, -0.012604542076587677, -0.017536843195557594, -0.05793744698166847, 0.04536138102412224, -0.06443658471107483, 0.11019452661275864, -0.01679248921573162, -0.04018999636173248, -0.013682234100997448, 0.0792519748210907, -0.03594203665852547, 0.010129383765161037, 0.00821376871317625, 0.012615825049579144, 0.04538201168179512, 0.05544423684477806, -0.037724610418081284, -0.005600334610790014, -0.06048022210597992, -0.032828450202941895, -0.06015085056424141, 0.06898350268602371, 0.008781375363469124, 0.0820549800992012, -0.016364818438887596, -0.0003078743175137788, -0.006050973664969206, -0.006254898849874735, 0.016589656472206116, 0.007757948245853186, -0.0680060014128685, -0.013677289709448814, -0.022369597107172012, 0.030127303674817085, 0.07033808529376984, 0.023922359570860863, -0.025986120104789734, -0.03961442410945892, 0.005918253678828478, -0.08935870975255966, 0.03798864036798477, 0.003110563615337014, -0.05894562974572182, 0.04851088300347328, 0.05872177705168724, 0.001775819342583418, -0.0078045097179710865, 0.02082696370780468, -0.0015709789004176855, 0.02712061069905758, -0.07339166849851608, 0.050837453454732895, 0.04638519883155823, -0.057493142783641815, 0.01925407163798809, -0.00062489666743204, -0.007303120568394661, 0.054201528429985046, 0.017392247915267944, 0.045657481998205185, 0.01908501423895359, 0.07106354087591171, 0.024552777409553528, 0.06334094703197479, 0.036592237651348114, -0.041865814477205276, 0.06139480695128441, -0.010214162990450859, -0.05691734328866005, 0.004028892610222101, 0.03858185559511185, 0.020336775109171867, 0.0171448215842247, 0.03381356596946716, -0.017558518797159195, -0.0403495728969574, 0.06629146635532379, -0.043623700737953186, -0.007986835204064846, 0.013200744986534119, 0.016546394675970078, -0.00824047066271305, -0.026046153157949448, -0.059502746909856796, 0.01691598631441593, 0.03808778151869774, -0.04144448786973953, -0.07571417093276978, -0.10011343657970428, 0.03748974949121475, 0.03380649536848068, 0.0035340720787644386, -0.017183661460876465, -0.057254187762737274, 0.00258309836499393, -0.06258256733417511, -0.0066080340184271336, -0.015454570762813091, -0.0009494443074800074, -0.06623422354459763, 0.029719246551394463, 0.016443854197859764, -0.027627548202872276, -0.009748587384819984, 0.06298040598630905, -0.040404483675956726, 0.06330237537622452, -0.05483129248023033, 0.025905560702085495, -0.024870717898011208, 0.04874539375305176, -0.030496900901198387, -0.04080721363425255, -0.009687541984021664, 0.003894131164997816, -0.04434414952993393, -0.05010591819882393, 0.03474941477179527, 0.06255465000867844, -0.037936415523290634, -0.09516041725873947, 0.0057791899889707565, 0.03697141259908676, 0.053197987377643585, 0.02312302030622959, 0.03035343624651432, 0.06837736815214157, -0.031879737973213196, 0.04368441551923752, -0.020715391263365746, 0.07656516879796982, -0.020217202603816986, 0.08075284212827682, 0.0012225380633026361, 0.07382065802812576, -0.03205554932355881, -0.04263513535261154, 0.02637881599366665, 0.06834094226360321, 0.03837849199771881, 0.0035677189007401466, 0.01067444123327732, -0.08214042335748672, 0.007386422716081142, 0.020509785041213036, 0.04438668116927147, 0.0656413659453392, -0.02520756609737873, -0.05549362301826477, -0.0045480490662157536, -0.04569809511303902, 0.05694358050823212, 0.06234361603856087, 0.028113681823015213, 0.02841661311686039, -0.0027856244705617428, -0.025721289217472076, -0.013672977685928345, -0.09569788724184036, -0.037473563104867935, -0.00825288612395525, 0.07854977995157242, -0.07044962048530579, -0.025081826373934746, -0.0005374447209760547, 0.039424654096364975, -0.03815566375851631, 0.04966963082551956, 0.025253837928175926, -0.025076130405068398, 0.05212745442986488, 0.027108360081911087, -0.05516478791832924, 0.04232420027256012, -0.030356109142303467, -0.0187227800488472, 0.02087620086967945, -0.016941778361797333, -0.004114985931664705, 0.039515815675258636, -0.0013507134281098843, -0.07514290511608124, -0.04737108573317528, 0.044737156480550766, 0.036465711891651154, -0.025049911811947823, -0.07468319684267044, -0.01581154204905033, -0.030382046476006508, 0.032539691776037216, 0.05428364500403404, -0.056314438581466675, -0.01482231542468071, -0.0029576446395367384, 0.013335403986275196, 0.02810666523873806, -0.1032470166683197, -0.06198785826563835, 0.07439859956502914, 0.030666040256619453, 0.030081871896982193, -0.04473137483000755, 0.06596844643354416, 0.03464525565505028, -0.0423552468419075, 0.04628216102719307, 0.002628238406032324, 0.02064617909491062, 0.03797474503517151, 0.009916913695633411, 0.015609977766871452, -0.011762432754039764, 0.0032613056246191263, -0.009226394817233086, -0.048788536339998245, -0.004036090336740017, 0.03393784537911415, 0.07186868786811829, -0.036521632224321365, -0.07057391852140427, 0.010080155916512012, 0.06581082195043564, 0.001390303485095501, 0.06957116723060608, -0.016562797129154205, 0.027663933113217354, -0.008000771515071392, -0.02681957744061947, 0.017077168449759483, -0.005496889352798462, 0.0009974947897717357, -0.019485797733068466, 0.06374972313642502, -0.04855990782380104, 0.033617667853832245, 0.02210562862455845, 0.045367371290922165, 0.04388047009706497, -0.06573210656642914, -0.05327705666422844, 0.0025629717856645584, 0.030047668144106865, 0.025001294910907745, -0.030872702598571777, -0.08920085430145264, -0.06284088641405106, -0.009229005314409733, -0.0021812552586197853, -0.011972170323133469, 0.11541715264320374, -0.004924173466861248, 0.017847299575805664, -0.11715926229953766, -0.11625441908836365, -0.023120533674955368, 0.05195806920528412, 0.13996852934360504, -0.04102605581283569, -0.047983016818761826, -0.014262070879340172, 0.05895006284117699, 0.04879721999168396, -0.03599070757627487, 0.02713020145893097, -0.02430834248661995, -0.014209132641553879, 0.009227681905031204, -0.023368865251541138, 0.06385661661624908, 0.003860168159008026, -0.02204897440969944, -0.041374221444129944, -0.05373697355389595, -0.08193054795265198, 0.018799008801579475, -0.01191489864140749, 0.08550624549388885, -0.011590346693992615, -0.07057704031467438, 0.028096921741962433, 0.0894429087638855, -0.010520651005208492, -0.03401119261980057, 0.02316170372068882, 0.06474456191062927, -0.002951560541987419, 0.02978152222931385, -0.06060054153203964, -0.015554283745586872, 0.07055606693029404, -0.10346658527851105, -0.018333440646529198, -0.00692805415019393, 0.03480134159326553, -0.08791296184062958, -0.04998457059264183, 0.015745485201478004, -0.02174624614417553, 0.02317090891301632, -0.05543310195207596, 0.047483474016189575, -0.017764417454600334, -0.0417301282286644, -0.0007184625719673932, -0.04611539840698242, -0.019923627376556396, 0.030256500467658043, 0.028476351872086525, 0.01995984837412834, 0.05019640177488327, 0.020507244393229485, 0.09027042239904404, -0.0037514150608330965, -0.02522261068224907, -0.022272713482379913, -0.08370396494865417} t.Logf("Blossom magnitude: %f", e.Magnitude()) - t.Logf("Blossom blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Blossom blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Garden", func(t *testing.T) { e := Embedding{0.029450472444295883, -0.02616771124303341, -0.11108852177858353, 0.025850815698504448, 0.015543344430625439, 0.03766537457704544, -0.04337846487760544, 0.015028399415314198, 0.03251208737492561, -0.06619285047054291, 0.007508732844144106, 0.06546419113874435, 0.1066984161734581, 0.0071456413716077805, 0.01691155694425106, 0.021115683019161224, 0.04886350408196449, 0.01571810245513916, 0.029032830148935318, -0.038796234875917435, -0.019296901300549507, -0.04544328525662422, 0.016262134537100792, -0.02470661699771881, 0.03579603135585785, -0.03756109997630119, -0.018320731818675995, 0.016431592404842377, 0.041621048003435135, 0.01632954552769661, 0.043801672756671906, -0.013622266240417957, -0.024091172963380814, -0.01047056820243597, -0.0717235654592514, 0.030399976298213005, 0.0029641836881637573, 0.023096470162272453, -0.05693362280726433, 0.06622857600450516, -0.05393676459789276, 0.01174027007073164, -0.00613653426989913, 0.0038851420395076275, 0.054551538079977036, 0.007108299061655998, 0.04403809458017349, -0.013658964075148106, -0.05020412057638168, -0.05926354601979256, -0.03387290984392166, -0.008434981107711792, 0.06530085951089859, 0.005070003680884838, -0.1048368364572525, 0.03507135808467865, 0.033572934567928314, 0.015251096338033676, -0.00012248411076143384, -0.032828059047460556, 0.03628222644329071, 0.03946855291724205, -0.0918068215250969, -0.021505288779735565, -0.02622317150235176, 0.09578832983970642, 0.01902947574853897, -0.008162671700119972, -0.05887138843536377, -0.0024935337714850903, -0.008546892553567886, -0.04424794018268585, 0.0038465987890958786, 0.002760303905233741, 0.026545381173491478, -0.09035931527614594, -0.06550516188144684, 0.05472956597805023, -0.059070128947496414, 0.008197394199669361, -0.03392776474356651, 0.026817528530955315, -0.010464455932378769, 0.001113097881898284, 0.0023126716259866953, -0.044506292790174484, -0.0758674368262291, 0.09812213480472565, -0.09673517942428589, 0.026506630703806877, 0.07263437658548355, 0.014737484976649284, 0.037864066660404205, -0.06617224961519241, 0.07685885578393936, 0.006310991942882538, 0.05843469873070717, 0.0027755044866353273, -0.030848920345306396, 0.04541933164000511, -0.05647830292582512, 0.012519258074462414, 0.02998855710029602, -0.03085692599415779, 0.0005864879349246621, 0.012187357991933823, -0.05132580175995827, -0.028619755059480667, -0.04047640413045883, 0.058719534426927567, 0.03181275725364685, 0.019011132419109344, -0.05842473730444908, -0.015319367870688438, 0.04820026084780693, -0.016459070146083832, 0.03458268567919731, 0.001874488894827664, -0.013077832758426666, 0.02509528025984764, -0.048245035111904144, 0.04755201190710068, 0.00040619823266752064, -0.006477742921561003, -0.017052823677659035, -0.03611822798848152, -0.010736986994743347, -0.02222706750035286, 0.000539301719982177, -0.06059937924146652, -0.018812399357557297, 0.050949569791555405, 0.06928367912769318, -0.014493902213871479, -0.032616883516311646, 0.02133842743933201, 0.04201561212539673, -0.03689774498343468, 0.049148887395858765, -0.032536156475543976, -0.04299809783697128, -0.05552523210644722, -0.05443565547466278, 0.011141049675643444, 0.07847368717193604, -0.07231663167476654, -0.05813386291265488, -0.03650275990366936, 0.06985370069742203, -0.03931870684027672, 0.008845476433634758, -0.0020725291687995195, -0.015220901928842068, 0.06117389723658562, 0.10758516937494278, -0.013337242417037487, 0.03648245334625244, 0.013812883757054806, 0.09391376376152039, 0.0012934838887304068, 0.04713243618607521, 0.04327142611145973, 0.06456369161605835, 0.0010187046136707067, 0.033284563571214676, 0.009135677479207516, -0.0055849673226475716, -0.034351810812950134, 0.0419909730553627, 0.03832126036286354, -0.07917091250419617, 0.07005874067544937, 0.032630279660224915, -0.028495419770479202, 0.039456479251384735, -0.027076352387666702, 0.058908965438604355, -0.011201824992895126, -0.011499661952257156, -0.04332108050584793, -0.019344458356499672, -0.01729557476937771, -0.15135915577411652, 0.009244582615792751, 0.010274229571223259, 0.08346062153577805, -0.026630014181137085, 0.046853210777044296, 0.024639243260025978, 0.04651235044002533, -0.07171203941106796, -0.10309342294931412, 0.03480513393878937, 0.027696119621396065, -0.0419134758412838, 0.030026240274310112, 0.047353193163871765, 0.03841102495789528, 0.0061353035271167755, 0.021579580381512642, 0.0506654754281044, -0.04570138826966286, -0.004223350901156664, -0.01755361817777157, -0.005313267465680838, 0.0300358384847641, -0.030828777700662613, -0.06586242467164993, 0.04118538647890091, 0.059702590107917786, -0.05966148152947426, 0.033441636711359024, -0.03350335732102394, 0.03178851678967476, 0.058546025305986404, 0.05301203951239586, -0.06467632204294205, -0.011848033405840397, 0.0035462877713143826, -0.08468713611364365, -0.03375484421849251, -0.07932175695896149, -0.04739697650074959, -0.033528611063957214, -0.015873754397034645, -0.05873408541083336, 0.026767820119857788, 0.00578950485214591, -0.0488525927066803, 0.02042422629892826, -0.04183270409703255, -0.004586539696902037, 0.1012435033917427, -0.07734445482492447, 0.018846673890948296, 0.011222604662179947, 0.021305294707417488, -0.026877202093601227, 0.0625997930765152, -0.05048948526382446, 0.018368618562817574, 0.041788987815380096, 0.05276724696159363, -0.09135818481445312, -0.03282717615365982, 0.004903355147689581, -0.0020676548592746258, 0.03400220721960068, -0.08710584789514542, 0.09027416259050369, -0.006589837837964296, 0.026096120476722717, 0.005323861725628376, -0.02991015650331974, 0.05539398267865181, 0.03507864475250244, 0.0892198458313942, -0.0327189639210701, 0.06906113773584366, 0.011825480498373508, -0.07363351434469223, -0.014786035753786564, -0.0787673145532608, -0.027592234313488007, 0.03746038302779198, -0.03909234702587128, -0.04073689505457878, -0.01479214709252119, -0.07038482278585434, -0.01906503178179264, -0.08360496163368225, 0.007178735453635454, 0.010692606680095196, 0.012219124473631382, -0.008390647359192371, -0.02204216830432415, 0.044480688869953156, 0.017050763592123985, -0.02348523959517479, -0.03206048160791397, 0.03966911882162094, 0.03853347897529602, 0.03821103274822235, 0.032163988798856735, 0.030129466205835342, -0.015558244660496712, -0.0028523197397589684, -0.010033335536718369, -0.030141092836856842, -0.023523734882473946, 0.026929456740617752, -0.01830533891916275, 0.0049797287210822105, 0.008532111532986164, -0.00794702023267746, -0.02516472339630127, 0.06437136977910995, 0.09759466350078583, 0.0674990564584732, 0.01918860897421837, 0.032300595194101334, 0.021144598722457886, -0.02867717854678631, -0.05926363542675972, -0.022921103984117508, 0.03321415185928345, 0.009561807848513126, -0.05000938102602959, 0.04287825897336006, 0.005228423047810793, -0.05798380449414253, 0.02100636437535286, 0.030448587611317635, 0.009154117666184902, -0.020849604159593582, 0.02494717389345169, 0.010335362516343594, 0.007624104153364897, 0.029058152809739113, 0.027177218347787857, 0.024040687829256058, -0.10509724915027618, -0.05212632939219475, 0.008854449726641178, -0.017730969935655594, 0.020659135654568672, -0.017762823030352592, 0.03579958528280258, 0.014194203540682793, 0.04261932149529457, 0.015989625826478004, 0.042415592819452286, 0.003266381099820137, -0.021214758977293968, -0.06781326979398727, -0.007272664457559586, -0.05565584823489189, -0.0626867264509201, 0.10425050556659698, 0.0502743236720562, 0.0060048033483326435, -0.04653723165392876, 0.010878033004701138, 0.03928819298744202, 0.027177825570106506, -0.035271208733320236, 0.020740289241075516, -0.029441095888614655, 0.0036403622943907976, 0.025305118411779404, 0.010180437937378883, 0.04877548664808273, 0.010653492994606495, -0.030853211879730225, 0.052494604140520096, -0.04649278521537781, 0.04197637736797333, 0.014773060567677021, 0.0240494254976511, -0.02348417416214943, -0.006568897981196642, -0.07376551628112793, -0.08133350312709808, -0.06484007835388184, -0.006082640495151281, 0.03920654579997063, 0.029368460178375244, -0.01943890191614628, 0.025850167497992516, -0.06532002240419388, -0.03255503624677658, -0.044191256165504456, -0.010769772343337536, 0.013064447790384293, 0.07825826108455658, 0.0040700542740523815, 0.039668891578912735, 0.016130367293953896, -0.04966011270880699, -0.08329926431179047, -0.05756401643157005, -0.09285017848014832, -0.016982808709144592, -0.025698954239487648, -0.1194397360086441, -0.024788333103060722, -0.0665445551276207, -0.03646986559033394, 0.06609807908535004, -0.07090594619512558, 0.030335599556565285, 0.0390649288892746, 0.04620400071144104, 0.03905622661113739, -0.015472183004021645, 0.07446028292179108, 0.07710541784763336, 0.07573383301496506, 0.031082773581147194, 0.01774517446756363, 0.0007772089447826147, 0.0825115218758583, 0.004602355882525444, -0.05312461778521538, 0.018673347309231758, 0.01574135757982731, -0.024082398042082787, 0.007202521897852421, -0.036750152707099915, -0.04730590432882309, 0.07367098331451416, 0.028804803267121315, 0.009261545725166798, -0.05021805688738823, 0.03901172801852226, 0.04439579322934151, 0.05723517760634422, -0.004847340285778046, 0.008586735464632511, -0.042107146233320236, -0.00565361836925149, 0.0665554329752922, -0.03692357614636421, 0.06880351901054382, -0.059439707547426224, 0.0481007844209671, 0.00142970634624362, 0.0046231686137616634, 0.005558807402849197, 0.048182372003793716, -0.06276160478591919, 0.043951135128736496, -0.06940657645463943, -0.016377735882997513, 0.021309049800038338, 0.02301374264061451, 0.03475716710090637, 0.003472226206213236, 0.004197967238724232, -0.0379212312400341, 0.10078726708889008, 0.02607596665620804, 0.021313192322850227, 0.03163071721792221, 0.00007226390880532563, 0.00949776079505682, -0.049197353422641754, -0.052099645137786865, 0.024028917774558067, 0.03941731154918671, -0.02255198359489441, 0.023086166009306908, -0.09338778257369995, 0.003557988442480564, 0.026949696242809296, 0.02078823745250702, 0.02661781571805477, 0.06080935150384903, 0.07675110548734665, -0.023944418877363205, -0.015261666849255562, -0.03631416708230972, -0.056954436004161835, -0.0317627489566803, 0.024737410247325897, -0.018332919105887413, -0.091570645570755, 0.013773911632597446, 0.009403225034475327, 0.0981302335858345, 0.022638453170657158, -0.007214141543954611, -0.003655100241303444, -0.02188034914433956, -0.008983440697193146, -0.07118245959281921, -0.008554312400519848, -0.07188895344734192, 0.10028397291898727, 0.02558337152004242, -0.020367326214909554, -0.03985120728611946, -0.024503454566001892, -0.04221349582076073, -0.02635509893298149, -0.015102341771125793, -0.019453858956694603, 0.022920556366443634, 0.026600679382681847, -0.033194560557603836, 0.054093897342681885, -0.0052024866454303265, -0.03220664709806442, 0.008835718967020512, 0.04873008280992508, -0.0021025671157985926, -0.008587689138948917, -0.008114021271467209, 0.03069460019469261, 0.040462885051965714, -0.04185732826590538, -0.007930666208267212, -0.027976514771580696, -0.003261580830439925, -0.05694374069571495, 0.06687197834253311, 0.10024196654558182, -0.04252481833100319, 0.0010597211075946689, 0.007037586532533169, 0.014683387242257595, 0.02604123204946518} t.Logf("Garden magnitude: %f", e.Magnitude()) - t.Logf("Garden blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Garden blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Display", func(t *testing.T) { e := Embedding{0.0655992180109024, -0.060943927615880966, 0.025899292901158333, 0.03808552771806717, -0.04981048032641411, -0.004682519938796759, -0.06709564477205276, 0.022405026480555534, 0.010651858523488045, -0.0972324013710022, -0.013849357143044472, 0.0011598772834986448, 0.006587308831512928, -0.006890364456921816, 0.03757510706782341, -0.03782757744193077, 0.000490826612804085, 0.05040956288576126, 0.029240766540169716, -0.035022664815187454, 0.01888369210064411, -0.021399375051259995, 0.003074551932513714, -0.021185049787163734, -0.0377926342189312, 0.03270004689693451, -0.04605064168572426, -0.002903539454564452, 0.011726617813110352, 0.03316459059715271, -0.045815564692020416, -0.003511677961796522, -0.033213693648576736, -0.030844159424304962, -0.043423403054475784, 0.021912800148129463, -0.04079496115446091, 0.061183080077171326, -0.06081172451376915, 0.05624420568346977, -0.03900836035609245, 0.08319094777107239, -0.06132802739739418, -0.011510769836604595, -0.026012219488620758, -0.007052286993712187, 0.05201044678688049, 0.029154257848858833, -0.06337668001651764, -0.0580013245344162, -0.05830046534538269, 0.036203619092702866, 0.011156917549669743, 0.06063550338149071, 0.028784630820155144, 0.05912322178483009, 0.10632403939962387, 0.008772610686719418, 0.04818073287606239, 0.03507508337497711, -0.07639612257480621, -0.007033055182546377, -0.00663603562861681, -0.006748252082616091, 0.05110344663262367, 0.09969019144773483, -0.012281601317226887, -0.0030436126980930567, -0.031047532334923744, -0.10100607573986053, -0.03562569245696068, 0.013750459998846054, 0.06335050612688065, -0.0520850233733654, 0.03574710711836815, -0.04770904406905174, -0.0494241788983345, 0.027270007878541946, -0.0320739708840847, -0.015194443054497242, 0.012237058952450752, -0.061840206384658813, 0.08665748685598373, 0.0651669055223465, -0.024673549458384514, 0.009629106149077415, -0.07379230856895447, 0.03019821271300316, -0.0026627276092767715, 0.028849635273218155, 0.04702817276120186, 0.07788898050785065, -0.0025648365262895823, 0.000009289172339776997, -0.02528950944542885, -0.017335202544927597, -0.04004426673054695, -0.016199011355638504, -0.03581972047686577, -0.008861823007464409, -0.0006539548048749566, -0.07807868719100952, -0.015390733256936073, 0.03235028684139252, 0.08752002567052841, -0.003604553174227476, 0.031287387013435364, -0.07505817711353302, -0.05587371066212654, -0.008831081911921501, -0.03359704837203026, 0.11381039023399353, -0.05182214081287384, 0.04337158799171448, -0.026881251484155655, 0.007756576873362064, -0.01063851360231638, -0.010440814308822155, -0.042394544929265976, -0.002712261863052845, -0.07624521851539612, -0.02908874675631523, 0.042222071439027786, -0.04457511380314827, 0.01811922714114189, -0.019151516258716583, -0.025909194722771645, -0.045582059770822525, 0.05103086680173874, -0.03155111148953438, -0.009922410361468792, 0.03185242787003517, 0.04041089490056038, 0.02876642346382141, 0.01018585916608572, 0.09116721153259277, -0.01409385446459055, 0.003687146818265319, 0.016644645482301712, -0.03938820958137512, -0.013990030623972416, 0.019131259992718697, -0.014485188759863377, 0.014388926327228546, 0.055811140686273575, -0.040063563734292984, -0.03232697769999504, -0.014766386710107327, -0.01749183051288128, 0.08663495630025864, 0.06876286119222641, -0.062139105051755905, -0.0431712307035923, 0.0048091537319123745, 0.007186077069491148, 0.05357756093144417, 0.020793680101633072, 0.010240933857858181, -0.05540792644023895, -0.05149132013320923, 0.019307436421513557, -0.011936662718653679, -0.09017080068588257, -0.015014625154435635, -0.008471742272377014, 0.06599333137273788, -0.05772527679800987, 0.003727627918124199, -0.04029823839664459, 0.019866151735186577, -0.0007386537035927176, -0.04396585002541542, 0.020981401205062866, -0.010769529268145561, 0.010821862146258354, -0.040240708738565445, 0.05260854586958885, -0.05224558711051941, -0.029141021892428398, -0.02974228747189045, 0.0331847257912159, 0.008872824721038342, 0.03084380552172661, -0.029272574931383133, -0.04070978984236717, 0.03956356644630432, 0.028073417022824287, 0.0032383096404373646, 0.035849858075380325, -0.054450057446956635, 0.006989041808992624, 0.02853487618267536, 0.026008695363998413, 0.039052970707416534, -0.024024585261940956, 0.047433316707611084, -0.038298364728689194, 0.05750300735235214, -0.02239871211349964, 0.006279219873249531, -0.01149484422057867, 0.07852279394865036, -0.009567233733832836, 0.01434333622455597, -0.03259366378188133, 0.0001492134906584397, -0.018412189558148384, 0.034333087503910065, 0.08523601293563843, 0.00902197789400816, 0.03146100789308548, 0.012538756243884563, -0.003853060305118561, 0.07740568369626999, -0.04406881332397461, -0.05664845183491707, -0.020414147526025772, 0.029861008748412132, -0.03270680084824562, 0.03857751935720444, -0.050657968968153, -0.047775764018297195, -0.026855291798710823, -0.07724877446889877, -0.021463574841618538, -0.0000484461234009359, -0.05966676399111748, 0.04255330190062523, -0.03757323697209358, 0.010809884406626225, -0.0001997073122765869, 0.04598240181803703, -0.06226584315299988, -0.079095259308815, 0.032271962612867355, -0.05880030617117882, 0.01130122970789671, 0.06339206546545029, 0.007702843751758337, -0.056541550904512405, -0.021677298471331596, -0.014744444750249386, 0.04744397848844528, 0.06589046120643616, -0.08186375349760056, 0.06591873615980148, -0.02532125450670719, 0.01582822948694229, -0.04779461771249771, -0.006261173170059919, 0.08422644436359406, 0.012947171926498413, 0.0163503959774971, 0.02605341747403145, -0.019635746255517006, 0.07001138478517532, -0.06175835803151131, 0.038023341447114944, 0.06290758401155472, -0.00443583820015192, -0.010369925759732723, -0.05562984198331833, 0.007820259779691696, 0.06135092303156853, -0.055922865867614746, 0.011652842164039612, 0.05176326632499695, -0.024643993005156517, -0.08861589431762695, 0.05282776430249214, -0.04682430252432823, -0.06356631964445114, 0.02226492390036583, -0.029923442751169205, 0.0015780653338879347, -0.018350476399064064, -0.02385411038994789, -0.024110181257128716, -0.04768393188714981, 0.0361931249499321, -0.021798348054289818, 0.03529005125164986, -0.10529688000679016, -0.02398676797747612, -0.09939674288034439, 0.10481902956962585, -0.040307316929101944, -0.07460855692625046, 0.08109752833843231, 0.028461484238505363, 0.044024862349033356, -0.04824283719062805, 0.021368293091654778, 0.052577897906303406, 0.016060255467891693, -0.034151095896959305, 0.059947799891233444, -0.06301431357860565, -0.03861737996339798, -0.0016308107879012823, -0.045780159533023834, -0.009392620995640755, 0.07527835667133331, 0.026525374501943588, -0.046036072075366974, -0.010333106853067875, 0.014917605556547642, 0.0326983779668808, 0.04132789745926857, -0.055204469710588455, -0.05281591787934303, 0.002354065654799342, 0.030623875558376312, 0.06624935567378998, 0.01723082736134529, 0.02028530463576317, -0.015481908805668354, -0.03871861472725868, 0.04146335646510124, 0.08309927582740784, -0.06184503808617592, 0.018608223646879196, 0.02411765791475773, 0.05588877573609352, 0.010409709066152573, -0.013584448955953121, 0.046046771109104156, 0.02999504841864109, -0.03150082379579544, 0.0788237452507019, 0.0026366030797362328, -0.0391005203127861, -0.01347008254379034, -0.07365158200263977, -0.011420555412769318, -0.04641832783818245, 0.028827840462327003, -0.0004414021095726639, 0.01253483071923256, 0.010070211254060268, -0.046282339841127396, -0.02230561338365078, -0.011926453560590744, -0.025934413075447083, -0.022038796916604042, -0.048531632870435715, 0.020875748246908188, 0.06551401317119598, 0.0009417361579835415, 0.024102527648210526, 0.05059129372239113, 0.080885149538517, 0.009069791063666344, -0.06709271669387817, -0.08334077149629593, -0.0022614854387938976, -0.017926877364516258, 0.0110850865021348, -0.018145492300391197, 0.020349526777863503, -0.029855048283934593, 0.026270803064107895, -0.005427079740911722, 0.024437107145786285, 0.025220457464456558, 0.07571688294410706, 0.04856814071536064, -0.004107890650629997, -0.009675886482000351, 0.026987992227077484, -0.05708082765340805, -0.03434988483786583, 0.041463177651166916, -0.015689512714743614, -0.01580163650214672, 0.020577983930706978, 0.07873080670833588, -0.07130134105682373, 0.02249782532453537, -0.01305398903787136, -0.039202719926834106, -0.09568741172552109, -0.00023119297111406922, 0.03705253079533577, -0.018705613911151886, 0.02936290018260479, 0.0010637904051691294, -0.10362178087234497, 0.009910302236676216, -0.04678329452872276, 0.03828885033726692, -0.0001911822910187766, 0.023206952959299088, -0.02458426170051098, 0.044332001358270645, 0.09940478950738907, 0.022996218875050545, 0.0015390956541523337, -0.03357856348156929, -0.030253948643803596, -0.049201373010873795, 0.041040536016225815, -0.02965884655714035, 0.0400298647582531, 0.03306504711508751, -0.005711978767067194, -0.037338677793741226, -0.0044212425127625465, 0.00814070925116539, 0.11224847286939621, 0.014320459216833115, 0.034216608852148056, 0.029657812789082527, -0.028688188642263412, -0.029930351302027702, 0.02932482212781906, -0.007280048914253712, -0.07937705516815186, 0.03440290689468384, 0.006860135588794947, -0.08642832189798355, 0.051139697432518005, -0.03442491218447685, -0.0449317991733551, -0.049150969833135605, -0.026916198432445526, -0.02883499301970005, -0.029600068926811218, 0.042264219373464584, 0.03566039353609085, 0.06674635410308838, 0.03245272487401962, 0.020105160772800446, 0.0369960181415081, -0.0701175108551979, 0.05485968664288521, 0.045772578567266464, 0.03870946168899536, 0.055414266884326935, 0.015157267451286316, 0.026634659618139267, 0.05343414098024368, -0.00466682855039835, -0.0787765234708786, 0.11390408873558044, 0.035443734377622604, -0.0496600940823555, -0.030378976836800575, -0.11963769793510437, -0.017842784523963928, -0.06787949800491333, 0.04347193241119385, 0.014137784019112587, 0.000957715034019202, 0.03411182016134262, -0.03648274019360542, 0.06048576161265373, 0.022757848724722862, 0.07433635741472244, 0.010900784283876419, 0.013481865637004375, 0.0023949556052684784, 0.002459852024912834, -0.08806446194648743, -0.0025787032209336758, -0.037947557866573334, -0.05472028627991676, -0.009296557866036892, -0.028818199411034584, 0.04470359906554222, -0.06231717765331268, -0.041501596570014954, 0.051473747938871384, -0.015353663824498653, 0.021792519837617874, -0.10240830481052399, 0.005166713614016771, -0.02508849836885929, -0.04951104894280434, 0.06325352191925049, 0.05408317595720291, -0.024246862158179283, 0.057713765650987625, 0.005624010227620602, 0.03990840166807175, 0.055710647255182266, -0.04280710592865944, -0.04204903170466423, -0.021418478339910507, 0.06103585660457611, -0.0902780294418335, -0.0884937047958374, -0.0004053741868119687, 0.02917689085006714, -0.010333945043385029, -0.0183197483420372, 0.0059021469205617905, 0.07217033952474594, 0.002421899698674679, 0.001394024584442377, -0.05985869839787483, -0.040213245898485184, -0.01530122384428978, 0.03582629933953285, -0.0458090603351593, -0.04060039669275284, 0.04923098534345627, 0.05691883713006973, 0.0394815169274807, 0.010122842155396938, -0.034661054611206055, -0.053235772997140884} t.Logf("Display magnitude: %f", e.Magnitude()) - t.Logf("Display blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Display blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Pattern", func(t *testing.T) { e := Embedding{0.011182552203536034, -0.03198026493191719, 0.05036688223481178, 0.103775754570961, 0.02036934345960617, -0.005827389657497406, -0.08856192976236343, 0.013280008919537067, 0.03656306490302086, -0.03468478098511696, 0.036104876548051834, 0.03765236586332321, 0.03452884778380394, -0.03924112766981125, -0.012520849704742432, 0.012768102809786797, -0.03037974052131176, 0.028632180765271187, 0.048706792294979095, -0.01307850144803524, -0.0031555755995213985, -0.0066888402216136456, -0.04768821597099304, -0.037621013820171356, -0.03692038357257843, -0.0011512459022924304, -0.008696944452822208, 0.002917237114161253, 0.005093724932521582, 0.06444576382637024, -0.040197331458330154, -0.020323194563388824, 0.04352154582738876, -0.06340284645557404, 0.011102389544248581, -0.0030603196937590837, -0.02301941253244877, 0.010849319398403168, -0.04762796312570572, 0.0631827861070633, 0.003218876663595438, 0.0393446646630764, -0.027210773900151253, -0.04394930973649025, -0.04317058250308037, 0.05376942455768585, 0.03706185147166252, 0.05894319340586662, -0.0556054562330246, -0.0068563311360776424, 0.00392104871571064, -0.03049829788506031, 0.0095547866076231, 0.06179016828536987, 0.012316078878939152, 0.007524982560425997, 0.11298546195030212, 0.04947438836097717, -0.02512982487678528, -0.005441837944090366, -0.015857534483075142, 0.02010851539671421, 0.000008624324436823372, -0.004105404485017061, -0.0339554026722908, 0.093845896422863, 0.03784773498773575, -0.03486837074160576, -0.006637908518314362, -0.06569439172744751, 0.0778961107134819, 0.06872962415218353, -0.03764212504029274, -0.0005130090285092592, -0.027153583243489265, -0.009530287235975266, -0.06999596953392029, 0.04659024253487587, -0.0034248342271894217, 0.028075208887457848, 0.09007386863231659, -0.020474297925829887, 0.06352788209915161, 0.021848607808351517, 0.014788075350224972, -0.00039335680776275694, 0.02757658064365387, 0.040653955191373825, 0.029667198657989502, 0.04207024350762367, 0.04404091089963913, 0.04847021400928497, -0.012513886205852032, -0.023561991751194, 0.05582676827907562, 0.044751785695552826, 0.013749989680945873, 0.023255987092852592, -0.09830516576766968, 0.04369471222162247, -0.0012974818237125874, -0.0783805251121521, -0.0038462644442915916, 0.07053287327289581, 0.029120024293661118, 0.0030008882749825716, 0.07326390594244003, -0.01402974035590887, -0.007101910654455423, 0.046405769884586334, 0.01983606070280075, 0.07367497682571411, -0.07793717831373215, -0.011301475577056408, -0.023151619359850883, 0.008923766203224659, 0.04130277782678604, 0.06510395556688309, 0.03669895976781845, 0.07343544811010361, -0.05692271515727043, -0.046051327139139175, 0.0002064390282612294, -0.10671428591012955, 0.020452115684747696, 0.018297651782631874, 0.011609603650867939, -0.06819531321525574, -0.057356130331754684, -0.06533502042293549, 0.04316001757979393, -0.004693765193223953, 0.03407829999923706, -0.023960931226611137, -0.029776833951473236, 0.0723918229341507, -0.04464232549071312, 0.0727013349533081, 0.026724044233560562, 0.043470099568367004, -0.006198048125952482, 0.014875692315399647, -0.0351022332906723, 0.028897998854517937, 0.06242276355624199, 0.004770057275891304, -0.017820537090301514, 0.05086192861199379, -0.032644785940647125, -0.011146636679768562, 0.10860063880681992, -0.02172284573316574, -0.08260565251111984, 0.0052221594378352165, -0.013085311278700829, 0.03194450959563255, -0.004659777041524649, 0.04866969957947731, -0.048795126378536224, 0.03906514123082161, 0.006386170629411936, -0.022889690473675728, -0.054820504039525986, 0.030735580250620842, -0.06512047350406647, 0.031556159257888794, -0.0360725075006485, -0.038505811244249344, -0.014963474124670029, 0.05134258046746254, -0.04306556656956673, -0.021186022087931633, 0.042047321796417236, -0.04122283309698105, 0.06254295259714127, 0.026322951540350914, 0.07550080865621567, -0.08807441592216492, -0.015313051640987396, -0.10228808224201202, -0.03928147628903389, -0.0143620939925313, -0.02451987750828266, 0.04941469803452492, -0.012584525160491467, 0.07995390146970749, 0.06185867264866829, 0.061250731348991394, 0.01882755570113659, -0.019031336531043053, 0.009450159966945648, 0.04402078688144684, 0.08964431285858154, 0.005615334492176771, 0.03219199553132057, -0.010542009025812149, -0.006778779439628124, 0.011389798484742641, -0.047655560076236725, 0.0037833666428923607, -0.008302710950374603, 0.002575608203187585, -0.005152552388608456, 0.01082716602832079, -0.031068263575434685, 0.052070800215005875, -0.019138602539896965, 0.07353443652391434, 0.03679770231246948, -0.020542949438095093, -0.04989967122673988, -0.025750892236828804, -0.015781857073307037, 0.019519004970788956, -0.0067334650084376335, -0.05612625181674957, -0.05498802289366722, 0.10259006917476654, -0.0040217069908976555, 0.07174261659383774, -0.08215469121932983, -0.04450174421072006, -0.08457054197788239, -0.05966305732727051, -0.03359587490558624, 0.026555674150586128, -0.03974385932087898, -0.008027340285480022, -0.07948605716228485, 0.0373103991150856, 0.040323588997125626, 0.036545466631650925, -0.016303105279803276, -0.09939703345298767, -0.031928807497024536, 0.00926075130701065, 0.024961302056908607, 0.07915075868368149, -0.05297691375017166, 0.018205177038908005, -0.03742707893252373, 0.08588935434818268, 0.021349087357521057, 0.05710023641586304, -0.024391161277890205, 0.00984833762049675, -0.011325842700898647, 0.01213042251765728, -0.0036950630601495504, -0.014841683208942413, 0.01591816172003746, -0.04253118485212326, 0.014558264054358006, 0.06826747953891754, -0.00782003253698349, 0.13246563076972961, -0.03908893093466759, 0.04261847957968712, 0.06706342846155167, 0.11482702195644379, -0.028479591012001038, -0.03595108538866043, 0.047186292707920074, -0.007744411937892437, -0.058247268199920654, 0.01074439287185669, 0.06177708879113197, 0.06795649975538254, -0.018218625336885452, 0.015611073933541775, -0.041417524218559265, -0.03496435284614563, 0.04051905870437622, -0.019088968634605408, -0.009041966870427132, -0.023917723447084427, 0.021793371066451073, -0.03579869866371155, -0.02143009752035141, -0.03773481026291847, -0.042745113372802734, 0.078328937292099, -0.051362477242946625, -0.024769410490989685, -0.07791978120803833, 0.036127492785453796, 0.0017436746275052428, -0.03294812887907028, 0.005175433121621609, -0.05599300190806389, 0.024318404495716095, -0.08288861811161041, 0.016335491091012955, 0.05513076111674309, -0.03047347068786621, -0.07396689802408218, 0.08696366101503372, -0.010433664545416832, 0.0015993264969438314, -0.005708006210625172, -0.013185993768274784, -0.04201440140604973, 0.08044257760047913, 0.03993251919746399, -0.021840017288923264, 0.0056692915968596935, -0.01731305569410324, 0.020412635058164597, -0.01668538711965084, -0.023957068100571632, 0.02364204451441765, 0.04951918497681618, 0.051634691655635834, 0.1052900180220604, 0.0077769458293914795, -0.0014242911711335182, -0.06375712156295776, -0.012236271984875202, -0.004456744529306889, 0.058486320078372955, 0.017882419750094414, 0.036724574863910675, -0.022710010409355164, 0.058371372520923615, 0.026853101328015327, -0.015979712828993797, 0.100007064640522, 0.03518165275454521, 0.045641183853149414, 0.07123033702373505, 0.04239988327026367, -0.019647788256406784, -0.008213777095079422, -0.061270467936992645, -0.002807794138789177, 0.015567252412438393, 0.026036476716399193, -0.015148059464991093, -0.015785401687026024, 0.035732388496398926, 0.0244048573076725, -0.018098553642630577, 0.018520409241318703, -0.023747006431221962, -0.017475387081503868, -0.07182250916957855, -0.04033968970179558, 0.07017000764608383, 0.006024254951626062, -0.0019372315146028996, 0.009860483929514885, 0.0887741670012474, -0.055409226566553116, 0.015219002030789852, -0.12752310931682587, -0.023461801931262016, 0.093065544962883, 0.06464963406324387, 0.043800242245197296, -0.014979849569499493, -0.030212784186005592, 0.06877675652503967, -0.008326681330800056, 0.006449521519243717, -0.004858455620706081, 0.02748873457312584, -0.03677187114953995, -0.0034823536407202482, -0.047686390578746796, 0.06628274917602539, -0.04045180231332779, -0.07052662968635559, -0.05243930220603943, -0.023042716085910797, 0.058988358825445175, 0.020725425332784653, 0.07013700157403946, -0.08367376774549484, -0.01199690718203783, 0.03341381624341011, 0.0025232001207768917, -0.07399675995111465, -0.0007996645290404558, 0.015194172970950603, -0.0027884631417691708, -0.03917454183101654, -0.01641644537448883, -0.08413006365299225, -0.021127358078956604, -0.03189577907323837, 0.04086909070611, -0.0009651981526985765, -0.034503720700740814, -0.097202368080616, 0.0674930289387703, 0.0251960176974535, 0.052130572497844696, 0.011541400104761124, 0.028760399669408798, 0.03466417267918587, -0.07138241082429886, 0.0582268163561821, -0.014314647763967514, 0.026972711086273193, 0.02620990015566349, -0.0017510551260784268, -0.012290941551327705, -0.015826817601919174, 0.03951813653111458, -0.004175465553998947, 0.00022092829749453813, -0.050558965653181076, 0.03428991511464119, -0.04501316323876381, -0.016839422285556793, 0.015215953812003136, -0.006655436474829912, 0.05737275630235672, 0.004569986369460821, 0.00957565288990736, -0.031953345984220505, 0.028307203203439713, 0.008911318145692348, 0.029433835297822952, -0.07632482796907425, 0.0017693666741251945, -0.007255810312926769, -0.030747223645448685, -0.0002626977220643312, -0.026849986985325813, 0.07034987211227417, 0.06782176345586777, 0.028483549132943153, 0.07335622608661652, -0.058949533849954605, 0.046953119337558746, -0.012706535868346691, 0.009670336730778217, -0.015912681818008423, -0.028285382315516472, -0.008360207080841064, -0.020661694929003716, -0.009819899685680866, -0.007382136769592762, 0.0052209882996976376, 0.05914842709898949, 0.0017217121785506606, -0.026081010699272156, -0.13745836913585663, -0.03498849645256996, -0.06768245995044708, -0.005944924894720316, 0.04767685383558273, 0.007634654175490141, 0.03165922686457634, -0.012757712975144386, 0.09916752576828003, -0.00889214314520359, -0.028547784313559532, 0.0024926464539021254, -0.013988882303237915, -0.03401821106672287, -0.024531086906790733, -0.0378766804933548, 0.044297270476818085, 0.007439044304192066, -0.049128178507089615, -0.023399684578180313, -0.0226377472281456, -0.026801755651831627, 0.022498585283756256, -0.07753501832485199, 0.04601794108748436, -0.028743186965584755, -0.038711413741111755, -0.01792079769074917, 0.04859494790434837, 0.010498802177608013, -0.004266820847988129, 0.11431433260440826, 0.06536754220724106, -0.009836823679506779, 0.03658169135451317, 0.0020162470173090696, 0.014873923733830452, 0.051684822887182236, -0.0325259268283844, -0.04022851586341858, 0.008777531795203686, 0.04507160931825638, -0.09752271324396133, 0.00799330323934555, -0.026857120916247368, -0.02986135147511959, 0.04114940017461777, -0.03602782264351845, 0.0136684225872159, -0.0076287174597382545, -0.05533957853913307, -0.0284186489880085, -0.03944806382060051, -0.0428704135119915, 0.028576267883181572, -0.021218398585915565, -0.03012392856180668, 0.006501384079456329, 0.015528577379882336, 0.012794416397809982, 0.048615843057632446, -0.0005869535962119699, -0.005586756858974695, -0.025109976530075073} t.Logf("Pattern magnitude: %f", e.Magnitude()) - t.Logf("Pattern blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Pattern blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Electronics", func(t *testing.T) { e := Embedding{-0.05180594325065613, 0.01302467193454504, -0.07439137995243073, 0.01689394749701023, 0.046378243714571, -0.0035438418854027987, 0.024782972410321236, 0.023577792569994926, 0.01646239310503006, -0.031226782128214836, -0.05440431833267212, 0.017289984971284866, -0.006996323354542255, -0.012644285336136818, 0.02970864810049534, 0.005355889443308115, 0.024662962183356285, 0.022619877010583878, 0.00677128043025732, -0.0563448965549469, -0.033471789211034775, -0.019071387127041817, 0.04766428470611572, 0.0010598651133477688, 0.02365567535161972, 0.01632094942033291, 0.006392440292984247, -0.09598034620285034, 0.009465769864618778, 0.04207403212785721, 0.03189894184470177, 0.017963960766792297, -0.030769845470786095, 0.005919745657593012, -0.08770479261875153, 0.012714629992842674, 0.018193846568465233, -0.035021308809518814, -0.0795571357011795, 0.06892108917236328, -0.017820099368691444, -0.02384634129703045, -0.0365188829600811, 0.08479302376508713, 0.012964854948222637, -0.03928542882204056, 0.04832274839282036, 0.12865662574768066, -0.0816672295331955, -0.03952854126691818, -0.022673537954688072, 0.07557689398527145, 0.10173349827528, -0.010405024513602257, -0.04927223175764084, 0.01974380575120449, 0.008235722780227661, 0.017481587827205658, -0.01310359314084053, -0.0641673281788826, -0.028081148862838745, 0.0027981651946902275, -0.030826350674033165, -0.058992281556129456, -0.025945695117115974, -0.009842520579695702, -0.1238027885556221, 0.04512490704655647, -0.05900980159640312, -0.011930370703339577, -0.01300117652863264, -0.012221364304423332, -0.002707510255277157, -0.06190686672925949, 0.04038376733660698, -0.022909319028258324, -0.029352504760026932, -0.0540381520986557, -0.04112442210316658, 0.0064831264317035675, -0.03242725506424904, -0.023029552772641182, -0.030570300295948982, 0.013785070739686489, -0.05163908377289772, -0.0179290771484375, -0.0646447017788887, 0.04891568049788475, -0.007749652490019798, -0.028875740244984627, 0.04430017247796059, 0.027526916936039925, 0.019241519272327423, -0.024648431688547134, 0.0812106728553772, -0.03707742318511009, -0.03149355202913284, -0.00023601599968969822, -0.029086312279105186, 0.04876125603914261, 0.034574247896671295, 0.007664257660508156, -0.004088438581675291, -0.03517894446849823, 0.02142981067299843, 0.03498981148004532, -0.04442032426595688, -0.0006218565977178514, 0.0227154903113842, -0.03919721394777298, 0.08658835291862488, 0.03793962672352791, -0.0690024122595787, -0.0228273905813694, 0.018410200253129005, 0.04332093149423599, -0.0029723148327320814, -0.03611557558178902, -0.07819456607103348, -0.020874394103884697, 0.022585326805710793, 0.008658535778522491, 0.060833849012851715, 0.04880820959806442, -0.010970346629619598, -0.047218549996614456, -0.009169485419988632, 0.016148699447512627, 0.06569914519786835, -0.031056180596351624, 0.012423882260918617, 0.004013547673821449, 0.08153069019317627, -0.020242849364876747, -0.013415863737463951, 0.036823153495788574, 0.018174750730395317, -0.05040120333433151, 0.012401800602674484, -0.01765509322285652, -0.09310948103666306, -0.013187769800424576, -0.07987909018993378, 0.015538031235337257, 0.12570154666900635, 0.0066225165501236916, 0.068520687520504, -0.0481201708316803, 0.03568735718727112, -0.023389358073472977, -0.023147553205490112, 0.011329473927617073, 0.021330680698156357, -0.03099925071001053, 0.05694403871893883, 0.013504046946763992, 0.047362618148326874, 0.030964717268943787, 0.09412779659032822, -0.007972204126417637, 0.058867715299129486, 0.008109568618237972, 0.012990031391382217, 0.018037034198641777, 0.018528752028942108, 0.04395899549126625, -0.08396230638027191, 0.0837755799293518, -0.07191102206707001, -0.05851449444890022, 0.05882364884018898, -0.04771038517355919, 0.04792647436261177, 0.05845404788851738, -0.03249375894665718, 0.008758701384067535, -0.03802226483821869, -0.054065950214862823, -0.04730144515633583, 0.0547344796359539, -0.012503416277468204, 0.0056467424146831036, -0.033631227910518646, -0.0254448801279068, 0.053906846791505814, 0.02265803888440132, 0.011962524615228176, 0.04344736412167549, 0.005184612236917019, -0.025078020989894867, -0.04106152802705765, -0.09192609786987305, 0.015378998592495918, -0.03699592500925064, 0.002315778285264969, -0.04419706389307976, 0.027319200336933136, -0.018326861783862114, -0.012322972528636456, 0.03662308678030968, 0.0014258358860388398, -0.0946279987692833, 0.0008999559795483947, -0.04863610118627548, -0.008256145752966404, -0.027774721384048462, 0.09342112392187119, -0.056634724140167236, 0.014086511917412281, 0.016605043783783913, -0.042245928198099136, 0.0507955327630043, 0.011735225096344948, 0.034866295754909515, 0.011504468508064747, 0.06196848675608635, 0.03830011188983917, -0.01032191887497902, 0.0785357803106308, -0.12769953906536102, -0.0697716623544693, -0.06901632994413376, 0.013542837463319302, -0.03622765466570854, 0.0495450422167778, -0.01701134257018566, -0.03405945003032684, -0.0004240999696776271, 0.00951355416327715, 0.010189238935709, -0.09063580632209778, 0.014262343756854534, 0.040071360766887665, 0.059647589921951294, -0.004764688201248646, -0.01770576275885105, 0.006461771670728922, -0.009240900166332722, 0.03322053328156471, -0.09033416956663132, -0.03484721481800079, -0.10987327992916107, -0.002261144807562232, -0.04900114983320236, 0.07635914534330368, 0.056854091584682465, 0.022609710693359375, -0.020036084577441216, -0.009062495082616806, 0.0019270111806690693, 0.07698258012533188, 0.0036713830195367336, 0.01944126933813095, -0.02994220331311226, 0.04366619139909744, -0.019312186166644096, 0.06478264182806015, 0.00580704165622592, 0.05500024929642677, -0.026193777099251747, -0.002457150025293231, -0.00016004775534383953, -0.020355207845568657, 0.05345325171947479, 0.013977224938571453, -0.027507858350872993, 0.004051582887768745, -0.10032303631305695, -0.06370993703603745, 0.043832674622535706, -0.06881938129663467, -0.015354456380009651, -0.08424967527389526, -0.04947251081466675, -0.05398682504892349, -0.012986556626856327, 0.03548300638794899, 0.08311420679092407, 0.03851205110549927, 0.01615382544696331, 0.06328174471855164, -0.0417158268392086, 0.06836480647325516, 0.0345422625541687, -0.03912895545363426, 0.029808785766363144, -0.027550140395760536, -0.0693395733833313, 0.03546261042356491, -0.008397885598242283, 0.013307852670550346, 0.00876383762806654, 0.03785255178809166, -0.005001096986234188, -0.053588058799505234, 0.028448157012462616, -0.0033611783292144537, -0.048942480236291885, 0.028983375057578087, 0.10365000367164612, -0.013335664756596088, 0.031586337834596634, -0.01502002403140068, 0.0011388760758563876, 0.045589692890644073, -0.02403954789042473, 0.00884709507226944, -0.028757045045495033, -0.05558492988348007, -0.02778763696551323, -0.04152512922883034, -0.004849799443036318, -0.016244297847151756, -0.004739189054816961, -0.0195847749710083, 0.029261745512485504, 0.020677413791418076, -0.029227856546640396, 0.014031228609383106, 0.00893145427107811, 0.018157480284571648, 0.03836044296622276, -0.03941855579614639, 0.06037724018096924, -0.022618262097239494, 0.03112851083278656, 0.0476846806704998, 0.03969716653227806, -0.01321848202496767, 0.049293044954538345, 0.009907064028084278, 0.04272647202014923, 0.006350188050419092, 0.026494145393371582, -0.10687833279371262, -0.06020421162247658, 0.0312567763030529, 0.022366780787706375, 0.09369365125894547, -0.05484655499458313, -0.05934743583202362, -0.05130891874432564, 0.033697545528411865, 0.07662129402160645, 0.008853242732584476, -0.025701461359858513, 0.04770874232053757, -0.003947387915104628, 0.023279843851923943, -0.03591609373688698, -0.01725313439965248, 0.054632581770420074, -0.018281087279319763, -0.13356782495975494, 0.08034199476242065, 0.03784467652440071, -0.0272986963391304, -0.011951543390750885, 0.02114124596118927, -0.03346940875053406, 0.051314592361450195, -0.05408085510134697, -0.05764668807387352, -0.010528967715799809, 0.03913090005517006, 0.03808952495455742, -0.007136747241020203, -0.005116567946970463, 0.049912016838788986, -0.046566933393478394, 0.01867944374680519, -0.045340318232774734, 0.07441763579845428, -0.034067101776599884, 0.023793131113052368, -0.006017758976668119, -0.06823911517858505, 0.011103279888629913, 0.021606607362627983, -0.05872885510325432, -0.0447419248521328, -0.05652032420039177, -0.0032780743204057217, 0.022875839844346046, -0.09284206479787827, 0.030475882813334465, -0.030939802527427673, -0.021535344421863556, 0.04112282022833824, -0.016121720895171165, 0.026498954743146896, -0.03837422654032707, 0.04041486233472824, 0.03827700391411781, -0.03251505270600319, -0.03419891372323036, -0.010765197686851025, 0.02659170888364315, -0.0030090028885751963, -0.04268939793109894, -0.00435756566002965, 0.02717021480202675, -0.010365478694438934, -0.015457169152796268, -0.04824524000287056, 0.01372006256133318, -0.0034992042928934097, 0.02669128030538559, -0.0428193099796772, 0.037115562707185745, 0.022006334736943245, 0.04329703748226166, -0.07274790108203888, -0.03314928710460663, -0.00825679861009121, 0.047763023525476456, -0.012437372468411922, -0.02454431541264057, 0.05798162519931793, -0.04042932763695717, -0.04596171900629997, -0.038405466824769974, -0.0232381634414196, 0.008631675504148006, -0.041038352996110916, -0.009912300854921341, -0.010535279288887978, 0.04912780225276947, 0.05499858036637306, 0.023777134716510773, -0.04207354411482811, 0.002657294971868396, 0.006232629530131817, 0.015887029469013214, -0.04449991136789322, -0.10454009473323822, -0.00498534832149744, -0.010939712636172771, -0.02944619581103325, 0.005014721769839525, 0.051825378090143204, 0.012274236418306828, -0.021996252238750458, 0.028091544285416603, -0.02451557293534279, 0.031162694096565247, -0.07489031553268433, -0.07601410895586014, 0.04577089846134186, -0.022376639768481255, -0.03450727090239525, 0.07526565343141556, -0.10059608519077301, -0.03786865621805191, 0.017856836318969727, -0.02193710021674633, -0.0470675528049469, 0.05056334286928177, 0.0808461531996727, 0.03288422152400017, 0.043834421783685684, 0.027150386944413185, -0.04425740987062454, -0.011408243328332901, 0.022294053807854652, 0.022577675059437752, -0.04433576390147209, 0.0667194053530693, 0.045244816690683365, 0.07393642514944077, -0.030389411374926567, 0.0236201174557209, -0.034357234835624695, -0.00841683428734541, -0.01628860831260681, -0.04927653446793556, -0.04270973801612854, 0.016641302034258842, 0.003920652437955141, 0.024007044732570648, -0.07007274776697159, -0.07339401543140411, 0.02648044191300869, -0.02913658134639263, 0.04785299673676491, 0.04063436761498451, -0.02389189973473549, -0.011189434677362442, 0.0616251602768898, -0.08126188814640045, 0.024900760501623154, -0.03966405615210533, -0.05537360534071922, -0.009808159433305264, -0.013427963480353355, 0.009381343610584736, -0.042348168790340424, 0.03679034858942032, 0.08338918536901474, 0.06688650697469711, -0.0792328491806984, -0.04324789717793465, 0.007892664521932602, 0.06452248990535736, -0.033160969614982605, 0.08800352364778519, 0.08067522197961807, -0.022453995421528816, -0.013616521842777729, -0.04252493381500244, 0.038282979279756546, -0.07005086541175842} t.Logf("Electronics magnitude: %f", e.Magnitude()) - t.Logf("Electronics blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Electronics blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Noise", func(t *testing.T) { e := Embedding{-0.028413644060492516, 0.014786642044782639, -0.00007781313615851104, 0.1010037213563919, -0.04993607476353645, 0.06978536397218704, -0.06021164730191231, -0.042146824300289154, -0.035856474190950394, -0.043905649334192276, 0.010542239993810654, 0.02672266587615013, 0.02182694710791111, -0.02880868874490261, -0.0033185447100549936, -0.02615543082356453, 0.062338776886463165, 0.08039543032646179, -0.02352938801050186, -0.07403530180454254, -0.04744778200984001, 0.025475526228547096, 0.0256473571062088, 0.015856800600886345, -0.015151508152484894, 0.05426067113876343, -0.007554059382528067, 0.014762965962290764, -0.03517051413655281, 0.058827269822359085, -0.029669538140296936, 0.011925357393920422, 0.007475290913134813, -0.04272055998444557, -0.07233448326587677, 0.05908074975013733, 0.013562211766839027, -0.02179832011461258, -0.03163204714655876, 0.0590066984295845, 0.009199007414281368, 0.020500030368566513, 0.0012806614395231009, -0.0284284558147192, 0.03187696635723114, 0.0025364093016833067, 0.06829433143138885, 0.03231976553797722, -0.014477436430752277, -0.06564563512802124, -0.028539760038256645, 0.07953496277332306, 0.004884612280875444, 0.02638429030776024, -0.010754811577498913, 0.008101477287709713, 0.045937154442071915, 0.012718256562948227, 0.036548782140016556, -0.04473473131656647, 0.04400881007313728, 0.03326819837093353, -0.0045490562915802, -0.09080851823091507, 0.015577688813209534, 0.13730572164058685, 0.046803105622529984, 0.0069542014971375465, -0.019231807440519333, 0.06008884310722351, 0.08810017257928848, 0.07350029051303864, 0.017721252515912056, 0.02388271875679493, -0.0224995668977499, -0.02448461391031742, -0.09358938783407211, 0.038782332092523575, -0.04076448827981949, 0.00615560170263052, 0.03091275878250599, 0.0018259275238960981, 0.04202258959412575, 0.05872068554162979, -0.014363343827426434, 0.015467570163309574, -0.019165923818945885, 0.043171290308237076, -0.014050137251615524, -0.023240115493535995, 0.010015680454671383, 0.02434336580336094, -0.027894245460629463, 0.0263045784085989, 0.09273324906826019, 0.010157005861401558, -0.0029004134703427553, -0.019458729773759842, -0.011881384067237377, 0.0430494099855423, -0.028559086844325066, -0.0821596011519432, -0.0524628721177578, -0.031237857416272163, -0.009436956606805325, 0.060465652495622635, 0.0635918378829956, -0.05811920762062073, -0.07726399600505829, 0.013206791132688522, 0.004525348078459501, -0.002418376039713621, -0.06070084497332573, 0.017589464783668518, -0.024137431755661964, -0.04277845472097397, 0.010736255906522274, -0.03239559009671211, -0.037546440958976746, 0.005552142392843962, -0.059628404676914215, -0.04132899269461632, -0.009844700805842876, 0.024386689066886902, -0.04013141244649887, -0.052814923226833344, -0.04984592646360397, 0.07609694451093674, 0.022249160334467888, -0.07648488134145737, 0.0619162879884243, -0.05086202174425125, 0.016806233674287796, -0.006233078893274069, -0.06411013007164001, 0.028302324935793877, -0.021486226469278336, -0.028159718960523605, 0.004870292730629444, 0.03476119041442871, -0.025948315858840942, 0.00465776352211833, 0.016743451356887817, 0.017727363854646683, 0.032459959387779236, -0.054315079003572464, -0.0020411110017448664, -0.09286140650510788, -0.007291000802069902, 0.03185432031750679, 0.009363161399960518, -0.05573581904172897, -0.038047004491090775, 0.05292218178510666, 0.046576403081417084, -0.013785549439489841, 0.0915217399597168, -0.05915768817067146, -0.003472099080681801, -0.01682491973042488, 0.054596200585365295, 0.06438492983579636, -0.02698427066206932, 0.047645654529333115, -0.013871925882995129, 0.0056120469234883785, -0.04510403051972389, -0.03502017259597778, 0.021069763228297234, -0.03018837794661522, -0.09241854399442673, 0.05827372521162033, -0.028374068439006805, 0.012629379518330097, -0.04728636518120766, 0.018793949857354164, 0.0918879434466362, -0.004692704416811466, 0.02713858336210251, -0.022178176790475845, -0.030031373724341393, -0.06870366632938385, 0.018052516505122185, 0.0996708795428276, -0.0014522215351462364, 0.0506286546587944, 0.010331612080335617, 0.06740710884332657, 0.06509607285261154, 0.024046966806054115, -0.03290802612900734, -0.04901464655995369, -0.01142885908484459, 0.07470168173313141, -0.04125039279460907, -0.018646981567144394, 0.018984682857990265, -0.029215164482593536, -0.02306317910552025, 0.10306476801633835, -0.023694956675171852, 0.017949145287275314, -0.08910650759935379, 0.03917764872312546, -0.02592002972960472, -0.03439103811979294, -0.05392073839902878, -0.0027159585151821375, -0.03975280001759529, -0.016177933663129807, 0.017451506108045578, 0.01851627230644226, 0.015910087153315544, 0.06750346720218658, -0.05556889623403549, 0.02579217031598091, -0.047894883900880814, 0.03685976192355156, -0.04535503685474396, 0.0035238228738307953, -0.021323584020137787, -0.11894910037517548, -0.06333388388156891, -0.03970464691519737, -0.034349266439676285, -0.0014089513570070267, -0.03491760790348053, -0.005621313117444515, 0.012693570926785469, -0.012811848893761635, 0.030286427587270737, 0.043887075036764145, 0.03323237970471382, -0.05593026056885719, -0.022510915994644165, -0.03651716560125351, 0.012303783558309078, 0.05548115447163582, 0.01129312813282013, -0.033798232674598694, 0.028211649507284164, 0.010793562978506088, 0.017142247408628464, 0.017841562628746033, -0.0027296950574964285, 0.002341729123145342, 0.02045668475329876, 0.07286343723535538, -0.000713328190613538, -0.03446117043495178, 0.018531430512666702, -0.018167082220315933, -0.01335199922323227, 0.012879359535872936, 0.047388624399900436, 0.08536183834075928, 0.06993164122104645, -0.01140724029392004, 0.06239224970340729, 0.06379444152116776, 0.02733798697590828, -0.016794076189398766, -0.017824772745370865, -0.005050200968980789, -0.04316059127449989, 0.04773077368736267, 0.011801869608461857, -0.00003232836752431467, -0.004256189800798893, 0.04065447673201561, -0.031527094542980194, -0.08187277615070343, 0.02091033011674881, -0.033953841775655746, 0.06257622689008713, 0.014442271552979946, -0.0004016747698187828, 0.014605076052248478, -0.0024968357756733894, -0.019030094146728516, 0.10549182444810867, -0.052236221730709076, -0.0648336187005043, 0.0013511480065062642, -0.03893159329891205, 0.022889235988259315, -0.06229560822248459, -0.007728569209575653, 0.005757871083915234, 0.018484340980648994, 0.03995220363140106, -0.07871561497449875, 0.019575616344809532, -0.038467101752758026, -0.06202089414000511, -0.035566654056310654, -0.003725929418578744, 0.052853554487228394, 0.022107671946287155, -0.005463050678372383, 0.0167850311845541, -0.06739120185375214, 0.08835293352603912, -0.025711337104439735, 0.021456580609083176, -0.034072309732437134, 0.011302193626761436, -0.0200370941311121, -0.01319929864257574, -0.022285275161266327, 0.06595989316701889, 0.0072543262504041195, 0.05091884732246399, 0.020910941064357758, -0.019620228558778763, 0.03761185705661774, -0.07370894402265549, 0.031761202961206436, -0.03505580127239227, 0.11571668833494186, 0.028902683407068253, -0.02053576335310936, 0.036277901381254196, 0.10120818018913269, 0.008436418138444424, -0.028232865035533905, 0.04401332139968872, -0.0014651515521109104, 0.1005694717168808, 0.10386687517166138, 0.016954330727458, -0.043245360255241394, 0.0032777392771095037, 0.002568027703091502, 0.0021635624580085278, -0.010651187039911747, 0.011290395632386208, -0.0426488071680069, 0.09171026945114136, 0.011310418136417866, -0.027610262855887413, -0.033042557537555695, 0.007360019721090794, -0.030163059011101723, -0.030643409118056297, -0.0028673706110566854, 0.00017030833987519145, 0.005978104658424854, 0.033997997641563416, 0.00850546546280384, 0.03002026304602623, 0.0838700458407402, -0.011348838917911053, -0.05045432224869728, 0.020681213587522507, 0.02559601329267025, -0.02028966136276722, 0.028254104778170586, 0.04748866334557533, 0.018251199275255203, -0.05420845001935959, 0.011673115193843842, -0.031087076291441917, -0.06763811409473419, 0.011426489800214767, 0.033442627638578415, 0.0496792234480381, 0.0034284067805856466, -0.06286217272281647, -0.0053913285955786705, -0.01386869978159666, -0.07702451944351196, 0.06530174612998962, -0.019985493272542953, 0.10027045756578445, 0.04905993491411209, 0.03406372293829918, 0.03530459105968475, -0.04158826917409897, -0.035541702061891556, 0.021857738494873047, -0.056640684604644775, -0.03093075007200241, -0.007426705211400986, -0.05518779903650284, 0.031687598675489426, -0.03246618062257767, -0.11285307258367538, 0.08490557968616486, 0.04217129200696945, -0.05021810531616211, -0.011847659014165401, -0.01841660775244236, -0.01951889507472515, -0.059226538985967636, 0.07194335758686066, -0.004706099163740873, -0.02126830257475376, -0.05091513693332672, 0.0556756928563118, -0.07102556526660919, 0.043586134910583496, -0.06486144661903381, 0.03345587104558945, 0.020112859085202217, -0.002977302297949791, 0.02106001041829586, 0.012586215510964394, -0.027502277866005898, -0.0002940233680419624, -0.023893512785434723, -0.07449221611022949, 0.11999334394931793, 0.06604016572237015, 0.030996937304735184, 0.07257511466741562, 0.02207574062049389, 0.021536322310566902, 0.009827738627791405, -0.012469608336687088, -0.02675343118607998, 0.021181965246796608, -0.01694016344845295, 0.0011069894535467029, -0.04770921543240547, -0.018840637058019638, 0.007796490099281073, 0.023776382207870483, 0.036454517394304276, 0.02920450083911419, 0.0037184825632721186, 0.019402915611863136, -0.023731935769319534, -0.0013123952085152268, -0.084922656416893, 0.02777346409857273, -0.02727806568145752, 0.06831947714090347, 0.04462556540966034, 0.007837491109967232, 0.009810738265514374, 0.08464496582746506, -0.06570249050855637, 0.026764122769236565, 0.013593709096312523, 0.02021610550582409, -0.044253814965486526, -0.016335617750883102, -0.05736757442355156, -0.024440636858344078, -0.0317864865064621, 0.05295802280306816, 0.019742723554372787, -0.06543746590614319, -0.0021693615708500147, -0.041007816791534424, 0.061920929700136185, 0.09611845016479492, 0.04492763802409172, 0.0158248171210289, -0.0653582513332367, -0.03883796185255051, -0.03449477627873421, 0.013100172393023968, 0.07131233811378479, 0.024944914504885674, -0.09189971536397934, 0.007772729732096195, 0.06423749774694443, 0.010816868394613266, 0.013702857308089733, 0.012827458791434765, 0.01697281002998352, -0.000897081452421844, -0.03244531899690628, -0.12932033836841583, 0.03132571280002594, -0.04876192286610603, 0.004856054205447435, 0.11330338567495346, 0.05476871877908707, -0.012223699130117893, 0.0025927689857780933, -0.004977259319275618, 0.0077224429696798325, 0.043029919266700745, 0.003542962484061718, -0.001704303896985948, 0.034003060311079025, 0.006550498306751251, 0.003356906119734049, 0.018864993005990982, -0.060863230377435684, -0.0018493583193048835, -0.022800946608185768, -0.07867416739463806, 0.03207734227180481, 0.07479742914438248, 0.02468251623213291, 0.042872678488492966, -0.045785658061504364, -0.00381815736182034, 0.028089841827750206, 0.09991013258695602, -0.10206685960292816, 0.018264122307300568, 0.07245838642120361, 0.013656336814165115, 0.03154417872428894, 0.016427813097834587, 0.019349565729498863, 0.018825579434633255} t.Logf("Noise magnitude: %f", e.Magnitude()) - assert.True(t, e.IgnoreFace()) + assert.True(t, e.Ignored()) }) t.Run("Table", func(t *testing.T) { e := Embedding{-0.021589165553450584, -0.04685473069548607, -0.03653239831328392, 0.09921359270811081, -0.033463504165410995, 0.015828609466552734, -0.07466079294681549, -0.007279849145561457, -0.0008846950950101018, 0.02164153940975666, 0.039402108639478683, 0.06595589965581894, -0.012385022826492786, -0.027386456727981567, 0.042002804577350616, -0.017668813467025757, 0.013556611724197865, 0.059105027467012405, 0.020291542634367943, 0.018905263394117355, -0.07945016026496887, 0.056240782141685486, 0.003986752592027187, -0.082450270652771, -0.0577380433678627, 0.008790938183665276, -0.02054051123559475, 0.02442559413611889, -0.0227860976010561, 0.009795891121029854, -0.035049185156822205, 0.04224361106753349, 0.0300704725086689, -0.024621469900012016, -0.07945629209280014, 0.009739790111780167, 0.02491810731589794, 0.008706964552402496, -0.002172251930460334, 0.03341079130768776, 0.013651988469064236, 0.013303282670676708, 0.010096142999827862, -0.03821680694818497, 0.01955227553844452, -0.016358619555830956, 0.06765712052583694, 0.010280216112732887, -0.03900022804737091, -0.03305138275027275, 0.025211848318576813, 0.05358365550637245, 0.013680046424269676, -0.0008027729927562177, -0.08227319270372391, -0.0028876576106995344, -0.04117295891046524, 0.12321393936872482, -0.01736162044107914, -0.06343534588813782, -0.013313072733581066, 0.07512281090021133, -0.07410137355327606, -0.05574270337820053, -0.017032019793987274, 0.1107853502035141, 0.028538815677165985, -0.04199889302253723, -0.035375479608774185, 0.03278984874486923, 0.07600616663694382, 0.07252155244350433, -0.007715845946222544, -0.009044633246958256, -0.029275542125105858, -0.04939345642924309, -0.04446575045585632, -0.01581619121134281, -0.05780661851167679, -0.022297438234090805, 0.04997215420007706, 0.06955426931381226, 0.008419277146458626, -0.026919016614556313, 0.03740996867418289, 0.023569636046886444, 0.010381177067756653, 0.05369122326374054, -0.09115616232156754, 0.059217724949121475, 0.04705702140927315, -0.010684452019631863, 0.04128545522689819, -0.03944771736860275, 0.033882513642311096, 0.050136953592300415, 0.08438227325677872, 0.041821856051683426, -0.05752246081829071, 0.018399879336357117, -0.012252287939190865, -0.036460407078266144, 0.014475136995315552, -0.038999248296022415, 0.0018727561691775918, -0.007863928563892841, 0.07946325093507767, -0.005779915489256382, -0.03330346196889877, 0.04451979696750641, 0.046568118035793304, -0.0347437784075737, -0.08650397509336472, 0.005427557043731213, -0.013447429053485394, 0.01087251864373684, 0.08186673372983932, 0.01233734656125307, 0.020150883123278618, 0.09651866555213928, -0.09818366169929504, -0.04016005992889404, -0.0024112944956868887, 0.024362700060009956, -0.030871255323290825, -0.05802598595619202, 0.038836970925331116, 0.02775968424975872, -0.07874374836683273, -0.11030562967061996, 0.022055234760046005, -0.06364589929580688, 0.07036200165748596, -0.029879840090870857, -0.08935156464576721, 0.03242754191160202, -0.014439196325838566, 0.0220960583537817, 0.05614573881030083, 0.04055033624172211, -0.017350755631923676, 0.027131175622344017, 0.005244737956672907, 0.1252637654542923, 0.04347527027130127, -0.027175569906830788, -0.03350072726607323, -0.008322399109601974, 0.026112832129001617, 0.038534071296453476, 0.045353326946496964, 0.015033332630991936, -0.046688780188560486, 0.010521644726395607, 0.08829093724489212, -0.011036528274416924, 0.07205603271722794, -0.002028469927608967, 0.02397444285452366, 0.022765319794416428, 0.07164853811264038, -0.0008233961998485029, -0.002320549450814724, 0.059182994067668915, 0.009708354249596596, -0.00671979459002614, -0.06414614617824554, -0.09810009598731995, 0.03798430785536766, 0.04144459590315819, -0.08087018877267838, 0.048061687499284744, -0.0375189334154129, -0.02903040684759617, -0.0440029613673687, -0.0008936659432947636, 0.06186728551983833, -0.014461840502917767, -0.004082171246409416, 0.001528706168755889, -0.054353758692741394, -0.06381633877754211, -0.031929001212120056, 0.09166610240936279, 0.00457199988886714, 0.04334920644760132, 0.027537677437067032, 0.0892101302742958, 0.0580415353178978, 0.06829368323087692, 0.04087226092815399, -0.03443273901939392, 0.013406775891780853, 0.06040319427847862, 0.04691523313522339, 0.04155455902218819, 0.0342801958322525, 0.008172724395990372, -0.02214004658162594, 0.06510085612535477, 0.045505914837121964, -0.03586297854781151, -0.06762072443962097, -0.016138868406414986, -0.009111137129366398, 0.01990254409611225, -0.0038413729052990675, 0.015513407066464424, -0.026733262464404106, 0.03474513813853264, -0.039417434483766556, -0.009462686255574226, 0.02761233225464821, -0.016141124069690704, -0.04543954133987427, -0.00854087620973587, -0.029416292905807495, 0.05266159400343895, -0.025889623910188675, 0.043734654784202576, -0.004586959723383188, -0.039181388914585114, -0.024353481829166412, -0.054189275950193405, -0.0013045256491750479, 0.002271519973874092, -0.002904401160776615, -0.02252289466559887, -0.017826629802584648, 0.05473259463906288, 0.07042432576417923, 0.005818055476993322, 0.04073331132531166, -0.052226658910512924, -0.07544738054275513, 0.05087263509631157, 0.050039779394865036, 0.013001667335629463, -0.03758437931537628, -0.019637947902083397, -0.005908559076488018, 0.023438839241862297, 0.012561791576445103, 0.04212377965450287, -0.01656646654009819, 0.017706722021102905, -0.013634750619530678, 0.04729851707816124, -0.0012661891523748636, 0.0398404523730278, -0.043200504034757614, -0.02030971646308899, 0.010626770555973053, 0.023047499358654022, 0.021381260827183723, 0.08393480628728867, 0.027060851454734802, -0.053558822721242905, 0.09457922726869583, 0.03992165997624397, -0.02943284437060356, 0.01390488538891077, 0.006432533264160156, -0.017174001783132553, 0.00507424958050251, 0.05148601159453392, -0.009343394078314304, -0.010018064640462399, -0.008664441294968128, 0.0022689441684633493, -0.059710025787353516, 0.01167707797139883, -0.01879064366221428, -0.0002774984750431031, 0.024170110002160072, -0.03107655979692936, -0.058846402913331985, -0.06049574911594391, 0.02590448036789894, 0.016504932194948196, 0.023786529898643494, 0.012453490868210793, -0.02809830941259861, -0.05986546725034714, -0.007037978619337082, -0.00921662151813507, -0.013017779216170311, 0.06875009834766388, 0.0007196488440968096, -0.05304053798317909, 0.04353706166148186, -0.017292160540819168, 0.04981149360537529, 0.021828437224030495, -0.10556493699550629, -0.08628076314926147, 0.03701668605208397, 0.045034367591142654, 0.04125640541315079, 0.028661005198955536, -0.011409590020775795, 0.006385049317032099, 0.021259164437651634, 0.021738123148679733, 0.06963995844125748, -0.041944436728954315, -0.035367466509342194, 0.018216723576188087, -0.03736977279186249, -0.015032593160867691, 0.0926671177148819, 0.11538353562355042, -0.007318203337490559, -0.006286968011409044, 0.027612177655100822, 0.014789076521992683, -0.006620221305638552, -0.0106476079672575, -0.021931886672973633, 0.02754267491400242, 0.10019835084676743, -0.020516762509942055, -0.020881665870547295, 0.10831841081380844, 0.013987889513373375, -0.03913186490535736, 0.04856870323419571, 0.00007914844172773883, 0.06843837350606918, 0.06867638975381851, -0.015593396499752998, 0.01639389432966709, 0.015867965295910835, 0.012694375589489937, -0.005950629711151123, 0.07184477150440216, -0.0346268005669117, -0.060592882335186005, 0.05542841553688049, -0.05493295565247536, 0.061231985688209534, 0.029638657346367836, -0.022517751902341843, -0.0019157027127221227, 0.003008403582498431, -0.02060856483876705, 0.009638550691306591, -0.01225468423217535, 0.06040838733315468, 0.031551461666822433, -0.005284036975353956, 0.01987117901444435, -0.06257200241088867, 0.054570943117141724, 0.020160099491477013, 0.013565560802817345, 0.04588785767555237, 0.032223187386989594, 0.053155891597270966, 0.06251689046621323, -0.02151763252913952, 0.025573236867785454, -0.04827703908085823, -0.021954240277409554, -0.014134456403553486, -0.0026004649698734283, 0.020854955539107323, -0.030388029292225838, -0.019069433212280273, -0.032420314848423004, -0.04193184897303581, -0.06172759085893631, -0.03392811492085457, 0.02990596368908882, 0.06988231837749481, 0.03622902184724808, -0.029415778815746307, 0.05750683695077896, -0.02586800418794155, -0.03631140664219856, -0.0024625754449516535, -0.01982639543712139, 0.004809279926121235, 0.019837893545627594, 0.034932468086481094, -0.035134006291627884, -0.01883365772664547, -0.0456979013979435, 0.03661424666643143, -0.008877614513039589, -0.008080322295427322, -0.008817297406494617, 0.0299233365803957, -0.10560581088066101, -0.0006552618579007685, 0.027141928672790527, -0.0009073318215087056, -0.02034454420208931, -0.022191865369677544, 0.06021259352564812, 0.002721563447266817, -0.0012744240229949355, -0.025433121249079704, -0.000595735851675272, -0.02398415096104145, -0.03791132569313049, 0.005501167383044958, -0.012918499298393726, -0.0015409777406603098, -0.0879034698009491, 0.03469567745923996, -0.10093044489622116, 0.09053795784711838, 0.0157612394541502, 0.009877887554466724, 0.07838699966669083, 0.02334423176944256, 0.09735008329153061, -0.07191004604101181, -0.043866850435733795, 0.04072999954223633, 0.020997000858187675, 0.031271763145923615, 0.08071895688772202, -0.04773331806063652, -0.04979562386870384, 0.007921415381133556, 0.04319244995713234, -0.018487954512238503, -0.05458609014749527, -0.015648838132619858, 0.022570408880710602, 0.019930245354771614, -0.04267783463001251, -0.06701118499040604, 0.036716535687446594, -0.021684350445866585, -0.021231088787317276, -0.0593838207423687, -0.06798826158046722, 0.030794641003012657, 0.04329315945506096, 0.014553885906934738, 0.08319137990474701, -0.04298501834273338, -0.03755864500999451, 0.03920957073569298, -0.00497422507032752, -0.06023462489247322, 0.022480331361293793, -0.008962797001004219, 0.08027992397546768, -0.003418724751099944, -0.010794541798532009, 0.0374147929251194, -0.032117635011672974, 0.06576591730117798, 0.022117530927062035, 0.04788321256637573, 0.004843743983656168, -0.014389514923095703, -0.02718529663980007, -0.0032875481992959976, -0.04833182319998741, 0.03657684847712517, 0.04287124052643776, -0.04246988892555237, 0.06136158108711243, 0.05915793403983116, 0.032115302979946136, 0.04048776999115944, 0.01704893633723259, 0.049435194581747055, -0.05625950172543526, -0.014019538648426533, -0.07476023584604263, -0.012357736937701702, -0.04346863552927971, 0.08984119445085526, 0.09707708656787872, -0.021844806149601936, -0.006514117121696472, 0.024254493415355682, 0.023296784609556198, 0.06181054934859276, 0.0023179377894848585, -0.017065823078155518, -0.0005792866577394307, 0.04935699701309204, -0.018029285594820976, 0.035312194377183914, 0.050970420241355896, -0.06523341685533524, 0.012616454623639584, 0.018337732180953026, -0.07271452248096466, 0.07746323198080063, -0.026397481560707092, 0.007706245873123407, 0.0021965971682220697, -0.061871279031038284, 0.0754067450761795, -0.07568344473838806, 0.08739562332630157, -0.06259223818778992, -0.0026166941970586777, -0.014678959734737873, -0.06578143686056137, 0.0024224165827035904, 0.02806960418820381, 0.015488820150494576, 0.040783755481243134} t.Logf("Table magnitude: %f", e.Magnitude()) - t.Logf("Table blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Table blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Grill", func(t *testing.T) { e := Embedding{-0.01837332546710968, -0.013573388569056988, -0.06768853217363358, 0.07513957470655441, -0.024594588205218315, 0.04866361990571022, -0.0223557036370039, 0.06777956336736679, -0.03355424106121063, 0.007214206270873547, 0.020838549360632896, 0.06315871328115463, 0.007955560460686684, -0.04978488013148308, -0.03457174450159073, -0.05756441876292229, 0.021101659163832664, 0.07351792603731155, 0.037004679441452026, -0.08092962950468063, -0.10090329498052597, 0.04342924803495407, 0.07541006058454514, -0.09794607758522034, -0.04336617887020111, 0.030530085787177086, 0.06687743961811066, -0.012134592048823833, -0.016766507178544998, 0.04169850051403046, -0.022724492475390434, 0.031140318140387535, 0.0304417721927166, -0.05157066136598587, -0.05721214413642883, 0.000007804320375726093, -0.015607557259500027, 0.04133500158786774, -0.05490269139409065, -0.04097500070929527, -0.07551655918359756, 0.018716955557465553, -0.002527209697291255, -0.024408608675003052, 0.03310471773147583, -0.050737414509058, 0.03021002933382988, 0.05805148184299469, -0.03748670965433121, -0.05660712718963623, -0.0603872649371624, 0.07678244262933731, 0.07810293138027191, -0.015639036893844604, -0.0976266860961914, 0.06810689717531204, -0.005614086054265499, 0.15125170350074768, -0.05728299915790558, 0.038004469126462936, -0.024654945358633995, -0.003890740917995572, 0.002573493868112564, -0.008778314106166363, -0.004702999722212553, 0.02146194502711296, -0.02527308277785778, -0.00032656369148753583, -0.011799085885286331, -0.007101763971149921, 0.022610392421483994, 0.048185817897319794, 0.0616774819791317, -0.045128002762794495, -0.01951797492802143, -0.06434294581413269, -0.05767672881484032, -0.05709012597799301, -0.011654190719127655, -0.027066649869084358, -0.03883373737335205, 0.010011427104473114, 0.07596040517091751, -0.026856714859604836, -0.03714124858379364, 0.014965778216719627, -0.042677007615566254, 0.019410759210586548, 0.006505198776721954, -0.00006856521940790117, -0.01570073515176773, 0.002915995428338647, -0.006686258129775524, -0.060209259390830994, 0.043758343905210495, 0.018303077667951584, 0.019022883847355843, -0.0027186169754713774, -0.09308966994285583, 0.01746193878352642, 0.005942555144429207, -0.05838776379823685, -0.0032717965077608824, 0.03753752261400223, 0.026200570166110992, 0.01961083523929119, 0.02666139230132103, -0.0012007004115730524, 0.0305663850158453, -0.05417969077825546, 0.03453692048788071, 0.04456380009651184, -0.07075267285108566, -0.03196420148015022, 0.0186473298817873, 0.025048403069376945, 0.034589216113090515, 0.05342273786664009, 0.04453473538160324, 0.032101619988679886, -0.04870849475264549, -0.08165700733661652, 0.05021516606211662, -0.013717597350478172, -0.06963597983121872, -0.0408187061548233, -0.015300817787647247, 0.05891439691185951, -0.03214791789650917, -0.0960891842842102, -0.010289954021573067, -0.0352291576564312, 0.07732859998941422, -0.03038274124264717, -0.07570908963680267, 0.05781133472919464, -0.05557519569993019, 0.03916268050670624, 0.031007817015051842, 0.04387404024600983, -0.05009175464510918, 0.041141826659440994, -0.04713473469018936, 0.02678399346768856, -0.025202425196766853, 0.00961983297020197, 0.0056135463528335094, -0.04324018210172653, 0.025789376348257065, 0.11923738569021225, 0.04898366332054138, 0.032321009784936905, -0.028951527550816536, 0.01557802502065897, 0.061684560030698776, 0.0565095916390419, 0.023945540189743042, -0.018223587423563004, 0.034053049981594086, -0.01928810402750969, 0.06278964132070541, 0.054570410400629044, -0.012285502627491951, -0.005429449491202831, 0.004575666971504688, -0.03712894394993782, -0.01709163561463356, -0.026084251701831818, -0.03786347806453705, 0.09257770329713821, -0.01701647974550724, 0.013358280062675476, -0.02419424057006836, -0.017860550433397293, -0.049975886940956116, -0.00546486908569932, -0.0031186616979539394, -0.04331083223223686, 0.007076986134052277, -0.003979419358074665, -0.04064244404435158, 0.03149298578500748, 0.010591072030365467, 0.057948868721723557, 0.04654596373438835, -0.004353404976427555, 0.04605630412697792, 0.06035831198096275, 0.029166119173169136, 0.015169025398790836, 0.02225130796432495, -0.02779862843453884, -0.007435665465891361, -0.017277976498007774, 0.043496280908584595, 0.018810587003827095, 0.01104480866342783, 0.0009244283428415656, -0.0012276170309633017, 0.04117584228515625, 0.03125379607081413, -0.005654424894601107, -0.0809519812464714, -0.018182238563895226, -0.009368046186864376, 0.02634824998676777, -0.010708615183830261, -0.08237410336732864, -0.058695342391729355, -0.0454757921397686, -0.004276546183973551, -0.019668331369757652, 0.01156708039343357, 0.005825164262205362, -0.02030778117477894, 0.021231357008218765, 0.0020852037705481052, 0.07142850011587143, 0.042712051421403885, 0.03716178983449936, -0.038085371255874634, -0.020067913457751274, -0.010079449974000454, -0.07912380993366241, 0.03926796466112137, 0.0072591258212924, -0.015999743714928627, 0.033970728516578674, -0.005030544474720955, 0.03844895213842392, 0.06487791985273361, 0.057253580540418625, 0.026071013882756233, -0.02809407189488411, -0.06125172972679138, 0.022567855194211006, 0.033738862723112106, -0.03835735842585564, -0.005810566712170839, -0.08258961886167526, -0.05357903987169266, -0.0623716376721859, 0.008676772005856037, -0.045764435082674026, 0.06992851942777634, 0.04286493733525276, -0.05911301448941231, -0.018865646794438362, 0.04048025980591774, 0.009918748401105404, -0.011037674732506275, -0.029486550018191338, 0.03196411207318306, 0.10675784945487976, -0.025096306577324867, 0.022484147921204567, 0.04281153157353401, 0.01335193682461977, 0.0778070017695427, 0.02550162374973297, 0.053211431950330734, -0.0014092683559283614, 0.008354195393621922, 0.04926919564604759, -0.04272175580263138, -0.03745431452989578, 0.016135748475790024, -0.04879765212535858, 0.002474494744092226, 0.05494896322488785, -0.024943072348833084, 0.03321000561118126, 0.021728726103901863, -0.003007449209690094, -0.003905203193426132, -0.015564911998808384, -0.019110094755887985, 0.0018606417579576373, -0.021113460883498192, -0.00246751238591969, 0.040949080139398575, 0.03537695109844208, -0.06276839971542358, -0.08904477208852768, -0.1082906424999237, 0.02130867727100849, 0.037984125316143036, 0.026547161862254143, -0.04801134392619133, -0.08856561034917831, 0.019111433997750282, -0.08792392164468765, -0.0071235764771699905, 0.01690705679357052, -0.08089005202054977, -0.06852070242166519, 0.0406472384929657, 0.04416599124670029, 0.04391292482614517, 0.04777980595827103, 0.03161164000630379, -0.0008415374322794378, 0.03374389559030533, 0.0021536180283874273, 0.018912913277745247, -0.05306759849190712, -0.042466308921575546, 0.011214659549295902, -0.07452170550823212, 0.03435830399394035, 0.04351859539747238, 0.016442840918898582, -0.04938583821058273, -0.012330090627074242, 0.060063764452934265, 0.0827053114771843, 0.019931375980377197, -0.015713868662714958, 0.001263986574485898, -0.037153683602809906, 0.0946587324142456, -0.04179805889725685, -0.031503040343523026, 0.08378716558218002, 0.04505069926381111, 0.015962976962327957, 0.05892454832792282, -0.005328725557774305, 0.11016961187124252, 0.007160934619605541, 0.08851701021194458, 0.04055180773139, 0.030467718839645386, 0.03291480988264084, -0.0012942601460963488, 0.06577343493700027, 0.016575995832681656, 0.01898728497326374, 0.011259748600423336, -0.052181728184223175, 0.05363364890217781, 0.011526152491569519, 0.029985100030899048, 0.0013887033564969897, -0.018924541771411896, -0.025999857112765312, -0.005061880685389042, 0.03498678654432297, 0.078218974173069, -0.0055760592222213745, -0.018386945128440857, 0.026025010272860527, -0.047515034675598145, -0.0350566990673542, -0.017717065289616585, 0.011146064847707748, 0.061272937804460526, 0.04854009300470352, 0.008093839511275291, 0.013849688693881035, -0.024181313812732697, -0.01912572793662548, -0.061820968985557556, -0.03306152671575546, -0.020716886967420578, -0.005063636694103479, 0.059605006128549576, -0.047032326459884644, 0.015689484775066376, 0.016283800825476646, -0.06861229985952377, 0.039671335369348526, -0.0018638827605172992, 0.004020238760858774, 0.05821191892027855, 0.030857248231768608, 0.03314149007201195, 0.04780798777937889, -0.029683001339435577, -0.07067815959453583, -0.07333091646432877, 0.014058925211429596, 0.009684273973107338, -0.043200548738241196, 0.033589743077754974, -0.03943955898284912, 0.0019110507564619184, -0.07584989815950394, -0.005160831846296787, -0.031273916363716125, 0.008309115655720234, 0.008059423416852951, -0.0160398930311203, -0.11247826367616653, 0.05177038908004761, 0.02321735769510269, 0.048999473452568054, 0.015340887010097504, 0.014640514738857746, 0.06382491439580917, -0.0444624237716198, 0.0030162502080202103, -0.049106698483228683, 0.06764595955610275, -0.008047755807638168, -0.022686833515763283, -0.021090218797326088, 0.00647903885692358, -0.007541711907833815, 0.019774310290813446, 0.03633493930101395, 0.012400027364492416, -0.022038666531443596, 0.05124752223491669, -0.012114549987018108, 0.018227778375148773, 0.006331732962280512, 0.07912388443946838, -0.048440735787153244, -0.013607225380837917, 0.09166562557220459, 0.03675336018204689, 0.06058765575289726, 0.05663304403424263, -0.03256278485059738, -0.022352520376443863, 0.009842786937952042, 0.05237407982349396, 0.0028863786719739437, -0.017864178866147995, -0.04790263622999191, -0.007800845894962549, -0.017278000712394714, -0.02507690154016018, -0.12456189841032028, -0.029792211949825287, -0.04477933794260025, -0.03509751334786415, 0.003342587035149336, -0.04380202665925026, -0.033429425209760666, 0.043944306671619415, 0.02098778635263443, -0.01782851479947567, -0.01938365399837494, -0.014628826640546322, -0.07685591280460358, 0.03887585550546646, -0.06969495862722397, -0.0505974143743515, 0.06318306922912598, 0.09165949374437332, 0.037156444042921066, -0.031236708164215088, 0.0244776401668787, -0.04959262162446976, -0.005363596137613058, 0.08817918598651886, 0.0890735536813736, 0.036729082465171814, -0.011415846645832062, 0.035182882100343704, -0.0309298112988472, 0.0024557129945605993, 0.0705060288310051, 0.06127885729074478, 0.006192913744598627, 0.01387468446046114, 0.047724973410367966, -0.04231903329491615, -0.023759663105010986, -0.07227593660354614, 0.08131195604801178, -0.030131617560982704, -0.05746624991297722, -0.00478571280837059, 0.013490273617208004, -0.015331927686929703, 0.027894074097275734, 0.0065618823282420635, 0.03960701450705528, -0.006414147559553385, 0.05134828761219978, -0.03544582054018974, 0.010427561588585377, 0.04944606497883797, -0.07917626947164536, 0.006316557060927153, -0.02602139115333557, -0.028132373467087746, -0.009745674207806587, 0.0668572187423706, -0.13087032735347748, -0.06989352405071259, 0.0966128334403038, -0.042153529822826385, -0.012866740114986897, 0.03817930445075035, 0.02469603531062603, -0.02157646417617798, -0.06616567820310593, 0.016029857099056244, -0.010954552330076694, 0.07590944319963455, 0.006881730165332556, -0.023549910634756088, -0.008066839538514614, -0.014809706248342991, 0.007013128604739904, -0.006129427347332239, -0.03455924242734909, -0.030557328835129738} t.Logf("Grill magnitude: %f", e.Magnitude()) - t.Logf("Grill blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Grill blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Flower1", func(t *testing.T) { e := Embedding{-0.03019552491605282, -0.07871674001216888, -0.023003704845905304, 0.09487959742546082, -0.017495226114988327, -0.008054818026721478, -0.0647301971912384, 0.013870361261069775, 0.0009670352446846664, -0.05396779254078865, 0.02548447623848915, 0.057007644325494766, 0.011709821410477161, 0.0038011909928172827, 0.045353058725595474, 0.035295017063617706, 0.04017356410622597, 0.043185487389564514, 0.027515195310115814, -0.020289737731218338, -0.039764322340488434, 0.005229332484304905, 0.00405721552670002, 0.000556905462872237, -0.021460331976413727, 0.00335355824790895, -0.0321849025785923, 0.055887673050165176, -0.004678008612245321, 0.1182812973856926, -0.07219913601875305, -0.05155760794878006, 0.00901042390614748, -0.06545215845108032, -0.07447744160890579, 0.03930509090423584, -0.057567134499549866, 0.05046992003917694, -0.0440463088452816, 0.05263185501098633, 0.0002704291546251625, 0.02582591585814953, 0.011618443764746189, -0.02601690962910652, 0.02271551638841629, 0.027715599164366722, 0.07251789420843124, 0.04268983379006386, -0.06031318008899689, 0.00862133502960205, 0.03970063105225563, 0.0518559105694294, 0.023329779505729675, -0.002031347481533885, -0.07488734275102615, 0.009001128375530243, -0.010369407013058662, 0.11085769534111023, 0.016241254284977913, -0.00002152912929886952, -0.02413908764719963, 0.008454854600131512, -0.011496080085635185, -0.04082289710640907, -0.031190361827611923, 0.1388476938009262, 0.008612303994596004, -0.023153211921453476, -0.043824996799230576, 0.024006437510252, 0.0481027252972126, 0.08680301159620285, 0.04270326346158981, -0.05216927453875542, -0.05927334353327751, -0.019374316558241844, -0.025229861959815025, -0.008222969248890877, -0.002543332986533642, 0.05790124833583832, 0.049608856439590454, 0.012818481773138046, 0.053785353899002075, 0.042208995670080185, 0.05840647593140602, -0.0249145720154047, 0.013419240713119507, 0.07815870642662048, -0.0288663599640131, 0.031133931130170822, 0.04570338502526283, 0.021969476714730263, 0.037383776158094406, -0.021146640181541443, 0.0657959058880806, -0.038604237139225006, 0.04351291060447693, 0.024784596636891365, -0.01146020833402872, 0.019733143970370293, -0.0026928819715976715, -0.05324970930814743, -0.0024495902471244335, 0.06615212559700012, 0.05224823206663132, 0.03705878555774689, 0.08077745884656906, 0.044284820556640625, 0.04056631401181221, 0.03569989278912544, -0.029091807082295418, 0.023202665150165558, -0.06368359178304672, -0.030634507536888123, -0.017721401527523994, -0.056922271847724915, 0.03359384834766388, -0.004456135910004377, -0.02138909325003624, 0.01833347976207733, -0.03810671344399452, -0.01576179824769497, -0.030147895216941833, -0.061343636363744736, 0.02187352068722248, -0.027865473181009293, -0.02818996086716652, 0.06268241256475449, -0.01986093446612358, -0.05663265287876129, 0.011026914231479168, -0.028170641511678696, 0.07949692010879517, 0.00592046370729804, -0.07582945376634598, 0.043210942298173904, -0.011235090903937817, 0.08058775216341019, 0.06084113568067551, 0.06698691099882126, 0.02548559196293354, 0.007087444420903921, 0.01572406105697155, 0.06709838658571243, 0.05799484625458717, -0.030445881187915802, -0.029201997444033623, -0.0296348724514246, -0.021554311737418175, 0.038257673382759094, 0.05144689977169037, -0.04842280596494675, -0.025446686893701553, 0.03977954387664795, 0.0036737604532390833, -0.06959599256515503, 0.06593459844589233, -0.019823838025331497, -0.02825123816728592, 0.0337490513920784, 0.04951351881027222, -0.036692652851343155, -0.012616735883057117, 0.06784524023532867, 0.03620803728699684, 0.007500113919377327, -0.037119060754776, -0.08364656567573547, -0.020971693098545074, -0.020525673404335976, -0.028083818033337593, 0.019949382171034813, -0.006462384015321732, -0.026246046647429466, -0.0034215052146464586, 0.02823772467672825, 0.11498260498046875, -0.06337784230709076, 0.005141086410731077, -0.027393296360969543, -0.07954125851392746, -0.04435193911194801, -0.04914383217692375, 0.059515394270420074, -0.03866855800151825, 0.04542951658368111, 0.01499941572546959, 0.06736072897911072, -0.00527695519849658, 0.013653818517923355, 0.047846656292676926, -0.052605826407670975, 0.04425685852766037, 0.009783400222659111, 0.05943259224295616, 0.04566368833184242, 0.024716567248106003, 0.04126652330160141, -0.10338572412729263, 0.05351461470127106, 0.035047195851802826, 0.03307333216071129, -0.03553280234336853, -0.04276985675096512, -0.019566865637898445, 0.04584430530667305, 0.00852769985795021, 0.03113703243434429, -0.01126800011843443, -0.022820426151156425, -0.008634181693196297, 0.0025746547617018223, 0.011587820947170258, 0.009403720498085022, -0.020057514309883118, -0.03369829058647156, -0.07091713696718216, 0.0917370468378067, -0.013627125881612301, 0.036804404109716415, -0.07365936785936356, -0.07721276581287384, -0.0848272293806076, -0.10376883298158646, -0.01686597615480423, 0.007328540552407503, -0.02435074746608734, 0.02855093404650688, -0.07155363261699677, 0.0339333713054657, 0.03228326514363289, -0.006101303268224001, -0.021284935995936394, -0.06754937022924423, -0.0361688993871212, 0.0016247049206867814, 0.045448753982782364, 0.023975545540452003, -0.07827144861221313, -0.04288452863693237, 0.0007490513380616903, 0.004697245545685291, 0.05560089275240898, 0.03225582838058472, 0.04222284257411957, 0.0831281989812851, -0.030278028920292854, 0.11795460432767868, -0.014389901421964169, 0.013684619218111038, -0.0016072815051302314, 0.03291520103812218, -0.03971284627914429, 0.011598853394389153, 0.01384691335260868, 0.1226653903722763, 0.0062681082636117935, -0.033354584127664566, 0.06482443958520889, 0.052742648869752884, -0.03917969390749931, -0.07197154313325882, 0.021264027804136276, 0.022814711555838585, 0.0015450160717591643, 0.03867420554161072, 0.010737990029156208, 0.018715685233473778, -0.011505317874252796, 0.059121936559677124, -0.10676467418670654, -0.05446113273501396, 0.0104120634496212, 0.022678585723042488, -0.02054324559867382, -0.08127003908157349, -0.0001387471129419282, -0.03535012900829315, -0.03275696560740471, -0.05604216083884239, 0.011631856672465801, -0.008016175590455532, -0.011187532916665077, -0.08117886632680893, -0.011685227043926716, 0.003281689714640379, -0.0334036648273468, 0.03511528670787811, -0.018891530111432076, -0.10006698966026306, 0.06871387362480164, -0.054714031517505646, 0.058559730648994446, -0.02187476120889187, -0.04462985694408417, -0.07783463597297668, 0.04556052014231682, 0.018844634294509888, 0.04587012529373169, 0.018023423850536346, 0.048708800226449966, -0.03465156629681587, 0.08744889497756958, -0.032538820058107376, 0.04354848712682724, 0.033971257507801056, -0.02715924195945263, -0.013029555790126324, 0.02003365382552147, 0.0027219990734010935, 0.05326205492019653, 0.09929276257753372, 0.011059815995395184, 0.024264490231871605, 0.01864546909928322, 0.006178828421980143, -0.08299916237592697, 0.026622293516993523, -0.035160548985004425, 0.027966154739260674, 0.019631322473287582, 0.014916624873876572, -0.024564530700445175, 0.05583149567246437, -0.008569297380745411, 0.014933700673282146, 0.003501041792333126, 0.04206134006381035, 0.08408672362565994, 0.06967388093471527, 0.03371506556868553, 0.0015939065488055348, -0.0021162545308470726, -0.004095290321856737, 0.03121296875178814, -0.019001834094524384, -0.010562566109001637, 0.0007475689053535461, -0.015188124030828476, -0.00844219047576189, 0.03192278742790222, 0.04883776232600212, -0.004265421535819769, 0.0064840917475521564, -0.008885269984602928, -0.020197948440909386, -0.008081543259322643, 0.0391877256333828, 0.05435195192694664, -0.030574191361665726, 0.05873652920126915, 0.008983828127384186, -0.044688791036605835, -0.03430255874991417, -0.04765993729233742, 0.01505275722593069, 0.014663179405033588, 0.03359309583902359, 0.03398916870355606, 0.010128621011972427, -0.04786868020892143, 0.09205295145511627, -0.04324489086866379, -0.012286108918488026, -0.025258829817175865, -0.03109554387629032, 0.018850045278668404, -0.06365649402141571, -0.04130743443965912, -0.06003929674625397, -0.06371771544218063, -0.053631216287612915, 0.0008108748588711023, 0.02512884885072708, 0.10647512972354889, 0.05736532434821129, -0.002245571231469512, 0.011623070575296879, -0.05012429505586624, -0.0002606081252451986, 0.0021158261224627495, -0.04840600863099098, -0.06371227651834488, 0.054799798876047134, 0.022411830723285675, -0.018866566941142082, 0.00929983425885439, -0.07035645097494125, 0.006125411484390497, -0.0443471297621727, 0.04035937786102295, -0.010307899676263332, 0.013318569399416447, -0.10588716715574265, 0.019783275201916695, 0.0025495027657598257, 0.03915978968143463, -0.030095787718892097, 0.010048536583781242, 0.0627862885594368, -0.018664665520191193, 0.0691421702504158, -0.0030263226944953203, -0.022138074040412903, -0.035055339336395264, -0.009527369402348995, 0.04268539696931839, -0.07183072715997696, -0.019671181216835976, -0.0358051061630249, 0.0025151509325951338, -0.040810003876686096, 0.0705331340432167, -0.008859500288963318, 0.028914960101246834, 0.047396715730428696, 0.012474226765334606, 0.09506535530090332, -0.02160799503326416, -0.024810440838336945, 0.04486755281686783, -0.03150194510817528, -0.0005808633868582547, 0.027153024449944496, -0.06281301379203796, -0.049513302743434906, 0.007842835038900375, 0.030769050121307373, 0.012647315859794617, -0.0408654510974884, 0.013696295209228992, 0.017897984012961388, 0.015162310563027859, 0.01770404912531376, -0.06318328529596329, 0.04427282139658928, 0.0055181668139994144, 0.03301384672522545, -0.019742365926504135, -0.027953891083598137, 0.00253329798579216, 0.00907354336231947, 0.033470518887043, 0.06994043290615082, -0.01579359360039234, 0.032001662999391556, 0.008337217383086681, -0.02048022672533989, -0.04494907706975937, 0.028811851516366005, -0.05173119902610779, 0.04572086036205292, 0.02442833036184311, -0.0145721435546875, 0.06387710571289062, -0.029308859258890152, 0.07402297109365463, -0.007370623294264078, -0.007440139539539814, -0.0022305867169052362, -0.04192188009619713, -0.08984600752592087, -0.03544710949063301, -0.043857723474502563, 0.11435452103614807, -0.01436969731003046, -0.06437531113624573, 0.007071901578456163, -0.006449805572628975, 0.0274976696819067, -0.011963422410190105, -0.005810614209622145, 0.05138937383890152, -0.062438853085041046, -0.07997965067625046, -0.03498489782214165, 0.04440535232424736, -0.002441627671942115, 0.04196169599890709, 0.09606023877859116, -0.026252146810293198, -0.04430140182375908, 0.0036590120289474726, -0.016555264592170715, 0.030623286962509155, 0.08178170770406723, -0.06528890877962112, -0.004473901819437742, 0.02909085713326931, 0.010233295150101185, -0.018495382741093636, 0.055798523128032684, -0.06662216037511826, 0.007149004377424717, 0.02449638582766056, -0.018667634576559067, 0.05378830432891846, 0.011866440065205097, 0.005244908854365349, -0.0053698159754276276, -0.0770626813173294, 0.0405881442129612, -0.040186453610658646, 0.023948803544044495, -0.020199982449412346, 0.03356420621275902, 0.06181802228093147, -0.015846192836761475, -0.00012590247206389904, 0.09354376792907715, 0.042751967906951904, -0.0723000168800354} t.Logf("Flower1 magnitude: %f", e.Magnitude()) - t.Logf("Flower1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Flower1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Flower2", func(t *testing.T) { e := Embedding{-0.05463063716888428, -0.03371426463127136, -0.0407349094748497, 0.05211907997727394, -0.0207980964332819, -0.026475567370653152, -0.004256931599229574, 0.009527092799544334, -0.0018235337920486927, -0.021133283153176308, 0.0652984082698822, 0.06004940718412399, 0.053581975400447845, 0.054923877120018005, 0.011446550488471985, -0.009651191532611847, -0.019915800541639328, 0.06117098033428192, -0.027432965114712715, 0.021548239514231682, -0.0759635642170906, 0.025930799543857574, 0.07706271857023239, -0.12473610043525696, -0.05552073195576668, -0.02323354408144951, 0.04534662142395973, -0.03784395009279251, -0.012352552264928818, -0.022830061614513397, 0.055954743176698685, 0.06220647320151329, 0.01621929556131363, 0.03211347386240959, -0.09252569079399109, -0.023571643978357315, -0.006070449482649565, 0.02719615213572979, -0.0394582636654377, 0.012589468620717525, -0.05825604125857353, -0.04322190210223198, 0.02713274396955967, 0.05877536162734032, 0.06345852464437485, -0.04119482636451721, 0.06242511421442032, 0.032530974596738815, -0.042238738387823105, -0.05084029957652092, -0.06455250084400177, 0.06907129287719727, 0.058659400790929794, -0.018500279635190964, -0.09088067710399628, 0.0029079692903906107, -0.030330153182148933, 0.04387861117720604, -0.05019963160157204, -0.002478249603882432, -0.014510122127830982, -0.00786376278847456, -0.0010800185846164823, -0.007502203807234764, 0.025499310344457626, 0.06315060704946518, -0.06748983263969421, -0.048920661211013794, -0.04095924645662308, -0.019630206748843193, 0.02626034803688526, -0.015071701258420944, 0.10041424632072449, -0.03800126910209656, -0.05575624853372574, -0.02125774323940277, 0.02796982042491436, -0.1026664599776268, -0.06748276948928833, -0.03743085265159607, -0.03552986681461334, 0.06065348908305168, 0.013063639402389526, -0.014365208335220814, -0.003555967705324292, 0.017303358763456345, -0.024060532450675964, 0.026340745389461517, -0.061510276049375534, -0.0046484931372106075, -0.006447231397032738, 0.01401460263878107, 0.011501336470246315, -0.07818710803985596, 0.02511146478354931, -0.002745403442531824, -0.029339004307985306, 0.015656275674700737, -0.029391447082161903, -0.020258497446775436, 0.0009495576960034668, 0.04092829301953316, 0.046933650970458984, 0.014906227588653564, -0.01311752200126648, 0.026448165997862816, 0.016317075118422508, -0.00741860456764698, -0.06228558346629143, -0.02560289204120636, -0.017271775752305984, 0.00003627142359619029, -0.06505917757749557, 0.02352156862616539, -0.010600448586046696, 0.001862041070125997, -0.027565129101276398, 0.07768595218658447, 0.005964277777820826, -0.024083254858851433, -0.026283763349056244, -0.04580988734960556, 0.04992192983627319, 0.0627615824341774, -0.10283318907022476, -0.07365758717060089, -0.04208321124315262, 0.04309738054871559, 0.037950318306684494, -0.10438454896211624, 0.024002524092793465, -0.04175486043095589, 0.046325746923685074, 0.02582639269530773, -0.01837374083697796, 0.01956857368350029, -0.04356582090258598, -0.06355538964271545, -0.023530298843979836, 0.006199323106557131, -0.023792369291186333, 0.0762750506401062, -0.07612712681293488, 0.018534565344452858, 0.014370683580636978, 0.04271596297621727, -0.016677238047122955, -0.03894709795713425, 0.03537117317318916, 0.08931876718997955, 0.019467126578092575, 0.05926606059074402, -0.04106913506984711, 0.03679004684090614, 0.041339896619319916, 0.0073695615865290165, 0.01521733682602644, -0.06132401525974274, 0.013890499249100685, -0.033076632767915726, 0.03764314204454422, 0.08146361261606216, 0.056604549288749695, 0.010546108707785606, 0.020975487306714058, -0.06503409147262573, -0.06469660997390747, -0.008601412177085876, 0.010800623334944248, -0.021312901750206947, -0.04689965397119522, 0.05380029231309891, -0.0316980704665184, -0.005872285459190607, -0.08645015954971313, -0.058882374316453934, -0.03977329283952713, -0.03215678408741951, 0.024742668494582176, 0.06970592588186264, 0.007632080931216478, 0.050259385257959366, -0.01501927338540554, 0.016141297295689583, 0.026386799290776253, -0.007451971061527729, 0.009198025800287724, 0.03558347001671791, 0.005506325978785753, -0.012559231370687485, -0.005907595157623291, -0.046198781579732895, -0.02942524664103985, 0.07434666901826859, -0.0023319339379668236, 0.04805666208267212, -0.008366252295672894, -0.02528618648648262, 0.014757177792489529, 0.06307618319988251, 0.06697240471839905, -0.035577718168497086, -0.0842052549123764, -0.0005646629724651575, -0.01780761405825615, 0.018630435690283775, 0.0017739025643095374, -0.06626256555318832, -0.0471806600689888, 0.003591350745409727, 0.022808531299233437, 0.036298491060733795, -0.005090136080980301, 0.039777323603630066, -0.04025647044181824, 0.029815541580319405, 0.002151516731828451, 0.010513653047382832, 0.05859753116965294, -0.015778928995132446, -0.004468567203730345, -0.003702316200360656, 0.0487135574221611, -0.04213191568851471, 0.07808691263198853, 0.03459445387125015, 0.06255919486284256, 0.020673291757702827, -0.022052913904190063, 0.054482750594615936, -0.005217147991061211, -0.010797238908708096, 0.08884876221418381, 0.0335734598338604, -0.10115119069814682, 0.02614814043045044, 0.0006375747034326196, -0.018745815381407738, 0.06347019970417023, -0.03981824219226837, 0.0005060746916569769, -0.05664358288049698, 0.014098847284913063, -0.07616740465164185, -0.029789837077260017, 0.012085791677236557, -0.09030250459909439, 0.04760579392313957, 0.012102440930902958, 0.04517171531915665, -0.03675411269068718, -0.019070954993367195, -0.022321367636322975, 0.023864755406975746, 0.022170912474393845, 0.057572487741708755, 0.07230287045240402, -0.011163034476339817, 0.04274069517850876, -0.013417111709713936, 0.016417235136032104, -0.01801385171711445, -0.04747485741972923, 0.05975719913840294, -0.004057082813233137, 0.020340483635663986, -0.019184084609150887, -0.10910630226135254, 0.04187655448913574, 0.0346197634935379, -0.02616635337471962, -0.020107585936784744, 0.03370631858706474, 0.013768580742180347, 0.05307316780090332, 0.04683014005422592, 0.002595299854874611, 0.02419392764568329, 0.007458163425326347, 0.07678227126598358, 0.058402884751558304, -0.026422254741191864, -0.026575807482004166, -0.038834962993860245, -0.01873084530234337, -0.0046195401810109615, -0.0018021861324086785, 0.007925357669591904, 0.01475005503743887, 0.010435611940920353, 0.0473245233297348, 0.0006347568123601377, 0.03385118022561073, -0.03781693056225777, -0.0607491098344326, -0.0277927964925766, -0.04968066141009331, -0.007106872741132975, 0.06414465606212616, 0.050950340926647186, -0.03911551460623741, 0.05142752081155777, 0.009516315534710884, -0.07451993972063065, 0.04769691824913025, -0.037567388266325, -0.007270279340445995, 0.023342827335000038, -0.1074666902422905, 0.005743145477026701, -0.00618224311619997, 0.05290457233786583, -0.010753381997346878, -0.06207698583602905, -0.013758545741438866, 0.10195783525705338, 0.020605722442269325, 0.008758201263844967, 0.055676791816949844, 0.044130630791187286, 0.012025833129882812, -0.08505481481552124, 0.022129017859697342, 0.05281268432736397, 0.0831422209739685, -0.009204448200762272, 0.027931025251746178, 0.05536891520023346, 0.08442933857440948, 0.026652567088603973, 0.05152091756463051, 0.017966322600841522, -0.0077913617715239525, 0.03361339494585991, -0.0233188234269619, 0.05592465400695801, 0.01619098149240017, -0.03983626887202263, 0.03911631181836128, -0.07761960476636887, -0.01579463668167591, -0.008182684890925884, 0.02287164516746998, 0.02247552014887333, 0.013657837174832821, 0.056794002652168274, -0.017609454691410065, 0.01021649595350027, 0.010986505076289177, 0.0680382251739502, 0.002902969717979431, -0.043789129704236984, 0.05324602127075195, -0.029620924964547157, 0.10853029787540436, -0.0027247837278991938, -0.07037591189146042, 0.022132592275738716, 0.016942990943789482, 0.0351603664457798, -0.005045001395046711, -0.06914281845092773, -0.037358883768320084, -0.05136822536587715, 0.03642115369439125, -0.058062706142663956, -0.00569938775151968, 0.008633515797555447, 0.003481707302853465, -0.07520686835050583, -0.0030026293825358152, -0.0015067231142893434, 0.02497561275959015, 0.016993306577205658, 0.028043579310178757, 0.04984911158680916, 0.013300284743309021, 0.09243999421596527, -0.043235212564468384, -0.06552619487047195, -0.08325153589248657, -0.0034248644951730967, 0.01185827236622572, -0.11692536622285843, -0.088642917573452, -0.021360620856285095, -0.00890771858394146, -0.03796566277742386, 0.03818303346633911, -0.046766676008701324, 0.0012511591194197536, -0.04985470697283745, 0.0017050039023160934, -0.0446314662694931, 0.08088840544223785, 0.012169009074568748, -0.0012177786557003856, 0.04765402898192406, -0.048890598118305206, -0.00910959392786026, 0.010794125497341156, -0.012930036522448063, -0.02452201023697853, -0.010357229970395565, -0.012033194303512573, 0.03402625769376755, -0.012193192727863789, -0.019931362941861153, -0.08148454129695892, -0.01975245587527752, -0.04136104881763458, 0.010260222479701042, 0.04248780384659767, 0.04047507420182228, 0.04457823187112808, 0.07326484471559525, -0.0009582974598743021, 0.031685590744018555, -0.05560756474733353, -0.02058897353708744, 0.05746864154934883, 0.03022921085357666, 0.008367500267922878, 0.06519459187984467, -0.02666599676012993, -0.008113586343824863, -0.0239166971296072, 0.05922173708677292, 0.0645650178194046, -0.002752220258116722, -0.10906533151865005, -0.038538847118616104, -0.02225417084991932, -0.02929493971168995, -0.06952250003814697, -0.026746297255158424, -0.0275005791336298, -0.05271037667989731, -0.024544361978769302, -0.02331933006644249, 0.0012029706267639995, 0.04079725593328476, -0.0077309082262218, 0.030475249513983727, -0.022778788581490517, -0.0008517080568708479, -0.0013180874520912766, -0.09267009794712067, -0.0034445244818925858, 0.051629748195409775, 0.020064370706677437, 0.12080015242099762, -0.023703785613179207, 0.013875625096261501, 0.007964171469211578, -0.0070303273387253284, -0.034431494772434235, 0.0573449470102787, 0.07444043457508087, 0.039818380028009415, 0.0022802790626883507, -0.030767062678933144, -0.02029518410563469, -0.02745060808956623, 0.00244359509088099, 0.046626362949609756, -0.032964736223220825, 0.026427168399095535, 0.07784203439950943, 0.06711117923259735, -0.005855479743331671, 0.06725795567035675, 0.039811067283153534, -0.04241913929581642, -0.021357636898756027, -0.04587371647357941, -0.0538177415728569, -0.00019739758863579482, 0.0531231053173542, 0.006827523000538349, -0.039574019610881805, -0.04367538541555405, -0.01919477991759777, 0.005830481648445129, -0.012708039954304695, 0.013483176939189434, 0.00956282950937748, 0.02948499284684658, -0.0004116289201192558, -0.06476131826639175, -0.0021609398536384106, 0.017205240204930305, -0.08842971920967102, -0.05815761908888817, 0.018156733363866806, -0.08241431415081024, 0.017732346430420876, 0.03039109893143177, 0.08258717507123947, -0.0047948891296982765, -0.06845401972532272, -0.0014109100447967649, -0.1068277582526207, 0.0880066379904747, -0.07067390531301498, 0.047006506472826004, 0.05599718540906906, -0.06734465807676315, -0.04146059229969978, 0.02272333949804306, 0.0254039503633976, 0.005440313834697008} t.Logf("Flower2 magnitude: %f", e.Magnitude()) - t.Logf("Flower2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Flower2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Dots1", func(t *testing.T) { e := Embedding{-0.08115676790475845, -0.05963730812072754, 0.0788436010479927, 0.04450595751404762, 0.06169874966144562, -0.015032034367322922, -0.0899500921368599, -0.009825228713452816, 0.0564420260488987, -0.006098559126257896, 0.025342704728245735, 0.06437194347381592, 0.040096595883369446, 0.006068151444196701, -0.022622305899858475, 0.03228282183408737, 0.02473197504878044, 0.07248376309871674, 0.008801424875855446, -0.03229149803519249, -0.0017382852965965867, 0.007214698474854231, 0.05117001757025719, -0.009290488436818123, -0.03940087929368019, 0.0213032029569149, -0.04150773957371712, 0.01231461763381958, -0.003015191527083516, 0.05852336809039116, -0.09817866235971451, -0.04224725812673569, 0.0015780223766341805, -0.09480146318674088, 0.0027741806115955114, 0.02010342665016651, -0.04425966739654541, -0.040346600115299225, -0.10663139820098877, 0.059161096811294556, 0.0040780920535326, 0.013586863875389099, -0.0005677796434611082, 0.023130279034376144, -0.03124443255364895, 0.04197738692164421, 0.06594746559858322, 0.06783415377140045, -0.09719463437795639, -0.010987519286572933, -0.0023087908048182726, 0.001773863798007369, 0.04488230496644974, 0.08580370247364044, 0.03434797376394272, 0.004936364945024252, 0.03639600798487663, 0.06204204261302948, -0.019927602261304855, -0.02692924067378044, 0.017000118270516396, -0.02604246325790882, -0.026507725939154625, 0.016996048390865326, -0.04385655000805855, 0.0884787067770958, -0.042860180139541626, 0.009798342362046242, -0.0063103619031608105, 0.015574026852846146, 0.06514336913824081, 0.019630873575806618, 0.06744594871997833, -0.04516621306538582, -0.05032436549663544, 0.020592208951711655, -0.02518467791378498, 0.04013744741678238, 0.013429186306893826, 0.03592214733362198, 0.06909503042697906, -0.02468045987188816, 0.04889506846666336, 0.03668493032455444, 0.0026139242108911276, 0.02689972333610058, -0.01203525997698307, 0.07506909966468811, 0.03239822760224342, 0.02902725152671337, 0.03790690377354622, 0.08072637021541595, 0.04927707090973854, 0.04923266917467117, 0.015510630793869495, 0.008611151948571205, -0.025840433314442635, 0.056794196367263794, 0.0004704083257820457, 0.02275877259671688, -0.01372733898460865, -0.055375292897224426, -0.024181945249438286, 0.0737459659576416, 0.04204948991537094, 0.028205251321196556, 0.0642118975520134, -0.02637362666428089, -0.011575883254408836, 0.02578408271074295, -0.05103129893541336, 0.0613427571952343, -0.07809718698263168, 0.026064777746796608, -0.0522201806306839, -0.0064789350144565105, 0.008620581589639187, 0.060150034725666046, -0.03483464941382408, -0.005583859048783779, 0.04235440492630005, -0.09111455827951431, -0.03303370252251625, -0.04741404578089714, 0.07915093749761581, 0.01825057528913021, -0.016481375321745872, 0.04156731069087982, -0.015531884506344795, -0.04502810537815094, 0.00981069914996624, -0.00807663518935442, 0.03779071196913719, -0.0004603196575772017, -0.023713205009698868, 0.06177502125501633, -0.04528318718075752, 0.014600848779082298, -0.010573716834187508, 0.01635739952325821, -0.06683669239282608, -0.0051379119977355, -0.017422694712877274, 0.03677544742822647, 0.013474640436470509, -0.019268950447440147, 0.011770953424274921, -0.0076083713211119175, -0.023129886016249657, 0.00902184471487999, 0.04812190681695938, -0.05269356817007065, -0.052405595779418945, 0.06389874964952469, -0.006590772420167923, -0.04771706089377403, -0.01384259294718504, 0.006632381584495306, -0.05110255628824234, 0.022211385890841484, 0.03172893077135086, -0.032283324748277664, -0.061732541769742966, 0.059450216591358185, 0.014081389643251896, -0.0018659111810848117, -0.02636120468378067, -0.04969250038266182, -0.011741330847144127, -0.01514124870300293, -0.036745455116033554, -0.07577916234731674, -0.03361281007528305, -0.003115437924861908, -0.04262397065758705, 0.007837039418518543, 0.0884321928024292, 0.012420982122421265, -0.058416612446308136, -0.04640566185116768, -0.030523240566253662, 0.013329975306987762, -0.032670460641384125, 0.04908979684114456, 0.0016104059759527445, 0.0267822053283453, 0.004912574775516987, 0.01936103217303753, -0.006825592368841171, -0.038040149956941605, 0.0337233766913414, 0.05847881734371185, 0.023053934797644615, -0.012655981816351414, 0.00887569785118103, 0.010923194698989391, -0.011545547284185886, -0.008611318655312061, -0.053053099662065506, 0.01476683933287859, 0.051253341138362885, 0.024779533967375755, -0.029689637944102287, -0.04664143919944763, -0.10984893888235092, 0.04402933269739151, 0.006930400617420673, 0.06238733232021332, 0.05343233421444893, -0.039708349853754044, -0.0042195855639874935, 0.021031396463513374, 0.0043520694598555565, 0.03880438208580017, -0.03387982398271561, -0.07224807888269424, -0.06749957799911499, 0.12418822944164276, -0.06942831724882126, 0.053260866552591324, -0.08149035274982452, -0.011059204116463661, 0.020626040175557137, -0.0822000727057457, -0.014941852539777756, 0.036649588495492935, -0.101241834461689, 0.012646468356251717, -0.016682717949151993, 0.010448996908962727, -0.006843209732323885, -0.00856192596256733, -0.02324419654905796, -0.012334282509982586, -0.003161926520988345, 0.003297114511951804, 0.009412284009158611, 0.008664682507514954, -0.047178640961647034, 0.0689479187130928, -0.05251511558890343, 0.037647880613803864, 0.00569966109469533, 0.1043928861618042, -0.03475610166788101, 0.03298821672797203, -0.02319612354040146, 0.05483856797218323, 0.02846248261630535, -0.003060076618567109, 0.07614942640066147, -0.005648394115269184, 0.006719463970512152, -0.004491327330470085, 0.01866794377565384, 0.12493720650672913, -0.03218918293714523, 0.04306122660636902, -0.0009663064847700298, 0.044334713369607925, -0.008344506844878197, -0.049632150679826736, 0.020624849945306778, 0.09142778813838959, -0.04559920355677605, 0.011752032674849033, 0.042302731424570084, -0.002007658826187253, -0.021200919523835182, 0.09403618425130844, -0.07005677372217178, -0.10193188488483429, 0.039701808243989944, -0.04359819367527962, 0.016325781121850014, -0.018767589703202248, 0.04733316972851753, 0.006023624446243048, 0.010154318995773792, -0.03220267593860626, 0.013191093690693378, 0.03393266350030899, -0.06861083954572678, -0.01742430403828621, -0.023993974551558495, 0.05500425025820732, -0.045878682285547256, -0.0005195793346501887, 0.046038780361413956, -0.08819218724966049, 0.06409626454114914, -0.022376736626029015, 0.05494682490825653, 0.0014755419688299298, 0.0023858428467065096, -0.018028493970632553, 0.08820650726556778, -0.03656633943319321, -0.003776528872549534, 0.03218711540102959, -0.002397269941866398, 0.05085684731602669, 0.10680899024009705, 0.03853011131286621, 0.046037591993808746, -0.004109532106667757, 0.021504102274775505, -0.03886057436466217, -0.05943303182721138, -0.0915352925658226, 0.013649459928274155, 0.07139262557029724, 0.024838292971253395, 0.05011162534356117, 0.07030156254768372, 0.02863646298646927, -0.05520547181367874, 0.049858033657073975, 0.007714556064456701, 0.05199074745178223, -0.00508091552183032, 0.05210539326071739, 0.023953648284077644, 0.07547666877508163, -0.03427216410636902, 0.00452800840139389, 0.05390504375100136, 0.06505003571510315, 0.050015274435281754, 0.05300457775592804, 0.0245889313519001, -0.02747657522559166, 0.010429390706121922, -0.04056383669376373, 0.03459808975458145, -0.01328829862177372, 0.06715405732393265, 0.03332553431391716, -0.052611686289310455, -0.008097517304122448, -0.019909808412194252, 0.03658982738852501, 0.0028853793628513813, -0.00869828462600708, 0.00793647300451994, -0.008162034675478935, -0.043640438467264175, 0.09346330910921097, 0.03838129714131355, -0.012016919441521168, 0.09594465047121048, 0.03059709072113037, -0.05039406940340996, -0.03789548948407173, -0.08031275123357773, 0.017095720395445824, 0.021855978295207024, 0.007595246657729149, 0.041599053889513016, 0.010288594290614128, 0.0041856830939650536, 0.08423073589801788, -0.018287254497408867, 0.03809792175889015, 0.04093942046165466, -0.033222559839487076, 0.004375685006380081, 0.005180163774639368, -0.025033410638570786, -0.015123081393539906, -0.04063202068209648, -0.06302951276302338, 0.03417890518903732, 0.02003955841064453, 0.06974335014820099, 0.08486700803041458, 0.006648624315857887, -0.05347717925906181, -0.036822687834501266, 0.03047998435795307, 0.04993908107280731, -0.013370467349886894, 0.03311610966920853, 0.05337180942296982, -0.008146698586642742, -0.020772676914930344, -0.04561322182416916, -0.08311467617750168, 0.007251769304275513, -0.04220651835203171, 0.020697645843029022, -0.04933066666126251, 0.0015219468623399734, -0.04755052924156189, 0.04442377761006355, -0.019198313355445862, 0.05311097949743271, -0.02865980751812458, -0.010415605269372463, 0.01476988848298788, -0.09961133450269699, 0.04974192753434181, -0.00211395975202322, -0.029359396547079086, 0.0063890693709254265, 0.011732285842299461, 0.05723942443728447, 0.004325998015701771, 0.05300479009747505, 0.03267650306224823, -0.002601505257189274, 0.022809471935033798, 0.05251869931817055, -0.022359322756528854, 0.0027018345426768064, 0.08109915256500244, -0.018779970705509186, 0.04157577082514763, 0.0058013866655528545, 0.01169825904071331, -0.0006808323669247329, -0.0368780791759491, -0.012484327889978886, 0.0134188923984766, -0.051110513508319855, -0.0015476575354114175, -0.02450643479824066, -0.0714423879981041, 0.02264491468667984, -0.0525474026799202, 0.016057288274168968, 0.07634048908948898, 0.07585665583610535, 0.11146531999111176, -0.049800463020801544, 0.0026023569516837597, 0.04227875918149948, 0.009020578116178513, -0.03679546341300011, 0.00038910421426407993, 0.022554710507392883, -0.0065070935525000095, -0.028031283989548683, 0.0013435474829748273, -0.00932274293154478, 0.06538671255111694, -0.0374307781457901, -0.05377684161067009, -0.06123567000031471, -0.0011226708302274346, -0.08560498058795929, 0.061603400856256485, 0.0550682358443737, -0.0397142618894577, 0.041000980883836746, 0.0017219348810613155, 0.016707979142665863, 0.002818128326907754, -0.04728423058986664, -0.03549855947494507, 0.0031014198902994394, -0.061578623950481415, -0.038454845547676086, -0.018084565177559853, 0.11073280870914459, -0.014639900997281075, -0.09602685272693634, -0.03872399032115936, -0.03743824362754822, -0.011552664451301098, -0.04760466516017914, -0.010792691260576248, -0.014341838657855988, -0.019254865124821663, -0.04623943194746971, -0.0027368648443371058, 0.057395048439502716, 0.02977125719189644, -0.0599244087934494, 0.08831997215747833, 0.020621009171009064, -0.04964616894721985, -0.01989050954580307, -0.01905161142349243, 0.024172471836209297, 0.07459156960248947, -0.010764791630208492, -0.045596763491630554, 0.014933018013834953, -0.0279565267264843, -0.06712216138839722, -0.008558833040297031, -0.03950041905045509, 0.0035549290478229523, 0.02523505501449108, -0.06828609108924866, -0.004157915711402893, 0.0385417640209198, -0.08221529424190521, 0.006915606092661619, -0.11618096381425858, -0.02392691560089588, -0.010516432113945484, -0.016847535967826843, 0.0067132809199392796, 0.05342332646250725, 0.03135665878653526, -0.014562353491783142, 0.03590148687362671, -0.0047067683190107346, 0.009007757529616356, -0.0603928379714489} t.Logf("Dots1 magnitude: %f", e.Magnitude()) - t.Logf("Dots1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Dots1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Dots2", func(t *testing.T) { e := Embedding{-0.04752028360962868, -0.07564439624547958, 0.06620408594608307, 0.07881300151348114, -0.010296037420630455, -0.04715193063020706, -0.08304407447576523, -0.0632619857788086, 0.006681173574179411, -0.08067381381988525, 0.028126709163188934, 0.0300692580640316, 0.027543583884835243, 0.027835704386234283, 0.02536364272236824, 0.06358302384614944, 0.04477228224277496, 0.09044454246759415, 0.0025768436025828123, 0.03368930146098137, 0.03108157590031624, 0.0034471654798835516, 0.006852663122117519, 0.009569973684847355, -0.032888468354940414, 0.007848908193409443, -0.02188052423298359, 0.01723313331604004, 0.02685108594596386, 0.07939361780881882, -0.04558749124407768, -0.02980669029057026, -0.018962625414133072, -0.052443426102399826, -0.06572094559669495, 0.008843130432069302, -0.05589630827307701, -0.005741346627473831, -0.025694040581583977, 0.08558199554681778, -0.011519107967615128, -0.006611749529838562, -0.024117479100823402, 0.020807920023798943, -0.005759728141129017, 0.011532783508300781, 0.08728612214326859, 0.037037864327430725, -0.04939253255724907, 0.053707193583250046, -0.00677343038842082, 0.05087637901306152, 0.03341832384467125, 0.06772391498088837, 0.014028037898242474, -0.03710141032934189, 0.05773237347602844, 0.013821864500641823, 0.017365241423249245, -0.006683145184069872, 0.032184142619371414, -0.014333033934235573, 0.02211962267756462, 0.01040064450353384, 0.008106250315904617, 0.1458284556865692, -0.029970917850732803, 0.010591461323201656, -0.05175281688570976, -0.019290633499622345, 0.03726418688893318, 0.05601935461163521, 0.07777519524097443, -0.010739256627857685, -0.0902026817202568, 0.030603161081671715, -0.0206608846783638, 0.005280520301312208, -0.01667620800435543, -0.002639653393998742, 0.05487610027194023, -0.043772317469120026, 0.027496369555592537, 0.07613971084356308, 0.03990131989121437, -0.04181038960814476, -0.0004919982748106122, 0.07768265157938004, 0.00032098483643494546, 0.031321946531534195, 0.06626664102077484, 0.060554686933755875, 0.0007006273954175413, 0.06040005758404732, 0.03150910884141922, -0.04204067587852478, -0.03609658032655716, 0.004612777382135391, -0.011249862611293793, -0.0014120896812528372, -0.008355832658708096, -0.04924174025654793, -0.01868174411356449, 0.036391619592905045, 0.05487244948744774, 0.02007218636572361, 0.05740034952759743, -0.012519082985818386, -0.04054625332355499, 0.04215769097208977, -0.04693460091948509, 0.0420171320438385, -0.06132034212350845, 0.06114023178815842, -0.05180251598358154, -0.04847567155957222, -0.0528692901134491, 0.022387083619832993, -0.04536806792020798, -0.02002035826444626, 0.031009504571557045, -0.043465755879879, -0.012002941220998764, -0.017938774079084396, 0.02036328800022602, 0.016838226467370987, -0.04751292243599892, 0.033071935176849365, 0.04301192983984947, -0.02976381406188011, 0.043087560683488846, -0.010051952674984932, 0.0000864430476212874, 0.01179417036473751, -0.021177852526307106, 0.03144577145576477, -0.05137062817811966, 0.009149949066340923, -0.016788091510534286, 0.015786245465278625, -0.018203238025307655, 0.020216401666402817, -0.016213763505220413, -0.00022753850498702377, 0.028512977063655853, -0.019117331132292747, 0.01792442426085472, -0.05919519439339638, -0.026117796078324318, 0.015188477002084255, 0.0418018214404583, -0.03122447244822979, -0.028978154063224792, 0.013010965660214424, 0.0037310197949409485, -0.03488035500049591, 0.02937684766948223, -0.015035790391266346, -0.04733068495988846, 0.03993461653590202, 0.0005705818184651434, -0.04286117106676102, -0.015688391402363777, 0.059625044465065, -0.0025964081287384033, -0.0009035039693117142, -0.04421289637684822, -0.02616998367011547, 0.009143768809735775, -0.10795585066080093, -0.05594909191131592, -0.025725699961185455, 0.0018580693285912275, -0.009901541285216808, -0.031974468380212784, -0.007890747860074043, 0.049082737416028976, -0.022871194407343864, 0.028161806985735893, -0.00343366339802742, -0.03733258694410324, -0.023921160027384758, -0.02917514741420746, 0.008737168274819851, -0.05744306370615959, 0.03965073823928833, -0.010245651938021183, 0.031067030504345894, -0.06880320608615875, -0.047421809285879135, -0.009126563556492329, -0.026365559548139572, 0.016342604532837868, 0.07319983094930649, -0.01783590391278267, 0.015760738402605057, -0.06865900754928589, 0.006389060523360968, -0.05571039766073227, 0.06424502283334732, 0.03057023510336876, 0.040452126413583755, -0.08346285670995712, 0.004188890103250742, -0.0790683850646019, -0.015150158666074276, -0.009363376535475254, 0.04995222017168999, 0.0012028699275106192, -0.05234126001596451, 0.012935735285282135, 0.04319604113698006, 0.009007412940263748, 0.08687765151262283, -0.0703146681189537, -0.052937183529138565, -0.05060243606567383, 0.10956063866615295, -0.014159583486616611, 0.02241330035030842, -0.06382989138364792, -0.04363411292433739, -0.02006581611931324, -0.07069699466228485, 0.025683902204036713, 0.02807503379881382, -0.0454539880156517, 0.024486424401402473, -0.03739352151751518, 0.021073926240205765, 0.0033160881139338017, -0.04300979897379875, 0.026578396558761597, -0.030208777636289597, -0.01752944476902485, -0.028961678966879845, -0.006636114791035652, 0.05700603500008583, -0.011641992256045341, 0.014966602437198162, -0.01645839773118496, -0.010028877295553684, 0.030007069930434227, 0.0796036645770073, -0.027284840121865273, 0.04128005728125572, -0.04381977766752243, 0.10477974265813828, 0.0023653078824281693, -0.04561001434922218, 0.022817719727754593, -0.019304847344756126, -0.053253792226314545, -0.00855953712016344, 0.01662144996225834, 0.11704686284065247, 0.006741310935467482, 0.005178636871278286, 0.025979990139603615, 0.037887681275606155, -0.044502753764390945, -0.09251159429550171, -0.02188168279826641, 0.08712977170944214, -0.007391767576336861, 0.0457465723156929, 0.024096287786960602, -0.06073309853672981, -0.001732272794470191, 0.11387427896261215, -0.06315546482801437, -0.12734033167362213, 0.06850278377532959, -0.014240512624382973, 0.027803147211670876, 0.03920065239071846, 0.018020672723650932, 0.0008384330430999398, -0.044500090181827545, -0.03762366995215416, 0.012982038781046867, -0.046006228774785995, -0.03146173432469368, 0.027960479259490967, -0.007341723423451185, 0.05657314136624336, -0.08806925266981125, -0.06103282421827316, 0.0710701122879982, -0.010064813308417797, 0.03965559974312782, -0.02964039333164692, 0.054878272116184235, -0.06197339668869972, -0.025491224601864815, -0.025080624967813492, 0.018865447491407394, -0.05246501788496971, 0.0004612802295014262, 0.018589314073324203, 0.001287001185119152, -0.0033134755212813616, 0.12326382845640182, 0.0020859618671238422, 0.028660500422120094, 0.01280015055090189, 0.007395996246486902, 0.0015387642197310925, -0.042844727635383606, -0.08565972000360489, 0.04061567038297653, 0.05902550369501114, 0.04539056867361069, 0.045123711228370667, -0.0064238584600389, 0.010240917094051838, -0.09630013257265091, 0.020836370065808296, 0.0019121587974950671, 0.11988287419080734, -0.05385896936058998, 0.023923536762595177, 0.019599400460720062, 0.08912831544876099, 0.03509555384516716, -0.0038113282062113285, 0.05427073314785957, 0.07548018544912338, 0.040832728147506714, 0.09100493043661118, -0.006812292616814375, -0.07638304680585861, -0.03785288706421852, -0.04157673940062523, 0.02399117685854435, -0.05391450226306915, 0.0546710267663002, -0.04788517579436302, -0.008415065705776215, 0.0190526582300663, -0.0535610057413578, 0.0006640843348577619, 0.021755598485469818, -0.008600223809480667, 0.017042579129338264, 0.033218298107385635, -0.009365798905491829, 0.03638644516468048, 0.009436419233679771, 0.02347351238131523, 0.08386346697807312, 0.02185327559709549, -0.001960794674232602, -0.06095265969634056, -0.030792316421866417, 0.028077324852347374, -0.041969750076532364, 0.008523321710526943, 0.04249250888824463, 0.007470793556421995, -0.01786721684038639, 0.03373116999864578, -0.004674183204770088, 0.009480656124651432, 0.0649460107088089, -0.030414408072829247, -0.006666137371212244, -0.014129295013844967, -0.07557740807533264, -0.05802527070045471, -0.046006400138139725, -0.0616336390376091, 0.0573379248380661, 0.0023992203641682863, 0.11006056517362595, 0.060295868664979935, -0.0012425596360117197, -0.02519555389881134, -0.05515694618225098, 0.01872861012816429, 0.031121667474508286, -0.03214739263057709, -0.007311405148357153, 0.023535214364528656, -0.051117971539497375, 0.013001185841858387, -0.03440394997596741, -0.0501117967069149, 0.02506876550614834, -0.015715956687927246, 0.020824499428272247, -0.05667538568377495, -0.027308529242873192, -0.052778784185647964, 0.02552853524684906, 0.01632942073047161, -0.017420196905732155, -0.023745426908135414, -0.07451629638671875, -0.007105295546352863, -0.052897967398166656, 0.04388761520385742, -0.01059349998831749, -0.04856410622596741, -0.023651709780097008, -0.0037534877192229033, 0.04467831924557686, 0.0018182978965342045, -0.029458705335855484, -0.004425189457833767, -0.035790860652923584, 0.006300986744463444, 0.06568392366170883, 0.013372441753745079, 0.027387090027332306, 0.05450981482863426, -0.03794523701071739, 0.032992128282785416, 0.03401702642440796, -0.022754982113838196, -0.05949227139353752, -0.024546097964048386, -0.04876836761832237, -0.009370082058012486, -0.04439966380596161, -0.03695692494511604, -0.00239416747353971, -0.013836627826094627, 0.04699043557047844, 0.019490864127874374, 0.015992075204849243, 0.021397363394498825, 0.049185529351234436, 0.07941543310880661, -0.06515055149793625, 0.02707764320075512, 0.04784364998340607, 0.02775290608406067, 0.007683657109737396, 0.010692615993320942, 0.055337682366371155, 0.0314343087375164, -0.05266646295785904, -0.027163976803421974, -0.022453228011727333, 0.0712142139673233, 0.019547946751117706, -0.0640762448310852, -0.03230171650648117, 0.04797965660691261, -0.08034712821245193, 0.054083261638879776, 0.0228063203394413, 0.01864396035671234, 0.0481182225048542, -0.01918119005858898, 0.04621328040957451, 0.0005009527667425573, -0.045466337352991104, 0.03345928713679314, -0.02734687179327011, -0.1390485018491745, -0.04874640703201294, -0.01304902508854866, 0.08697491139173508, 0.009817454032599926, -0.07510531693696976, -0.037909071892499924, 0.011962316930294037, 0.04911210387945175, -0.025918735191226006, 0.03815838694572449, 0.02111901342868805, -0.03300011157989502, -0.05754151567816734, -0.08874650299549103, 0.01458192802965641, 0.0031666795257478952, -0.07050268352031708, 0.0709979385137558, 0.015251022763550282, -0.06549207121133804, 0.017819244414567947, 0.01970839686691761, 0.00553897162899375, 0.08502942323684692, 0.03349141404032707, -0.03648731857538223, 0.035922564566135406, -0.0009460005676373839, -0.05740830674767494, -0.006268422119319439, -0.04769990220665932, 0.011836306191980839, -0.02242809347808361, -0.05767815560102463, 0.021089378744363785, 0.06673338264226913, -0.015342120081186295, 0.020239686593413353, -0.08835706859827042, -0.01716511882841587, -0.03562764823436737, 0.04994310438632965, -0.03140198811888695, 0.04564203694462776, 0.10635264217853546, 0.00002224606942036189, -0.020681651309132576, 0.04942489415407181, 0.0709083080291748, -0.06130135431885719} t.Logf("Dots2 magnitude: %f", e.Magnitude()) - t.Logf("Dots2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Dots2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) /* p, r, _ := EmbeddingsMidpoint(Embeddings{ @@ -102,60 +102,60 @@ func TestIgnoreEmbeddings(t *testing.T) { t.Run("Cup", func(t *testing.T) { e := Embedding{0.013752159662544727, -0.06209644302725792, -0.05203453078866005, 0.05004068464040756, -0.029140783473849297, -0.02017567679286003, -0.057443562895059586, 0.027564097195863724, -0.017887884750962257, 0.011591270565986633, 0.011138231493532658, 0.016641922295093536, -0.05436382442712784, -0.009291388094425201, 0.041821204125881195, -0.020641714334487915, 0.050666701048612595, 0.05518513545393944, 0.012744207866489887, 0.026812026277184486, -0.005747167393565178, 0.09193259477615356, 0.039670493453741074, -0.05512256175279617, -0.07696390151977539, 0.01839328370988369, 0.0456295870244503, 0.04978585243225098, 0.01719575747847557, -0.03635410964488983, 0.00027501225122250617, 0.08197610825300217, 0.043580710887908936, -0.02464931271970272, -0.015474572777748108, -0.04262015223503113, -0.02856202982366085, 0.00023728566884528846, 0.04029883071780205, -0.04167935252189636, -0.026648391038179398, -0.024459555745124817, 0.016916552558541298, -0.05821489915251732, 0.05082862079143524, -0.05330951139330864, 0.03885507583618164, -0.048241741955280304, -0.019662652164697647, 0.0323975645005703, 0.012168103829026222, 0.08332370966672897, 0.053779080510139465, -0.04951723664999008, -0.08811856061220169, 0.006690997630357742, -0.06469269841909409, 0.11562515795230865, 0.042662184685468674, 0.008934368379414082, -0.03489194065332413, 0.005934728309512138, -0.038055676966905594, 0.00898660533130169, -0.018299542367458344, 0.058539897203445435, -0.007009998895227909, -0.0017516580410301685, -0.023383939638733864, -0.00813512783497572, -0.00761600024998188, 0.000339806720148772, 0.047994647175073624, 0.025400636717677116, -0.021664157509803772, -0.024009281769394875, 0.013586976565420628, -0.07572927325963974, -0.0637129470705986, -0.041140116751194, 0.011158430948853493, 0.07330124080181122, -0.018013032153248787, -0.01913454197347164, 0.025541672483086586, -0.030622441321611404, 0.03486725687980652, 0.04702776297926903, -0.07686083018779755, 0.024169502779841423, -0.033461544662714005, -0.0337384007871151, 0.09664148092269897, -0.02432338520884514, -0.037094201892614365, 0.04197841137647629, 0.005453732330352068, 0.029384136199951172, -0.03283499553799629, -0.05406608432531357, 0.015594429336488247, 0.03868358954787254, 0.03451664373278618, -0.038406968116760254, 0.050539687275886536, -0.04596829041838646, 0.03459451347589493, -0.031264808028936386, 0.008030586875975132, -0.029887238517403603, 0.03563602641224861, -0.02823842503130436, -0.0828784927725792, -0.022357741370797157, 0.018160784617066383, -0.001101673231460154, 0.03691968321800232, 0.005956575740128756, 0.023448295891284943, 0.06482123583555222, -0.05048611760139465, -0.013085119426250458, -0.03342186659574509, 0.05323881283402443, -0.05166739597916603, -0.02238074317574501, 0.06445351988077164, 0.027077453210949898, -0.002531358040869236, -0.06395924836397171, -0.017190266400575638, -0.034269072115421295, 0.042341843247413635, -0.053622838109731674, -0.04920750856399536, 0.01728804036974907, -0.043004874140024185, 0.007158726453781128, 0.060289762914180756, 0.02067073993384838, 0.012799883261322975, 0.057328011840581894, -0.013701182790100574, 0.04958059638738632, 0.00265366374514997, -0.01924964413046837, -0.06384072452783585, -0.02989046834409237, 0.07000751048326492, 0.09176922589540482, 0.0260714553296566, 0.08187873661518097, 0.019890254363417625, -0.0174320749938488, 0.05929093807935715, -0.019961928948760033, 0.014430992305278778, -0.04653369262814522, 0.043965525925159454, -0.043890319764614105, 0.02300461195409298, -0.02528192847967148, 0.0415680892765522, 0.03989613428711891, 0.0531243197619915, -0.0605732724070549, -0.009310571476817131, -0.025268608704209328, 0.01972251571714878, 0.02193635329604149, -0.02737266942858696, 0.02609758824110031, -0.06805046647787094, -0.07252658903598785, -0.08559703826904297, -0.010851000435650349, -0.07949008047580719, 0.023219378665089607, 0.04905194044113159, 0.055004287511110306, -0.039890874177217484, -0.02624371461570263, -0.03042159043252468, 0.015076524578034878, 0.005990734789520502, 0.003020947566255927, -0.06554363667964935, 0.030011074617505074, -0.02610105648636818, 0.07511749118566513, 0.07854931056499481, -0.025849441066384315, -0.014285020530223846, 0.041567180305719376, 0.08347772061824799, 0.04681669920682907, -0.012450416572391987, 0.0007547590648755431, -0.0124222282320261, 0.01154726929962635, 0.06352735310792923, 0.012722726911306381, -0.047517359256744385, -0.016946319490671158, -0.011325926519930363, -0.002807334763929248, -0.005138039123266935, -0.046296995133161545, -0.07415389269590378, 0.0351884625852108, 0.04539870843291283, 0.02827780321240425, -0.0006112416740506887, 0.02004982717335224, -0.06716994941234589, 0.03673698753118515, 0.005295862443745136, 0.006927271839231253, -0.014196513220667839, 0.000732473679818213, 0.04657714068889618, 0.05964193865656853, 0.010061715729534626, 0.005009720101952553, 0.05523022636771202, -0.008466321043670177, 0.001293068053200841, 0.017806360498070717, 0.03619388863444328, 0.07545873522758484, 0.07949813455343246, -0.08112550526857376, 0.05442928150296211, -0.008542275056242943, -0.0604272224009037, 0.032504353672266006, 0.01910223439335823, -0.038911815732717514, 0.024526560679078102, -0.05691903084516525, 0.0028643079567700624, -0.03205300495028496, 0.05037008598446846, -0.026457732543349266, 0.02172057330608368, 0.026082005351781845, -0.07319814711809158, 0.01702755317091942, 0.032038915902376175, 0.014159844256937504, -0.08529134094715118, -0.01717435196042061, -0.021337365731596947, 0.0028669715393334627, 0.017302455380558968, -0.03907589614391327, 0.04396161809563637, -0.05220969021320343, 0.05321837216615677, -0.052969545125961304, -0.01998959854245186, -0.013536712154746056, 0.02137974463403225, 0.016249431297183037, 0.03536098822951317, -0.033312320709228516, -0.0020883071701973677, -0.049318064004182816, 0.03273964300751686, 0.007966892793774605, -0.024762267246842384, 0.07698094844818115, 0.03660450130701065, 0.020187681540846825, 0.020793190225958824, -0.02036220394074917, -0.08851266652345657, -0.019450534135103226, -0.019699351862072945, 0.03255355358123779, 0.006343437358736992, -0.00757745373994112, 0.016373587772250175, -0.09202414005994797, 0.03124779462814331, 0.020435919985175133, 0.039044033735990524, 0.03698750585317612, -0.030123965814709663, -0.04853767156600952, 0.017160337418317795, 0.05574164167046547, 0.05091768130660057, -0.053446657955646515, -0.08700962364673615, -0.030683932825922966, 0.01824435032904148, -0.0013933555455878377, 0.06825803220272064, 0.026263991370797157, 0.038890719413757324, 0.017042942345142365, -0.021636169403791428, 0.006143227685242891, 0.01886095106601715, -0.03955521062016487, -0.02339235134422779, -0.00502155302092433, -0.033512260764837265, 0.00009574060095474124, 0.028757905587553978, 0.045777011662721634, -0.06637528538703918, -0.08810123801231384, -0.0034002219326794147, 0.046113137155771255, 0.043077144771814346, -0.004782472271472216, 0.07722974568605423, -0.05657222494482994, 0.06689652055501938, -0.05955943837761879, -0.021074671298265457, 0.012959282845258713, 0.05029875785112381, -0.05195783078670502, 0.0120863551273942, -0.0037539179902523756, 0.04467688873410225, 0.01906336098909378, -0.03722992539405823, 0.057116441428661346, 0.023170940577983856, 0.04060415178537369, 0.0028422875329852104, 0.05973020941019058, -0.05887828767299652, -0.07004474848508835, -0.00488450238481164, -0.11220593750476837, 0.07805347442626953, 0.02872287854552269, -0.012465044856071472, 0.012977718375623226, 0.015250014141201973, 0.040875453501939774, 0.04246016964316368, -0.00908720400184393, 0.051810916513204575, 0.05518171191215515, 0.010715508833527565, -0.10127659142017365, -0.05656280368566513, 0.05404601991176605, 0.053407661616802216, 0.02108496055006981, 0.005453426856547594, 0.007797097321599722, -0.028581466525793076, 0.06495942175388336, -0.000838819018099457, 0.004340803250670433, -0.025330154225230217, 0.0005586473853327334, 0.010220260359346867, -0.04375847801566124, 0.03231492638587952, -0.040052566677331924, -0.005654715932905674, -0.07593836635351181, -0.045480623841285706, 0.061574943363666534, -0.061263035982847214, 0.024348463863134384, 0.0335712768137455, 0.05115237087011337, -0.08036527037620544, 0.0959492176771164, -0.03532581403851509, -0.031648438423871994, -0.10018681734800339, 0.05555269122123718, 0.007597935386002064, 0.016003645956516266, 0.07495692372322083, -0.028934869915246964, 0.02817291021347046, -0.004916295874863863, -0.013518774881958961, -0.03109889291226864, -0.019961075857281685, 0.025823136791586876, 0.028158416971564293, -0.10907013714313507, 0.045273590832948685, 0.016117827966809273, -0.013323524035513401, 0.019265590235590935, -0.025448216125369072, 0.02011694759130478, 0.041363030672073364, -0.08211395889520645, -0.024974895641207695, 0.008903870359063148, -0.04001568257808685, -0.03352295979857445, -0.02300894819200039, -0.006617120001465082, -0.02114943414926529, -0.09263057261705399, 0.07323914021253586, -0.04174990952014923, 0.023614639416337013, 0.03496827557682991, -0.03347340226173401, 0.05626162886619568, 0.01633438467979431, 0.0706576481461525, -0.09405632317066193, -0.0062115378677845, 0.09242693334817886, -0.015478407964110374, 0.06051035597920418, 0.04991695284843445, -0.05389998480677605, -0.09365149587392807, 0.02132171206176281, 0.049209244549274445, -0.02959505282342434, -0.07207947969436646, -0.0883110761642456, -0.03383586183190346, 0.018218712881207466, -0.0591430701315403, -0.03453631326556206, -0.02510770410299301, 0.010379955172538757, -0.040726132690906525, 0.006181046832352877, -0.04331059381365776, 0.031004544347524643, 0.04103422164916992, 0.03511875122785568, 0.026640238240361214, -0.01789003796875477, -0.040565840899944305, 0.03571556881070137, 0.04962749406695366, 0.013188150711357594, 0.03736574202775955, 0.0441589429974556, 0.08353835344314575, 0.0222642682492733, 0.04310579225420952, 0.01644653081893921, -0.004452899098396301, -0.04434436932206154, 0.0032764736097306013, 0.04574785754084587, 0.08775253593921661, -0.02401290088891983, -0.031049136072397232, -0.005336869042366743, -0.03507830202579498, 0.025087401270866394, 0.024462975561618805, -0.0023582109715789557, 0.02564176172018051, 0.06322600692510605, 0.048747096210718155, -0.00380174582824111, 0.057831499725580215, 0.05644192546606064, -0.03247222304344177, 0.0030780311208218336, 0.022960474714636803, -0.04512936994433403, -0.05589504912495613, 0.07010006159543991, -0.018591681495308876, -0.03622529283165932, -0.010281712748110294, 0.02209414541721344, 0.014390719123184681, 0.03884855657815933, -0.07383368164300919, -0.016682429239153862, 0.039643190801143646, 0.041434161365032196, -0.08392155170440674, 0.07296194136142731, 0.033603083342313766, -0.025124922394752502, 0.0017855064943432808, 0.03325026482343674, -0.01979706808924675, 0.10416451096534729, -0.040712978690862656, 0.02843358926475048, -0.02592780441045761, -0.03380077704787254, 0.11353100091218948, -0.11003599315881729, 0.08268658071756363, 0.003628447884693742, -0.02920548990368843, -0.014609727077186108, -0.09271237999200821, -0.07450192421674728, 0.06005602329969406, 0.014151078648865223, 0.014069697819650173} t.Logf("Cup magnitude: %f", e.Magnitude()) - assert.True(t, e.IgnoreFace()) + assert.True(t, e.Ignored()) }) t.Run("Window", func(t *testing.T) { e := Embedding{0.02911793440580368, -0.02657805196940899, -0.05582059919834137, 0.029433075338602066, -0.010347411967813969, -0.0437883585691452, -0.01719910278916359, 0.03379708155989647, 0.040116291493177414, -0.0012780230026692152, -0.028184039518237114, 0.03558448702096939, -0.054644662886857986, 0.015985896810889244, -0.009933551773428917, -0.030867986381053925, 0.08947663009166718, 0.04410885274410248, 0.016108760610222816, -0.024095948785543442, 0.0019277503015473485, 0.061038099229335785, 0.09400294721126556, 0.011825635097920895, -0.07130510360002518, 0.05226944759488106, 0.026077503338456154, -0.002403449499979615, 0.0387146919965744, 0.02326650358736515, -0.06516426801681519, 0.038887664675712585, 0.02336987294256687, -0.05232160910964012, -0.03179354965686798, 0.01697697304189205, -0.059383973479270935, 0.017879735678434372, 0.0035271933302283287, 0.03116966411471367, -0.06499483436346054, 0.017210200428962708, -0.03446599841117859, 0.011310559697449207, 0.020511511713266373, -0.013348361477255821, 0.03540978580713272, 0.08153408765792847, -0.08863010257482529, 0.027557143941521645, -0.04153082147240639, 0.08518209308385849, 0.05460561439394951, -0.00509260967373848, -0.08393505960702896, 0.05111226066946983, -0.020677952095866203, 0.12282205373048782, 0.061678774654865265, -0.02400984615087509, -0.04075946286320686, -0.007096405141055584, -0.020884502679109573, -0.02719257026910782, -0.005751963704824448, 0.0339011549949646, -0.06634193658828735, 0.0603402741253376, -0.02390725165605545, 0.01417065691202879, 0.002856130013242364, 0.027137313038110733, 0.058229170739650726, 0.016302403062582016, -0.006456597242504358, -0.06220299378037453, -0.05931615084409714, -0.01871989108622074, -0.08259420096874237, -0.019265370443463326, 0.007964858785271645, 0.03329536318778992, -0.009261127561330795, 0.03060186095535755, -0.041915785521268845, -0.02041928470134735, 0.004344126209616661, 0.02770347334444523, -0.06137992814183235, -0.022406261414289474, 0.0051990654319524765, -0.011708610691130161, 0.07265359163284302, -0.036635641008615494, 0.027904348447918892, -0.010735378600656986, -0.021341411396861076, 0.04975174739956856, -0.06281881034374237, -0.05822886526584625, 0.04163268953561783, 0.016820937395095825, -0.04927929863333702, -0.01128738559782505, 0.08849763125181198, -0.026227008551359177, 0.04043696075677872, -0.0010101052466779947, 0.017911851406097412, -0.07956790179014206, 0.07445459812879562, 0.006290021352469921, -0.0765388235449791, -0.07569659501314163, 0.056237876415252686, -0.034641217440366745, 0.05620419234037399, -0.022589176893234253, -0.02227533422410488, -0.024665959179401398, -0.027809448540210724, 0.026454370468854904, -0.0012154135620221496, -0.0281841978430748, -0.06634492427110672, -0.06074248254299164, 0.010864422656595707, 0.04182087257504463, 0.01839812658727169, -0.03266937658190727, -0.06528614461421967, 0.0019207947188988328, 0.03016660176217556, -0.05803235247731209, -0.07951787859201431, -0.00947436410933733, -0.07019511610269547, 0.015433420427143574, 0.0848907008767128, 0.0642448365688324, -0.005741069093346596, 0.05455503240227699, -0.009055864997208118, 0.04258446395397186, 0.038894496858119965, -0.027821457013487816, 0.0075020152144134045, -0.03795981407165527, 0.014150748029351234, 0.05680326744914055, 0.06952846050262451, 0.010174200870096684, -0.003917880821973085, 0.01599237136542797, 0.020336398854851723, 0.016038110479712486, -0.03700350224971771, -0.008327248506247997, 0.038398850709199905, -0.10057638585567474, 0.061393484473228455, 0.036584705114364624, -0.020751893520355225, 0.05094417184591293, 0.07093091309070587, 0.0025936472229659557, -0.008558832108974457, 0.0045006731525063515, -0.058181680738925934, 0.02719442918896675, -0.005936834029853344, -0.07664960622787476, -0.04825340956449509, -0.05500617250800133, 0.007463700138032436, 0.03628788888454437, -0.08027489483356476, -0.017566995695233345, 0.06691382080316544, 0.020471086725592613, -0.03597363457083702, -0.05336826294660568, -0.04296419024467468, 0.002566613256931305, 0.028471486642956734, 0.023728083819150925, -0.037878721952438354, 0.024699172005057335, -0.02210160531103611, 0.033050600439310074, 0.11090678721666336, -0.06724068522453308, -0.011181749403476715, -0.005420798901468515, 0.1024690791964531, -0.04223097115755081, -0.057751160115003586, 0.012521141208708286, -0.03643505275249481, 0.05981193855404854, 0.04434889927506447, 0.03706434369087219, -0.052842456847429276, -0.025779925286769867, 0.03062680922448635, 0.025187751278281212, 0.04791240021586418, -0.10419069975614548, 0.0033473209477961063, -0.01841050013899803, 0.04840228334069252, 0.01573493331670761, -0.018114393576979637, 0.018285470083355904, -0.038850653916597366, 0.0104988943785429, 0.01910373382270336, 0.011977719143033028, -0.0056076496839523315, -0.0026072650216519833, -0.053923435509204865, -0.05239752307534218, -0.02477901801466942, -0.08253784477710724, 0.025321971625089645, -0.009751998819410801, -0.033649805933237076, 0.10457976907491684, 0.014464314095675945, 0.02956053614616394, 0.02083662897348404, -0.049254704266786575, 0.008172950707376003, -0.02802124433219433, -0.019159022718667984, -0.014537503942847252, 0.024371227249503136, -0.043627120554447174, 0.011588520370423794, -0.06162629649043083, 0.027166591957211494, -0.07471424341201782, 0.08610502630472183, -0.0035992907360196114, 0.06477395445108414, 0.07061174511909485, -0.06775729358196259, 0.017505306750535965, -0.014613572508096695, -0.007782674394547939, 0.020995941013097763, 0.032021209597587585, -0.010559371672570705, 0.03692861273884773, -0.007089415565133095, -0.02570454776287079, 0.014890582300722599, -0.0014478290686383843, 0.04698558896780014, -0.001595232984982431, -0.027973409742116928, -0.06259539723396301, 0.015755729749798775, 0.042637281119823456, -0.05503348633646965, -0.03362675756216049, 0.07771629095077515, -0.05364986136555672, -0.018186716362833977, 0.04623029753565788, -0.012736326083540916, 0.023434551432728767, 0.020245874300599098, 0.06203334033489227, -0.013105535879731178, -0.04606945440173149, -0.04155709594488144, 0.08044987171888351, -0.02282041497528553, -0.054206639528274536, 0.033670295029878616, -0.002611258067190647, 0.03710491955280304, -0.1022791862487793, -0.01903601735830307, 0.018292216584086418, 0.04077790305018425, -0.00397401861846447, -0.04288841411471367, -0.05435892194509506, 0.001978822285309434, -0.008545175194740295, 0.02804577350616455, -0.0483548603951931, -0.07188912481069565, -0.08567944914102554, 0.0023146362509578466, -0.004301212262362242, 0.0437830425798893, 0.004908181261271238, 0.06009092926979065, -0.0013609864981845021, -0.03463510796427727, 0.04823419079184532, 0.0027413314674049616, -0.03981701284646988, -0.03749029338359833, -0.05680685117840767, 0.04015055298805237, 0.04504672810435295, 0.021967031061649323, -0.0070725553669035435, -0.04244669899344444, -0.011021360754966736, 0.002556811086833477, 0.026144100353121758, 0.022996535524725914, 0.03930694982409477, 0.0805368646979332, -0.052306707948446274, -0.011729497462511063, 0.020011156797409058, -0.021863561123609543, 0.054033637046813965, -0.04380829259753227, 0.03462866693735123, 0.005561060272157192, 0.02123917080461979, 0.036273010075092316, 0.013665425591170788, -0.016265617683529854, 0.00849177036434412, 0.02091488055884838, 0.05537859722971916, -0.0009296822245232761, -0.044729772955179214, -0.013201156631112099, -0.04404592886567116, 0.05378791317343712, -0.09276770055294037, 0.05502057820558548, 0.03120020218193531, 0.004499764647334814, -0.014770730398595333, -0.0005987307522445917, 0.0005041692638769746, 0.001439673942513764, 0.01816864125430584, 0.06850360333919525, 0.0015913645038381219, 0.06125645712018013, -0.023225722834467888, -0.054615262895822525, -0.0388643853366375, -0.03034493699669838, 0.02625128999352455, 0.019644569605588913, 0.016655875369906425, -0.01681300438940525, 0.0424853190779686, -0.028417114168405533, 0.001190638286061585, 0.0023888079449534416, 0.0388503298163414, 0.023136021569371223, 0.009953195229172707, 0.08297811448574066, -0.039209429174661636, 0.04466947168111801, -0.07943809032440186, -0.11884154379367828, 0.05406811460852623, -0.005009778775274754, -0.01282230019569397, 0.09129441529512405, 0.10110490769147873, -0.053814250975847244, 0.0456453338265419, -0.02388603985309601, -0.016806097701191902, -0.05704531446099281, -0.023061273619532585, -0.04818015918135643, 0.08812825381755829, 0.07932434231042862, 0.037987761199474335, 0.017215553671121597, 0.000956085801590234, -0.02895890735089779, -0.03207133337855339, 0.02317795902490616, 0.051888708025217056, 0.021641472354531288, -0.0573309101164341, -0.015206899493932724, 0.005721524823457003, 0.046972595155239105, -0.0071283970028162, 0.0010179923847317696, -0.009326724335551262, 0.02622980810701847, -0.0441557802259922, 0.0014963631983846426, 0.042699314653873444, -0.011078293435275555, -0.03397537022829056, -0.06883902102708817, -0.02404836378991604, -0.016223328188061714, -0.017116909846663475, 0.07850213348865509, 0.0011684182099997997, -0.055834878236055374, 0.036523766815662384, -0.055808424949645996, 0.03357178717851639, 0.03164798021316528, 0.02297123149037361, -0.03571857511997223, -0.039285849779844284, 0.05847541242837906, 0.01003316044807434, 0.04982317239046097, -0.006880565080791712, -0.09735269844532013, -0.07573311030864716, 0.052646927535533905, 0.013141392730176449, -0.04452533274888992, -0.02631550282239914, -0.019277768209576607, 0.011394030414521694, -0.031440719962120056, -0.003719296073541045, -0.07334233820438385, -0.015069697052240372, -0.020505040884017944, 0.009671908803284168, 0.08794745057821274, 0.01165361050516367, 0.0011308048851788044, 0.05189745873212814, 0.031029099598526955, 0.01595052145421505, 0.00978169497102499, -0.004756065085530281, -0.07681659609079361, 0.04254371300339699, 0.0035952283069491386, -0.019414318725466728, 0.020107369869947433, 0.0947345495223999, -0.01656467653810978, 0.01574030891060829, 0.029396992176771164, -0.006667194422334433, -0.049987971782684326, 0.04558682441711426, 0.10567794740200043, 0.062466882169246674, 0.011380662210285664, -0.03236931934952736, -0.02642352692782879, -0.03477538004517555, 0.03161207213997841, 0.00296088308095932, -0.0439484678208828, 0.05153980478644371, 0.05486668646335602, 0.06256739050149918, -0.025777840986847878, 0.01087973639369011, 0.0968063697218895, -0.07499328255653381, -0.03420738875865936, 0.036994386464357376, 0.026577066630125046, -0.009130851365625858, 0.014268516562879086, -0.018918536603450775, 0.03861630707979202, 0.03421098366379738, 0.014280983246862888, 0.0026093756314367056, 0.04012279957532883, -0.01649044081568718, -0.059231702238321304, 0.08990202099084854, 0.06901304423809052, -0.1075073778629303, 0.0744258314371109, -0.029666820541024208, -0.04933129623532295, -0.02978212758898735, 0.058902956545352936, 0.03109016828238964, 0.003959085326641798, 0.049945730715990067, 0.06493376195430756, -0.051935844123363495, -0.0834219679236412, 0.08662208914756775, -0.015829479321837425, 0.08935528248548508, 0.02228694036602974, -0.00004407033702591434, 0.01757136732339859, -0.030932733789086342, -0.07185200601816177, 0.014429250732064247, 0.02448366954922676, -0.0506591796875} t.Logf("Window magnitude: %f", e.Magnitude()) - t.Logf("Window blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Window blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Dalmatian", func(t *testing.T) { e := Embedding{0.026646258309483528, -0.027234680950641632, -0.046598002314567566, 0.03628503158688545, -0.018819356337189674, 0.007703959476202726, -0.032692212611436844, 0.12524119019508362, -0.019190849736332893, -0.005543830338865519, 0.006821943446993828, 0.09052197635173798, 0.0026234982069581747, -0.042261600494384766, -0.0015102076577022672, -0.07758268713951111, -0.013937989249825478, 0.0002279259788338095, -0.009208843111991882, -0.03529713675379753, -0.09800537675619125, 0.04205315560102463, 0.01071444246917963, -0.06714940071105957, -0.016024576500058174, -0.017938051372766495, -0.004281200468540192, -0.003906877711415291, 0.03909142687916756, 0.0683499202132225, -0.006580389104783535, -0.02470361813902855, 0.013347705826163292, -0.02134637162089348, -0.01637570559978485, -0.0018088578945025802, -0.05121270939707756, 0.017718825489282608, -0.0267690047621727, 0.0736365020275116, 0.03339534252882004, 0.030867744237184525, 0.011860023252665997, -0.01027654204517603, -0.012793825007975101, 0.040147166699171066, -0.024491481482982635, 0.035660892724990845, -0.05980999022722244, -0.07612340152263641, 0.00834803655743599, -0.004732488188892603, 0.043393850326538086, -0.0017798622138798237, -0.06645412743091583, 0.060781680047512054, -0.03432569280266762, 0.09253647923469543, -0.040562063455581665, 0.02240123227238655, -0.08719266206026077, 0.027310427278280258, -0.04967907816171646, -0.029913850128650665, -0.02556425891816616, 0.04354802519083023, -0.020857322961091995, -0.007945463061332703, 0.002865595044568181, -0.07649020105600357, 0.07630413770675659, 0.04261307045817375, -0.02928168699145317, -0.05996842682361603, 0.036596719175577164, -0.0691286027431488, -0.016534283757209778, -0.025427108630537987, -0.005348315462470055, 0.015645360574126244, -0.004603080451488495, 0.011040807701647282, 0.05554540082812309, -0.03575444966554642, -0.0004593868216034025, -0.00724007049575448, -0.004787648096680641, -0.01000897865742445, 0.020312050357460976, 0.008837522938847542, 0.042510878294706345, -0.01644499972462654, 0.024724218994379044, -0.1185469701886177, -0.012266467325389385, -0.03088436648249626, 0.017647063359618187, 0.010768704116344452, -0.09721033275127411, 0.07860993593931198, 0.004318119492381811, 0.03094315342605114, 0.08767559379339218, 0.052156757563352585, 0.06397729367017746, 0.0370735228061676, 0.024893201887607574, 0.02925868332386017, 0.037951886653900146, -0.044335462152957916, 0.05891245976090431, 0.07784770429134369, -0.06189887225627899, 0.002108003245666623, 0.058803822845220566, 0.054515473544597626, 0.0466577410697937, 0.04859960824251175, -0.004205063916742802, -0.0227779783308506, -0.05351591482758522, 0.06318030506372452, -0.004482760094106197, -0.07996728271245956, 0.016884665936231613, -0.0314750038087368, -0.029315950348973274, -0.003455169266089797, 0.000278834777418524, -0.0362372063100338, -0.04891921952366829, -0.03789520636200905, 0.07659225165843964, 0.01648969203233719, -0.04136713594198227, 0.020139314234256744, -0.03831976279616356, 0.02926899679005146, 0.09600241482257843, 0.06205567717552185, -0.008440036326646805, 0.013345755636692047, -0.01746530644595623, 0.06611013412475586, 0.02675841748714447, 0.0390179269015789, -0.07807181775569916, 0.03523588553071022, 0.027623990550637245, 0.018078066408634186, 0.08260850608348846, -0.03682425990700722, -0.05607173591852188, 0.03175996243953705, 0.07956872135400772, 0.0015851265052333474, 0.06806983053684235, -0.004079481586813927, -0.05854551121592522, 0.02332674153149128, 0.037818148732185364, 0.013924544677138329, -0.06151168793439865, -0.02128257229924202, 0.07897766679525375, 0.08932406455278397, 0.0022109244018793106, -0.007865920662879944, -0.10105230659246445, 0.10908880829811096, -0.051295846700668335, -0.0006763980491086841, -0.00981240626424551, 0.008709346875548363, 0.029637020081281662, -0.002898978069424629, 0.09623362123966217, -0.09953208267688751, -0.048222459852695465, -0.0282367505133152, 0.003294126596301794, -0.016644049435853958, 0.031007293611764908, 0.00820146594196558, 0.024699145928025246, 0.029636673629283905, 0.023872297257184982, -0.034153442829847336, 0.03693559393286705, -0.011865675449371338, 0.05607692152261734, 0.012380012311041355, 0.06414782255887985, -0.07196776568889618, 0.08656994998455048, 0.01843082346022129, 0.05273249372839928, 0.019780179485678673, 0.027549799531698227, -0.03615277260541916, -0.04024089500308037, -0.03679996356368065, 0.04048161208629608, -0.07094372808933258, 0.02751721628010273, 0.03590704873204231, 0.0030472087673842907, 0.01744101382791996, 0.045789457857608795, 0.03111567534506321, -0.04604488983750343, -0.020041359588503838, -0.02614283375442028, 0.0004471387655939907, 0.02540448307991028, -0.019564010202884674, -0.03379834070801735, 0.022784898057579994, -0.027518462389707565, -0.024399511516094208, -0.05583765730261803, -0.005633528344333172, -0.011563356965780258, -0.09494444727897644, -0.01054051611572504, 0.008248037658631802, 0.0011248791124671698, 0.04045868292450905, 0.01259907241910696, 0.06069809943437576, -0.0144270034506917, 0.06897660344839096, -0.04331396892666817, -0.06552129238843918, -0.030034324154257774, 0.024715837091207504, -0.010362811386585236, -0.009781135246157646, -0.033470213413238525, -0.03285818174481392, -0.04677248001098633, -0.0074976710602641106, 0.04469340294599533, 0.008604122325778008, 0.08773165941238403, 0.025361603125929832, -0.016623906791210175, -0.018919937312602997, -0.03005106933414936, -0.02666456624865532, 0.0837448239326477, 0.11036281287670135, 0.02056243270635605, 0.03098408132791519, 0.030305607244372368, 0.005301784258335829, 0.05114784464240074, -0.009261532686650753, 0.004074763506650925, 0.05239688605070114, 0.03687426447868347, -0.010143129155039787, -0.018807440996170044, -0.024822933599352837, -0.0636371374130249, -0.02486196532845497, 0.03723008930683136, 0.012254804372787476, -0.08644507825374603, -0.010275773704051971, -0.11856245249509811, 0.034491922706365585, -0.0010990106966346502, -0.019038153812289238, -0.04945534095168114, -0.07139872759580612, 0.004871743731200695, -0.06853078305721283, 0.018731841817498207, -0.013382633216679096, 0.020101619884371758, 0.12438402324914932, -0.06628888100385666, -0.06533245742321014, -0.08286300301551819, 0.017836647108197212, 0.05333803966641426, 0.022407781332731247, -0.029853880405426025, -0.07487902790307999, -0.03070046752691269, -0.035446736961603165, 0.03027864173054695, 0.038236103951931, 0.03422371670603752, -0.0032161506824195385, 0.04238798841834068, 0.005765004549175501, -0.022580718621611595, 0.08893970400094986, 0.05571730434894562, -0.02083916962146759, 0.004051415715366602, -0.03710080683231354, -0.05099838972091675, -0.07020294666290283, 0.013165383599698544, -0.03769316151738167, -0.02710675075650215, 0.031139710918068886, -0.008093186654150486, -0.023726828396320343, -0.004489372484385967, 0.029533397406339645, 0.0659969300031662, -0.024000834673643112, 0.02143634855747223, -0.052298542112112045, 0.01584985852241516, -0.007323301862925291, 0.06828799098730087, 0.048178475350141525, -0.0418487973511219, 0.03664831444621086, 0.017161216586828232, -0.02329673059284687, 0.034718107432127, 0.010494607500731945, 0.02592475898563862, 0.022769737988710403, 0.045960888266563416, 0.02430117502808571, 0.02357560768723488, 0.047512900084257126, 0.050311360508203506, 0.0026949334423989058, -0.0326329842209816, 0.07400642335414886, 0.0004001592460554093, 0.035992905497550964, 0.037017710506916046, -0.031365130096673965, 0.041706863790750504, 0.01779109798371792, -0.003434921847656369, -0.07067946344614029, 0.005030053202062845, -0.0012725003762170672, 0.06871958822011948, -0.016166366636753082, 0.0036190059036016464, 0.023692963644862175, -0.05347966402769089, -0.019849369302392006, -0.05886821821331978, 0.0007735646213404834, 0.05689377710223198, 0.02194727212190628, -0.04168907552957535, -0.005047735292464495, 0.023749111220240593, 0.026664279401302338, -0.08855626732110977, 0.04574701189994812, 0.001004935009405017, 0.012404043227434158, 0.03595005348324776, 0.04267893731594086, -0.024806920439004898, 0.031158672645688057, -0.00901742372661829, -0.07420548051595688, 0.02588438242673874, -0.02817189134657383, -0.009802385233342648, 0.0007581425015814602, 0.0076921246945858, -0.032944757491350174, 0.04138611629605293, -0.0819862112402916, -0.07433368265628815, -0.04014160856604576, -0.07294953614473343, -0.009471649304032326, -0.0048404112458229065, -0.01834850013256073, 0.008153703995049, -0.09898816794157028, -0.006675191689282656, -0.06303300708532333, 0.08737976849079132, 0.06719458848237991, -0.044175732880830765, -0.08292863517999649, 0.048659421503543854, 0.027445347979664803, 0.09764395654201508, -0.007413069251924753, 0.04494934156537056, 0.0887129157781601, -0.024246713146567345, 0.10906267911195755, 0.011435465887188911, 0.0756140872836113, -0.039372608065605164, -0.033034346997737885, -0.0007861556368879974, -0.04882461205124855, 0.0369054414331913, 0.008680860511958599, 0.019461344927549362, -0.022704727947711945, -0.013094273395836353, -0.0757276713848114, -0.05773172155022621, 0.0034368447959423065, -0.017915256321430206, 0.02795783430337906, 0.027839262038469315, -0.03349648416042328, 0.05034312233328819, 0.05156104266643524, -0.02368897758424282, 0.008080405183136463, -0.050456903874874115, -0.0777718722820282, -0.0035410227719694376, -0.05132525414228439, 0.012731142342090607, -0.02978540025651455, 0.03752249851822853, 0.08143523335456848, 0.027472535148262978, 0.03480103611946106, -0.07347465306520462, -0.06258952617645264, 0.007371994201093912, -0.012934684753417969, -0.01935151219367981, 0.02408112771809101, -0.035528119653463364, 0.0002917046658694744, 0.030841760337352753, 0.0096122520044446, 0.0003891165542881936, 0.03238602727651596, -0.035068318247795105, -0.07111231237649918, -0.03920498490333557, -0.09298393875360489, -0.033098842948675156, -0.010599478147923946, 0.01509090419858694, -0.005317585542798042, 0.04166068881750107, 0.04849447309970856, 0.036215078085660934, -0.004265950061380863, -0.017442351207137108, -0.02511746622622013, 0.03561961278319359, -0.0070447479374706745, 0.04111465439200401, -0.1030883863568306, -0.0038648878689855337, -0.017859311774373055, 0.012498666532337666, -0.011417094618082047, -0.06500793248414993, -0.022498993203043938, 0.0019853103440254927, -0.012897524051368237, 0.0801575779914856, -0.03934445232152939, -0.017590245231986046, 0.03284640982747078, 0.0349578820168972, -0.029724160209298134, 0.018992137163877487, 0.06570129841566086, 0.026866722851991653, 0.0253378264605999, 0.016735579818487167, -0.018076324835419655, 0.07716136425733566, 0.015892326831817627, -0.11567492038011551, -0.04783870279788971, -0.012479908764362335, 0.03499581292271614, -0.06888748705387115, -0.00044733111280947924, -0.05065196007490158, -0.06457473337650299, 0.05067094415426254, -0.025969132781028748, -0.0011521957349032164, -0.015634486451745033, -0.011258309707045555, 0.019092096015810966, -0.05213501304388046, -0.002810249337926507, 0.00647676270455122, -0.031403470784425735, 0.023617204278707504, 0.009010065346956253, 0.004353594034910202, 0.055391326546669006, 0.03347782418131828, -0.011441335082054138, -0.02407366968691349, -0.046123284846544266} t.Logf("Dalmatian magnitude: %f", e.Magnitude()) - t.Logf("Dalmatian blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Dalmatian blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Hair1", func(t *testing.T) { e := Embedding{-0.02186507359147072, -0.02343287505209446, 0.012334531173110008, 0.06589528173208237, 0.003181028412654996, 0.023103436455130577, -0.033060502260923386, 0.04050910100340843, -0.04571661353111267, -0.016881445422768593, -0.02440449222922325, 0.0627303197979927, 0.013221108354628086, -0.017312059178948402, -0.03989502415060997, 0.030291154980659485, 0.015385689213871956, 0.03833505138754845, -0.03853273391723633, -0.06539343297481537, -0.047265298664569855, -0.005378637928515673, 0.011277339421212673, 0.023217234760522842, 0.012571279890835285, 0.012044169008731842, 0.007989807985723019, -0.03285067155957222, 0.01388829480856657, 0.06479942798614502, -0.05244818329811096, -0.050881389528512955, 0.004368424881249666, -0.039944764226675034, -0.04860450327396393, 0.06007057800889015, -0.024117710068821907, -0.027301909402012825, -0.06967205554246902, 0.07871851325035095, -0.0049963453784585, 0.05830663815140724, 0.0017558529507368803, -0.0029655308462679386, 0.0022946924436837435, 0.0948474183678627, 0.054396852850914, 0.06009141355752945, -0.01731225848197937, -0.019688088446855545, -0.006394019816070795, 0.04341787472367287, 0.020347202196717262, 0.0295484010130167, -0.02720114029943943, 0.04617561027407646, 0.05694594606757164, 0.01914539560675621, 0.01043949369341135, -0.026747386902570724, -0.019355246797204018, -0.013019140809774399, 0.010485176928341389, -0.03908209130167961, -0.025765586644411087, 0.10351331532001495, -0.03676328808069229, 0.025375237688422203, 0.027708711102604866, -0.011420972645282745, 0.04914155602455139, 0.04410508647561073, 0.05510319024324417, 0.005535257514566183, -0.026457522064447403, 0.021328607574105263, -0.0862191691994667, 0.023158293217420578, -0.01705312915146351, 0.0352226085960865, 0.050656940788030624, -0.04597005993127823, 0.06266540288925171, 0.07038892060518265, -0.005098729860037565, 0.030597317963838577, -0.0023044119589030743, 0.04612474888563156, 0.04337996616959572, 0.011935937218368053, -0.014555811882019043, 0.039222728461027145, -0.013018335215747356, -0.007112194783985615, 0.04548836499452591, -0.06039473041892052, -0.06223556026816368, -0.00940612331032753, -0.0333172008395195, 0.04146142303943634, 0.030734900385141373, -0.026868222281336784, -0.005701250862330198, 0.04213353246450424, 0.049119483679533005, 0.01556873507797718, 0.03767542541027069, -0.0792568027973175, -0.010347368195652962, -0.07231560349464417, -0.024369049817323685, 0.06508026272058487, -0.06497415155172348, -0.005637121386826038, 0.0016806387575343251, -0.027321230620145798, -0.006407047621905804, -0.01755347289144993, -0.03195110335946083, -0.06080681085586548, 0.0011495030485093594, -0.04538745433092117, -0.0031417023856192827, -0.0687950849533081, 0.025956306606531143, -0.05747046321630478, -0.04319126531481743, 0.05188388004899025, 0.05193556472659111, -0.03580246865749359, 0.033515315502882004, -0.023215007036924362, -0.010482209734618664, 0.003323460230603814, -0.029377244412899017, 0.005186772905290127, -0.033111829310655594, 0.01790827140212059, 0.009473776444792747, 0.07845223695039749, 0.007859498262405396, 0.029412848874926567, -0.008103846572339535, 0.005843850784003735, 0.06390887498855591, -0.02585470862686634, 0.008810088038444519, -0.027372995391488075, 0.005474025383591652, 0.03221543878316879, 0.06743903458118439, -0.08745471388101578, -0.0313003771007061, 0.0670057162642479, -0.016054192557930946, 0.010099897161126137, 0.05560088902711868, -0.003228723304346204, -0.06843406707048416, -0.019763188436627388, 0.041721753776073456, 0.0322103276848793, -0.09497141093015671, 0.008731914684176445, 0.023821836337447166, 0.03971601650118828, -0.049941323697566986, -0.0052082655020058155, -0.04125530272722244, -0.02955256775021553, -0.05284795165061951, -0.031147681176662445, -0.020690610632300377, 0.02056681551039219, 0.0300931166857481, 0.021964510902762413, 0.0940595343708992, -0.07598525285720825, -0.014555050060153008, -0.029066354036331177, -0.0361894816160202, -0.03464911878108978, 0.0294784065335989, 0.046739283949136734, 0.013800876215100288, 0.033814966678619385, 0.03995446488261223, -0.0060543036088347435, -0.006773496046662331, -0.04320034384727478, -0.0007653564098291099, 0.04266098514199257, 0.033065639436244965, -0.021329058334231377, 0.040674179792404175, -0.04022622108459473, -0.009163843467831612, -0.02263103425502777, -0.0017387907719239593, 0.07157322764396667, -0.07054857909679413, 0.03882239758968353, -0.04831436276435852, -0.023874027654528618, -0.008721361868083477, 0.018243463709950447, -0.020765915513038635, 0.049232117831707, 0.021059267222881317, -0.032627977430820465, -0.02802090346813202, 0.00990067794919014, 0.0002113313676090911, 0.03829136863350868, -0.02960396371781826, 0.0006424871389754117, -0.09077048301696777, 0.07731141895055771, -0.01742955669760704, 0.02896827459335327, -0.08997362852096558, -0.05931659787893295, -0.032005082815885544, -0.07028943300247192, -0.003746600355952978, 0.015777645632624626, -0.08993984013795853, 0.02712121419608593, 0.013001562096178532, 0.04171518608927727, -0.015890678390860558, 0.023585813120007515, -0.031072892248630524, -0.057539425790309906, 0.005541072227060795, -0.0834437683224678, 0.039466459304094315, 0.011791035532951355, -0.016843870282173157, 0.002218683483079076, 0.02723301202058792, -0.004065515007823706, 0.03550812602043152, 0.04505772516131401, 0.014466912485659122, 0.02242622897028923, -0.055771149694919586, 0.0552775114774704, -0.011244548484683037, -0.05873364210128784, 0.10357419401407242, 0.04638461023569107, -0.009525592438876629, 0.04342067986726761, 0.023703480139374733, 0.07711437344551086, 0.013369210995733738, 0.07057002931833267, 0.04166711866855621, 0.10292782634496689, 0.02096669375896454, -0.04913197085261345, -0.02238919772207737, 0.049232978373765945, -0.06740923225879669, 0.0001948919816641137, 0.07494483143091202, -0.01998022384941578, -0.010823297314345837, 0.0742516815662384, -0.08634816110134125, -0.10709606111049652, 0.012155032716691494, -0.04642106592655182, 0.0031527455430477858, -0.017490748316049576, 0.010762923397123814, 0.025190245360136032, -0.022009123116731644, -0.014452231116592884, 0.03678946569561958, 0.0048712450079619884, -0.06687389314174652, -0.016870591789484024, -0.07956214249134064, 0.028733929619193077, -0.03633692488074303, -0.04127155616879463, 0.03138130530714989, -0.030540868639945984, 0.012475420720875263, -0.058738406747579575, 0.009036359377205372, -0.019230077043175697, 0.016125639900565147, -0.018295729532837868, 0.0026537803933024406, 0.019546540454030037, -0.018815185874700546, 0.035081736743450165, 0.044899675995111465, -0.0377112478017807, 0.10825715214014053, -0.010111951269209385, 0.0013025443768128753, -0.05451561138033867, 0.03181266412138939, -0.057572945952415466, -0.03310608118772507, -0.05680757761001587, 0.024739820510149002, -0.03788967803120613, -0.025704268366098404, 0.033602651208639145, 0.02746254950761795, -0.014232141897082329, -0.07502280920743942, 0.027720773592591286, 0.0008490365580655634, 0.08184535056352615, 0.0019373855320736766, 0.03436217084527016, 0.01792270876467228, 0.06180305778980255, -0.022957345470786095, 0.036776088178157806, 0.04908819496631622, 0.0055131446570158005, 0.04661300778388977, 0.056201737374067307, 0.029172629117965698, -0.07408027350902557, -0.0063392589800059795, -0.026280997321009636, 0.0345616452395916, -0.026827573776245117, 0.07769934833049774, 0.018136583268642426, 0.017556458711624146, 0.0369984470307827, -0.04605568200349808, -0.00034705211874097586, 0.058896504342556, -0.023098155856132507, -0.046520281583070755, -0.008038979955017567, -0.016580745577812195, 0.05753606557846069, 0.06145307794213295, 0.024370193481445312, 0.08348362892866135, 0.0884450376033783, -0.003356358502060175, -0.08212625235319138, -0.06463661044836044, -0.020628847181797028, -0.02762742154300213, 0.04919709637761116, -0.03425033390522003, -0.0419468879699707, -0.01633688248693943, -0.009391408413648605, -0.004303722642362118, -0.0034849306102842093, 0.05811161920428276, 0.023470157757401466, 0.07913243025541306, 0.03348318859934807, -0.06512626260519028, 0.025306714698672295, -0.040098171681165695, -0.08123191446065903, 0.07536390423774719, -0.04337701201438904, 0.0728081613779068, 0.03539746254682541, 0.009888707660138607, -0.05766364559531212, -0.026785075664520264, 0.029108818620443344, -0.01800093613564968, -0.051825977861881256, -0.07949819415807724, 0.03059769980609417, -0.043246686458587646, 0.03567437827587128, -0.0159920547157526, -0.1025632694363594, 0.013610861264169216, -0.00143863121047616, 0.00936894305050373, 0.007849413901567459, -0.07691975682973862, -0.04766712337732315, 0.0008854612824507058, 0.05160164460539818, 0.0736081600189209, -0.04824114963412285, -0.021663526073098183, 0.031366683542728424, -0.08146066218614578, 0.05221071094274521, -0.030445555225014687, 0.0318172313272953, -0.012792552821338177, 0.01565302535891533, 0.02002139389514923, 0.003897114424034953, -0.006562490947544575, 0.038324978202581406, -0.03154256194829941, -0.04699084907770157, 0.04745260626077652, 0.028746385127305984, -0.0417412631213665, 0.031400348991155624, -0.015578853897750378, 0.010591003112494946, 0.022084997966885567, 0.015942564234137535, -0.04243066534399986, 0.0399642214179039, -0.041381921619176865, -0.04037219285964966, -0.0565185472369194, -0.00825568288564682, 0.014783812686800957, -0.0370330773293972, 0.07193450629711151, 0.007179559208452702, 0.060542281717061996, 0.055761680006980896, 0.006954664830118418, 0.08003195375204086, -0.1078958809375763, -0.0034260102547705173, -0.003283640369772911, 0.08042386174201965, 0.03910432383418083, 0.016319414600729942, -0.050928469747304916, 0.032910145819187164, -0.05117615684866905, -0.024145659059286118, 0.011494588106870651, 0.08348812907934189, -0.04891537129878998, -0.049403224140405655, -0.06035155430436134, -0.11147603392601013, -0.019970079883933067, 0.038283705711364746, 0.1048283651471138, -0.04033345729112625, 0.02842160128057003, -0.016713451594114304, 0.08932913839817047, 0.07279515266418457, -0.002659780904650688, 0.0063094692304730415, -0.019364261999726295, -0.031528450548648834, 0.03371338173747063, -0.027063041925430298, 0.05413629487156868, 0.01165601797401905, -0.07764656096696854, -0.024608829990029335, -0.0023769447579979897, -0.03337009623646736, -0.03780199959874153, 0.003398125059902668, 0.027612922713160515, -0.01955243945121765, -0.06535094976425171, -0.0473538339138031, 0.0770038291811943, -0.007759930100291967, -0.04642774164676666, 0.09121515601873398, 0.07967960089445114, -0.00670990813523531, -0.000026235093173454516, -0.03997980058193207, 0.07913265377283096, 0.08137226104736328, -0.054963305592536926, -0.04027187451720238, 0.042858440428972244, 0.021043742075562477, -0.08569692075252533, -0.062682144343853, -0.03156895563006401, -0.013686256483197212, 0.015510676428675652, -0.0723404586315155, -0.020010625943541527, 0.07138247787952423, 0.015610286965966225, 0.02059394307434559, -0.06863471865653992, -0.05084877088665962, 0.0388568714261055, 0.038771431893110275, -0.0703396201133728, 0.04458151385188103, 0.0920683890581131, 0.08748011291027069, 0.049037013202905655, -0.03518988564610481, 0.021881869062781334, -0.042361557483673096} t.Logf("Hair1 magnitude: %f", e.Magnitude()) - t.Logf("Hair1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Hair1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Hair2", func(t *testing.T) { e := Embedding{-0.07056678831577301, -0.03332336246967316, 0.08463431894779205, 0.06696385145187378, 0.005142074543982744, -0.06524451076984406, -0.07349174469709396, -0.06319113075733185, 0.016687868162989616, -0.034913621842861176, 0.03476087749004364, 0.018713563680648804, -0.0018297286005690694, 0.018387986347079277, 0.05654005706310272, 0.005042634904384613, -0.015201602131128311, 0.0770261362195015, 0.024004312232136726, 0.036976199597120285, -0.002464086515828967, 0.02513919584453106, 0.016641883179545403, -0.021559180691838264, -0.06449621170759201, 0.060183122754096985, 0.01581723988056183, -0.007955816574394703, 0.02477899380028248, 0.020169220864772797, -0.021087637171149254, 0.050271932035684586, -0.013380712829530239, -0.030434612184762955, -0.07422660291194916, -0.032203953713178635, -0.02195470780134201, 0.03863530978560448, -0.039519138634204865, 0.06319011747837067, -0.05499489605426788, -0.007015233393758535, 0.006444621365517378, 0.049160201102495193, -0.03823341429233551, -0.08745429664850235, 0.07455123215913773, 0.04647452384233475, -0.0650848001241684, 0.028375139459967613, -0.03140963986515999, 0.09503776580095291, 0.04979921877384186, 0.022749848663806915, 0.028820687904953957, -0.007359408773481846, 0.02711997926235199, 0.034156106412410736, -0.024450475350022316, 0.006517508998513222, -0.014555424451828003, -0.018514933064579964, 0.0022120303474366665, -0.0132994269952178, 0.04736936092376709, 0.07562895864248276, -0.1448953002691269, 0.0037868882063776255, -0.09171698242425919, -0.037389885634183884, 0.03342403098940849, 0.043034572154283524, 0.06563864648342133, -0.06330602616071701, -0.04816831275820732, 0.022747745737433434, 0.013718266040086746, -0.03997776284813881, -0.039804499596357346, -0.05902743712067604, 0.012449015863239765, -0.04033438861370087, 0.012104171328246593, 0.016236258670687675, 0.028925010934472084, -0.03236094489693642, -0.06139582395553589, 0.06753940880298615, -0.008502204902470112, 0.0365002267062664, 0.06811824440956116, 0.0575312003493309, 0.020441686734557152, 0.040743909776210785, -0.003850004868581891, -0.048101894557476044, -0.02956753969192505, -0.00430340925231576, 0.01596318744122982, -0.012729411013424397, -0.00530171999707818, -0.028826817870140076, -0.003394062863662839, 0.0015828009927645326, 0.06721688061952591, 0.009363928809762001, 0.0031018275767564774, -0.013773697428405285, -0.008585025556385517, 0.023941051214933395, -0.021726734936237335, 0.061123792082071304, -0.08317796140909195, 0.11060342192649841, -0.06626953929662704, 0.04460027813911438, -0.04494602605700493, 0.05633082985877991, -0.05562416464090347, -0.015336848795413971, 0.017103901132941246, -0.04723440110683441, 0.034024786204099655, 0.032124113291502, 0.007451185956597328, -0.010434882715344429, -0.013384637422859669, 0.013886917382478714, 0.06147490814328194, -0.014839456416666508, 0.015928491950035095, -0.009892764501273632, 0.11054471880197525, 0.024434298276901245, -0.01948487013578415, 0.051527123898267746, -0.05049963667988777, -0.042557232081890106, -0.04161396622657776, -0.03666619583964348, -0.03936830163002014, 0.029861046001315117, -0.04210648685693741, 0.021615229547023773, -0.020411193370819092, 0.02748953551054001, 0.02066243253648281, -0.04365302622318268, 0.016032597050070763, 0.06179943308234215, 0.026732048019766808, 0.0403854064643383, -0.007917510345578194, -0.011295943520963192, 0.038255251944065094, 0.03486952558159828, 0.004939987789839506, 0.023728806525468826, 0.014910740777850151, -0.00024114394909702241, 0.014278295449912548, -0.03869172930717468, -0.008789232932031155, 0.05729365348815918, -0.0010839541209861636, -0.03194917365908623, -0.05005102604627609, -0.019684480503201485, 0.0011725728400051594, -0.06479152292013168, -0.004202935844659805, -0.059931494295597076, -0.031350649893283844, 0.0023999859113246202, -0.09660552442073822, -0.0654047355055809, -0.009836130775511265, -0.014136970974504948, -0.016194194555282593, 0.034801509231328964, -0.0064384667202830315, 0.011279897764325142, 0.0009344230056740344, -0.029729554429650307, -0.05224978178739548, -0.005557349417358637, -0.008342817425727844, 0.05614427849650383, -0.056575972586870193, -0.013741389848291874, 0.0013043328654021025, 0.03838326036930084, -0.004799273796379566, 0.051777731627225876, -0.04089748114347458, 0.07162205129861832, -0.05598731338977814, 0.0033291359432041645, 0.0008261133916676044, 0.019133688881993294, 0.05232996866106987, -0.015170860104262829, -0.06582842022180557, -0.01883283071219921, -0.06924369186162949, -0.011791675351560116, 0.021385444328188896, 0.0008655695128254592, -0.023395325988531113, -0.06011974439024925, 0.003274026559665799, 0.0014837950002402067, 0.057333074510097504, 0.08554921299219131, -0.03435629978775978, -0.07618316262960434, 0.025553042069077492, 0.07478097826242447, -0.012625506147742271, 0.0146762290969491, -0.04215473309159279, -0.0074606179259717464, 0.06307540088891983, -0.06311176717281342, 0.0572674386203289, -0.0012367962626740336, -0.025153333321213722, 0.02955515682697296, -0.00820826180279255, 0.044305600225925446, 0.0010835313005372882, 0.0009943860350176692, -0.003508332883939147, 0.011699468828737736, -0.030762437731027603, -0.0018478995189070702, -0.004583017434924841, 0.06658414751291275, 0.008036871440708637, -0.032812461256980896, -0.08310826867818832, -0.061023905873298645, -0.02060907520353794, 0.09060383588075638, -0.059332411736249924, 0.06430073082447052, -0.03563961759209633, 0.06149595230817795, 0.008755963295698166, 0.016432223841547966, 0.011488678865134716, -0.04102516919374466, 0.011696639470756054, 0.007059895899146795, -0.0327988900244236, 0.08895598351955414, -0.04690045118331909, 0.016769880428910255, 0.0407332107424736, -0.05420279875397682, -0.01476248074322939, -0.05599641427397728, -0.004266425035893917, 0.1437477469444275, 0.009973364882171154, 0.0024319980293512344, -0.0328729972243309, -0.11374544352293015, -0.02005608193576336, 0.11969605833292007, -0.010400373488664627, -0.06352300196886063, 0.025967774912714958, 0.004895436577498913, 0.015377827920019627, 0.04389586299657822, -0.028088048100471497, 0.015353024005889893, -0.03189140558242798, 0.06631813943386078, -0.008808687329292297, -0.043011292815208435, -0.06226041913032532, 0.01239862758666277, -0.04247018322348595, 0.06384997814893723, -0.05823144689202309, -0.07329464703798294, 0.11127929389476776, -0.021708833053708076, 0.0364394411444664, 0.008857013657689095, 0.0515746995806694, -0.0019382634200155735, -0.018710961565375328, -0.04147745668888092, 0.020446859300136566, -0.11704324930906296, 0.02783537283539772, 0.07914430648088455, -0.07275768369436264, 0.07510071992874146, 0.06882835179567337, -0.00019317222177051008, 0.060150064527988434, -0.02478848397731781, 0.0023927621077746153, 0.09535970538854599, -0.07878332585096359, -0.08921142667531967, 0.023998644202947617, 0.09418756514787674, -0.0015824330039322376, 0.013478307984769344, 0.05340062454342842, 0.0688902884721756, 0.0353359691798687, -0.025178151205182076, 0.0016408102819696069, 0.05338170751929283, -0.019100796431303024, 0.023321442306041718, -0.01044465135782957, 0.11208423227071762, 0.026754207909107208, 0.018051637336611748, 0.04323175549507141, 0.10267219692468643, 0.013582073152065277, 0.061312198638916016, -0.020958779379725456, -0.030193759128451347, -0.021949199959635735, -0.02041020616889, -0.03514774516224861, -0.0074590276926755905, 0.0017321784980595112, -0.01617525890469551, -0.03136612847447395, -0.024582484737038612, -0.08548212051391602, 0.020307308062911034, -0.005535328295081854, 0.020694391801953316, 0.06176816299557686, 0.020855363458395004, 0.006159502547234297, 0.04035540297627449, 0.043677762150764465, 0.02061574161052704, -0.0041297441348433495, 0.009444527328014374, -0.022506235167384148, -0.05470973998308182, -0.0026345858350396156, 0.03292693942785263, -0.04492105171084404, -0.02738448977470398, 0.05824761465191841, 0.0424024760723114, 0.012024330906569958, 0.012867973186075687, -0.04134664684534073, -0.002206578152254224, 0.06092642620205879, -0.02617255598306656, -0.029331577941775322, -0.009799184277653694, -0.0036961205769330263, -0.0461198091506958, -0.02344195917248726, -0.019558336585760117, 0.0498860627412796, 0.03787770867347717, 0.0517912358045578, 0.01806904934346676, -0.0036940486170351505, -0.014324081130325794, -0.012805938720703125, -0.05291207879781723, -0.014501404948532581, -0.015114229172468185, 0.04735064506530762, -0.011077839881181717, -0.03791604936122894, -0.0033306293189525604, -0.02384103089570999, -0.041735079139471054, 0.037829358130693436, -0.058207329362630844, 0.01963764987885952, -0.06390134990215302, 0.06091088429093361, -0.05839622765779495, 0.0782627984881401, -0.027540283277630806, -0.040025293827056885, 0.02690764330327511, -0.11590712517499924, -0.04860502853989601, -0.016739163547754288, 0.005339222960174084, -0.0069730402901768684, -0.03365778550505638, -0.045495327562093735, -0.023561617359519005, 0.025036493316292763, 0.04175471141934395, -0.017216486856341362, 0.056336794048547745, -0.018641550093889236, 0.059274736791849136, 0.010568586178123951, -0.006253372877836227, 0.03077176958322525, 0.09671531617641449, -0.09455626457929611, -0.018906431272625923, -0.030335793271660805, -0.002192741259932518, -0.00886294525116682, -0.032128073275089264, -0.029736153781414032, 0.014627717435359955, -0.03032330423593521, -0.05169089883565903, -0.02165272645652294, 0.006246745586395264, 0.07640261203050613, 0.060379091650247574, -0.040346018970012665, -0.010508855804800987, 0.04603688418865204, 0.04866556078195572, -0.057028044015169144, -0.0007266605971381068, 0.0167826060205698, -0.06127692013978958, -0.03444261848926544, -0.006859917193651199, 0.08922915905714035, 0.0596579872071743, -0.02272549271583557, -0.0856904461979866, -0.006722114980220795, 0.003940393682569265, 0.0051834192126989365, -0.04024692252278328, -0.0431806854903698, 0.06729709357023239, -0.06605508923530579, 0.10524123162031174, -0.002791458973661065, 0.008093047887086868, 0.07303857058286667, 0.014380333945155144, -0.028728561475872993, -0.005342419259250164, 0.019970210269093513, 0.015503430739045143, 0.062286246567964554, -0.04445619508624077, -0.027957385405898094, -0.03501391038298607, 0.04216654971241951, -0.00962076522409916, -0.011585169471800327, -0.0054314699955284595, -0.004774521570652723, 0.03826829418540001, -0.07426267862319946, 0.016538962721824646, -0.004706526640802622, -0.05953143909573555, -0.020176351070404053, -0.06442935764789581, -0.029930852353572845, 0.017144404351711273, -0.07028170675039291, 0.017401261255145073, -0.024246614426374435, -0.05695994570851326, 0.03165644034743309, 0.03779977187514305, 0.04084419831633568, 0.05675602704286575, 0.027757929638028145, -0.019574414938688278, -0.04158337041735649, -0.016203735023736954, -0.0011005443520843983, 0.00562485633417964, -0.049056731164455414, 0.0018610043916851282, -0.0001480452629039064, -0.06531254947185516, -0.008899573236703873, 0.04751473665237427, -0.01158524677157402, -0.006627133581787348, -0.10368957370519638, 0.009993605315685272, -0.0646754652261734, 0.06651201099157333, -0.021048733964562416, -0.0028225036803632975, 0.027871249243617058, -0.03709973394870758, 0.004292707424610853, 0.043832872062921524, 0.05254104733467102, -0.03369797393679619} t.Logf("Hair2 magnitude: %f", e.Magnitude()) - t.Logf("Hair2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Hair2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Pizza", func(t *testing.T) { e := Embedding{0.012545363046228886, -0.061116933822631836, -0.02601468190550804, 0.07787652313709259, -0.021964995190501213, -0.023282092064619064, -0.08820506185293198, 0.010442275553941727, 0.029084602370858192, 0.025907300412654877, 0.078743115067482, 0.09169194102287292, 0.002513485262170434, 0.027812410145998, -0.01141712348908186, 0.014333035796880722, 0.04622969403862953, 0.09377928078174591, -0.016980072483420372, 0.06723900139331818, 0.01565365120768547, 0.03776547312736511, 0.01959950663149357, -0.08438864350318909, -0.08823507279157639, -0.045819494873285294, -0.00987899862229824, 0.08199148625135422, -0.017163563519716263, 0.03196392208337784, -0.03880349546670914, -0.010429245419800282, 0.03400889039039612, -0.02507573924958706, -0.02711472474038601, -0.02076355367898941, -0.06196495145559311, 0.00007420445763273165, 0.007788555696606636, -0.006365785840898752, -0.053578175604343414, 0.002917165169492364, -0.014961115084588528, -0.049679115414619446, 0.021205920726060867, 0.06038018316030502, 0.04206155613064766, -0.03510258346796036, -0.02227739430963993, 0.0319143608212471, 0.012007143348455429, -0.031473204493522644, 0.04150312393903732, 0.03206299990415573, -0.07135185599327087, -0.02659107744693756, -0.049489956349134445, 0.129530668258667, -0.001706702052615583, 0.022227127104997635, -0.009720972739160061, 0.03467530757188797, -0.0368318147957325, 0.062267500907182693, -0.035633385181427, 0.0889773741364479, 0.03451388701796532, -0.028726212680339813, 0.02337571606040001, 0.015196731314063072, -0.00435465294867754, 0.03634943813085556, 0.053100794553756714, 0.024936867877840996, -0.03557504341006279, -0.05027907341718674, -0.06076475605368614, -0.0021708118729293346, -0.0010567440185695887, 0.002548838732764125, 0.043838098645210266, 0.028069010004401207, 0.055249039083719254, -0.029096569865942, 0.023744715377688408, -0.008417421020567417, 0.03569412976503372, 0.04479945823550224, -0.07184062153100967, 0.04942385107278824, -0.0048046959564089775, 0.027909867465496063, 0.04909295216202736, -0.024840859696269035, -0.003915414679795504, 0.07276055216789246, 0.07918114960193634, 0.07377838343381882, -0.038963962346315384, -0.01905442215502262, -0.0025953841395676136, 0.03661784157156944, 0.016301093623042107, 0.0453956238925457, 0.06560754030942917, -0.040288299322128296, 0.056177254766225815, -0.0159284844994545, -0.02543586492538452, 0.022719712927937508, 0.009137158282101154, -0.0016262037679553032, -0.051590144634246826, -0.04233044385910034, 0.021122964099049568, -0.03287129104137421, 0.06519603729248047, 0.041751984506845474, 0.026396363973617554, 0.0509265661239624, -0.03888273611664772, 0.005256630014628172, -0.05733426660299301, -0.05205492302775383, -0.004923680331557989, -0.023246167227625847, 0.012522782199084759, -0.002016804413869977, -0.08184214681386948, -0.09565647691488266, -0.03298015147447586, 0.010475958697497845, 0.013875200413167477, -0.04938983917236328, -0.03782426938414574, 0.004746602848172188, -0.054582349956035614, 0.05560821294784546, 0.043821677565574646, 0.0775490254163742, 0.04190433397889137, 0.06321405619382858, -0.02040085755288601, 0.07404965907335281, 0.0073580970056355, -0.024778010323643684, -0.08656046539545059, 0.02373918704688549, -0.011463992297649384, 0.0750817134976387, 0.051595963537693024, -0.0002577614795882255, -0.06305596977472305, 0.05620763450860977, 0.04583015292882919, -0.04491866007447243, -0.03542491793632507, -0.014527394436299801, -0.08535799384117126, -0.026765991002321243, 0.042345430701971054, 0.026542849838733673, 0.013871053233742714, 0.06566711515188217, 0.03165765851736069, -0.024077052250504494, -0.005411694757640362, -0.08341077715158463, 0.01584622636437416, 0.06698086857795715, -0.08994724601507187, 0.03225015103816986, -0.02775558829307556, -0.04994354024529457, -0.00590173015370965, 0.0053266603499650955, 0.01468923594802618, 0.009833848103880882, 0.021012863144278526, -0.03522282838821411, -0.04945491999387741, -0.04269673675298691, -0.048763155937194824, 0.051856011152267456, 0.005998180713504553, 0.03852929174900055, 0.014216920360922813, 0.02274898998439312, 0.0009073410183191299, 0.038456667214632034, 0.06223500147461891, -0.008021334186196327, 0.05453789606690407, 0.03586237505078316, 0.07295446842908859, 0.0357092060148716, -0.03255810588598251, 0.02614772506058216, -0.010909597389400005, 0.003484312677755952, 0.09289882332086563, 0.04279493913054466, -0.04767463356256485, -0.015047965571284294, 0.01605597324669361, 0.051896579563617706, -0.03076995722949505, 0.002906594891101122, -0.0016273800283670425, 0.01307581178843975, 0.0020702334586530924, 0.020348306745290756, -0.0068978238850831985, -0.020782288163900375, -0.024606075137853622, -0.02136104926466942, -0.045268282294273376, 0.09409216791391373, -0.03416816145181656, 0.059909991919994354, -0.02509133331477642, 0.03705504164099693, -0.009940257295966148, -0.06069604307413101, 0.05879036337137222, 0.02018267847597599, 0.012033514678478241, 0.05548003315925598, -0.04247593134641647, 0.07618723064661026, 0.09211259335279465, -0.055258072912693024, 0.01551026850938797, -0.08853983879089355, -0.03643134608864784, 0.04442460462450981, -0.005638878792524338, -0.012456538155674934, -0.022824931889772415, 0.034743621945381165, 0.01816997118294239, 0.0758754089474678, 0.07930681109428406, 0.04332619905471802, -0.0036835786886513233, 0.051733020693063736, -0.05761045590043068, 0.0611192062497139, 0.03279784321784973, 0.01648361049592495, -0.09358076751232147, -0.003039013594388962, 0.01756441220641136, 0.03448006510734558, 0.0214298777282238, 0.04768865928053856, -0.004204778932034969, -0.003616234753280878, 0.04621971398591995, 0.06408524513244629, -0.04956408590078354, -0.049268897622823715, 0.010123969987034798, -0.010007522068917751, -0.015084651298820972, -0.023827288299798965, 0.022870177403092384, 0.03165298327803612, 0.027228321880102158, -0.016080282628536224, -0.03201444819569588, -0.018628915771842003, 0.08714095503091812, 0.06293098628520966, 0.047809991985559464, -0.0019487414974719286, -0.009214922785758972, -0.041966237127780914, -0.04429829120635986, -0.05633355677127838, -0.0320746935904026, 0.06119261682033539, -0.044968131929636, -0.07855569571256638, -0.0036828776355832815, 0.00629341509193182, 0.03343503922224045, 0.04882736876606941, -0.09383642673492432, -0.055929962545633316, 0.004742121789604425, -0.02332443743944168, 0.0355745367705822, -0.019382910802960396, -0.06269549578428268, -0.09659743309020996, 0.04899698868393898, 0.02932705730199814, 0.025525745004415512, -0.03729311749339104, 0.0824044719338417, 0.010802071541547775, 0.01708611100912094, 0.04428812861442566, 0.02441093698143959, 0.0170294139534235, -0.033865150064229965, -0.04955276474356651, -0.004622049629688263, -0.007028747349977493, 0.046732887625694275, 0.0839061513543129, 0.009446821175515652, 0.0035056148190051317, 0.06861769407987595, -0.014254030771553516, -0.06609104573726654, 0.0249414574354887, 0.05216621607542038, -0.0002667897497303784, 0.006799418944865465, -0.05278008431196213, -0.030145280063152313, 0.04831700026988983, 0.028970159590244293, -0.02426898665726185, 0.024844396859407425, 0.013640712946653366, 0.06718818843364716, 0.04249601066112518, 0.022609014064073563, 0.004999866243451834, -0.03607172518968582, -0.014851744286715984, 0.040100958198308945, 0.06714383512735367, 0.007898117415606976, -0.08118928968906403, -0.031810108572244644, -0.031015707179903984, 0.1173936054110527, 0.020359262824058533, 0.018206926062703133, -0.03627790883183479, 0.027831129729747772, 0.01291407085955143, -0.04392821341753006, 0.04793228581547737, 0.03106507658958435, 0.03492511808872223, 0.06302934885025024, -0.04226762056350708, -0.03496506065130234, 0.06727349758148193, -0.026239942759275436, 0.015046640299260616, 0.05465487018227577, 0.06104649230837822, -0.01843472197651863, 0.040070775896310806, -0.04856192320585251, 0.029033558443188667, -0.027761179953813553, -0.006202262360602617, 0.000042897176172118634, -0.05505603179335594, -0.00022128257842268795, -0.017887437716126442, -0.0512210987508297, -0.053783319890499115, -0.09691770374774933, 0.009384265169501305, -0.039526231586933136, 0.04781114682555199, 0.07678693532943726, 0.09154985100030899, 0.004411216359585524, 0.04786872863769531, -0.10096634179353714, 0.038979656994342804, -0.02486174739897251, 0.007210108917206526, 0.0010656312806531787, 0.0027146253269165754, 0.06702210009098053, -0.06544293463230133, 0.003979342058300972, -0.020429957658052444, -0.04888343811035156, 0.00777844525873661, 0.0017838992644101381, 0.043044593185186386, -0.02616707608103752, -0.08543302863836288, 0.02923828922212124, 0.05405482277274132, 0.03539930284023285, -0.005181912798434496, 0.04890943691134453, 0.04352310672402382, 0.0058060986921191216, -0.013989288359880447, 0.04485408961772919, -0.02174242213368416, 0.0159736480563879, -0.03395828977227211, -0.005125345196574926, -0.026771683245897293, -0.004216945264488459, -0.07054102420806885, 0.04204969480633736, -0.054219797253608704, 0.0771569311618805, 0.045652832835912704, -0.05977426841855049, 0.018092460930347443, 0.053125668317079544, 0.1022033840417862, -0.0524955615401268, -0.05913929641246796, 0.0939919725060463, 0.0258707944303751, 0.024904316291213036, 0.04495333135128021, -0.037374142557382584, 0.0023578039836138487, 0.015697695314884186, -0.023977559059858322, -0.04372340440750122, -0.08841490745544434, -0.02740422822535038, 0.009173375554382801, 0.023014375939965248, -0.036456167697906494, -0.006427311338484287, 0.06290242820978165, -0.016438452526926994, -0.01087272260338068, -0.007567212916910648, -0.06073007732629776, -0.02773628942668438, 0.02444310672581196, 0.03662426397204399, 0.072282575070858, -0.044864825904369354, 0.02136402204632759, 0.018532827496528625, 0.006380004342645407, -0.03391898795962334, 0.004193667322397232, 0.019939862191677094, 0.02075907029211521, 0.06549801677465439, 0.06464849412441254, -0.0037845675833523273, -0.018483510240912437, 0.04408736526966095, 0.009609662927687168, 0.039530444890260696, 0.02751564048230648, -0.031785998493433, -0.06710276752710342, 0.00755219766870141, -0.06471654027700424, 0.05976949632167816, 0.05364137887954712, -0.04699977859854698, -0.03983379900455475, 0.02045058272778988, 0.01911342144012451, 0.014096674509346485, -0.03193356469273567, 0.08493281155824661, -0.06857762485742569, -0.065360888838768, 0.027792450040578842, 0.024931656196713448, -0.049998994916677475, 0.09934980422258377, 0.0360228568315506, 0.055417392402887344, 0.021256962791085243, -0.025104334577918053, 0.007479116320610046, 0.008613666519522667, -0.0288022980093956, -0.03587917983531952, 0.010054606944322586, 0.057236090302467346, -0.047835711389780045, -0.03931228071451187, 0.0336461216211319, -0.05462923273444176, 0.03637146204710007, 0.09296578168869019, -0.025614680722355843, 0.06573427468538284, 0.006791483145207167, -0.0050501711666584015, -0.038006819784641266, -0.0524778738617897, 0.07571382075548172, -0.04572443664073944, -0.010501379147171974, 0.010415388271212578, 0.0000018857821260098717, 0.008800419978797436, -0.031839240342378616, -0.0037819892168045044, 0.032508328557014465, 0.017411408945918083, 0.011756446212530136} t.Logf("Pizza magnitude: %f", e.Magnitude()) - assert.True(t, e.IgnoreFace()) + assert.True(t, e.Ignored()) }) t.Run("Mouth", func(t *testing.T) { e := Embedding{0.0818071961402893, -0.02670663595199585, -0.04388338327407837, 0.08276037871837616, -0.06790941208600998, 0.03789176791906357, -0.06332214176654816, 0.08206091821193695, -0.05989192798733711, -0.003227150533348322, -0.015824133530259132, 0.04487046226859093, -0.06514846533536911, -0.01332323718816042, -0.019904369488358498, -0.04819081351161003, 0.08377592265605927, 0.05940860137343407, 0.022396722808480263, -0.0661005973815918, 0.016026105731725693, 0.03261292725801468, 0.005642699543386698, 0.014816517941653728, -0.05345245823264122, 0.027366245165467262, 0.027163103222846985, 0.07712122052907944, 0.030850466340780258, 0.06144077703356743, -0.059152714908123016, -0.06890091300010681, 0.018452424556016922, -0.08021985739469528, -0.047281138598918915, -0.0018729253206402063, -0.11094509810209274, 0.0428999662399292, 0.04686363786458969, -0.012471457943320274, -0.05648921802639961, 0.06422606110572815, -0.021855125203728676, -0.07533032447099686, 0.010723584331572056, 0.019587961956858635, -0.056368667632341385, -0.012293539009988308, -0.012883886694908142, 0.03776860237121582, -0.025323309004306793, 0.07278133928775787, 0.07964740693569183, 0.0028865807689726353, -0.08581559360027313, 0.017843525856733322, 0.04243101179599762, 0.07050904631614685, 0.031054070219397545, 0.027697229757905006, -0.029815763235092163, -0.003724771784618497, 0.013232680968940258, 0.0287990253418684, 0.004315348342061043, 0.03348809480667114, 0.026770438998937607, -0.0008104921435005963, 0.018644029274582863, 0.00035887211561203003, -0.04005575552582741, 0.0619829036295414, 0.012762446887791157, 0.0019664671272039413, 0.009145539253950119, -0.031211525201797485, -0.0852985605597496, -0.026104852557182312, 0.0021302697714418173, 0.02192031964659691, -0.023708004504442215, -0.041466131806373596, 0.03970984369516373, 0.01837923936545849, 0.013577239587903023, -0.02928433008491993, 0.01567188650369644, 0.0038431996945291758, -0.03661859780550003, -0.043729133903980255, -0.01424663607031107, -0.0479993037879467, -0.008989574387669563, -0.024322370067238808, 0.0016269977204501629, 0.030273018404841423, 0.042096249759197235, -0.05009687691926956, -0.02507871389389038, 0.04270801693201065, 0.010935754515230656, -0.03858715295791626, -0.026746602728962898, 0.027308344841003418, 0.08383316546678543, -0.01575608365237713, -0.022132067009806633, 0.016370894387364388, 0.05716874077916145, -0.07125204056501389, 0.06941413879394531, 0.05170678719878197, -0.05539847910404205, -0.06683334708213806, 0.04969911649823189, -0.03656375780701637, 0.011205047369003296, -0.04780178517103195, -0.012514649890363216, -0.003727744333446026, -0.04610877484083176, 0.052401717752218246, -0.07958122342824936, -0.07168949395418167, 0.012691276147961617, -0.031475767493247986, -0.0063604568131268024, 0.04088949039578438, -0.019529160112142563, 0.005899976007640362, -0.10109469294548035, -0.011112082749605179, 0.052239399403333664, -0.020688559859991074, -0.06433560699224472, 0.038858070969581604, -0.023653613403439522, 0.08269057422876358, 0.09711100906133652, 0.06777472794055939, 0.03805705904960632, 0.05151732638478279, 0.05700840801000595, 0.014179802499711514, -0.01719832606613636, -0.0012138898018747568, -0.03528042137622833, -0.015471433289349079, -0.045495349913835526, 0.08877721428871155, 0.015324071981012821, -0.0036056595854461193, -0.027256198227405548, -0.02317759394645691, 0.09318786859512329, 0.03649521246552467, 0.016537973657250404, 0.028720324859023094, -0.016964662820100784, -0.026621969416737556, 0.0374566875398159, 0.001231615082360804, 0.0014859272632747889, 0.06432097405195236, 0.02374720200896263, 0.07618646323680878, 0.03371207416057587, -0.006346920970827341, -0.07591185718774796, 0.08389206975698471, 0.007961773313581944, -0.015088549815118313, 0.029834715649485588, -0.03998756781220436, 0.020206039771437645, 0.02946779690682888, -0.004931765142828226, -0.04080476984381676, 0.0028028427623212337, -0.011422369629144669, -0.05081048607826233, -0.11411978304386139, 0.0002430275926599279, -0.03312571346759796, -0.008036168292164803, -0.012223554775118828, -0.046255871653556824, -0.009086698293685913, -0.003148017218336463, -0.019448591396212578, 0.009623763151466846, -0.004998832941055298, 0.04153710603713989, -0.0761776939034462, 0.051422227174043655, 0.018014483153820038, -0.020127346739172935, -0.0007846374646760523, -0.01942124031484127, -0.013104344718158245, -0.009910606779158115, 0.10966400057077408, -0.03622647374868393, -0.058822810649871826, 0.0241804551333189, 0.008945982903242111, -0.05016666650772095, -0.07081463932991028, -0.03007488325238228, -0.024169063195586205, 0.038168709725141525, 0.027235528454184532, 0.01919381693005562, 0.004419947974383831, 0.008099156431853771, 0.0016416452126577497, 0.002381302183493972, 0.03320160135626793, -0.018313027918338776, -0.0035216547548770905, 0.008222050033509731, -0.00986926443874836, -0.031358204782009125, -0.032381366938352585, 0.033044472336769104, -0.06813707202672958, -0.0383276641368866, 0.016628919169306755, 0.007378889713436365, -0.016432272270321846, 0.07840882241725922, 0.06248893961310387, -0.016148051247000694, -0.12043803185224533, -0.00027594107086770236, -0.027748387306928635, 0.06770715117454529, 0.011241858825087547, -0.015258741565048695, -0.06275545060634613, 0.003046794096007943, -0.048787251114845276, 0.03279348090291023, 0.02108222432434559, 0.07017185539007187, 0.07821259647607803, 0.019150547683238983, -0.017450295388698578, -0.010062678717076778, -0.047699686139822006, -0.03794712945818901, 0.013243325054645538, 0.04239930957555771, 0.09664575755596161, 0.037265196442604065, -0.02639499120414257, -0.017893310636281967, -0.0014869648730382323, 0.013404333032667637, 0.042169537395238876, 0.030752070248126984, -0.009393138810992241, 0.027500057592988014, -0.029133103787899017, -0.05348258465528488, -0.059215009212493896, 0.02112257108092308, -0.04747743159532547, -0.07296369969844818, 0.013967584818601608, -0.013076810166239738, 0.06480240076780319, 0.053335171192884445, 0.0024655605666339397, -0.010288210585713387, -0.021236561238765717, -0.034911323338747025, -0.05283006653189659, -0.031532250344753265, -0.07302706688642502, 0.019008925184607506, 0.00899957399815321, -0.049319446086883545, -0.0646449625492096, -0.08574111759662628, 0.08940184861421585, 0.06515233218669891, 0.026135308668017387, -0.07035009562969208, -0.050200194120407104, -0.029697703197598457, -0.08214828372001648, 0.052806608378887177, 0.01832338236272335, -0.013814210891723633, -0.07930482178926468, -0.00579405203461647, 0.03165283054113388, 0.012179997749626637, -0.0011783103691413999, 0.1184648647904396, -0.07156511396169662, 0.03674345090985298, 0.0036732873413711786, -0.04984794184565544, -0.012014386244118214, -0.012831777334213257, -0.030284931883215904, 0.04152374342083931, 0.01585487462580204, 0.009693439118564129, -0.06022825837135315, -0.03560836240649223, 0.026040801778435707, 0.05318394675850868, -0.0046441927552223206, 0.008540816605091095, -0.05306963622570038, -0.011593527160584927, -0.0167976263910532, 0.03615924343466759, 0.04646051675081253, -0.057334013283252716, -0.027518386021256447, -0.0004384744679555297, -0.0004149869200773537, -0.0160137377679348, -0.04648573696613312, 0.021888477727770805, 0.013624202460050583, 0.043189436197280884, 0.01631380245089531, -0.03758130595088005, 0.04594672471284866, 0.03805117309093475, 0.02580314129590988, -0.05813679099082947, 0.0065255421213805676, -0.04650060459971428, -0.008533624932169914, 0.05468260124325752, -0.009562136605381966, 0.094278484582901, 0.014148309826850891, -0.027893394231796265, -0.06328396499156952, 0.015346553176641464, -0.014867067337036133, 0.07413247227668762, -0.03897915408015251, -0.05778569355607033, -0.006251830607652664, -0.07035098969936371, -0.020941082388162613, -0.07186810672283173, 0.025896817445755005, 0.05953649431467056, 0.03583839535713196, -0.06907452642917633, 0.024623142555356026, -0.017644990235567093, 0.0725882351398468, -0.03465977683663368, 0.060934532433748245, -0.02601538598537445, 0.03643237054347992, 0.07541332393884659, 0.01587853580713272, 0.002616932848468423, -0.012820392847061157, -0.025584163144230843, 0.06907656043767929, 0.059524815529584885, 0.02263757586479187, 0.014587259851396084, 0.0019875774160027504, -0.04242004081606865, 0.007209803443402052, -0.04292167350649834, -0.07441505789756775, -0.03681248053908348, 0.023158971220254898, -0.056171245872974396, 0.055422741919755936, 0.09875713288784027, -0.012177548371255398, 0.057813435792922974, -0.06344520300626755, -0.042773403227329254, 0.013436638750135899, 0.08227351307868958, 0.07470797747373581, -0.01677628792822361, -0.05141500383615494, -0.0777927041053772, 0.060596123337745667, 0.00530647486448288, -0.026591448113322258, 0.03001985140144825, 0.048230789601802826, 0.005213168449699879, 0.036196377128362656, -0.03171728178858757, 0.06301207095384598, -0.0061806561425328255, -0.03350459784269333, -0.029837744310498238, 0.0044655874371528625, -0.019328709691762924, 0.0046782465651631355, 0.040043726563453674, 0.015632767230272293, -0.03702161833643913, 0.029124116525053978, -0.03672756999731064, -0.05152951925992966, 0.01167905144393444, 0.023672204464673996, 0.02087184228003025, -0.017876263707876205, 0.05791016295552254, 0.002335177967324853, 0.03287780284881592, -0.07645203918218613, -0.02439247816801071, -0.05162420868873596, 0.0658591166138649, -0.009200669825077057, 0.026879532262682915, -0.010261692106723785, 0.008500082418322563, 0.01575946994125843, 0.01591259427368641, -0.043938010931015015, -0.041595470160245895, -0.03938499465584755, -0.02976192906498909, 0.0013203995767980814, 0.09189633280038834, 0.0013797852443531156, 0.010791689157485962, 0.06994916498661041, -0.000692025467287749, 0.0034171822480857372, -0.0389590784907341, 0.01220420841127634, -0.056612297892570496, 0.08581070601940155, -0.06745323538780212, -0.0938427522778511, -0.011157377623021603, -0.006571977399289608, 0.04435853287577629, 0.011915359646081924, 0.020302774384617805, -0.03749265521764755, 0.05212841182947159, 0.02225070260465145, 0.03683068975806236, 0.04843031242489815, -0.013122848235070705, 0.032009731978178024, 0.031934041529893875, -0.009558628313243389, 0.05928546190261841, 0.024590367451310158, 0.0542060025036335, 0.0010475624585524201, -0.030888164415955544, -0.04555213823914528, -0.020379068329930305, -0.09547329694032669, 0.124330073595047, -0.0445215106010437, -0.046482764184474945, 0.020792394876480103, 0.0377921499311924, -0.07444160431623459, 0.02125447429716587, -0.0299525186419487, 0.043460603803396225, 0.022467132657766342, 0.06910812109708786, -0.049281369894742966, 0.015644496306777, 0.03176625445485115, -0.09332097321748734, 0.00847408827394247, -0.005209109280258417, 0.022829929366707802, 0.02716072089970112, 0.028529148548841476, -0.012005689553916454, -0.008923888206481934, 0.06908790022134781, 0.020576845854520798, 0.04308956488966942, -0.009421642869710922, -0.01696605794131756, -0.010693961754441261, 0.005959373898804188, 0.112999327480793, 0.028561241924762726, 0.0167742557823658, 0.05243640020489693, -0.008612705394625664, 0.029878703877329826, 0.06133407726883888, -0.03356262296438217, 0.002026799600571394, -0.05413080006837845, -0.04636191204190254} t.Logf("Mouth magnitude: %f", e.Magnitude()) - t.Logf("Mouth blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Mouth blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Hands", func(t *testing.T) { e := Embedding{0.06800967454910278, 0.014943060465157032, -0.03815193474292755, 0.061972297728061676, -0.03068658523261547, 0.023386536166071892, -0.09429468214511871, 0.0281218271702528, -0.020950259640812874, -0.06430718302726746, -0.0051723662763834, 0.03371420502662659, -0.004883932415395975, -0.028872383758425713, 0.0554707795381546, -0.08306090533733368, 0.007016982417553663, 0.07661793380975723, 0.020108982920646667, -0.012177039869129658, -0.08107452839612961, 0.0019218273228034377, -0.0017007937422022223, -0.0925346314907074, -0.006843474693596363, 0.0044988361187279224, -0.014817462302744389, -0.02070135623216629, 0.061560001224279404, 0.053207140415906906, 0.004307453986257315, 0.0249142125248909, 0.000544507522135973, -0.04379061236977577, -0.05548075586557388, -0.021299464628100395, 0.004362935665994883, -0.01409577950835228, 0.0060603804886341095, 0.06408311426639557, -0.05726391822099686, -0.017893489450216293, -0.08481934666633606, -0.0520801767706871, 0.022130560129880905, -0.041218917816877365, 0.009603206999599934, 0.024055592715740204, -0.01699327677488327, -0.03296425938606262, -0.01941504143178463, -0.053286854177713394, 0.0071816351264715195, 0.048552218824625015, -0.04173465445637703, 0.019668815657496452, 0.01666739396750927, 0.06181837245821953, -0.0142489830031991, -0.013856017030775547, -0.0525357648730278, 0.06763152778148651, -0.06656254827976227, 0.012323605827987194, -0.009243583306670189, 0.05591072142124176, 0.021979764103889465, -0.004156413022428751, -0.03454184904694557, -0.08790867030620575, 0.03656799718737602, 0.07132644206285477, -0.0497322753071785, -0.01750035397708416, -0.005225967615842819, -0.11555836349725723, -0.03905574977397919, -0.04467228427529335, -0.014362022280693054, -0.019055044278502464, 0.03191450983285904, -0.010453014634549618, 0.08757585287094116, -0.029692165553569794, 0.008261462673544884, -0.037200622260570526, -0.0776897445321083, 0.012314132414758205, 0.00407141400501132, 0.04746837168931961, 0.12277686595916748, 0.016017626971006393, 0.04314332827925682, -0.0948345735669136, 0.03130676597356796, 0.05931435897946358, 0.012661945074796677, 0.01928090490400791, -0.11891371011734009, 0.05977544188499451, 0.0021558115258812904, -0.02819810062646866, 0.05190897360444069, -0.0012781992554664612, 0.014554232358932495, 0.017773766070604324, 0.015998953953385353, -0.0331634059548378, -0.052866216748952866, -0.0024563816841691732, 0.07878424227237701, 0.049375373870134354, -0.04542739316821098, 0.05561786890029907, -0.0015382841229438782, 0.0526365302503109, 0.060375113040208817, 0.0042859590612351894, 0.021306950598955154, 0.08104266226291656, -0.07422176003456116, 0.03607352450489998, 0.04333891347050667, -0.03579263016581535, -0.011166614480316639, -0.033253565430641174, 0.001504167914390564, -0.08601394295692444, -0.05513449385762215, -0.07004782557487488, 0.0054741185158491135, -0.007946699857711792, 0.025273945182561874, -0.009772094897925854, -0.05400902032852173, 0.04678212106227875, -0.02820483036339283, -0.008067966438829899, 0.06739245355129242, -0.0019745994359254837, -0.056615568697452545, 0.02644413150846958, -0.10103209316730499, 0.0345887616276741, 0.08167438954114914, 0.02648608572781086, -0.02660847268998623, -0.03116915188729763, 0.01988879032433033, 0.012142010033130646, 0.06729826331138611, 0.039178021252155304, -0.05023375526070595, 0.0006591514684259892, 0.13739371299743652, 0.04972291365265846, 0.03704720363020897, 0.0006241801311261952, 0.021746637299656868, 0.009487578645348549, 0.030556324869394302, -0.027118254452943802, -0.015532579272985458, -0.0061856834217906, -0.017525052651762962, 0.040801241993904114, -0.0035515138879418373, 0.01166065875440836, -0.07358100265264511, 0.07806885242462158, -0.0899202898144722, 0.030144575983285904, 0.0264816302806139, 0.006456506438553333, 0.012648648582398891, -0.03377404808998108, 0.03163297101855278, -0.06493984907865524, -0.03652690351009369, -0.014077319763600826, 0.031231386587023735, -0.04911602661013603, -0.05198896303772926, 0.011137476190924644, 0.018216287717223167, 0.025216512382030487, 0.030555834993720055, 0.04156283661723137, 0.06819998472929001, 0.04395845904946327, -0.030153097584843636, -0.011970375664532185, 0.07122687995433807, 0.020437531173229218, -0.009669247083365917, 0.033631764352321625, -0.01162997167557478, 0.01783837378025055, 0.027639854699373245, -0.023945316672325134, -0.016932552680373192, -0.05446825549006462, -0.0012844173470512033, 0.049832090735435486, 0.03893524780869484, -0.026689713820815086, 0.015217853710055351, 0.013796612620353699, 0.03025115467607975, 0.07001909613609314, -0.060108985751867294, -0.02799593098461628, -0.011923057958483696, 0.04196866974234581, -0.0038162667769938707, -0.02056271769106388, -0.01480772066861391, 0.042736444622278214, 0.0006656547193415463, 0.005062334705144167, -0.04918226972222328, -0.006349253002554178, -0.02912614680826664, -0.05316288396716118, -0.016837051138281822, 0.02172211743891239, 0.0006595784798264503, 0.015010768547654152, -0.0579000823199749, 0.04910410940647125, 0.0467592291533947, 0.042650751769542694, 0.008921841159462929, -0.06304839998483658, -0.02619110234081745, 0.0029906812123954296, -0.023585345596075058, 0.049340009689331055, 0.01771300844848156, -0.059439387172460556, -0.08027065545320511, 0.012406125664710999, 0.035913024097681046, 0.012033644132316113, 0.014767278917133808, 0.008061177097260952, -0.00041978800436481833, -0.06147145479917526, -0.014910695143043995, 0.032662004232406616, 0.009512126445770264, -0.025222409516572952, 0.02037961408495903, 0.026294656097888947, -0.0077243889681994915, -0.009868351742625237, 0.06836677342653275, 0.014251199550926685, 0.07199183106422424, 0.02758108638226986, -0.010732145980000496, 0.03602578118443489, 0.03371293097734451, -0.06324949860572815, 0.026011116802692413, -0.021186599507927895, 0.008735056966543198, -0.009822407737374306, -0.10368278622627258, -0.03824703022837639, -0.06355985999107361, 0.009802375920116901, 0.05084632337093353, -0.02756565809249878, -0.04620520770549774, -0.0006836658576503396, 0.02206777222454548, -0.04605785012245178, 0.046884164214134216, -0.007826701737940311, -0.016390357166528702, 0.09758418053388596, -0.08982982486486435, 0.029885943979024887, -0.07216703146696091, 0.018979568034410477, 0.013848042115569115, 0.005160720087587833, 0.011137663386762142, -0.04384308308362961, -0.06501559168100357, -0.0679052546620369, 0.0020767166279256344, 0.03588397800922394, -0.06154605746269226, -0.05598553642630577, 0.05342397838830948, -0.00009341086115455255, -0.018353940919041634, 0.0442456416785717, -0.020383842289447784, -0.05367651954293251, -0.0041824448853731155, 0.012194566428661346, -0.014708265662193298, -0.038226477801799774, -0.0020380003843456507, 0.028408942744135857, -0.05555034056305885, 0.038586586713790894, -0.019160734489560127, 0.0429065078496933, 0.04142273589968681, 0.06893438845872879, 0.02501196600496769, 0.01911221817135811, -0.04520648717880249, -0.09565896540880203, -0.03140087425708771, 0.08436435461044312, 0.10995198786258698, 0.0032645787578076124, -0.04052676633000374, 0.10964872688055038, 0.0559660866856575, -0.06361017376184464, 0.0762399435043335, 0.028079986572265625, -0.025001373142004013, 0.04008101671934128, 0.05123879387974739, 0.007984031923115253, -0.000008416279342782218, -0.015337658114731312, -0.06656760722398758, -0.002904517576098442, -0.05411209538578987, -0.010373060591518879, 0.07006239891052246, 0.006028351373970509, 0.018228543922305107, -0.034176141023635864, 0.0009416138054803014, 0.007130984682589769, 0.054373010993003845, -0.022411497309803963, 0.028464358299970627, -0.015985624864697456, 0.062213074415922165, -0.000621593149844557, -0.03677884489297867, 0.03003406524658203, -0.06387203186750412, -0.03039613738656044, -0.032772038131952286, 0.02748963236808777, 0.0818522647023201, 0.028033697977662086, 0.030221711844205856, -0.0031808384228497744, -0.014201122336089611, -0.0369342565536499, -0.07547933608293533, 0.037489667534828186, 0.030847424641251564, -0.0012737741926684976, 0.03355979546904564, -0.029503673315048218, -0.035156674683094025, 0.0688718631863594, -0.031455814838409424, -0.08894888311624527, -0.004388647153973579, -0.03459826856851578, 0.012967395596206188, 0.02863665670156479, 0.027017133310437202, 0.006182440090924501, -0.005753602832555771, -0.07888531684875488, -0.05724901705980301, -0.10376168042421341, -0.005841919220983982, 0.0018376336665824056, -0.022104283794760704, -0.06119965761899948, -0.09241409599781036, -0.03779738023877144, -0.021129177883267403, -0.013692792505025864, 0.033727217465639114, 0.03535785153508186, 0.008455089293420315, -0.054199010133743286, 0.030598636716604233, 0.07688231021165848, 0.04323872551321983, 0.022387292236089706, -0.012106158770620823, 0.05045999214053154, -0.04638897627592087, 0.060460109263658524, -0.047063469886779785, 0.06677280366420746, 0.0044760932214558125, -0.07279149442911148, -0.0614168606698513, -0.025396905839443207, 0.0059859780594706535, 0.025352362543344498, 0.023328473791480064, -0.025442857295274734, -0.009926537983119488, -0.04177949205040932, 0.02353341318666935, 0.012404174543917179, 0.053003039211034775, 0.07169144600629807, 0.03418015316128731, -0.07398971170186996, -0.060145165771245956, 0.04962604120373726, -0.022432124242186546, 0.02895701304078102, -0.03289991617202759, 0.004467011895030737, -0.009019974619150162, 0.03424254432320595, -0.02147660404443741, 0.005284739192575216, 0.03666652739048004, 0.05568708851933479, -0.009557107463479042, -0.028852500021457672, -0.05505732446908951, 0.012282146140933037, -0.001173202763311565, -0.07908841222524643, -0.015152683481574059, -0.02341414801776409, 0.07421097159385681, 0.006894294172525406, -0.03522450476884842, 0.0016711830394342542, -0.054133832454681396, 0.07072155177593231, -0.006880319677293301, -0.027067022398114204, -0.061399467289447784, -0.030069993808865547, -0.006553489249199629, 0.04162300005555153, -0.05817380174994469, -0.0003335995425004512, 0.06534004211425781, 0.015017951838672161, 0.03262748569250107, 0.00815445277839899, 0.06750284135341644, 0.033221662044525146, -0.022541468963027, -0.018948310986161232, -0.06399112939834595, -0.056508585810661316, -0.008455454371869564, 0.007267309818416834, 0.0027919358108192682, 0.01652160845696926, 0.04739325866103172, 0.06128105893731117, 0.014352100901305676, -0.028366930782794952, 0.09453455358743668, -0.017032623291015625, 0.038646310567855835, -0.09846241772174835, -0.029862865805625916, -0.10262437164783478, 0.023371068760752678, 0.101364865899086, 0.04129050672054291, 0.019664211198687553, 0.08509522676467896, 0.040672559291124344, 0.005562108475714922, 0.030986953526735306, -0.0709533542394638, -0.026608459651470184, 0.04657440632581711, 0.054697226732969284, -0.06656312197446823, 0.011308304965496063, -0.09248340129852295, -0.057660821825265884, 0.036397699266672134, -0.06424076110124588, -0.0030825596768409014, 0.007301960606127977, -0.016404712572693825, 0.014328011311590672, -0.011685286648571491, -0.03198537603020668, -0.013111865147948265, -0.0037993311416357756, 0.02083543688058853, 0.044131528586149216, -0.0264967679977417, 0.04059396684169769, 0.0051407176069915295, -0.04394226521253586, 0.030103128403425217, -0.0175037644803524} t.Logf("Hands magnitude: %f", e.Magnitude()) - t.Logf("Hands blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Hands blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Neckline1", func(t *testing.T) { e := Embedding{-0.021214468404650688, -0.08825807273387909, -0.024100830778479576, -0.0749080628156662, 0.06906117498874664, -0.049879010766744614, -0.0206401739269495, 0.022474050521850586, 0.003262620186433196, -0.019519725814461708, -0.013318439014256, 0.08099097013473511, 0.041292622685432434, -0.0009268737630918622, 0.035383205860853195, 0.0635155513882637, 0.004669536836445332, -0.017719784751534462, -0.021314412355422974, 0.0012528026709333062, -0.01536466646939516, -0.0510890856385231, -0.011554482392966747, 0.0021909610368311405, 0.000988184241577983, -0.04302235692739487, -0.04827045276761055, -0.08782166242599487, 0.015939686447381973, -0.01569664478302002, -0.00002939470869023353, -0.04967746138572693, -0.029887838289141655, 0.030824510380625725, -0.026004085317254066, 0.0038077461067587137, -0.018639687448740005, -0.06636559963226318, -0.06887199729681015, 0.1230739951133728, 0.001235812553204596, -0.015357023105025291, -0.011043163947761059, 0.039761703461408615, 0.0159311480820179, 0.07689104974269867, 0.04919219762086868, 0.009077026508748531, -0.06515306979417801, -0.006734342779964209, 0.011677936650812626, 0.018189284950494766, 0.027414413169026375, 0.038556162267923355, -0.04817062243819237, -0.019315406680107117, -0.0033731264993548393, -0.03256676718592644, -0.036154769361019135, -0.030659226700663567, -0.04370402172207832, 0.029668418690562248, -0.05120636522769928, 0.03484269231557846, -0.04163138568401337, 0.04292847216129303, -0.07885508984327316, 0.0006402255385182798, -0.021691933274269104, -0.04432434216141701, 0.02800828032195568, -0.09544489532709122, 0.0369441993534565, -0.01730477809906006, -0.034752100706100464, 0.045872438699007034, 0.020005300641059875, -0.016411617398262024, -0.014964046888053417, 0.001606486621312797, 0.01681387610733509, 0.045953117311000824, -0.04028761386871338, 0.026372810825705528, 0.016764607280492783, -0.031238850206136703, -0.006362352520227432, 0.0890614241361618, 0.020816456526517868, 0.020879963412880898, 0.048431672155857086, 0.05266088247299194, 0.050555791705846786, -0.03838769719004631, 0.00036916183307766914, -0.043389249593019485, -0.09475662559270859, 0.04026512801647186, -0.024581093341112137, -0.013414999470114708, 0.031959228217601776, 0.058118365705013275, 0.05312944948673248, 0.0063401320949196815, 0.02532665990293026, -0.018715815618634224, -0.005444089882075787, -0.03840278089046478, -0.029712826013565063, -0.06228933110833168, -0.025740373879671097, 0.037858739495277405, -0.0922742635011673, 0.05937720462679863, 0.03050682693719864, 0.030648402869701385, -0.016746483743190765, 0.013065865263342857, -0.029768746346235275, -0.026974080130457878, 0.00901819672435522, -0.017012862488627434, 0.013227489776909351, -0.040640417486429214, 0.07854104787111282, 0.009712324477732182, -0.05267297849059105, 0.0025253931526094675, 0.05174652114510536, -0.02452586032450199, -0.03246896341443062, 0.003572023706510663, 0.013100586831569672, -0.012467165477573872, 0.021367736160755157, -0.010899340733885765, -0.014318828471004963, -0.04115388169884682, -0.0033794317860156298, -0.03305904194712639, -0.02712656371295452, 0.008904485031962395, -0.06452339887619019, 0.03517462685704231, 0.06803631782531738, -0.059344496577978134, -0.02991984412074089, 0.045251332223415375, 0.08184774965047836, 0.0022686761803925037, 0.020685307681560516, -0.025787128135561943, 0.0032214345410466194, 0.06131143867969513, 0.04409313574433327, -0.022299088537693024, 0.0445500910282135, 0.0071045756340026855, 0.04109949618577957, -0.006089251488447189, 0.0027454430237412453, -0.05094190686941147, -0.05369836464524269, 0.013229510746896267, 0.0872252881526947, 0.038748349994421005, -0.03548654168844223, 0.06942304223775864, 0.003663688199594617, -0.04928385466337204, -0.018708931282162666, -0.04765505716204643, -0.04992944747209549, -0.0014015285996720195, -0.025472354143857956, -0.005789888557046652, 0.026408683508634567, -0.03892185166478157, -0.044844191521406174, 0.005069330334663391, -0.03414269909262657, -0.012076916173100471, -0.04281042143702507, -0.024428600445389748, -0.01485874131321907, 0.016987605020403862, -0.051159828901290894, -0.024585820734500885, -0.05887780711054802, -0.05454850569367409, 0.006124031729996204, -0.007963520474731922, 0.06256163865327835, -0.024594830349087715, 0.01902106963098049, -0.05034991353750229, 0.07066789269447327, -0.004410186782479286, 0.0038422243669629097, -0.0026940014213323593, 0.005105162505060434, -0.07121678441762924, 0.034382954239845276, -0.039652492851018906, -0.0417342409491539, 0.04631864279508591, 0.03643152117729187, 0.040750712156295776, 0.0714733824133873, 0.051892250776290894, -0.05707290396094322, 0.05288593843579292, -0.054835833609104156, 0.01938498765230179, 0.01589474081993103, -0.07911475002765656, -0.06353975087404251, 0.0572020560503006, 0.03344953805208206, -0.04313657060265541, -0.07093457877635956, 0.021312959492206573, 0.06401494890451431, -0.04650603234767914, 0.08077049255371094, -0.0286504328250885, -0.046756092458963394, 0.00301894242875278, -0.04401365667581558, 0.06723281741142273, -0.06633667647838593, -0.008340435102581978, 0.027797970920801163, 0.023266930133104324, 0.06863552331924438, -0.044503241777420044, 0.02705446071922779, -0.05602143332362175, 0.019653508439660072, -0.0012858508853241801, 0.023809093981981277, 0.0011471268953755498, 0.059762291610240936, 0.05426492542028427, -0.03341545909643173, -0.018417438492178917, -0.021136419847607613, 0.0191955603659153, -0.04253546521067619, 0.016529947519302368, 0.0912376418709755, 0.06179238483309746, 0.013533241115510464, -0.04259704798460007, 0.02543141134083271, -0.017176249995827675, 0.038064125925302505, 0.028988782316446304, -0.031629521399736404, 0.011850926093757153, -0.03157743439078331, -0.035305824130773544, -0.04931005463004112, 0.015354312025010586, -0.009503492154181004, 0.015366367995738983, 0.054621320217847824, -0.08249345421791077, -0.07148325443267822, 0.024340810254216194, -0.12321681529283524, -0.06660863757133484, -0.016812263056635857, -0.07369605451822281, -0.05357787013053894, -0.05692548677325249, 0.019784631207585335, -0.005342819262295961, 0.024815598502755165, -0.0038146148435771465, -0.02744688279926777, 0.0395994633436203, 0.05727386847138405, 0.03631048649549484, 0.004957378376275301, 0.042469993233680725, -0.005675052758306265, -0.0637376606464386, 0.0791887417435646, -0.04918130114674568, 0.015717212110757828, 0.10337706655263901, 0.07787372171878815, -0.028327040374279022, 0.08058209717273712, 0.03467497229576111, 0.08143963664770126, -0.025251151993870735, 0.013674174435436726, 0.09685403853654861, 0.025876792147755623, 0.04472796991467476, -0.015060069970786572, -0.013897792436182499, 0.007555302232503891, -0.011836392804980278, -0.0016178044024854898, -0.072891965508461, -0.01843908242881298, -0.047244928777217865, -0.05770043656229973, -0.01924392208456993, -0.013222998008131981, -0.010010148398578167, 0.0161499734967947, -0.04879551753401756, 0.008350354619324207, -0.004230834078043699, 0.06653232872486115, 0.020347515121102333, 0.008945903740823269, 0.05777663737535477, -0.03560291603207588, -0.036602217704057693, -0.03346359729766846, 0.01772286556661129, 0.059496138244867325, 0.0851031169295311, -0.05297591909766197, 0.06091205030679703, -0.02496807463467121, 0.023829467594623566, -0.02207981050014496, -0.00010905389353865758, -0.004301499575376511, -0.06336405128240585, 0.0069908746518194675, 0.011306004598736763, 0.006169251166284084, 0.043985430151224136, -0.06624381989240646, -0.02809831313788891, 0.054093848913908005, 0.02190885879099369, 0.01104329526424408, 0.032349035143852234, 0.04755571857094765, -0.02541162818670273, 0.035498712211847305, 0.035304371267557144, 0.05096650868654251, 0.004593749530613422, -0.012912514619529247, -0.04336235299706459, 0.008907749317586422, -0.008742377161979675, 0.007322476711124182, -0.04208524152636528, -0.010875857435166836, -0.04977058619260788, 0.0710388645529747, -0.03864361718297005, -0.03073032572865486, 0.058614104986190796, 0.07756205648183823, -0.007605003658682108, 0.05245952680706978, 0.07602335512638092, 0.0038208444602787495, -0.03401503711938858, 0.00330623728223145, -0.04458557814359665, 0.057743899524211884, -0.013089360669255257, -0.004417861346155405, 0.03687146306037903, -0.020676465705037117, -0.06894288212060928, 0.017756791785359383, -0.00929702166467905, -0.025895606726408005, -0.06675063073635101, -0.04024260491132736, 0.01878446526825428, -0.0739472284913063, 0.03031698428094387, -0.044887904077768326, -0.03804263100028038, 0.01209914032369852, -0.05999091640114784, 0.02555130422115326, 0.03423265740275383, 0.015372749418020248, 0.012712777592241764, 0.04614197462797165, 0.030202170833945274, 0.011808302253484726, -0.016211921349167824, -0.0408371202647686, 0.009761178866028786, -0.005699409171938896, 0.01292793545871973, 0.03607843443751335, -0.03549749776721001, -0.05073947086930275, 0.02539914660155773, 0.07158619910478592, 0.029030870646238327, -0.00626207422465086, -0.051237717270851135, 0.02812722884118557, 0.02418440207839012, 0.0036969424691051245, -0.07483146339654922, -0.05755685642361641, 0.06768010556697845, -0.027036650106310844, -0.03107641637325287, 0.020382681861519814, 0.024138495326042175, -0.08594930917024612, -0.002680298639461398, -0.0884675681591034, 0.01594550535082817, -0.045595236122608185, 0.007148858159780502, 0.0002004603884415701, -0.03288862109184265, 0.060421172529459, -0.009464421309530735, 0.025263141840696335, 0.08572076261043549, 0.059795163571834564, 0.09615049511194229, 0.010054418817162514, -0.056690484285354614, 0.06354417651891708, -0.001484088716097176, -0.04131897911429405, 0.03783109411597252, 0.04341450706124306, -0.052487172186374664, 0.026670828461647034, 0.036107100546360016, 0.009455698542296886, 0.06242184340953827, 0.02396167255938053, -0.10845384746789932, 0.041736774146556854, -0.004101794213056564, -0.11316626518964767, 0.057027265429496765, 0.008351001888513565, -0.02253711223602295, 0.0048136948607862, 0.08278420567512512, -0.02734079398214817, 0.004022950306534767, -0.08790142834186554, -0.020605387166142464, 0.02787383273243904, -0.08069746196269989, 0.0361345000565052, -0.09026912599802017, -0.023689599707722664, -0.06635329872369766, -0.06333273649215698, 0.061648864299058914, -0.07153037190437317, 0.07003317028284073, -0.016978461295366287, 0.09693336486816406, -0.031508032232522964, 0.026826944202184677, -0.007541390601545572, 0.01027778722345829, -0.029580451548099518, -0.012868455611169338, -0.026551349088549614, -0.004121067002415657, -0.048262353986501694, -0.08954235911369324, 0.010019811801612377, -0.026200074702501297, 0.08274306356906891, 0.04002682492136955, -0.04577689990401268, -0.07945007085800171, 0.07736200094223022, -0.030931074172258377, -0.05847625061869621, -0.07671508193016052, 0.03706398606300354, 0.02441396936774254, -0.007176999002695084, -0.0704612210392952, -0.0009268032154068351, -0.02201954461634159, 0.015288589522242546, 0.0643734484910965, -0.08050262182950974, -0.020431416109204292, -0.09294025599956512, -0.015219194814562798, -0.012071800418198109, 0.10745205730199814, 0.04715665802359581, 0.011131536215543747, -0.04366388916969299, -0.04914935305714607, 0.03812306001782417, -0.008865824900567532} t.Logf("Neckline1 magnitude: %f", e.Magnitude()) - t.Logf("Neckline1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Neckline1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) }) t.Run("Neckline2", func(t *testing.T) { e := Embedding{-0.021047260612249374, -0.09117822349071503, -0.0036935743410140276, 0.01417315099388361, 0.020702973008155823, -0.07730448991060257, -0.022538714110851288, 0.0008960997802205384, 0.07584141194820404, -0.08703958243131638, -0.027213476598262787, 0.030831214040517807, 0.03846513107419014, -0.02574390172958374, 0.005949356593191624, 0.034153006970882416, 0.0502694770693779, 0.049452800303697586, 0.04756177216768265, 0.013959689997136593, -0.0008715657750144601, -0.008311758749186993, 0.00967266783118248, 0.029063668102025986, -0.018811305984854698, -0.02114877477288246, -0.04066148400306702, -0.043518248945474625, 0.034607499837875366, 0.07722979784011841, -0.06318975239992142, -0.03036031313240528, -0.040437206625938416, -0.0306966882199049, -0.01230829767882824, 0.013008832931518555, -0.06284645944833755, 0.021724438294768333, -0.05889994278550148, 0.1126873791217804, 0.0082920603454113, 0.04383585974574089, -0.05189816653728485, 0.004493188578635454, -0.07934847474098206, 0.015960389748215675, 0.05772770196199417, 0.0929194763302803, -0.1207270622253418, 0.023672636598348618, -0.043461039662361145, 0.06598865240812302, 0.06559981405735016, 0.08972116559743881, -0.010192264802753925, -0.00006493971886811778, 0.07417741417884827, 0.022931404411792755, 0.002648651599884033, 0.00017719563038554043, -0.03249083831906319, 0.0066436827182769775, 0.022280892357230186, 0.02954297885298729, 0.011857707984745502, 0.05364985764026642, -0.05407198518514633, 0.03159007057547569, -0.0464022271335125, -0.07352010905742645, 0.0008308703545480967, -0.00935188215225935, 0.025230437517166138, -0.042542602866888046, -0.02545572817325592, -0.017938658595085144, -0.05022764578461647, 0.027861030772328377, -0.012384142726659775, -0.03536989539861679, 0.02622094191610813, -0.039108674973249435, -0.009348583407700062, 0.05863160267472267, -0.0033685648813843727, -0.027020664885640144, -0.01528194546699524, 0.033148858696222305, -0.003938604611903429, -0.002564582973718643, 0.10723849385976791, 0.07396524399518967, 0.006011884193867445, -0.005720559507608414, 0.030343513935804367, -0.04320579767227173, -0.03716659173369408, -0.014175888150930405, -0.07664424926042557, -0.011303940787911415, -0.014239524491131306, -0.038122422993183136, -0.04236108437180519, 0.04539639130234718, 0.07109137624502182, -0.005180756561458111, 0.023847023025155067, 0.03781135752797127, 0.019286341965198517, 0.02212359942495823, 0.013462726026773453, 0.08546662330627441, -0.07789190858602524, 0.019633833318948746, -0.00977618619799614, 0.009688129648566246, -0.026129623875021935, 0.05521164461970329, -0.05941189080476761, -0.021663838997483253, -0.0097630200907588, -0.02597961388528347, 0.053157515823841095, -0.08618530631065369, 0.04335147514939308, 0.06053593009710312, -0.03177686780691147, -0.02400903031229973, -0.021391961723566055, -0.011104932986199856, -0.036599744111299515, 0.02093241922557354, 0.02867083065211773, -0.03826045244932175, -0.00466502271592617, 0.04794762656092644, -0.06816736608743668, 0.012903828173875809, 0.03275635838508606, -0.007293709088116884, -0.06861128658056259, -0.004334226716309786, -0.009978098794817924, 0.040290467441082, 0.04147408902645111, -0.03715590015053749, 0.0018661987269297242, 0.02434059977531433, -0.02293923869729042, -0.022093895822763443, 0.08443142473697662, -0.05705507844686508, -0.009666470810770988, 0.006215548142790794, 0.006407914683222771, 0.02969067543745041, 0.026140712201595306, 0.058914732187986374, -0.0002614355180412531, 0.028481315821409225, 0.011693334206938744, -0.002098239026963711, -0.05217684805393219, 0.0033446091692894697, 0.012253424152731895, 0.07924586534500122, -0.06503402441740036, 0.01831119693815708, -0.037110310047864914, -0.038805507123470306, -0.016300713643431664, -0.09109119325876236, 0.05010674148797989, -0.02111317217350006, 0.0369328148663044, 0.02087623067200184, 0.026787076145410538, -0.06654538214206696, -0.0032995748333632946, -0.055970706045627594, -0.05383675917983055, 0.00559749873355031, -0.01536683738231659, -0.01740189827978611, -0.038632750511169434, 0.08410165458917618, 0.005646675359457731, 0.009784942492842674, -0.06687989830970764, -0.08488636463880539, 0.02366507798433304, -0.056903690099716187, 0.034912046045064926, -0.003857448697090149, 0.01449204608798027, -0.04689721018075943, -0.034597449004650116, 0.04392432048916817, -0.039912447333335876, 0.031908221542835236, 0.009554008953273296, 0.005686269607394934, -0.01887221820652485, -0.04419495910406113, -0.05163528025150299, 0.01602901704609394, 0.013183096423745155, 0.01498616673052311, 0.07879240810871124, -0.0232255682349205, -0.01745237596333027, 0.04765612632036209, -0.0523655004799366, 0.03747081756591797, -0.023460054770112038, -0.06446249037981033, 0.0038526172284036875, 0.08510725200176239, 0.008658167906105518, -0.0206683948636055, -0.07995381206274033, -0.06528708338737488, -0.0417834110558033, -0.114157535135746, 0.02938874065876007, -0.002875830978155136, -0.03465954214334488, 0.054288823157548904, -0.05569082871079445, 0.007127632852643728, -0.029925543814897537, 0.0033589634113013744, 0.02552095800638199, -0.04154547303915024, 0.025946054607629776, -0.015358122065663338, 0.008125082589685917, 0.006752391345798969, -0.02256914973258972, -0.020680665969848633, -0.016033336520195007, -0.06299514323472977, 0.007841917686164379, 0.05947365611791611, -0.008249863982200623, 0.05130207538604736, -0.016429785639047623, 0.04273105412721634, -0.05866283178329468, -0.04830200597643852, 0.10065437853336334, 0.013826987706124783, 0.009366351179778576, 0.04232798516750336, 0.004135387949645519, 0.0698171928524971, -0.014545517042279243, -0.028368836268782616, -0.004376869648694992, 0.0486018992960453, -0.05022486671805382, -0.10452712327241898, -0.01717766933143139, 0.05750569701194763, -0.07461949437856674, 0.01785123161971569, 0.049779485911130905, -0.03664710372686386, -0.07108525931835175, 0.09121039509773254, -0.08314156532287598, -0.07543161511421204, 0.01640559732913971, -0.02193642035126686, -0.038323622196912766, -0.011338035576045513, -0.002689315704628825, 0.010765436105430126, -0.0407978780567646, -0.047952283173799515, -0.02639886736869812, 0.019432073459029198, 0.03478626906871796, 0.03654462844133377, -0.07407665252685547, 0.06799519807100296, -0.016246497631072998, -0.08786390721797943, 0.0496462881565094, -0.03678357973694801, 0.006981083657592535, -0.02529613859951496, 0.06080494076013565, -0.015389715321362019, 0.030209342017769814, -0.031282391399145126, 0.08077149093151093, -0.056308697909116745, -0.016837812960147858, 0.043670885264873505, 0.020768631249666214, 0.011673374101519585, 0.05843035504221916, 0.05518064647912979, -0.01721765100955963, 0.0023038345389068127, -0.021457349881529808, -0.04562731459736824, 0.028879882767796516, -0.0732656791806221, -0.01047608908265829, 0.004017543513327837, 0.02344418130815029, 0.06516324728727341, 0.0072731077671051025, -0.028483057394623756, -0.024729693308472633, 0.022807585075497627, 0.05107325688004494, 0.0267648845911026, -0.06888807564973831, 0.07498718798160553, 0.020697953179478645, 0.07396852970123291, -0.024840718135237694, 0.0389171801507473, 0.05789131671190262, 0.06126018986105919, -0.004948447458446026, 0.07312360405921936, -0.03464927524328232, -0.0459102988243103, 0.007588075008243322, -0.035540420562028885, 0.00004683993392973207, -0.08241245150566101, 0.07284428179264069, 0.0006260968511924148, 0.02586020529270172, 0.06659451127052307, -0.03716599941253662, -0.05256786197423935, 0.004201124422252178, -0.03344202786684036, 0.024976346641778946, -0.07112616300582886, 0.01919233798980713, 0.051663316786289215, 0.011223051697015762, 0.0023660799488425255, 0.06715823709964752, 0.08852143585681915, -0.03185200318694115, -0.08211231976747513, -0.08669161796569824, -0.0017839607317000628, 0.024773336946964264, -0.027531782165169716, 0.03529326990246773, 0.0015074042603373528, 0.0385238341987133, 0.02392289601266384, -0.021165035665035248, 0.052968479692935944, 0.04717925935983658, 0.06943423300981522, 0.008910770528018475, 0.007325870916247368, 0.011308138258755207, -0.028967218473553658, -0.0832056999206543, -0.014000969007611275, 0.04796710982918739, -0.010755063965916634, 0.07809185236692429, 0.03782963007688522, 0.010784244164824486, -0.1129310205578804, 0.02504316344857216, 0.010186235420405865, 0.014090994372963905, -0.051565319299697876, -0.004577565472573042, 0.047471120953559875, -0.025527600198984146, 0.04528454691171646, -0.013761842623353004, -0.020562920719385147, 0.04868718981742859, -0.05353183299303055, 0.05995693430304527, 0.02299371361732483, -0.016819095239043236, -0.025038709864020348, 0.02078882046043873, 0.002344234846532345, 0.014839854091405869, -0.018732771277427673, -0.007915320806205273, -0.027182428166270256, -0.03578556701540947, 0.039184436202049255, 0.00014944701979402453, -0.011375908739864826, -0.009755348786711693, -0.02782370336353779, 0.010233834385871887, 0.043100353330373764, 0.0003101586480624974, -0.021826989948749542, 0.015434172004461288, 0.05388091132044792, -0.03080364502966404, -0.06234248727560043, -0.07696865499019623, 0.015523898415267467, -0.05242226645350456, -0.040671780705451965, 0.057821329683065414, -0.022717170417308807, -0.07855060696601868, -0.0002448536397423595, -0.05989321693778038, 0.033771637827157974, -0.05693606659770012, -0.06288284063339233, 0.018674274906516075, -0.05111487954854965, -0.011336985044181347, 0.04491716995835304, 0.048694852739572525, 0.04944426566362381, 0.07119526714086533, 0.126508891582489, -0.052800536155700684, -0.02806784212589264, 0.05667724832892418, 0.002246001735329628, -0.00236389203928411, 0.014631173573434353, 0.022965973243117332, -0.014651204459369183, 0.038090258836746216, -0.03791843354701996, 0.048259854316711426, 0.05113539472222328, -0.022955911234021187, -0.05542738735675812, -0.0343480221927166, 0.022767910733819008, -0.1350214034318924, 0.01740928925573826, 0.00850808434188366, -0.014641832560300827, 0.037134211510419846, 0.008193901740014553, 0.029951348900794983, 0.003096480155363679, -0.03930901736021042, 0.008850578218698502, 0.03876172751188278, -0.07198940217494965, -0.05069885030388832, -0.061359841376543045, 0.04132252186536789, -0.0009375826921314001, -0.033892951905727386, -0.031277380883693695, -0.047186244279146194, 0.0602429136633873, -0.024298949167132378, -0.018825476989150047, -0.020970162004232407, 0.011263438500463963, -0.02768906205892563, 0.0023744753561913967, 0.01570354588329792, 0.038836438208818436, -0.07742402702569962, 0.0258023738861084, 0.05340016260743141, -0.0845150575041771, 0.04582203924655914, -0.024561593309044838, 0.04127059131860733, 0.08142418414354324, -0.012576096691191196, -0.05171620100736618, 0.020911242812871933, 0.012165696360170841, -0.05116066336631775, -0.06542398780584335, -0.013949551619589329, 0.013339832425117493, 0.030675001442432404, 0.0007445793598890305, -0.03759340941905975, 0.057823166251182556, -0.012061253190040588, 0.019608236849308014, -0.10733279585838318, -0.06241072714328766, 0.00016146377311088145, 0.05646587535738945, 0.024785462766885757, 0.013125932775437832, 0.06847936660051346, 0.024397023022174835, 0.02226707898080349, 0.0018762372201308608, 0.004223340190947056, -0.07761077582836151} t.Logf("Neckline2 magnitude: %f", e.Magnitude()) - t.Logf("Neckline2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.True(t, e.IgnoreFace()) + t.Logf("Neckline2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.True(t, e.Ignored()) /* p, r, _ := EmbeddingsMidpoint(Embeddings{ @@ -169,19 +169,19 @@ func TestIgnoreEmbeddings(t *testing.T) { t.Run("PaintedPerson", func(t *testing.T) { e := Embedding{0.01597357913851738, -0.07193982601165771, 0.043656475841999054, 0.04960828647017479, -0.008978357538580894, 0.06066560000181198, -0.020420748740434647, 0.0173389483243227, -0.019165219739079475, -0.03516208752989769, -0.04103156551718712, 0.018409833312034607, 0.04072514921426773, 0.05058896169066429, 0.015338804572820663, 0.030164213851094246, -0.015386463142931461, 0.03273216634988785, 0.04219293221831322, -0.1108786091208458, -0.10304711014032364, 0.020315513014793396, 0.057943981140851974, -0.0027196938171982765, -0.0061768414452672005, 0.0260649174451828, -0.08365893363952637, -0.09976255148649216, -0.03090636245906353, -0.0025166093837469816, -0.06923917680978775, 0.034817129373550415, 0.0253363735973835, -0.025557270273566246, -0.022549046203494072, 0.044226013123989105, 0.04888883978128433, 0.03800947964191437, -0.09485054761171341, -0.00033863651333376765, -0.010704882442951202, 0.05157643184065819, 0.015239695087075233, -0.01969643123447895, 0.0014363847440108657, 0.0009661687654443085, 0.04228316247463226, 0.03631330654025078, -0.07720259577035904, -0.044195886701345444, -0.02269810624420643, 0.09080266952514648, 0.010291875340044498, 0.02037722058594227, -0.08863915503025055, 0.0035208254121243954, 0.06523952633142471, 0.0441037081182003, 0.007976756431162357, 0.0045996662229299545, -0.03677069768309593, -0.06329121440649033, 0.012780512683093548, -0.03916202858090401, -0.06256367266178131, 0.0803549736738205, -0.03259962052106857, 0.017731521278619766, 0.03806477040052414, 0.009746663272380829, 0.010604199953377247, -0.017310233786702156, 0.10745426267385483, 0.0032290273811668158, -0.012216795235872269, -0.01717674359679222, -0.04497332125902176, 0.016326576471328735, -0.023344388231635094, 0.0020901684183627367, 0.054117463529109955, -0.013483460992574692, -0.006190767046064138, 0.023456061258912086, -0.026996703818440437, 0.0846126601099968, -0.0005202461616136134, 0.05341147258877754, -0.049257174134254456, -0.012583576142787933, 0.008442644961178303, 0.035333383828401566, 0.025291845202445984, -0.010890500620007515, 0.04216349869966507, -0.0476442351937294, -0.026283128187060356, -0.03478209301829338, -0.05787711963057518, 0.009672915562987328, 0.03499358892440796, -0.02469063177704811, -0.006710068788379431, -0.004809626843780279, 0.05640732869505882, -0.04302126541733742, 0.028157107532024384, -0.10112379491329193, -0.04380965605378151, -0.11678586900234222, -0.03923406824469566, 0.06040608510375023, -0.10087518393993378, -0.0530724972486496, -0.023564834147691727, -0.00684269517660141, 0.05356975644826889, -0.035915307700634, -0.025520041584968567, -0.01648668944835663, -0.06130196899175644, -0.01658470556139946, 0.004858672618865967, -0.03841536492109299, 0.017837807536125183, -0.03939996287226677, -0.015943342819809914, 0.07338301092386246, 0.0807722881436348, -0.022905180230736732, 0.0336654931306839, -0.03565594553947449, 0.05552743002772331, 0.04095354676246643, -0.031242642551660538, 0.039830368012189865, -0.038103893399238586, -0.010134496726095676, 0.05570278689265251, 0.02351784147322178, -0.02299611270427704, 0.053819019347429276, 0.034673627465963364, 0.031377315521240234, 0.04231230914592743, -0.023052338510751724, -0.010306629352271557, -0.015399642288684845, 0.051914919167757034, 0.07044005393981934, 0.09296474605798721, -0.08138900995254517, -0.033701006323099136, 0.004072033800184727, -0.0020206875633448362, 0.048470474779605865, 0.0028269262984395027, 0.05156606063246727, 0.025790657848119736, -0.058407314121723175, -0.03125441446900368, 0.01334269531071186, -0.05527856945991516, 0.0296731386333704, 0.019522489979863167, 0.026443053036928177, -0.12732702493667603, -0.0034121081698685884, 0.012761381454765797, 0.036282408982515335, 0.03162815421819687, -0.04704444855451584, -0.024629021063447, 0.01591433398425579, -0.0005493798526003957, -0.0501101016998291, 0.03899604082107544, -0.038960520178079605, -0.01800590194761753, 0.029212797060608864, -0.06600833684206009, 0.031156904995441437, 0.024141786620020866, -0.003317768219858408, -0.003920566290616989, -0.006939861923456192, 0.07737533003091812, 0.035820163786411285, 0.03365776315331459, -0.054605305194854736, 0.07606712728738785, 0.05051489546895027, 0.02057207003235817, 0.022945839911699295, 0.0008273129933513701, 0.005792823154479265, 0.004569715354591608, -0.002575124381110072, -0.013341030105948448, 0.06895353645086288, 0.04561972618103027, 0.05963420495390892, -0.001989814918488264, 0.023420987650752068, -0.04155866801738739, 0.06971555948257446, -0.005659183021634817, 0.04545917734503746, 0.01331553515046835, -0.03823747858405113, -0.05372835695743561, -0.03834766894578934, 0.019600100815296173, 0.09644639492034912, 0.026453090831637383, -0.007863708771765232, 0.05031179264187813, -0.01901695691049099, 0.0181371308863163, 0.07339556515216827, -0.06784798949956894, -0.048230696469545364, -0.023418331518769264, -0.103119857609272, 0.005312192719429731, 0.00793666671961546, -0.05386500433087349, 0.007539672777056694, -0.01215648464858532, 0.055117346346378326, 0.05204245075583458, 0.09822934120893478, -0.040691062808036804, 0.0035281905438750982, -0.013850259594619274, -0.058170415461063385, 0.10378692299127579, -0.036707911640405655, 0.050528835505247116, -0.07029395550489426, -0.009521860629320145, -0.030611727386713028, 0.038581255823373795, 0.06420805305242538, -0.04095904529094696, 0.0039362553507089615, 0.02269616164267063, 0.028584513813257217, -0.04330946505069733, 0.036014966666698456, 0.10501296818256378, -0.047305986285209656, -0.00032546179136261344, 0.039181046187877655, -0.017799802124500275, 0.043878406286239624, -0.04363051801919937, -0.021742625162005424, 0.0005747449467889965, 0.027649298310279846, 0.005642932374030352, -0.010955455712974072, 0.0337509885430336, 0.05143224075436592, -0.0878075659275055, 0.015767866745591164, 0.056287556886672974, -0.07557154446840286, -0.018000023439526558, 0.06744494289159775, -0.044510368257761, -0.013818219304084778, 0.0029945767018944025, 0.010900385677814484, -0.055003572255373, -0.1025921180844307, -0.04064873605966568, 0.005055897869169712, 0.027730746194720268, 0.03185932710766792, 0.0023040121886879206, 0.02501119300723076, -0.050378553569316864, -0.05160580575466156, -0.08358556032180786, 0.007594792637974024, -0.040957219898700714, -0.07050413638353348, 0.06051569804549217, -0.03803252801299095, 0.02274048514664173, 0.014578158035874367, 0.07824084907770157, 0.0408061146736145, 0.05447494238615036, -0.04177893325686455, -0.03330428898334503, 0.0042859637178480625, -0.01080472581088543, 0.05019731447100639, 0.00018294739129487425, -0.014399861916899681, 0.10141165554523468, 0.07071347534656525, 0.014951310120522976, -0.03011101856827736, -0.06508581340312958, -0.021347783505916595, 0.02545611746609211, -0.01354166679084301, -0.02817683480679989, 0.057672496885061264, -0.015965979546308517, 0.005934766959398985, 0.03351050615310669, 0.016078295186161995, 0.015063274651765823, 0.03533317893743515, 0.001076950691640377, 0.013549630530178547, 0.0346587635576725, 0.04121863842010498, -0.013695892877876759, 0.009236577898263931, -0.06757228821516037, 0.10480765998363495, -0.036418553441762924, -0.0037368854973465204, 0.012888357043266296, 0.02272830717265606, 0.01192606519907713, -0.028047077357769012, -0.0012485141633078456, -0.06703557819128036, -0.03338891267776489, 0.0031921803019940853, 0.062465447932481766, 0.03926593437790871, 0.03460651636123657, -0.05668650567531586, -0.04720911756157875, 0.009730434976518154, 0.02906031161546707, -0.057393878698349, -0.06274914741516113, -0.048074785619974136, -0.018012454733252525, 0.00621568551287055, 0.023777222260832787, -0.013679377734661102, -0.00022730656201019883, 0.042406823486089706, -0.024579016491770744, -0.03812238574028015, -0.01727627031505108, -0.016880443319678307, 0.019188104197382927, 0.024385960772633553, -0.049682117998600006, 0.00036114969407208264, -0.009493647143244743, 0.020863002166152, 0.023153604939579964, 0.029164385050535202, -0.00030223297653719783, 0.004758278373628855, 0.03658118098974228, 0.03135006129741669, -0.007742880377918482, 0.04058638960123062, -0.017036402598023415, 0.04519055038690567, 0.0018178171012550592, -0.0006817050161771476, 0.015926865860819817, 0.036399565637111664, 0.006131448317319155, -0.054221395403146744, 0.06021636351943016, 0.02610265649855137, -0.06213931366801262, -0.045825324952602386, -0.0005509998300112784, 0.03888043761253357, 0.0521681010723114, 0.02393646351993084, -0.03505561128258705, -0.08070369064807892, 0.018432384356856346, -0.05158394202589989, 0.05304363742470741, 0.018089504912495613, 0.08790239691734314, -0.001722385990433395, -0.0027569930534809828, 0.01917317695915699, 0.05333968251943588, 0.009451157413423061, -0.07562132924795151, 0.021587656810879707, -0.06788883358240128, -0.02754906378686428, -0.06258401274681091, 0.0492587648332119, -0.0034600202925503254, -0.06341584026813507, 0.02471046708524227, -0.004790421575307846, -0.03600534796714783, 0.05601498857140541, 0.014920870773494244, -0.047645967453718185, -0.003240075195208192, 0.0005391445010900497, -0.015295980498194695, 0.07231325656175613, -0.07740612328052521, -0.08658719062805176, 0.03397674858570099, 0.016982445493340492, -0.051424846053123474, -0.03868729621171951, -0.0013543255627155304, -0.016734382137656212, -0.07939253002405167, 0.019641805440187454, 0.027074601501226425, 0.02830844186246395, 0.01144347246736288, -0.005397784058004618, 0.07319182902574539, 0.050040800124406815, -0.021809881553053856, 0.040998730808496475, -0.004934004042297602, 0.035213273018598557, 0.03710246458649635, 0.009665041230618954, 0.015287664718925953, -0.03161002695560455, -0.023860881105065346, -0.00030005836742930114, 0.057885006070137024, 0.01010730117559433, 0.07192880660295486, -0.0038926242850720882, -0.0739869698882103, -0.019083591178059578, -0.002537532476708293, -0.06337025761604309, -0.09009282290935516, 0.08770939707756042, 0.022934451699256897, -0.08211331069469452, 0.06496310234069824, -0.011005539447069168, 0.005247761495411396, 0.07067444920539856, 0.022533442825078964, 0.03188265115022659, -0.018107861280441284, 0.0173112191259861, 0.039995092898607254, -0.018331704661250114, -0.03907928243279457, -0.07069626450538635, -0.04568508267402649, 0.04175611585378647, 0.010662917979061604, 0.016010427847504616, -0.02990751527249813, -0.048690564930438995, -0.03412264212965965, -0.005951398517936468, -0.007761804852634668, -0.0569462813436985, 0.0073435199446976185, -0.030721446499228477, -0.035164669156074524, 0.10624047368764877, -0.04197647050023079, -0.02504684403538704, 0.07344018667936325, -0.06350075453519821, 0.06391378492116928, 0.0565185584127903, -0.043936487287282944, -0.027384424582123756, 0.020891351625323296, -0.002006136579439044, -0.06088550016283989, -0.049474503844976425, -0.028472227975726128, -0.050478436052799225, 0.043917663395404816, -0.049325309693813324, 0.017862016335129738, 0.10076982527971268, 0.05516329035162926, 0.0273272804915905, -0.013084950856864452, -0.012623034417629242, -0.01223387848585844, 0.09096908569335938, -0.05225193500518799, 0.022140637040138245, 0.03860332444310188, -0.023946430534124374, 0.025730647146701813, 0.03227037191390991, -0.09421394765377045, -0.04385320097208023} t.Logf("PaintedPerson magnitude: %f", e.Magnitude()) - t.Logf("PaintedPerson blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.False(t, e.IgnoreFace()) + t.Logf("PaintedPerson blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.False(t, e.Ignored()) }) t.Run("RealPerson1", func(t *testing.T) { e := Embedding{-0.037731018, -0.005501065, 0.04339579, 0.050818004, -0.059338734, 0.033849984, -0.006599584, -0.0017643301, 0.049746443, -0.103716515, 0.037138782, -0.0064612515, 0.071909964, 0.013218528, -0.065359734, 0.11057091, 0.031195551, 0.025612833, 0.0075477255, -0.034973715, -0.013490629, -0.08104751, -0.022038054, -0.05304818, 0.008366317, -0.056096837, -0.008484318, 0.049539477, 0.019540254, 0.067417614, -0.027856546, -0.008532138, -0.017063588, -0.00016265438, -0.106199585, 0.03904082, 0.030587498, 0.043008707, -0.015111545, -0.022849092, 0.0025588698, -0.012814152, 0.037556626, -0.0086288145, 0.05265788, 0.011832273, 0.00015048613, -0.0081366515, 0.0013409692, 0.028389124, 0.022627315, -0.015008434, -0.0007749727, 0.013927345, -0.012275729, -0.0090859635, 0.019502806, -0.011900984, 0.016286656, 0.08094661, 0.000306613, -0.06327904, 0.018552454, 0.08885108, -0.07583091, 0.09275318, -0.018484656, 0.074180886, -0.039385945, -0.08063905, -0.05360434, -0.037074074, 0.09909196, 0.025063906, -0.009406389, -0.029612983, -0.018644262, 0.08433939, -0.04466277, -0.07118042, -0.0053266245, -0.07471344, 0.06739151, -0.05399609, 0.03125197, -0.00007781149, -0.04214992, -0.044316035, 0.025013437, 0.031466946, 0.0023496088, 0.042693187, -0.046198968, 0.026152546, -0.017578958, 0.023763098, 0.027511515, -0.05229892, -0.005204117, 0.035853546, -0.031919815, -0.027175877, -0.033706605, 0.018576957, -0.0010251165, -0.006808904, 0.009910016, -0.046926413, -0.02833718, 0.0132687995, -0.033933964, 0.06434295, 0.046245363, 0.044698197, 0.041076522, 0.04224362, -0.050834127, 0.0037004466, 0.061506275, -0.018232772, 0.067569405, 0.048701495, 0.042266034, -0.11045008, 0.03627151, -0.07259142, -0.0027725939, 0.040572345, 0.010365194, -0.018683784, 0.004533848, 0.037213936, -0.050944775, 0.07134523, 0.004012727, 0.036228556, -0.013853831, -0.06910639, -0.011394227, -0.012075533, 0.036311198, -0.02587341, -0.04086224, -0.024498813, -0.019423751, -0.022674281, 0.052483488, 0.026303312, -0.051178075, 0.008410645, 0.039851066, -0.028721321, -0.027934253, -0.029567441, 0.054549955, 0.07423011, -0.07211806, 0.015979288, 0.002092099, 0.049062036, 0.025120452, 0.045975365, 0.025024865, -0.04019101, 0.0013054911, -0.0049644294, 0.0065203104, -0.03237452, -0.020704443, 0.028736785, -0.027353559, 0.07551169, 0.0842262, 0.019992182, 0.11138123, -0.028617613, 0.06700691, -0.048681036, -0.008201593, -0.058066163, 0.027867565, 0.07693089, -0.033642102, -0.05855467, -0.08575646, -0.019721355, 0.018443357, -0.0037373751, 0.032450553, -0.0074002664, -0.028135147, 0.046631414, 0.0192969, -0.0071076434, -0.004898368, 0.011896125, -0.026020564, 0.074016415, -0.033884488, -0.07919758, 0.021606326, -0.0142197255, 0.0807476, 0.03722956, -0.0015949347, 0.008076167, -0.009640628, 0.02341143, 0.015375526, -0.059428506, 0.051759534, 0.028049389, 0.07790443, 0.0478649, 0.09191913, -0.055882096, -0.026637457, 0.01236174, -0.0033003334, 0.008522798, 0.027216703, -0.033221588, -0.028086975, -0.11505473, -0.044336796, 0.013873659, 0.03982099, 0.060988583, -0.07439005, 0.01333661, -0.004818605, 0.02561305, -0.059055943, 0.0081638545, -0.032278564, 0.046092775, 0.025316834, -0.046857174, -0.0341012, 0.04379944, -0.029710777, 0.09238533, 0.009769442, 0.018552538, -0.02632421, 0.033739865, -0.022547472, 0.016400741, -0.05336998, -0.012623122, -0.08303054, -0.010368709, 0.01690871, 0.0014627968, -0.050720602, 0.038742293, -0.065664165, -0.10676187, -0.013403239, 0.075702645, -0.055623896, -0.03871971, -0.042371742, 0.03794916, -0.0590573, -0.002583715, -0.029995736, -0.08144537, -0.043295015, -0.034286328, -0.026538746, 0.01953962, 0.08203153, 0.036415525, 0.045531306, 0.004713152, 0.026550433, -0.0055336948, -0.031087596, -0.01923592, -0.1047651, 0.051826596, -0.009522955, 0.0023846119, -0.030824797, 0.0011774554, 0.03384506, 0.010090165, -0.033521466, -0.052155476, 0.0032979914, -0.004305921, -0.08622774, 0.03262125, 0.06332183, 0.00067599304, 0.01989574, 0.04406689, 0.019945903, -0.003796719, 0.00025200442, -0.010055775, 0.04070448, -0.004082432, -0.026942603, 0.110138796, -0.029453337, 0.015611174, 0.08778206, -0.027199872, -0.014513782, 0.021546016, 0.01706933, -0.01365763, 0.026393317, -0.029974515, 0.0050973813, 0.00732006, 0.034644503, 0.03125295, -0.01563078, -0.041023903, -0.04566191, -0.00013489528, 0.04253813, 0.045907266, -0.011943533, 0.031480506, -0.0034109016, -0.035025172, 0.028193155, -0.06832476, -0.0019371725, -0.049427234, -0.0061696135, 0.051213425, 0.07832765, -0.01894849, 0.0290217, 0.031639505, -0.045830216, -0.048976466, 0.052241277, -0.026111973, 0.037248738, -0.07693719, -0.00020981894, 0.030037824, -0.041687537, -0.015251262, 0.041234106, 0.031005232, 0.024838371, 0.0020733695, -0.038252156, -0.026375879, 0.03495583, 0.018539391, -0.07203285, 0.006305707, -0.004792029, -0.05153865, 0.0072443904, -0.017075827, 0.013596034, -0.0054885144, -0.052320853, -0.033805914, -0.038080305, -0.010182737, 0.012953395, 0.014565793, -0.023107765, 0.030313661, 0.011124675, 0.018100796, 0.1074551, -0.074430406, -0.04017658, -0.002058053, -0.07340946, 0.0033503077, 0.04565434, -0.033483636, -0.029218825, -0.05245377, -0.059680052, 0.017752757, -0.05493096, -0.10746678, 0.08623605, 0.014577705, 0.0044184765, -0.025559181, -0.015846781, -0.006661373, 0.09459266, 0.036481388, 0.030402042, -0.0152169075, 0.0037343376, 0.024195764, -0.01859682, -0.0022416788, 0.0056786016, -0.06771737, 0.02364697, 0.021247962, 0.05002757, 0.083975114, 0.011197936, 0.0035017033, -0.0014220127, -0.024415374, 0.023921741, -0.0108229555, -0.06622103, -0.00024976654, 0.06549428, -0.004968772, -0.011665843, 0.03409593, 0.028397659, -0.086434126, -0.074232705, 0.041721817, -0.034767248, -0.014432104, 0.006313255, 0.04040112, -0.0050085387, -0.0023618732, -0.02225774, 0.02383989, 0.061036374, 0.058602326, 0.04343989, -0.029145751, 0.0369256, -0.054843802, -0.017078603, 0.047091234, 0.050245833, -0.04615808, -0.02404996, 0.02584908, -0.006215116, -0.016719814, 0.052097827, 0.01908364, -0.07564805, -0.11024787, -0.036854018, -0.0056766514, -0.007618422, 0.034403287, 0.056957226, -0.03565076, -0.0365251, 0.040833052, 0.008173664, -0.04300709, 0.0028465139, -0.020792698, 0.020321466, -0.002447697, 0.019681728, -0.08843341, -0.042670425, 0.014576458, 0.009701015, -0.12435015, -0.025056241, 0.03084893, -0.031128377, 0.006784327, 0.052201632, 0.06773422, 0.015289244, 0.009421969, 0.0725144, -0.07110377, -0.05183192, -0.008816121, -0.11178569, 0.079700254, -0.0110752955, 0.0046521816, -0.07299747, 0.10732809, -0.06012486, 0.057736155, -0.02227576, -0.063017495, 0.085292354, 0.037407015, -0.07368719, 0.033426613, 0.062104296, -0.016089993, -0.023178348, -0.064638525, 0.028132388, -0.049967688, 0.053581465, 0.031400185, 0.0712773, -0.012665878, 0.0760322, 0.030081542, -0.022147592, 0.009422989} t.Logf("RealPerson1 magnitude: %f", e.Magnitude()) - t.Logf("RealPerson1 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.False(t, e.IgnoreFace()) + t.Logf("RealPerson1 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.False(t, e.Ignored()) }) t.Run("RealPerson2", func(t *testing.T) { e := Embedding{0.05743743, 0.06322246, 0.04731233, -0.01582013, -0.014022472, 0.028749773, -0.079572044, 0.010417165, 0.012425559, -0.013655686, -0.05018789, 0.026249807, 0.037449032, 0.051438555, -0.055292394, 0.018136416, 0.035481997, 0.021924775, 0.0449153, -0.046709806, 0.025960712, -0.063309774, 0.037570722, 0.0053055496, 0.07164356, -0.058082405, 0.0017537506, 0.05310737, 0.008366767, 0.001858572, -0.0444527, -0.04880738, -0.033274952, -0.08379612, -0.018964237, -0.0029277618, -0.021386296, 0.0375952, -0.034034044, -0.060141306, -0.0727236, 0.05060482, -0.082235344, 0.04422095, 0.074947104, 0.020209799, 0.0017703519, -0.015411033, 0.012017898, 0.02179871, -0.013231191, -0.08483583, 0.0057485234, -0.019012775, -0.04857383, 0.084329374, 0.009039854, 0.040807534, -0.01692938, 0.0017201875, 0.036594935, -0.08844029, -0.00285713, 0.054565318, -0.047155175, 0.017556412, 0.009818504, 0.113506615, -0.009222306, -0.0004704829, -0.0005908021, 0.023356704, 0.015126567, 0.035651624, 0.025497274, -0.10676789, -0.06828348, 0.112095155, 0.08150907, 0.0007053766, -0.008199173, -0.03852071, 0.029535439, -0.030568745, -0.08978221, -0.004848515, -0.03737906, 0.036448833, 0.004548617, 0.08181337, -0.0087715015, 0.02876368, -0.0060202847, -0.013462866, -0.05015226, -0.03569624, 0.049505115, 0.011994855, -0.010969182, -0.0038046215, -0.004821639, 0.01422656, -0.05946822, -0.013812223, 0.039755587, 0.034921456, -0.05158028, -0.0008751564, -0.031674784, -0.002480392, 0.013109971, -0.017252844, 0.064675435, 0.07642624, 0.08362122, 0.030908048, 0.067052245, 0.021291262, 0.01784629, -0.0507172, 0.052007917, 0.04663132, 0.0064223176, -0.027726524, 0.08033194, 0.038676508, 0.018382965, 0.048913725, -0.022436062, 0.0056725373, -0.040102404, 0.037674494, -0.022307452, -0.03098931, 0.0577183, -0.022725038, -0.0055031423, 0.045162845, -0.014300147, -0.018093627, -0.040114313, -0.051383376, -0.030573318, -0.101557806, -0.008447289, 0.014637746, 0.050047614, -0.011550598, 0.027773034, -0.03317795, -0.048737925, -0.02800452, -0.016925864, -0.037572905, 0.025179392, 0.031473313, -0.010588548, -0.0119464, 0.0057186596, 0.049826983, -0.026282294, -0.00095309806, 0.04696705, -0.0444816, -0.04687481, -0.05711774, 0.07398202, -0.0066416007, -0.016446855, 0.051111717, -0.0419391, -0.013271554, 0.043318115, 0.0012680996, 0.037176434, -0.021031545, 0.03968714, 0.048614495, -0.0058204047, -0.010237752, 0.07029732, 0.018752169, -0.0616816, 0.008854898, 0.06205655, -0.009874518, -0.050585378, 0.012557405, 0.01626891, 0.017797807, -0.03568621, -0.007182635, 0.015247179, 0.02795279, 0.009831571, 0.045041207, -0.055870973, -0.025731718, 0.01907759, -0.034226514, 0.029678043, -0.021697098, -0.020734878, 0.057307053, -0.008900531, -0.019598745, -0.03082626, 0.014591779, 0.06420119, -0.059627317, -0.03732171, 0.016718497, -0.0027331563, 0.013793794, 0.06873449, 0.031878877, -0.025323479, 0.017207827, -0.00025769856, 0.01302832, -0.033877812, 0.1036087, -0.031368185, -0.0062403507, -0.020410763, 0.064998895, -0.049161144, 0.075556606, -0.005309279, 0.024778325, -0.055955246, -0.053952686, 0.04611469, -0.040877238, 0.0366899, 0.05907716, -0.023292458, -0.081198305, 0.078474045, 0.050623402, -0.06233864, 0.07453958, 0.0152983265, -0.04816594, 0.023196025, -0.03438517, -0.024680838, -0.04664079, 0.054698855, 0.0038191404, 0.0024043208, 0.0034349218, -0.03711057, 0.001107596, -0.0028691792, 0.00030419108, 0.037632354, 0.060571946, -0.0946064, 0.042204216, -0.037838906, 0.021439435, -0.076814726, 0.06236704, 0.012242562, -0.061841127, 0.016115433, -0.063648604, 0.025584254, 0.10527214, -0.079565875, 0.008840051, 0.06655628, -0.0051484755, -0.08278825, -0.023478502, 0.0713399, -0.018204115, 0.048147563, -0.12774643, -0.014040633, 0.052833144, 0.0025820592, 0.029898077, 0.09640923, 0.08246072, 0.02947083, -0.015254255, -0.05879318, -0.08034651, -0.03984985, -0.008921548, 0.0035848247, 0.01210673, 0.01669468, -0.011540037, 0.043646365, 0.12930681, 0.028525097, -0.033249676, 0.009854595, 0.020683004, -0.03317388, 0.030189851, -0.037221596, 0.056988247, 0.028217647, -0.09884985, 0.010463105, 0.052619364, -0.025229864, -0.0095943725, -0.0152116455, 0.050259188, 0.04650281, -0.07481224, -0.024553102, -0.00060233194, -0.054850005, 0.024833087, 0.029229235, -0.041785177, -0.07714764, -0.013403594, 0.030718219, 0.015469627, -0.0074155433, -0.02679301, 0.009519983, -0.059538018, -0.008628714, -0.0067284205, 0.010197514, -0.06606767, -0.005759551, -0.0022303548, -0.0028307706, 0.014501192, 0.025007654, 0.02578938, -0.0378708, 0.045471873, 0.046895593, 0.064339206, -0.028388325, 0.060857113, -0.020218765, 0.031644333, 0.0052066315, 0.019141829, 0.056266394, 0.009460299, -0.024507342, -0.007147454, -0.08706694, -0.040379945, 0.044624608, 0.0354123, -0.019891156, -0.07543022, 0.04300264, -0.057571575, -0.008736315, 0.027166944, -0.02620351, -0.06503468, 0.04547514, -0.06995108, 0.023360554, 0.0067407857, -0.07763636, 0.04539317, 0.022868318, -0.010696204, 0.096428476, -0.0098833935, 0.010394665, -0.053308632, -0.07989839, 0.0047803717, -0.008077739, -0.002149282, 0.03329656, 0.031331684, -0.041785568, -0.047738556, -0.06495552, 0.020175837, -0.03115513, -0.06061734, -0.002706623, -0.010334317, 0.00423277, 0.012610406, -0.035930026, 0.016086096, 0.0995368, -0.022022268, 0.0145803625, 0.055138133, -0.05336383, 0.064680666, -0.009677598, -0.054862097, 0.055777773, -0.06849751, -0.022308815, 0.04459878, 0.05018248, 0.07288731, 0.009007135, 0.09244995, -0.120825015, 0.06114768, 0.06042321, -0.007861768, -0.010927538, 0.04720156, 0.04455385, -0.03482649, -0.026552528, 0.043172978, 0.01093146, -0.015799692, 0.002202651, 0.010309535, 0.005310587, -0.11890363, -0.0795878, -0.0003631139, -0.027302552, -0.015855208, -0.018209826, -0.022755314, -0.013153738, 0.04345833, 0.03354373, 0.0105263805, 0.06194301, -0.032513645, 0.096333094, 0.005829615, 0.03347289, -0.07679508, -0.045443438, 0.030386887, -0.05020792, 0.0033663346, 0.05774469, -0.027640222, 0.044374026, 0.00033217962, -0.030820126, 0.05522514, 0.013675768, 0.0069077997, 0.04126497, 0.03151114, 0.02491263, -0.067820564, -0.0103627015, -0.07824549, -0.05266336, 0.013888292, 0.040954925, 0.034307495, -0.06418129, 0.0039767474, 0.024156764, 0.014469209, -0.0018970015, -0.07990409, 0.028226675, -0.026945848, -0.02464125, -0.050481487, 0.05450125, -0.025523432, -0.015445301, 0.0060901823, 0.012443802, 0.04673962, -0.018540293, -0.016265117, -0.031241901, 0.009048211, 0.054158207, -0.048130896, 0.09530002, 0.0099937515, -0.03540203, 0.025122656, -0.0856811, -0.06332409, 0.0068043796, 0.020160854, -0.06262762, 0.038287282, -0.06531139, 0.0063432995, 0.00087177445, -0.007837982, 0.050352592, -0.05995185, 0.063116044, 0.017331842, -0.0021170392, 0.0011423155, -0.023920225, -0.050662033, -0.015922869, -0.028740764} t.Logf("RealPerson2 magnitude: %f", e.Magnitude()) - t.Logf("RealPerson2 blacklist dist: %f", IgnoreEmbeddings.Dist(e)) - assert.False(t, e.IgnoreFace()) + t.Logf("RealPerson2 blacklist dist: %f", IgnoredEmbeddings.Dist(e)) + assert.False(t, e.Ignored()) }) } diff --git a/internal/face/embeddings_kids.go b/internal/face/embeddings_kids.go index 2150825f5..0a1a5fc4c 100644 --- a/internal/face/embeddings_kids.go +++ b/internal/face/embeddings_kids.go @@ -15,13 +15,24 @@ func init() { log.Warnf("faces: PHOTOPRISM_FACE_KIDS_DIST can not be parsed (0.1-1.5; -1 to disable)") } else if f < 0 { KidsDist = -1 + log.Debugf("faces: enabled matching of all kids embeddings") } else if f >= 0.1 && f <= 1.5 { KidsDist = f + log.Debugf("faces: changed matching distance for kids embeddings to %f", KidsDist) } else { log.Warnf("faces: PHOTOPRISM_FACE_KIDS_DIST is out of range (0.1-1.5; -1 to disable)") } } +// KidsFace tests if the embedded face belongs to a baby or young child. +func (m Embedding) KidsFace() bool { + if KidsDist <= 0 { + return false + } + + return KidsEmbeddings.Contains(m, KidsDist) +} + // KidsEmbeddings contains embeddings of children's faces that are (currently) too generic to be properly matched. var KidsEmbeddings = Embeddings{ {0.014076345932802983, 0.00010343994862133903, -0.010959638582010354, 0.04127759233649288, 0.08789882808923721, 0.017725093897232518, -0.022899451665580273, 0.0452611151018313, 0.03823948075296357, 0.06343058230621475, 0.04759708313005311, 0.025469324551522732, -0.038468056092304845, -0.01729393713841481, -0.024367967886584147, -0.013041795021438572, -0.023096864776951925, 0.02793885980333601, -0.01649821868964604, 0.01995509217626282, -0.01322871370108, -0.008252202965585249, 0.028910591408410773, -0.07333579286932945, -0.08700574721608843, 0.07423889530556542, 0.07409120404294559, -0.008282799340252365, -0.045015843851225715, 0.03404966489012752, 0.01429881900548935, -0.016775283297257765, -0.010920435023893203, 0.050287961161562374, -0.001957439451611468, -0.021051756106317043, -0.024205328364457403, 0.003975618431078536, -0.07230451224105698, 0.03437736251258424, -0.026977801843064038, -0.0028144880530557464, 0.0007902844808995724, 0.06425002217292786, 0.0022268929917897496, 0.001021586192239608, -0.004946612969173917, 0.04372643147196088, -0.08558774952377592, -0.04968303974185671, 0.002605055658412831, -0.03057751152664423, 0.04062951808529241, 0.02759489676515971, -0.07084034436515399, 0.01893762020128114, -0.025910851021762937, 0.0092267398223547, -0.051628660942826955, 0.007369522271411759, -0.008836706734395452, -0.006196810797389064, -0.025300242139824798, 0.011610688575144325, -0.03033792200897421, -0.03983142187020609, -0.0495086024914469, -0.049739364734185595, 0.018020538247323463, -0.002467086366648021, 0.01068531721830368, -0.012969749713582652, -0.005401422668780599, -0.07798752295119422, -0.015362580107258899, 0.023464103628482138, -0.03776164698813643, -0.037554266463432996, 0.020393860027460114, -0.0013615138117789424, 0.03326471469232014, 0.025772061997226307, 0.03849751901413713, -0.009273543953895569, -0.020172682125121355, 0.07898283536945071, -0.020976615803582326, 0.013514869646834475, 0.034119718575051854, 0.011594483063423209, -0.05110570602118969, -0.0017224330721156938, -0.008944391782279126, -0.03416518388049943, 0.07138298824429512, 0.026323047632883703, 0.0073144749206091675, 0.07004635035991669, -0.022454025805927813, -0.040454973599740436, 0.043226572551897595, 0.03743345769388335, 0.0006607548067612308, 0.11384290669645582, 0.04992901560451303, 0.005408631754107773, 0.009607095537441117, -0.012680422797399973, 0.024073518147425994, -0.04440920746752194, 0.004120621896748032, 0.02761713575039591, -0.04635274117546422, -0.06435357247080122, 0.031128881632217338, 0.016416337208024094, -0.008968281027461802, 0.04653826622026307, 0.025854617889438356, 0.012687867827480659, 0.028297867892043933, -0.0342022893684251, -0.019416423381439278, -0.05280240252614021, -0.03576486740660455, -0.10419229524476188, -0.0395921202642577, -0.002911932795541361, -0.01974446409648018, -0.038143089307206016, -0.03505285644834138, 0.03834166377782822, 0.05046930696283068, -0.03904489088537438, 0.0015146988932558867, 0.0006450490493859563, -0.01604000066540071, -0.060584313103130887, -0.0234440263759877, 0.1150767132639885, 0.04494018480181694, 0.04640173725783825, -0.0817852717425142, 0.06888745352625847, -0.013860651824091162, -0.030807798728346825, 0.031202219160539762, 0.061024581747395654, -0.04371023550629616, 0.04711497601653848, 0.009631564042397909, 0.034288076018648486, -0.0194188054717545, 0.05254533940127918, -0.01510106319827693, 0.009491389650585396, -0.05281628668308258, 0.02491598323519741, -0.005189976239177797, -0.08681996273142951, 0.06076004409364292, 0.07559112406202725, -0.05669804077063288, 0.02945604913734964, 0.027437320245163783, 0.015105903082128082, -0.04193821709070887, -0.026287166617943773, -0.0038107597585102277, 0.06687954121402331, 0.03067953691684774, -0.009460966102778912, -0.04888412994997842, 0.04546929177428995, 0.04723436451916184, 0.05976005271077156, -0.061716834881475995, -0.04373723414859602, -0.03389950868274484, -0.02664987860979246, -0.03256083915143141, 0.06557192546980721, -0.0290171406897051, 0.027153336176914827, 0.056861317051308494, 0.00020447039111916508, 0.047693803374256404, 0.049033508236919134, 0.07628711685538292, 0.0019295273149119957, 0.059248405641743114, 0.03713620241199221, 0.03938868269324303, -0.07728196148361478, 0.0781343403671469, -0.04133392870426178, -0.0025214664305427243, 0.023521269472049817, 0.020395624418077723, -0.012292510231158562, 0.06772763707808085, -0.057607442672763555, 0.014909451295222555, -0.02597519475966692, 0.020843904365652373, 0.12138529973370689, 0.0699907738183226, 0.0011699934423502003, 0.032344259188643525, -0.017931338466171707, -0.04415031309638705, -0.05866546503135136, 0.026486211456358433, -0.047235749661922455, 0.034934155110801966, -0.07664269900747708, -0.04435665985303266, 0.10441660348858152, 0.006143384879188878, 0.05253929438601647, -0.06623010896146297, -0.04942487303300628, 0.03449147407497678, 0.0007907572435215116, 0.049213665537536144, -0.00010418881928282124, 0.010722510915781771, -0.0004391219200832503, -0.04541484160082681, 0.007650986712958131, 0.015242969816816705, 0.04837085785610335, -0.038825065695813725, -0.022832507201071297, -0.0002476620887007032, -0.019403694330581596, -0.002909829041787556, -0.018281465670692602, -0.050270756773118465, 0.027654021812070693, -0.013657089954774295, 0.019546472001820803, 0.010389665673886026, 0.034141533475901396, -0.0004837455094924995, 0.07777866455061096, -0.007949292826067125, 0.013858457075132589, 0.003931396158545145, 0.0811523614185197, -0.016969480185902545, 0.03314976314348834, 0.11588869776044573, 0.003944599934454475, -0.034417706940855296, 0.02784160172034587, -0.04914911038109234, 0.08718934495534215, 0.019049697189724872, 0.013309361546167306, 0.04204291198402643, -0.021495494026956812, 0.03727173140006406, 0.029242440438663055, -0.04222947811441762, -0.00020415568724274635, 0.07019899466208049, 0.007470259575971535, -0.026189473707095852, -0.0509006285241672, 0.017916672197835787, -0.014949705451726913, 0.01677722334196525, -0.00622811254912189, 0.030192647129297256, 0.025268076519880976, 0.022140379729015485, 0.017673412071807042, -0.041411813880716054, -0.010129792611613604, -0.04742219405514853, 0.06065551936626434, 0.006248684733041695, -0.03159510237830026, -0.10512959691030639, -0.013546304178557225, 0.0530348393533911, 0.03726583772471973, -0.0022837852260896136, -0.014439305606564241, 0.03326475274349962, -0.058948068746498654, -0.02467245063079255, 0.04014056255774839, -0.00553179153108171, -0.07112542539834976, 0.019263099745980332, -0.017030355470654155, 0.03558562669370856, -0.032303132782025, -0.008226013808910335, 0.026718814059027603, -0.06395143909113747, -0.0009964699690629328, 0.006130681331602058, 0.0013612337144357817, -0.0384515126102737, 0.04492992375578199, -0.025556965531515225, 0.050049419913973124, -0.002290177990549377, 0.011718649383900421, -0.015226649453065224, 0.0065279485923903325, 0.06847320071288518, 0.025952399442238466, 0.00922902480566076, 0.047610953716295104, 0.08964167109557561, -0.04491263894098146, -0.0012162652201368473, 0.011623006114470107, -0.010330095321738295, 0.0070962873952729365, -0.06016726206455912, 0.037089853414467404, 0.044088662219499905, 0.07287504098245076, 0.05003845904554639, 0.016861805226653814, 0.06682616525462695, 0.016479269426781684, -0.03286760752754552, 0.032508469253246276, 0.037334298981087546, 0.05727878798331533, 0.046473084283726554, 0.013850023465887975, -0.0448771459715707, -0.058480056801012585, 0.012287137697317771, 0.006908522153805409, 0.05805885472467968, 0.007298575814015099, -0.047519726412636895, -0.012268234243882554, -0.042631172708102634, 0.059748037053006034, -0.015406917980206864, -0.03286976194275277, -0.03570778827582087, 0.040669042084898264, -0.003618439314388005, -0.04232252628675529, -0.014721277169883251, -0.023870398188591935, 0.044233343697019985, 0.0019210554185389941, -0.02572108938225678, -0.02226788324436971, -0.013971864528554891, 0.020698852970131805, 0.001971312366159899, -0.030296192970126867, -0.0031498843537909643, -0.02648255554959178, 0.0021840321964451243, 0.03471777129120061, 0.08421645473156657, -0.017675458969149207, -0.04551512508520058, -0.0028491621570927756, 0.005945813634233283, 0.028508121564560236, -0.03560362703033856, 0.03503057839615004, 0.05654426344803402, 0.054752117821148465, 0.003946646715381316, -0.009083229038099359, 0.00037828879430890083, -0.05373396724462509, -0.027248423280460492, -0.03485211144600596, 0.01790844994996275, -0.03580645737903459, 0.042952057506356923, -0.019408846573371972, -0.030717704179031507, -0.025656313502362797, -0.006663430981071932, 0.04082118985908372, -0.029017690369593247, -0.006911012510369931, 0.016536551427894404, -0.009813120122998953, -0.013277398522144981, 0.06780306941696576, 0.05186024361423084, -0.060186868267399926, -0.007926974345796875, -0.021092301101556847, 0.05055769213608333, 0.028884618343519314, 0.04616476169654301, 0.07065490686467715, -0.03826879949441978, -0.04060428829065391, 0.03843348792621067, 0.006155987985299102, 0.0503339022397995, 0.017868165192859515, 0.029534360813808495, -0.01988592796260491, -0.03106991933392627, 0.003867536591964641, 0.006842663578156914, -0.04231948758076344, -0.04206894471177033, -0.016717470650162016, 0.12284087283270699, 0.011976274794765882, 0.04830259404012135, 0.013946931277002608, -0.060219808880771906, 0.0576941722205707, -0.03876325355044433, -0.04303128431950297, 0.03322139675063746, -0.05825509104345526, -0.021442676927628263, -0.014830144795788718, -0.013462983537465334, 0.0041965715188000885, 0.013849832915834017, 0.005390205902845732, -0.06316755445940155, -0.011416594963520765, -0.037480144894548824, 0.024408350731911405, -0.13485033277954375, 0.027967219839670827, -0.03652323596179485, 0.06313076535505908, -0.027905823646246324, 0.012111392238044314, -0.06691073998808861, -0.03143905828307782, -0.018076121541006223, -0.07290613651275635, -0.007582986727356911, 0.03677370346018246, 0.028467300347983837, 0.013981979939022235, -0.010124886680776919, 0.028533336174275194, -0.0652630158833095, 0.04787162797791617, 0.03326065346066441, -0.015817939969045774, 0.1019530754004206, 0.0827519063438688, 0.056755139359406064, 0.0078425841805126, 0.015177697675036532, -0.002688862987270113, -0.014755288671169962, -0.023900384731989886, -0.015706837509891818, -0.02743975631892681, -0.01445802247950009, -0.07460099618349757, -0.004163045835282121, -0.038367324109588354, -0.06638768741062709, 0.10174498494182314, 0.08023705812437194, 0.0333203866279551, 0.009899045207670756, -0.04073775406660778, 0.05222869025809424, 0.024900466735873903, -0.04738671678517546, -0.014064535756395864, 0.016554274546381618, 0.04374341028077262, -0.0926162281206676, 0.03787749579974583, -0.03116710903123021, -0.0750660231070859, -0.014340140989848546, -0.01891417194357408, -0.008606983282204186, 0.025383558656488146, 0.04610604606568813, 0.00399405462667346, -0.035686567957912176, -0.05102745037791984, 0.05376252106257847, -0.02617214181061302, -0.028111532729651247, -0.002391643622624023, -0.0005033645180187055, -0.0643762041415487, 0.0034515859110147823, 0.011676949565298855, 0.00442592498646783, -0.012337790968428766, 0.00354800747507917, -0.055656829316701205, 0.03167104481586388, 0.018552562720807537}, diff --git a/internal/face/embeddings_random.go b/internal/face/embeddings_random.go new file mode 100644 index 000000000..6ec21f260 --- /dev/null +++ b/internal/face/embeddings_random.go @@ -0,0 +1,98 @@ +package face + +import ( + "math/rand" + "time" +) + +type Kind int + +const ( + RegularFace Kind = iota + 1 + KidsFace + IgnoredFace +) + +var r = rand.New(rand.NewSource(time.Now().UnixNano())) + +// RandomDist returns a distance threshold for matching RandomDEmbeddings. +func RandomDist() float64 { + return RandomFloat64(0.75, 0.15) +} + +// RandomFloat64 adds a random distance offset to a float64. +func RandomFloat64(f, d float64) float64 { + return f + (r.Float64()-0.5)*d +} + +// RandomEmbeddings returns random embeddings for testing. +func RandomEmbeddings(n int, k Kind) (result Embeddings) { + if n <= 0 { + return Embeddings{} + } + + result = make(Embeddings, n) + + for i := range result { + switch k { + case RegularFace: + result[i] = RandomEmbedding() + case KidsFace: + result[i] = RandomKidsEmbedding() + case IgnoredFace: + result[i] = RandomIgnoredEmbedding() + } + + } + + return result +} + +// RandomEmbedding returns a random embedding for testing. +func RandomEmbedding() (result Embedding) { + result = make(Embedding, 512) + + d := 64 / 512.0 + + for { + i := 0 + for i = range result { + result[i] = RandomFloat64(0, d) + } + if !result.SkipMatching() { + break + } + } + + return result +} + +// RandomKidsEmbedding returns a random kids embedding for testing. +func RandomKidsEmbedding() (result Embedding) { + result = make(Embedding, 512) + + d := 0.1 / 512.0 + n := 1 + r.Intn(len(KidsEmbeddings)-1) + e := KidsEmbeddings[n] + + for i := range result { + result[i] = RandomFloat64(e[i], d) + } + + return result +} + +// RandomIgnoredEmbedding returns a random ignored embedding for testing. +func RandomIgnoredEmbedding() (result Embedding) { + result = make(Embedding, 512) + + d := 0.1 / 512.0 + n := 1 + r.Intn(len(IgnoredEmbeddings)-1) + e := IgnoredEmbeddings[n] + + for i := range result { + result[i] = RandomFloat64(e[i], d) + } + + return result +} diff --git a/internal/face/embeddings_random_test.go b/internal/face/embeddings_random_test.go new file mode 100644 index 000000000..51c21bc08 --- /dev/null +++ b/internal/face/embeddings_random_test.go @@ -0,0 +1,40 @@ +package face + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRandomDist(t *testing.T) { + t.Run("Range", func(t *testing.T) { + d := RandomDist() + assert.GreaterOrEqual(t, d, 0.1) + assert.LessOrEqual(t, d, 1.5) + }) +} + +func TestRandomEmbeddings(t *testing.T) { + t.Run("Regular", func(t *testing.T) { + e := RandomEmbeddings(2, RegularFace) + for i := range e { + // t.Logf("embedding: %#v", e[i]) + assert.False(t, e[i].KidsFace()) + assert.False(t, e[i].Ignored()) + } + }) + t.Run("Kids", func(t *testing.T) { + e := RandomEmbeddings(2, KidsFace) + for i := range e { + assert.False(t, e[i].Ignored()) + assert.True(t, e[i].KidsFace()) + } + }) + t.Run("Ignored", func(t *testing.T) { + e := RandomEmbeddings(2, IgnoredFace) + for i := range e { + assert.True(t, e[i].Ignored()) + assert.False(t, e[i].KidsFace()) + } + }) +} diff --git a/internal/face/embeddings_test.go b/internal/face/embeddings_test.go index bcbab17dc..5dd29707c 100644 --- a/internal/face/embeddings_test.go +++ b/internal/face/embeddings_test.go @@ -10,15 +10,15 @@ func TestEmbeddings_Contains(t *testing.T) { t.Run("Ignore", func(t *testing.T) { e1 := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.007879496, 0.01986026, -0.019533899, 0.0405012, 0.015047856, 0.04601962, 0.080275685, 0.017424034, -0.032671392, 0.024088044, -0.021807125, 0.010775311, 0.094901696, 0.0048406925, 0.013086048, 0.04339756, -0.0069915624, 0.019183818, 0.0624931, 0.019509323, 0.07727781, 0.071851335, 0.046544127, 0.040363774, -0.027118236, 0.06800823, -0.01851149, 0.039025713, -0.037301723, 0.05617681, 0.027737545, -0.0011841523, 0.034742635, 0.006083848, 0.033872508, 0.012025738, -0.02354928, -0.07461171, 0.0027702893, 0.04646551, 0.06590462, -0.00794524, -0.011096932, 0.031695057, -0.06732352, -0.051879242, -0.0773121, -0.000517982, 0.08113213, -0.015312499, 0.018544769, -0.023654874, -0.01689197, 0.026425209, -0.08191027, 0.03139842, -0.011997609, 0.059896134, 0.07505033, -0.012907369, 0.008597082, 0.007715897, -0.07062183, -0.027084265, 0.0028182073, 0.03769887, 0.034299187, 0.046780333, -0.007847023, -0.051446356, 0.007982996, -0.034917314, -0.0038174198, -0.05954771, -0.044208106, 0.04685703, -0.0199229, -0.0032713648, 0.009684984, -0.050678924, 0.007356914, -0.06628045, 0.042982273, 0.0055478252, 0.011330174, -0.082057334, 0.026437566, -0.015942575, 0.048285805, -0.003856138, 0.04399534, 0.01741405, -0.059217025, 0.056499016, -0.03459506, 0.030366927, 0.016147505, -0.021027595, -0.013333387, -0.035330992, 0.0445699, -0.03483558, 0.02072434, -0.019552084, -0.0043943045, -0.03957101, 0.0041682394, 0.006047565, 0.03504845, 0.04675005, -0.021805461, -0.0033183587, -0.0017508261, 0.033419013, 0.008266579, 0.067113, -0.026226636, -0.020189233, 0.029219048, 0.031028047, 0.021648621, -0.055164326, -0.008505359, 0.05173594, 0.016450783, -0.017234024, -0.10492493, -0.04954522, 0.024168914, -0.008840458, -0.078473605, -0.042714797, -0.040692057, -0.05446264, 0.0148880705, 0.057658363, 0.005458192, 0.02171352, -0.04556389, 0.017333247, -0.10342444, -0.06159851, -0.03170678, 0.08064648, 0.024460033, -0.07185376, -0.0019515441, -0.026248276, 0.034460787, 0.08695437, 0.06363327, 0.012909266, 0.00093975884, 0.03682474, -0.041370448, -0.0070990156, 0.058603138, -0.038166087, -0.039693672, 0.025385896, 0.0035452761, -0.015794974, 0.019059189, -0.028707229, 0.038948998, -0.032039847, -0.07992934, -0.05482927, 0.048767164, -0.03186542, 0.059099294, 0.063702375, 0.01810526, -0.019284561, 0.036313917, 0.0006970895, 0.020730797, 0.08630282, -0.10650717, 0.0017196184, 0.023258938, -0.021214833, 0.015206377, -0.027243242, -0.021319263, -0.054438062, 0.066603355, -0.047786396, 0.018822387, -0.031346995, -0.0049103773, -0.020732613, -0.0841506, 0.00707288, -0.0033278253, 0.068160556, -0.011127404, 0.05533654, 0.0046188673, 0.039132893, 0.008633137, -0.057081457, -0.030337824, -0.0721918} e2 := Embedding{-0.037731018, -0.005501065, 0.04339579, 0.050818004, -0.059338734, 0.033849984, -0.006599584, -0.0017643301, 0.049746443, -0.103716515, 0.037138782, -0.0064612515, 0.071909964, 0.013218528, -0.065359734, 0.11057091, 0.031195551, 0.025612833, 0.0075477255, -0.034973715, -0.013490629, -0.08104751, -0.022038054, -0.05304818, 0.008366317, -0.056096837, -0.008484318, 0.049539477, 0.019540254, 0.067417614, -0.027856546, -0.008532138, -0.017063588, -0.00016265438, -0.106199585, 0.03904082, 0.030587498, 0.043008707, -0.015111545, -0.022849092, 0.0025588698, -0.012814152, 0.037556626, -0.0086288145, 0.05265788, 0.011832273, 0.00015048613, -0.0081366515, 0.0013409692, 0.028389124, 0.022627315, -0.015008434, -0.0007749727, 0.013927345, -0.012275729, -0.0090859635, 0.019502806, -0.011900984, 0.016286656, 0.08094661, 0.000306613, -0.06327904, 0.018552454, 0.08885108, -0.07583091, 0.09275318, -0.018484656, 0.074180886, -0.039385945, -0.08063905, -0.05360434, -0.037074074, 0.09909196, 0.025063906, -0.009406389, -0.029612983, -0.018644262, 0.08433939, -0.04466277, -0.07118042, -0.0053266245, -0.07471344, 0.06739151, -0.05399609, 0.03125197, -0.00007781149, -0.04214992, -0.044316035, 0.025013437, 0.031466946, 0.0023496088, 0.042693187, -0.046198968, 0.026152546, -0.017578958, 0.023763098, 0.027511515, -0.05229892, -0.005204117, 0.035853546, -0.031919815, -0.027175877, -0.033706605, 0.018576957, -0.0010251165, -0.006808904, 0.009910016, -0.046926413, -0.02833718, 0.0132687995, -0.033933964, 0.06434295, 0.046245363, 0.044698197, 0.041076522, 0.04224362, -0.050834127, 0.0037004466, 0.061506275, -0.018232772, 0.067569405, 0.048701495, 0.042266034, -0.11045008, 0.03627151, -0.07259142, -0.0027725939, 0.040572345, 0.010365194, -0.018683784, 0.004533848, 0.037213936, -0.050944775, 0.07134523, 0.004012727, 0.036228556, -0.013853831, -0.06910639, -0.011394227, -0.012075533, 0.036311198, -0.02587341, -0.04086224, -0.024498813, -0.019423751, -0.022674281, 0.052483488, 0.026303312, -0.051178075, 0.008410645, 0.039851066, -0.028721321, -0.027934253, -0.029567441, 0.054549955, 0.07423011, -0.07211806, 0.015979288, 0.002092099, 0.049062036, 0.025120452, 0.045975365, 0.025024865, -0.04019101, 0.0013054911, -0.0049644294, 0.0065203104, -0.03237452, -0.020704443, 0.028736785, -0.027353559, 0.07551169, 0.0842262, 0.019992182, 0.11138123, -0.028617613, 0.06700691, -0.048681036, -0.008201593, -0.058066163, 0.027867565, 0.07693089, -0.033642102, -0.05855467, -0.08575646, -0.019721355, 0.018443357, -0.0037373751, 0.032450553, -0.0074002664, -0.028135147, 0.046631414, 0.0192969, -0.0071076434, -0.004898368, 0.011896125, -0.026020564, 0.074016415, -0.033884488, -0.07919758, 0.021606326, -0.0142197255, 0.0807476, 0.03722956, -0.0015949347, 0.008076167, -0.009640628, 0.02341143, 0.015375526, -0.059428506, 0.051759534, 0.028049389, 0.07790443, 0.0478649, 0.09191913, -0.055882096, -0.026637457, 0.01236174, -0.0033003334, 0.008522798, 0.027216703, -0.033221588, -0.028086975, -0.11505473, -0.044336796, 0.013873659, 0.03982099, 0.060988583, -0.07439005, 0.01333661, -0.004818605, 0.02561305, -0.059055943, 0.0081638545, -0.032278564, 0.046092775, 0.025316834, -0.046857174, -0.0341012, 0.04379944, -0.029710777, 0.09238533, 0.009769442, 0.018552538, -0.02632421, 0.033739865, -0.022547472, 0.016400741, -0.05336998, -0.012623122, -0.08303054, -0.010368709, 0.01690871, 0.0014627968, -0.050720602, 0.038742293, -0.065664165, -0.10676187, -0.013403239, 0.075702645, -0.055623896, -0.03871971, -0.042371742, 0.03794916, -0.0590573, -0.002583715, -0.029995736, -0.08144537, -0.043295015, -0.034286328, -0.026538746, 0.01953962, 0.08203153, 0.036415525, 0.045531306, 0.004713152, 0.026550433, -0.0055336948, -0.031087596, -0.01923592, -0.1047651, 0.051826596, -0.009522955, 0.0023846119, -0.030824797, 0.0011774554, 0.03384506, 0.010090165, -0.033521466, -0.052155476, 0.0032979914, -0.004305921, -0.08622774, 0.03262125, 0.06332183, 0.00067599304, 0.01989574, 0.04406689, 0.019945903, -0.003796719, 0.00025200442, -0.010055775, 0.04070448, -0.004082432, -0.026942603, 0.110138796, -0.029453337, 0.015611174, 0.08778206, -0.027199872, -0.014513782, 0.021546016, 0.01706933, -0.01365763, 0.026393317, -0.029974515, 0.0050973813, 0.00732006, 0.034644503, 0.03125295, -0.01563078, -0.041023903, -0.04566191, -0.00013489528, 0.04253813, 0.045907266, -0.011943533, 0.031480506, -0.0034109016, -0.035025172, 0.028193155, -0.06832476, -0.0019371725, -0.049427234, -0.0061696135, 0.051213425, 0.07832765, -0.01894849, 0.0290217, 0.031639505, -0.045830216, -0.048976466, 0.052241277, -0.026111973, 0.037248738, -0.07693719, -0.00020981894, 0.030037824, -0.041687537, -0.015251262, 0.041234106, 0.031005232, 0.024838371, 0.0020733695, -0.038252156, -0.026375879, 0.03495583, 0.018539391, -0.07203285, 0.006305707, -0.004792029, -0.05153865, 0.0072443904, -0.017075827, 0.013596034, -0.0054885144, -0.052320853, -0.033805914, -0.038080305, -0.010182737, 0.012953395, 0.014565793, -0.023107765, 0.030313661, 0.011124675, 0.018100796, 0.1074551, -0.074430406, -0.04017658, -0.002058053, -0.07340946, 0.0033503077, 0.04565434, -0.033483636, -0.029218825, -0.05245377, -0.059680052, 0.017752757, -0.05493096, -0.10746678, 0.08623605, 0.014577705, 0.0044184765, -0.025559181, -0.015846781, -0.006661373, 0.09459266, 0.036481388, 0.030402042, -0.0152169075, 0.0037343376, 0.024195764, -0.01859682, -0.0022416788, 0.0056786016, -0.06771737, 0.02364697, 0.021247962, 0.05002757, 0.083975114, 0.011197936, 0.0035017033, -0.0014220127, -0.024415374, 0.023921741, -0.0108229555, -0.06622103, -0.00024976654, 0.06549428, -0.004968772, -0.011665843, 0.03409593, 0.028397659, -0.086434126, -0.074232705, 0.041721817, -0.034767248, -0.014432104, 0.006313255, 0.04040112, -0.0050085387, -0.0023618732, -0.02225774, 0.02383989, 0.061036374, 0.058602326, 0.04343989, -0.029145751, 0.0369256, -0.054843802, -0.017078603, 0.047091234, 0.050245833, -0.04615808, -0.02404996, 0.02584908, -0.006215116, -0.016719814, 0.052097827, 0.01908364, -0.07564805, -0.11024787, -0.036854018, -0.0056766514, -0.007618422, 0.034403287, 0.056957226, -0.03565076, -0.0365251, 0.040833052, 0.008173664, -0.04300709, 0.0028465139, -0.020792698, 0.020321466, -0.002447697, 0.019681728, -0.08843341, -0.042670425, 0.014576458, 0.009701015, -0.12435015, -0.025056241, 0.03084893, -0.031128377, 0.006784327, 0.052201632, 0.06773422, 0.015289244, 0.009421969, 0.0725144, -0.07110377, -0.05183192, -0.008816121, -0.11178569, 0.079700254, -0.0110752955, 0.0046521816, -0.07299747, 0.10732809, -0.06012486, 0.057736155, -0.02227576, -0.063017495, 0.085292354, 0.037407015, -0.07368719, 0.033426613, 0.062104296, -0.016089993, -0.023178348, -0.064638525, 0.028132388, -0.049967688, 0.053581465, 0.031400185, 0.0712773, -0.012665878, 0.0760322, 0.030081542, -0.022147592, 0.009422989} - assert.True(t, IgnoreEmbeddings.Contains(e1, IgnoreDist)) - assert.False(t, IgnoreEmbeddings.Contains(e2, IgnoreDist)) - assert.False(t, IgnoreEmbeddings.Contains(e1, 0.1)) + assert.True(t, IgnoredEmbeddings.Contains(e1, IgnoredDist)) + assert.False(t, IgnoredEmbeddings.Contains(e2, IgnoredDist)) + assert.False(t, IgnoredEmbeddings.Contains(e1, 0.1)) }) } func TestEmbeddings_First(t *testing.T) { t.Run("Ignore", func(t *testing.T) { - e := IgnoreEmbeddings.First() + e := IgnoredEmbeddings.First() assert.Equal(t, Embedding{0.0001326936762779951, 0.010595318133709952, -0.025556722866895143, 0.0469118170440197, -0.006627591326832771, 0.05271399952471256, -0.04542037146165967, 0.027480189339257777, -0.004917271726299077, -0.07468410208821297, 0.02064464334398508, 0.027222666889429092, 0.07686506863683462, -0.03543879697099328, -0.06587888672947884, 0.00656710215844214, 0.0468103364109993, 0.026114298962056637, 0.09671456180512905, -0.10109077207744122, -0.00781591737177223, -0.03552762418985367, 0.06885470915585756, -0.012004591058939695, 0.08148624002933502, -0.028154293075203896, 0.04417960252612829, -0.04447614587843418, -0.02476067957468331, 0.08517011441290379, 0.002213838277384639, -0.04421043721958995, -0.030782480724155903, -0.022004681872203946, 0.0009286352433264256, 0.010065821232274175, -0.02192891761660576, -0.012186611769720912, -0.08409351948648691, 0.03493268555030227, -0.044278232380747795, 0.028376419097185135, 0.0037802220904268324, 0.04365090653300285, 0.020489776856265962, 0.0062931065913289785, 0.012816649512387812, 0.08537860121577978, -0.08391124662011862, -0.0074469012033659965, 0.007379985763691366, 0.010717783472500741, 0.05138006154447794, 0.03530120011419058, -0.0252615287899971, 0.048870823346078396, 0.051952130161225796, 0.05130995064973831, -0.07164964452385902, 0.008358421036973596, 0.07212860928848386, 0.023144953418523073, 0.016010764054954052, -0.0020557132083922625, 0.0006047732058505062, 0.05894300062209368, 0.018385239876806736, 0.013549384311772883, 0.013471916783601046, -0.026798027334734797, 0.055714783258736134, 0.056760589592158794, -0.03564274637028575, 0.006639213301241398, -0.010688409092836082, -0.014488881919533014, -0.041894917376339436, 0.027378612896427512, 0.04120381874963641, 0.026110727107152343, 0.014362117013661191, -0.015710897743701935, 0.01369841955602169, -0.013755762134678662, -0.025898753898218274, 0.03539643401745707, -0.02275478537194431, 0.044916168320924044, 0.06104293651878834, 0.020197266509057954, 0.03360230568796396, 0.0005524924490600824, -0.03635450592264533, -0.04944554786197841, 0.07170013058930635, -0.0030192392878234386, 0.0010193748748861253, -0.010943924076855183, -0.06179766729474068, 0.056694529950618744, 0.004520991584286094, -0.09191464446485043, -0.02631867417949252, 0.03776269545778632, -0.00876810192130506, 0.10884877666831017, 0.005137963918969035, 0.014990123057032179, -0.012330824043601751, -0.007994036190211773, 0.04028965998440981, 0.030694966204464436, 0.013997081900015473, -0.027155806310474873, 0.008769600055529736, 0.0038997385127004236, -0.003813096962403506, 0.06714510265737772, 0.006777862668968737, 0.061618989799171686, -0.016695198486559093, -0.014862070740491617, 0.047256719786673784, -0.030920962191885337, -0.010902314214035869, 0.029649023665115237, -0.03882072772830725, 0.037115989718586206, -0.00044789700768887997, -0.050685918889939785, 0.023225090000778437, 0.005942594725638628, 0.03058242436964065, -0.05067136138677597, -0.013880123384296894, 0.0521021569147706, -0.03878975426778197, 0.0057146906128764385, 0.01622107159346342, 0.0286275401012972, -0.07171816006302834, -0.024164889007806778, -0.036472175968810916, -0.06874032877385616, -0.013022568658925593, -0.02637113118544221, 0.061983236111700535, 0.0328070695977658, 0.004039793537231162, -0.022473737597465515, 0.017253196332603693, -0.04853619821369648, -0.053010642528533936, 0.04317591618746519, 0.00835538915998768, 0.015444972610566765, 0.04270970821380615, 0.028640874341363087, 0.06504016369581223, 0.03173913527280092, 0.05225925333797932, 0.03651800798252225, -0.022531148977577686, -0.0032108076702570543, 0.030786060029640794, 0.01946059288457036, -0.020198959624394774, -0.010514225577935576, -0.04853967670351267, 0.02134396170731634, -0.05255058314651251, 0.016728751827031374, 0.0456616897135973, -0.021495807450264692, 0.03207355597987771, 0.010148180415853858, 0.03585670003667474, -0.02635771268978715, -0.04969983361661434, -0.034095218405127525, -0.02873873570933938, 0.020237101707607508, -0.026095976354554296, 0.06887094769626856, 0.010905503178946674, 0.05485152825713158, 0.03837144002318382, 0.07052317541092634, 0.006913394434377551, 0.010285209049470723, -0.03990606777369976, -0.05088027101010084, 0.0778753962367773, -0.0213193167001009, -0.03161718975752592, -0.02693262230604887, 0.0435414626263082, 0.01335046417079866, -0.036178333684802055, 0.037226798478513956, 0.052575312089174986, -0.0522100068628788, -0.009666121564805508, 0.009881116129690781, -0.0037592697190120816, 0.017672576592303813, -0.039784221327863634, -0.023527713026851416, -0.020135456696152687, -0.04171011736616492, -0.03752618143334985, 0.011444047326222062, 0.0015834929654374719, 0.008812893531285226, -0.023482086980948225, 0.006552054779604077, -0.0058590869884938, 0.04283139808103442, 0.052830352913588285, -0.0008150241555995308, -0.08346264809370041, -0.10364211909472942, -0.025862343376502395, -0.037633945466950536, -0.00131333211902529, 0.04283250030130148, -0.02747755730524659, -0.022013332003552932, -0.05700004659593105, -0.057958067394793034, 0.04643791541457176, 0.09375700354576111, 0.044992691837251186, -0.025699439109303057, 0.03685394627973437, 0.039113527920562774, -0.004286542231056956, -0.050266037695109844, 0.006167740881210193, 0.009338066913187504, -0.05799494404345751, 0.011283616302534938, -0.021689202752895653, -0.022013561276253313, 0.06421529594808817, 0.037321062409318984, -0.022122669965028763, 0.03338781511411071, 0.004881134445895441, -0.005090652208309621, -0.005954607389867306, -0.003857724070257973, 0.013872599869500846, 0.040445003658533096, 0.0030193766724551097, 0.020781447528861463, 0.04388184240087867, -0.00434388080611825, 0.014594015898182988, 0.07954355143010616, -0.003253952323575504, -0.05893095303326845, 0.012250101892277598, 0.029312842525541782, -0.08140432462096214, 0.024246320594102144, 0.006364793865941465, -0.012409177725203335, -0.022765739355236292, 0.07083966210484505, -0.0560477483086288, 0.02344445328344591, 0.025518586859107018, -0.038515486754477024, -0.040526574943214655, 0.0033363434486091137, 0.07186504639685154, -0.007116460474207997, -0.027830936181999277, -0.11900371685624123, 0.036241024266928434, -0.019209803780540824, 0.016880312585271895, -0.020635713124647737, -0.012299022404477, -0.012887225369922817, 0.013467759592458606, -0.056274086236953735, -0.07062955480068922, -0.047921731136739254, 0.050967195304110646, -0.09523350931704044, -0.01923635500133969, 0.0018940714071504772, -0.025784526020288467, 0.004750739550217986, 0.001268803607672453, 0.08276346698403358, 0.0475466912612319, 0.0204452850157395, 0.04777416866272688, 0.004511475046456326, 0.05325452284887433, -0.00824436274706386, 0.04315535444766283, 0.01829960517352447, -0.03411059989593923, 0.011709870072081685, -0.022576917544938624, 0.04093322320841253, -0.03366286098025739, 0.00007134396582841873, 0.0672286506742239, 0.057760706171393394, 0.05040881037712097, 0.019016009813640267, -0.07006099820137024, 0.011889255285495892, -0.035422834334895015, 0.03638885170221329, 0.0601487485691905, -0.03319359011948109, -0.045506994472816586, 0.019405824947170913, -0.00514926778851077, 0.07637834828346968, 0.07720410358160734, 0.022179096937179565, 0.09868652559816837, 0.06108273658901453, 0.0493094720877707, 0.03135237097740173, -0.04882502695545554, 0.0584859773516655, 0.030338898301124573, 0.003376852720975876, 0.01842997614585329, 0.046141053549945354, 0.03998812031932175, 0.06666938867419958, 0.021333562210202217, -0.024483966641128063, 0.04871886316686869, 0.02728640241548419, -0.05634338594973087, -0.007101567229256034, 0.027000208385288715, 0.03502309508621693, 0.011526696383953094, -0.03697758028283715, -0.010898058622842655, 0.056068443693220615, 0.029542725766077638, -0.06271603982895613, -0.05443012993782759, -0.0007829638198018074, 0.11164804548025131, -0.02070094458758831, 0.006636139118199935, -0.0727179991081357, 0.021099978126585484, -0.03498802054673433, -0.06967776361852884, -0.04527123365551233, -0.015574883203953505, 0.024440275970846415, 0.024940682807937264, -0.0767935961484909, -0.02395771024748683, 0.028084914898499846, -0.0915510281920433, 0.02133126324042678, 0.013071146167021652, 0.004649237322155386, 0.08952618017792702, 0.03991545923054218, 0.0416784998960793, -0.06148885563015938, -0.01432584528811276, 0.008203202858567238, 0.020670469384640455, -0.027112244328236557, 0.0039047824539011344, -0.024497278966009617, -0.043294325936585665, -0.025314603466540575, -0.0067777622025460005, -0.040093651972711086, 0.009956442285329103, -0.03299230616539717, -0.01792255137115717, 0.012778022966813296, -0.03521473368164152, -0.010197664145380259, 0.01715578866424039, -0.008158075157552958, 0.04854840412735939, 0.07429435942322016, 0.040353764314204454, 0.034050410613417625, -0.06899271160364151, 0.05916056968271732, 0.009034074377268553, -0.015106763457879424, -0.00039310590364038944, -0.01474015589337796, 0.0068119101342745125, 0.030776663683354855, 0.04403356648981571, -0.03385453065857291, 0.013438114430755377, 0.017026713234372437, -0.05315904412418604, 0.002748164813965559, -0.002453066874295473, -0.04506317153573036, 0.012577373650856316, 0.057200564071536064, 0.06909130979329348, -0.0031225606217049062, -0.003926296718418598, 0.048229482024908066, -0.008486846985761076, 0.0746435010805726, -0.000002196320565417409, 0.001961063011549413, 0.012371355667710304, -0.00031584547832608223, 0.03543752012774348, -0.009082387339731213, -0.019061634404351935, 0.018139481428079307, -0.0034449175582267344, 0.02569328702520579, -0.06800238601863384, -0.010652570286765695, 0.04442033916711807, 0.0008707062224857509, -0.03791629173792899, -0.01974694279488176, -0.012471344787627459, -0.05222656764090061, 0.027658848877763376, 0.0261795298429206, 0.03837209613993764, 0.03547914605587721, -0.065070073120296, 0.015463256451766938, 0.004419506039994303, -0.02969307790044695, -0.012613456230610609, 0.03048483419115655, 0.007312143221497536, -0.08750566467642784, -0.017710077576339245, -0.03023367328569293, 0.021140164230018854, 0.10436926037073135, 0.011926733888685703, 0.009961859206669033, -0.029476960422471166, -0.020159751875326037, -0.07790366746485233, 0.06886674929410219, 0.07955041993409395, -0.009233276476152241, -0.0632511768490076, 0.003533775918185711, 0.03217921918258071, -0.0017657459757174365, 0.0499554630368948, -0.022411202546209097, 0.00822790467645973, 0.007166558876633644, -0.13091474398970604, -0.06948660034686327, 0.031344231218099594, -0.010657696751877666, -0.025052876735571772, 0.009426685981452465, -0.000860230065882206, -0.04037135327234864, 0.06806340254843235, 0.02604401228018105, -0.07262456882745028, 0.10524584539234638, -0.017017694772221148, 0.03847663733176887, 0.015304135085898452, -0.022285677026957273, -0.0003880725707858801, 0.03794682491570711, -0.06800171174108982, -0.039943912997841835, 0.08338448591530323, 0.012431795010343194, -0.004205749952234328, 0.01789577683666721, 0.02100188471376896, 0.0023398662451654673, -0.03323878743685782, -0.06432780250906944, 0.03639972861856222, 0.011190281802555546, 0.002120053926773835, 0.06202080566436052, 0.05974051542580128, 0.024543930077925324, -0.0370339029468596, -0.020636610919609666, -0.0005317113827914, -0.07742119580507278}, e) diff --git a/internal/photoprism/faces_audit.go b/internal/photoprism/faces_audit.go index 65fb0ae0e..f95d41a23 100644 --- a/internal/photoprism/faces_audit.go +++ b/internal/photoprism/faces_audit.go @@ -20,7 +20,7 @@ func (w *Faces) Audit(fix bool) (err error) { subj, err := query.SubjectMap() if err != nil { - log.Error(err) + log.Errorf("faces: %s (find subjects)", err) } if n := len(subj); n == 0 { @@ -35,9 +35,9 @@ func (w *Faces) Audit(fix bool) (err error) { } else if !fix { log.Infof("%s with non-existent subjects", english.Plural(n, "marker", "markers")) } else if removed, err := query.RemoveNonExistentMarkerSubjects(); err != nil { + log.Errorf("faces: %s (remove orphan subjects)", err) + } else if removed > 0 { log.Infof("removed %d / %d markers with non-existent subjects", removed, n) - } else { - log.Error(err) } // Fix non-existent marker face references? @@ -46,9 +46,9 @@ func (w *Faces) Audit(fix bool) (err error) { } else if !fix { log.Infof("%s with non-existent faces", english.Plural(n, "marker", "markers")) } else if removed, err := query.RemoveNonExistentMarkerFaces(); err != nil { + log.Errorf("faces: %s (remove orphan embeddings)", err) + } else if removed > 0 { log.Infof("removed %d / %d markers with non-existent faces", removed, n) - } else { - log.Error(err) } conflicts := 0 @@ -92,12 +92,12 @@ func (w *Faces) Audit(fix bool) (err error) { if !fix { // Do nothing. } else if ok, err := f1.ResolveCollision(face.Embeddings{f2.Embedding()}); err != nil { - log.Errorf("face %s: %s", f1.ID, err) + log.Errorf("conflict resolution for %s failed, face id %s has collisions with other persons (%s)", entity.SubjNames.Log(f1.SubjUID), f1.ID, err) } else if ok { - log.Infof("face %s: ambiguous subject has been resolved", f1.ID) + log.Infof("successful conflict resolution for %s, face id %s had collisions with other persons", entity.SubjNames.Log(f1.SubjUID), f1.ID) resolved++ } else { - log.Infof("face %s: ambiguous subject could not be resolved", f1.ID) + log.Infof("conflict resolution for %s not successful, face id %s still has collisions with other persons", entity.SubjNames.Log(f1.SubjUID), f1.ID) } } } @@ -112,7 +112,7 @@ func (w *Faces) Audit(fix bool) (err error) { } if markers, err := query.MarkersWithSubjectConflict(); err != nil { - log.Error(err) + log.Errorf("faces: %s (find marker conflicts)", err) } else { for _, m := range markers { log.Infof("marker %s: %s subject %s conflicts with face %s subject %s", m.MarkerUID, entity.SrcString(m.SubjSrc), sanitize.Log(subj[m.SubjUID].SubjName), m.FaceID, sanitize.Log(subj[faceMap[m.FaceID].SubjUID].SubjName)) diff --git a/internal/photoprism/faces_cluster.go b/internal/photoprism/faces_cluster.go index 2a95abf85..afd6284ec 100644 --- a/internal/photoprism/faces_cluster.go +++ b/internal/photoprism/faces_cluster.go @@ -73,8 +73,8 @@ func (w *Faces) Cluster(opt FacesOptions) (added entity.Faces, err error) { for _, cluster := range results { if f := entity.NewFace("", entity.SrcAuto, cluster); f == nil { log.Errorf("faces: face should not be nil - bug?") - } else if f.OmitMatch() { - log.Infof("faces: ignoring %s, cluster unsuitable for matching", f.ID) + } else if f.SkipMatching() { + log.Infof("faces: skipped cluster %s, embedding not distinct enough", f.ID) } else if err := f.Create(); err == nil { added = append(added, *f) log.Debugf("faces: added cluster %s based on %s, radius %f", f.ID, english.Plural(f.Samples, "sample", "samples"), f.SampleRadius) diff --git a/internal/photoprism/faces_optimize.go b/internal/photoprism/faces_optimize.go index 470c48829..5a36a5cff 100644 --- a/internal/photoprism/faces_optimize.go +++ b/internal/photoprism/faces_optimize.go @@ -27,7 +27,7 @@ func (w *Faces) Optimize() (result FacesOptimizeResult, err error) { var faces entity.Faces // Fetch manually added faces from the database. - if faces, err = query.ManuallyAddedFaces(false); err != nil { + if faces, err = query.ManuallyAddedFaces(false, face.RegularFace); err != nil { return result, err } else if n = len(faces) - 1; n < 1 { // Need at least 2 faces to optimize. diff --git a/internal/query/faces.go b/internal/query/faces.go index bd6d1823c..594f54df8 100644 --- a/internal/query/faces.go +++ b/internal/query/faces.go @@ -29,9 +29,10 @@ func Faces(knownOnly, unmatched, hidden bool) (result entity.Faces, err error) { } // ManuallyAddedFaces returns all manually added face clusters. -func ManuallyAddedFaces(hidden bool) (result entity.Faces, err error) { +func ManuallyAddedFaces(hidden bool, kind face.Kind) (result entity.Faces, err error) { err = Db(). Where("face_hidden = ?", hidden). + Where("face_kind <= ?", int(kind)). Where("face_src = ?", entity.SrcManual). Where("subj_uid <> ''").Order("subj_uid, samples DESC"). Find(&result).Error diff --git a/internal/query/faces_test.go b/internal/query/faces_test.go index c63945425..a5a0d7bcd 100644 --- a/internal/query/faces_test.go +++ b/internal/query/faces_test.go @@ -51,7 +51,7 @@ func TestFaces(t *testing.T) { func TestManuallyAddedFaces(t *testing.T) { t.Run("Ok", func(t *testing.T) { - results, err := ManuallyAddedFaces(false) + results, err := ManuallyAddedFaces(false, face.RegularFace) if err != nil { t.Fatal(err) @@ -64,7 +64,7 @@ func TestManuallyAddedFaces(t *testing.T) { } }) t.Run("Hidden", func(t *testing.T) { - results, err := ManuallyAddedFaces(true) + results, err := ManuallyAddedFaces(true, face.RegularFace) if err != nil { t.Fatal(err) diff --git a/pkg/clusters/clusters.go b/pkg/clusters/clusters.go index 3aa511e60..bbabcc560 100644 --- a/pkg/clusters/clusters.go +++ b/pkg/clusters/clusters.go @@ -53,7 +53,7 @@ type HardClusterer interface { // the returned channel. Online(observations chan []float64, done chan struct{}) chan *HCEvent - // Implement common operation + // Clusterer implements common operation Clusterer }