Using for a gallery app like Google Photos #290
-
Hi, I'm using this package in my application "à la" google photos to identify friends and familly in photos. What are the recommendations/best models/best settings to use for this non real time use? Right now my settings are: const myConfig: Partial<Config> = {
cacheSensitivity: 0,
filter: {
equalization: true
},
face: {
enabled: true,
detector: { rotation: true,
maxDetected: 30, },
mesh: { enabled: true },
description: { enabled: true },
},
}; I detect person in photos like this: const queryImage = tf.node.decodeJpeg(query);
const resultsQuery = await human.detect(queryImage) i load existing descriptors from database labeledDescriptors: {personId: string, descriptor: number[]}[} fore each faces from step 1 i get the best match from those existing descriptors: const match = await matchFace(labeledDescriptors, face.embedding) const best = human.match(face, embeddingArray); if best.similarity is above 0.5 i auto tag. if not the user has it as suggestion and if he validate i had the 'embedding' result i had from step 1 in database const resultsQuery = await human.detect(queryImage) Not sur if i should use enhance manually before saving to DB? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
your configuration sounds reasonable. note that btw, regarding app itself, check out https://github.com/vladmandic/pigallery |
Beta Was this translation helpful? Give feedback.
-
i haven't done updates to gallery app in a long time and in the meantime there is a lot of new stuff in
its very impactful if head angle is more than 30 degrees, otherwise very little.
i've opened a feature request a while ago, its not getting much traction. |
Beta Was this translation helpful? Give feedback.
-
sure - its tensorflow/tfjs#5473 |
Beta Was this translation helpful? Give feedback.
-
new version of that allows face rotation correction to work in nodejs its disabled by default as it does have a performance impact |
Beta Was this translation helpful? Give feedback.
your configuration sounds reasonable.
note that
config.face.detector.rotation
is auto-disabled fortfjs-node
as required op is not supported in underlyingtensorflow
library.regarding enhance, typically there is no harm by enabling it as it performs histogram equalization, but best if you try yourself.
btw, regarding app itself, check out https://github.com/vladmandic/pigallery