-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script.convert tfjs model to onnx support #1038
Comments
Hi there 👋 which model are you trying to convert? Also, can you provide the transformers.js code you are trying to run? Note that our conversion script is only built for Hugging Face transformers models (and not just arbitrary conversion) |
Ah.. thanks Xenova. I created a custom image-classifier model with tfjs-node - attached the model.onnx with txt extension in prior msg. Let me grab and share shortly the code it's pretty basic. |
This is what I'm using to validate test the onnx generated: I'm generating the model using tfjs-node transformers.js to test with (not working) And then I was playing around with web worker and your latest on ms-florence example and seeing if I could find tune with the custom images. (wip) here is an image in the training model I was using to test against. If there are any guides you can point me to - I just want to create a custom mini image classifier ideally with node convert it to onnx use transformers.js and pass images through it to return a classified label. config.json
preprocessor_config.json
|
Hmm looks like the link to the model is broken: Feel free to upload it to the Hugging Face Hub for easier transferring (https://huggingface.co/new) |
Thanks @xenova I've dropped the files into here: |
Question
I'm using tfjs-node to create an image-classifier model;
but I'm stuck with how to convert model.json to a format that can be used by optimum or script.convert to convert it to a onnx file.
I'm able to convert to a graph model using
and then I can convert to an onnx using
This works fine when I test in python but I'm unable to use in transformers.js - I probably need to use optimum to convert it?
I tried a number of approaches but was unable to convert to onnx - I then saw script.convert but am having difficulties
Uploading model.onnx.txt…
Any guidance on how to go from tfjs model.json to onnx supported by transformers.js would really help me out.
Thanks!
The text was updated successfully, but these errors were encountered: