How to get Prediction results(prediction class) using tflite model (using custom dataset to train the Yolov11) in tensorflow js (want to use in Nextjs)? #18309
Replies: 2 comments 5 replies
-
👋 Hello @BiswajitAich, thank you for your interest in Ultralytics 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom deployment ❓ Question, we recommend providing additional details about your workflow, such as:
For maintaining minimal latency in web apps like Next.js, you can also explore ONNXruntime.js or TensorFlow.js for optimized inference pipelines. Details included in the model API routing<here context |
Beta Was this translation helpful? Give feedback.
-
You can check this example on how to preprocesss and postprocess. https://github.com/ultralytics/ultralytics/tree/main/examples/YOLOv8-TFLite-Python You will have to implement similar pre and post processing. |
Beta Was this translation helpful? Give feedback.
-
I trained the Yolov11 model for ROCK-PAPER-SCISSOR dataset(roboflow). It's predicting the image with good accuracy. Then I converted it to tflite to use it as a website (Nextjs framework). To get predicted class I was trying to use tensorflow js ! But using python I am getting the predicted class using loop( as shown in documentation) but I am not getting the same using tf.js ; I also tried onnx format still can't get the predicted class.
( I also tried as python api it's working as intended but can't use it as in free render version it's not returning the response only works in my desktop so no use. )
Please help/guide me!. It will be helpful if a sample could be provided to me.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions