Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

398
Views
How replace faceapi.fetchImage() and use a function that will load my image from the database and be used for Facial Recognition

I am creating a face-recognition system with javascript, PHP and MySQL. The problem I have is I don't know how I will load the image from the database and replace the fetchImage() for something on the disk or MySQL database. I am using XAMPP and localhost.

This is my PHP script:

$result = $mysqli->query("SELECT * FROM student WHERE email = '$user'");
$row = mysqli_fetch_assoc($result);;

$num = $row['stud_num'];
$name = $row['full_name'];
$image = $row['img_name'];
$image_src = "upload/".$image; 

then this is for the face recognition

for (let i = 1; i <= 2; i++) {
    const img = await faceapi.fetchImage(`https://raw.githubusercontent.com/WebDevSimplified/Face-Recognition-JavaScript/master/labeled_images/${label}/${i}.jpg`)
    const detections = await faceapi.detectSingleFace(img).withFaceLandmarks().withFaceDescriptor()
    descriptions.push(detections.descriptor)
}

I want to change the fetch image since the

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!