1,578 questions
-1
votes
0
answers
22
views
Using TensorFlow.js to Correct Sentences Based on Training Data
I'm working on a Node.js project that uses TensorFlow.js to correct sentences based on a training dataset. The dataset consists of example sentences, and I want the machine learning model to learn ...
0
votes
0
answers
3
views
TypeError: prediction.argMax is not a function
Using tensor flow.js for deploy model...
Model get [1,63]
I can't fix problem "const predictedClass = prediction.argMax(1).dataSync();"
async function predictGesture(coordinates) {
if (!...
0
votes
0
answers
23
views
Force TouchDesigner to use a specific python version
I'm running Windows10.
For my project I have to use Python 3.10 with tensorflow-directml, torchvision and other deep learning tools.
The following is a link to one of the many guides about this topic:
...
1
vote
0
answers
28
views
YOLOv8 Hand Detection Fails at Close Range After TensorFlow.js Conversion
I'm using YOLOv8 for real-time hand detection in a web app. The model works well in Python, but after converting it to TensorFlow.js, detection struggles when the hand is too close to the webcam—...
0
votes
0
answers
25
views
Memory leak in TFJS converted model (original model in Pytorch)
I have been working on Gaze Estimation in Browser environment and for that I used the following repo: gaze-estimation
For my use case I converted their PyTorch mobileone_S0 model to a TFJS model.
...
0
votes
0
answers
59
views
How to convert .h5 file to JSON format
I have tried all the steps at https://www.tensorflow.org/js/guide/conversion. I do not know whether i should install using pip or npm so I tried both, but when i tried using either of them, it gave me ...
-1
votes
1
answer
29
views
AWS IVS client not getting background video blur and only rendering first frame
I am working on an Angular 15 application where I apply a background blur effect to a video stream using CanvasRenderingContext2D and MediaPipeSelfieSegmentation (from bodySegmentation) for real-time ...
1
vote
0
answers
46
views
Converting tensorflow model using tensorflowjs
Trying to convert a simple CNN using tfjs. The model gets converted, however it does not get loaded in properly. Error: 'An InputLayer should be passed either a batchInputShape or an inputShape.'
tf....
1
vote
0
answers
68
views
How to leverage pyannote / speaker-diarization-3.0 with Transformers.js?
pyannote/segmentation-3.0 suggests to use pyannote/speaker-diarization-3.0 since it has better embedding model for diarization. I am trying to use this in client-side JS. It seems like I am supposed ...
0
votes
0
answers
14
views
Not getting expected results when loading tensorflowjs model
Followed this guide to create a tensorflow.js neural network https://medium.com/@GeorgePerry/finding-intent-to-buy-from-instagram-comments-with-tensorflow-js-3f764c132be7
It works prefectly until I ...
2
votes
0
answers
17
views
Tensorflow Matrices match error when applying gaussian blur module
I am having a problem with the gaussian blur of tensorflow.js.
Tried to apply the gaussian blur to a video but the best I can do is get the colors inverted.
The 5 by 5 matrix kernel I have seems to ...
0
votes
0
answers
23
views
TensorCamera never fires onReady, silent failure
I am trying to use TFJS because react-native-fast-tflite package is not able to load VertexAI models 🤷🏻♂️. So I tried following example TFJS + ReactNative repo, however, it is severely outdated. ...
0
votes
0
answers
24
views
An error while using tensorflowjs with NextJs
ModelLoader.js:17 Error loading model: ValueError: An InputLayer should be passed either a batchInputShape or an inputShape.
The above error is encountered when I am running a simple shelf life ...
1
vote
1
answer
101
views
How to Change the Default Background of bodySegmentation-mask-body-parts in p5.js?
I'm trying to change the background behind the detected body segment, but I can't get it to work. Even though I'm modifying the background(...) function, it keeps defaulting to white. Can anyone ...
0
votes
0
answers
95
views
tensorflowjs loadLayersModel function throwing ValueError: An InputLayer should be passed either a `batchInputShape` or an `inputShape`
heres my code for generating and training the model https://github.com/JaylenLuc/Terrestrial-based-ML-cloud-classification/blob/main/cloud.ipynb
I specified the input shape in the VGG16 model yet ...
0
votes
0
answers
50
views
How to use converted tensorflowjs model
I have converted a saved_model tensorflow model into tensorflowjs using the converter.
Link to tfjsexport https://drive.google.com/drive/folders/1qrZOm4EIahkXBQFIYbaAFYGDk8UX0jCs?usp=drive_link. Link ...
0
votes
0
answers
18
views
Firebase Cloud Function: Error loading TensorFlow model - tf.node.loadLayersModel not a function
In firebase cloud function I'm trying to run a tenserflow model. But I keep getting the error: tf.node.loadLayersModel is not a function. Does anyone know what I might do wrong?
exports....
0
votes
0
answers
28
views
Tensorflow.js custom trained model issues
I created my own tensorflow model to detect only one object (trucks) in images. The model works perfectly in Python, it's a saved model (saved_model.pb), and I need to use it in the browser with ...
0
votes
0
answers
45
views
tfjs_binding.node is not available in node module when trying to use tensoflow.js in node
Solved: After running
node-gyp configure --verbose
I've noticed message about outdated of Visual Studio C++. After updating, I finally had a different error, code related at least. That means, ...
0
votes
0
answers
104
views
Error starting next js app with @tensorflow/tfjs-node-gpu on wsl
So i installed wsl, nvidia cuda, created next js project in linux subsystem, installed @tensorflow/tfjs-node-gpu and to this moment everything was fine, but while starting App i got this error
✓ ...
0
votes
0
answers
17
views
How can I convert a TFJS model to TFLite?
I'm attempting to convert a TFJS model which consists of a model.json and group1-shard1 - 7 files.
I'm trying to load the model in tfjs like this:
import tfjs_graph_converter.api as tfjs
tfjs....
0
votes
0
answers
43
views
Unable to resolve tensorflow model weight bin file in react native
`const loadModel = async () => {
const temperatureModel = await tf.loadLayersModel(
bundleResourceIO(temperatureLSTM, modelWeight)
).catch((e)=>{
console.log("error: ",e)
})
return ...
0
votes
0
answers
31
views
Firebase code is not loading model from storage
The code is calling file from firebase cloud storage and using that file to do stuff like image detection which is intended with model, but the function which was deployed using this code is giving an ...
0
votes
0
answers
21
views
How can I edit the contour colour in toBinaryMask in @tensorflow-models/body-segmentation?
I am using @tensorflow-models/body-segmentation and the contour colour always defaults to rgb(0,255,255). I'm using the toBinaryMask function to segment people from their background and I want the ...
1
vote
0
answers
72
views
Converted Model Using TensorFlow.JS Converter Not Working
I was following the TFJS WebML YT Course from Jason Mayes and following along to the TFJS Converter video, here's my notebook:
Google Colab Notebook
Basically it is an exact replica from the video and ...
0
votes
1
answer
40
views
Tensorflowjs keras model node weights aren't recognized
I'm facing an error when calling a pre-trained keras model in javascript for a simple web app on Heroku.
https://digit-predictor-6ba58c0cd85a.herokuapp.com
Unhandled Promise Rejection: Error: ...
1
vote
0
answers
170
views
TensorFlow.js with Expo Camera not processing frames in React Native
I have the following React Native App.js File where I'm trying to print nextImageTensor received, but the flow is not going inside loop(). As a matter of fact loop is not even getting called
App.js
...
1
vote
1
answer
47
views
TensorFlow JS : model.predict() provoke undefined on 'backend' because of an error within the library tensorflow : engine.ts:425 that cause undefined
Thanks for taking the time to read my problem 👍
System information
OS Platform and Distribution : Windows 10
TensorFlow.js installed from (npm or script link): npm
TensorFlow.js version (use command ...
2
votes
2
answers
178
views
different predictions on same data, TenserflowJS
I have saved a TFJS model to a document in cloud firestore, if I run this code straight from the browser:
const jsonObject = JSON.parse(TFModeljson);
loadedModel = await
tf.loadLayersModel(tf.io....
0
votes
0
answers
58
views
tensorflowjs_converter utility adds suffixes to variable names that cause errors
I am trying to use tensorflowjs_converter to convert a model that I am training in python (using tensorflow) to a JSON layers format so that I can run it on the web. I installed the latest version, ...
0
votes
0
answers
78
views
While importing a converted tensorflowjs model into react, having an error while using "loadLayersModel"
I am new to ML and tf. This is my first time trying to do a project on it. I have trained a siamese model in tensorflow and saved it with .h5 format. Then, I have used "tensorflowjs_converter&...
0
votes
0
answers
16
views
Can I package a pretrained tensorflowjs model within my ReactJs App
I am looking to use tensorflowjs on the browser as part of my ReactJS app. The model I am trying to use (as a proof of concept) is toxicity model. It is meant to detect overly toxic reviews and ...
1
vote
0
answers
83
views
Mobile inference in a React Native App: use tensorflow in a native module or use directly Tensorflow.js in React Native?
I want to performance a face detection + face recognition in a React Native App offline, so I need to do my inference directly on mobile. I see that are many ways to do that, such as with Tensorflow....
0
votes
0
answers
115
views
Provided weight data has no target variable: sequential/conv2d/kernel
I am building a website that uses facial emotion recognition system on the browser. I built and trained a CNN model in tensorflow and converted it to tensorflow.js. However, while loading the model I ...
0
votes
0
answers
167
views
input_shape error while converting tensorflow model to tensorflow.js model
I want to use my deep learning CNN algorithm in a web application and I converted my tensorflow model, emotion_model.h5 to a tensorflow.js model using this command in the terminal
...
0
votes
0
answers
28
views
How to get the tfjs model movenet singlepose-lightning-4 in INT8?
This is the smallest tfjs movenet model now movenet/tfJs/singlepose-lightning,but I want get a samller one.
I try to convert it to quantize_uint8 follow this tfjs-converter,but not successed.
I want ...
0
votes
0
answers
214
views
Cannot install Tensorflowjs
I have a keras machine learning model titled "melanoma_binary_classifer.keras", and I am trying to convert it to tf.js layer format, and load it into tensorflow.js. I am doing this by ...
0
votes
0
answers
199
views
Install tensorflow\tfjs-node on Windows 11
I've got a lot of problem installing TFJS
My situation:
Python v3.11.9 (from vscode terminal)
NodeJS v20.14.0 (from vscode terminal)
Windows 11
Visual Studio Community installed
What i've done:
...
0
votes
0
answers
33
views
Setup a Residual Neural Network block in tfjs tensorflow.js
I am trying to implement the behavior of a ResNet (Residual Neural Network) in tensorflow.js. I am hoping someone who knows what they are doing can point me in the right direction. Would the following ...
1
vote
0
answers
46
views
cannot back propagate on multi head attention tensorflowjs
I am trying to create a multi-head attention using tensorflowjs. When trying to train the model, an error kept popping up that the gradient shape was inconsistent with the input shape.
reproducable ...
0
votes
0
answers
95
views
How to detect background and gender(man,women) using TensorFlow.js?
I am trying to create a Web app where user provide a photo and the app should detect the object also gender if he/she of the image and the backgroud. I can detect object by TensorFlow.js object ...
0
votes
0
answers
34
views
Converting Model Saved by tfjs-react-native to Keras or Saved Model
I am having difficulties in converting a model saved by tfjs-react-native to a Keras or TF_Saved_Model format using tensorflowjs_converter. My intention is to use federated learning to train a global ...
0
votes
0
answers
22
views
How to get the tensorflow.js model predictions percentage in float
I am following on the codelabs of TensorFlow.js — Handwritten digit recognition with CNNs
The screenshot above, shows the prediction as a float, but when I am calling
const predict = this.model?....
0
votes
0
answers
23
views
Calculate user height from tensorflow pose
Here i have write logic of get pose from image or video
const pose = await net.estimateSinglePose(video);
estimateHeight(pose)
const minConfidence = 0.5;
I want to find height ...
0
votes
0
answers
85
views
Getting a domain/app's categories by quering the chrome://topics-internals/ Classifier directly
Chrome's Topics API's internal tool chrome://topics-internals/ has a Classifier that can list which categories a domain/app belongs to, as determined by an offline file (which is shipped with Chrome) ...
0
votes
0
answers
89
views
Loading models from Keras in tensorflow
I’m currently working on a web application where I need to use custom machine learning models with TensorFlow.js. I’ve successfully converted my Keras model to TensorFlow.js format, but I’m ...
0
votes
2
answers
525
views
Need to convert Keras model to TensorFlow.js but facing version compatibility issues between TensorFlow and Keras
When I tried to convert a .h5 model by using this command in the terminal
tensorflowjs_converter --input_format keras model.h5 ./folder
I got an output that says "ValueError: Expected Keras ...
0
votes
0
answers
14
views
TensorFlow on phone using frontcamera as default
I'm trying to make an application that identifies plant diseases but I have a problem that it uses the phone's front camera instead of the back camera, so I need you guys to help me fix it. I tried ...
0
votes
0
answers
17
views
Can't import @tensorflow, @mediapipe libraries in JS [duplicate]
I'm trying to build a chrome extension that uses the pre-built tensorflowjs face landmark detection model. I'm having trouble importing the models for usage. I've tried following the documentation for ...
0
votes
0
answers
120
views
Porting TimesNet from PyTorch to Tensorflow.js
I want to use part of the Time Series Library, namely TimesNet on Tensorflow.js. How can I do this?
This requires knowledge of PyTorch, Python and mathematics.
Source code https://github.com/thuml/...