Comments (4)
Hi there! π
Integrating YOLOv8 in Unity for mobile deployment isn't directly supported, but you can achieve it by exporting the model to ONNX and then utilizing a plugin or framework compatible with Unity for ONNX models, like [Unity Barracuda](https://docs.unity3d.com/Packages/com.unity.barracuda @cmilanes93).
Hereβs a basic example of how you might export your model to ONNX:
yolo export model=yolov8n.pt format=onnx
Then, load this ONNX model into Unity with Barracuda. Ensure to optimize your model for mobile deployment to achieve good FPS, such as using smaller model variants and quantization if necessary.
Feel free to ask more if you need further guidance! π
from ultralytics.
Hi there! π
Integrating YOLOv8 in Unity for mobile deployment isn't directly supported, but you can achieve it by exporting the model to ONNX and then utilizing a plugin or framework compatible with Unity for ONNX models, like [Unity Barracuda](https://docs.unity3d.com/Packages/com.unity.barracuda @cmilanes93).
Hereβs a basic example of how you might export your model to ONNX:
yolo export model=yolov8n.pt format=onnx
Then, load this ONNX model into Unity with Barracuda. Ensure to optimize your model for mobile deployment to achieve good FPS, such as using smaller model variants and quantization if necessary.
Feel free to ask more if you need further guidance! π
Quantization? We already build our mobile app with the yolov8, but we are trying to solve the problem of fps on mobile.
We retrain our model only using CPU, and the smaller version, but still having poor performance on cell.
from ultralytics.
Hi! Glad to hear you've made progress with YOLOv8 on mobile. If you're still facing low FPS issues, consider the following:
-
Model Quantization: Reduces the precision of the weights from floating point to int8, which can significantly improve performance without a large sacrifice in accuracy. ONNX provides tools for quantization that you can utilize.
-
Optimize the Inference Pipeline: Ensure that input preprocessing and output postprocessing are optimized. Reducing the resolution or simplifying preprocessing steps might help speed up the process.
-
Use Hardware Accelerators: If your mobile device supports it, make use of hardware accelerators like GPU or DSP.
Here's a quick snippet on how you might quantize in ONNX:
import onnx
from onnxruntime.quantization import quantize_dynamic, QuantType
model_path = "model.onnx"
quantized_model_path = "quantized_model.onnx"
model = onnx.load(model_path)
quantized_model = quantize_dynamic(model, quantized_model_path, weight_type=QuantType.QInt8)
onnx.save(quantized_model, quantized_model_path)
Implementing these can potentially help improve your app's performance. Let me know if this helps or if you need more details!
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)
- 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 1
- 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
- Two questions about 'yolov8-rtdetr' HOT 1
- Error in TensorFlow Lite export for YOLOv8 model HOT 3
- Error occurred while running the code to generate COCO-test-dev2017 HOT 25
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.