You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code i check image upload and compare it with embeding in database but after call function human.match.find function it allways return similarity 0. Althought i up load same image with image save embedding in data base, below my code
and what is the type of rec.embedding?
you said you're using a database, but no note on which one? based on SELECT name, embedding FROM employee, its some sort of sql database.
note that most sql databases don't natively store float arrays, so i'd assume you'd need to do some serialization when storing and deserialize when reading.
if you can reproduce the problem with simple store, then its an issue, but i cannot troubleshoot your sql interface.
once there is a reproduction that can be used, i can reopen.
and what is the type of rec.embedding? you said you're using a database, but no note on which one? based on SELECT name, embedding FROM employee, its some sort of sql database. note that most sql databases don't natively store float arrays, so i'd assume you'd need to do some serialization when storing and deserialize when reading.
if you can reproduce the problem with simple store, then its an issue, but i cannot troubleshoot your sql interface. once there is a reproduction that can be used, i can reopen.
Thank for quick reply, i just solved by update
const embeddingArray = rows.map((rec) => rec.embedding); // build array with just embeddings
to
const embeddingArray = rows.map((rec) => JSON.parse(rec.embedding));
My code i check image upload and compare it with embeding in database but after call function human.match.find function it allways return similarity 0. Althought i up load same image with image save embedding in data base, below my code
export const recognition = async (req, res) => {
try {
// Access headers
const customHeader = req.headers['api-Key'];
if (!req.file) {
return res.status(400).json({ message: 'No file uploaded' });
}
// Do something with the header parameters
console.log('Custom Header:', customHeader);
const uploadedFile = req.file;
const input = uploadedFile.path;
};
Environment
js
,esm
,esm-nobundle
)?The text was updated successfully, but these errors were encountered: