question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node js real time

See original GitHub issue

Hello, thank you very much for this library! I’m trying to run a small face detection program in node js. It takes as input a frame read from the webcam and output the detection object. I see that the browser version does realtime detection while with the node version it takes around 350ms per frame which is very low compared.

I took some measures of just the prediction step

console.time("detect")
const detections = await faceapi.detectAllFaces(frame)
console.timeEnd("detect")

detect: 442.732ms detect: 363.256ms detect: 365.847ms detect: 338.513ms detect: 334.374ms detect: 340.412ms detect: 324.549ms detect: 333.849ms detect: 327.226ms detect: 325.315ms detect: 322.517ms detect: 322.398ms

I am already importing the tfjs-node library and I am running the program on a 2,6 GHz Intel Core i7 quad-core 16gb ram MacBook.

I just want to know if that frame rate is common or I am facing slow performances.

Thank you

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
tonxxdcommented, Apr 25, 2020

@ChrisDalley yes but that was on my MacBook, since I plan to run the app on fewer resources I am looking for a better strategy as you

0reactions
chanduthedevcommented, Jul 1, 2020

@ChrisDalley could you able to get any improvement? I am also facing same issue in my MacBook. It is taking ~7.5 sec for each image which is quite a lot in these days. I used GPU as well, but not much difference. Please help if you got any breakthrough.

Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building a real-time location app with Node.js and Socket.IO
In this guide, we be building a real-time, location-sharing application using Node.js and Socket.IO as our use case.
Read more >
How to Build Real-time Application with Node.js
Node.js is best suited for handling concurrent connections, making it an excellent framework to develop real-time as well as multi-user web apps ...
Read more >
8 Reasons Why Node.js is Best for Building Real-time Apps
Node.js has recently gained appeal as a platform for developing real-time applications. The primary advantage of Node.js is its asynchronous and ...
Read more >
A Starter Guide to Building Real-time Applications with Node.js
In this article, we are introducing you to the development of real-time applications using Node.js by building a real-time chat.
Read more >
Node.js for Real-Time Application Development - Dev Genius
Node.js is a server-side JavaScript platform that enables developers to create real-time applications. It's fast, efficient, and perfect for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found