integrations/torchscript/ #9002
Replies: 2 comments 7 replies
-
hi, I'm implementing yolov8 model in android gallery's search mechanism. the purpose of yolov8 model is to scan media files and return images that has a bounding box label that matches the search query. i can make it work with yolov5s.torchscript.ptl using org.pytorch:pytorch_android_lite:1.10.0 and org.pytorch:pytorch_android_torchvision_lite:1.10.0 but it wont work with yolov8s.torchscript. i really need help with this. |
Beta Was this translation helpful? Give feedback.
-
Load the YOLOv8 modelmodel = YOLO("yolov8n.pt") Export the model to TorchScript formatmodel.export(format="torchscript") # creates 'yolov8n.torchscript' Load the exported TorchScript modeltorchscript_model = YOLO("yolov8n.torchscript") For loading "yolov8n.torchscript" here yolo is used. |
Beta Was this translation helpful? Give feedback.
-
integrations/torchscript/
Learn to export your Ultralytics YOLOv8 models to TorchScript format for deployment through platforms like embedded systems, web browsers, and C++ applications.
https://docs.ultralytics.com/integrations/torchscript/
Beta Was this translation helpful? Give feedback.
All reactions