tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Is real time object detection possible using TensorCamera and Cocossd ?

Open AdarshJais opened this issue 5 years ago • 10 comments

When I use Tensor Camera

  1. It is very much laggy
  2. I guess it keeps capturing each frame and thus we just get one item in prediction using the mobilenet model
  3. In case we use cocossd for multiple image detection it throw error ""tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead""

So How is it possible to make a real-time multiple image detection, I can see an example in flutter so is that the same possible in React Native anyway?

Flutter example that I need in React Native : - https://heartbeat.fritz.ai/turning-the-mobile-camera-into-a-real-time-object-detector-with-flutter-and-tensorflow-lite-f412962b1805

AdarshJais avatar Apr 26 '21 13:04 AdarshJais

You can refer tensorflow js face landmark detection from the tensorflow website itself it might help you ,for capturing the images u can use openCV

RohitGamare avatar Apr 28 '21 19:04 RohitGamare

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.

rthadur avatar May 06 '21 22:05 rthadur

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar May 06 '21 22:05 google-ml-butler[bot]

When I use Tensor Camera

1. It is very much laggy

2. I guess it keeps capturing each frame and thus we just get one item in prediction using the mobilenet model

3. In case we use cocossd for multiple image detection it throw error ""tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead""

So How is it possible to make a real-time multiple image detection, I can see an example in flutter so is that the same possible in React Native anyway?

Flutter example that I need in React Native : - https://heartbeat.fritz.ai/turning-the-mobile-camera-into-a-real-time-object-detector-with-flutter-and-tensorflow-lite-f412962b1805

Did you find a solution?

uffoltzl avatar Jul 14 '21 17:07 uffoltzl

Hi. I'm facing the same issue. It's very laggy on Android. Any helps please? Thanks a lot

anhquan291 avatar May 10 '22 12:05 anhquan291

When I use Tensor Camera

1. It is very much laggy

2. I guess it keeps capturing each frame and thus we just get one item in prediction using the mobilenet model

3. In case we use cocossd for multiple image detection it throw error ""tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead""

So How is it possible to make a real-time multiple image detection, I can see an example in flutter so is that the same possible in React Native anyway? Flutter example that I need in React Native : - https://heartbeat.fritz.ai/turning-the-mobile-camera-into-a-real-time-object-detector-with-flutter-and-tensorflow-lite-f412962b1805

Did you find a solution?

No bro, no solution yet.

AdarshJais avatar May 10 '22 18:05 AdarshJais

Hi. I'm facing the same issue. It's very laggy on Android. Any helps please? Thanks a lot

Brother did you find any solution to this im also facing same problem im using a model that I created using teachable machine and its very laggy ?

arpitKohli112 avatar Jan 02 '23 13:01 arpitKohli112

When I use Tensor Camera

1. It is very much laggy

2. I guess it keeps capturing each frame and thus we just get one item in prediction using the mobilenet model

3. In case we use cocossd for multiple image detection it throw error ""tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead""

So How is it possible to make a real-time multiple image detection, I can see an example in flutter so is that the same possible in React Native anyway? Flutter example that I need in React Native : - https://heartbeat.fritz.ai/turning-the-mobile-camera-into-a-real-time-object-detector-with-flutter-and-tensorflow-lite-f412962b1805

Did you find a solution?

Brother did you find any solution to this im also facing same problem im using a model that I created using teachable machine and its very laggy ?

arpitKohli112 avatar Jan 02 '23 13:01 arpitKohli112

Hi. I'm facing the same issue. It's very laggy on Android. Any helps please? Thanks a lot

any solution brother pls help ?

arpitKohli112 avatar Jan 02 '23 13:01 arpitKohli112

Hi. My solution is still a little bit laggy on android, but you can find an article I wrote about two years ago (https://www.bam.tech/article/how-to-recognize-real-time-object-in-reactnative-for-dummies) it has not been updated since so it may be an outdated solution. Hope it can help

uffoltzl avatar Jan 18 '23 12:01 uffoltzl