Comments (4)
@Thunderzen hello! Currently, we don't provide a direct C++ implementation for YOLOv8 using TensorFlow Lite. However, you can perform inference with your .tflite
model in C++ by using the TensorFlow Lite C++ API. Here's a basic outline of the steps you'd typically follow:
-
Load the TensorFlow Lite model:
std::unique_ptr<tflite::FlatBufferModel> model = tflite::FlatBufferModel::BuildFromFile("your_model.tflite");
-
Build the interpreter:
tflite::ops::builtin::BuiltinOpResolver resolver; std::unique_ptr<tflite::Interpreter> interpreter; tflite::InterpreterBuilder(*model, resolver)(&interpreter);
-
Allocate tensors and perform inference:
interpreter->AllocateTensors(); // Set input data float* input = interpreter->typed_input_tensor<float>(0); // Fill 'input' with your input data interpreter->Invoke(); // Get output data float* output = interpreter->typed_output_tensor<float>(0);
For a complete example and more details, you might want to check out the TensorFlow Lite C++ API documentation. Hope this helps!
from ultralytics.
Hi, is there documentation on the post-processing after performing interpreter->invoke in c++? For example, code to extract the information like bounding boxes, confidences and class scores?
from ultralytics.
Hello! Currently, we don't have specific documentation for post-processing YOLOv8 outputs in C++ after using TensorFlow Lite's interpreter->Invoke()
. However, typically, you'll need to access the output tensor, which contains the detection results, and then apply the appropriate logic to extract bounding boxes, confidence scores, and class IDs.
Here's a brief example of how you might start accessing the output tensor:
float* output = interpreter->typed_output_tensor<float>(0);
// Output processing code here
The exact details depend on the output format of your model. You might need to reshape the tensor and apply non-max suppression to filter overlapping boxes. For a more detailed guide, you might find TensorFlow's C++ API documentation helpful, or consider exploring community forums for specific examples related to YOLOv8. Hope this helps!
from ultralytics.
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
from ultralytics.
Related Issues (20)
- How do you combine yolov8 with tracking algorithms other than botsort and bytetrack? HOT 6
- Pre & Post Processing (Yolov8 OBB, TFLite C++) HOT 7
- While using track and persist=True, different detections based on image position HOT 4
- Why the reasoning speed of yolov8-seg is getting slower and slower? HOT 13
- How to use FASTSAM with camera HOT 2
- Cannot get bounding boxes but `show` can still display the detected objects HOT 2
- Oriented Bounding Boxes for Cross Detection HOT 7
- Training a model using ARM64 devices utilizes only one core HOT 15
- Add hardware support for ARM64 NPUs (Hailo8L or RK3855 NPU)
- Deployment of training nodes in a Kuberentes Cluster HOT 4
- yolo_world HOT 2
- The problem of weight transfer in YOLOv8s backbone HOT 35
- Export - Ultralytics YOLOv8 model to TFJS HOT 3
- Application of SAHI in YOLOV8-OBB mission HOT 1
- Frame drop when increasing the number of streams HOT 2
- How to ReID a person and visualize his route across multiple cameras in live time HOT 2
- How to train YOLOV9 with this project? HOT 1
- Not displaying the RGB frame as soon as code runs and lagging when there is no object detected HOT 2
- Failed to train on AMD GPU (RCOM enabled and validated) HOT 2
- Convert YOLO models to Torchscript GPU Half Precision HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.