Limit tsne to 200 faces

As it takes exponential time and 200 faces is enough for analysis
This commit is contained in:
Shailesh Pandit 2021-11-22 11:49:05 +05:30
parent d16837262d
commit 9068b5643a

View file

@ -307,7 +307,9 @@ class MachineLearningService {
}
private toTSNE() {
const input = this.allFaces.map((f) => Array.from(f.embedding));
const input = this.allFaces
.slice(0, 200)
.map((f) => Array.from(f.embedding));
if (!input || input.length < 1) {
return null;
}