--- library_name: unity-sentis pipeline_tag: object-detection --- # LaboroTomato for Unity Sentis (Version 1.4.0-pre.3*) [LaboroTomato](https://github.com/laboroai/LaboroTomato) is is an image dataset of growing tomatoes at different stages of their ripening. This model was trained on the LaboroTomato image dataset using the Ultralytics [YOLOv8n](https://docs.ultralytics.com/models/yolov8/) object detection framework. The sentis example implementation was copied from [sentis-YOLOv8n](https://huggingface.co/unity/sentis-YOLOv8n). ## How to Use First get the package `com.unity.sentis` from the package manager. You will also need the Unity UI package. * Create a new scene in Unity 6. * Install `com.unity.sentis` version `1.4.0-pre.3` from the package manager, and enable the 'Video' built-in module. * Add the c# script to the Main Camera. * Create a Raw Image in the scene and link it as the `displayImage` * Drag the laboro_tomato_yolov8.sentis file into the model asset field * Drag the classes.txt on to the labelAssets field * Put a video file in the Assets/StreamingAssets folder and set the name of videoName to the filename in the script ("tomatoes.mp4") * Set the fields for the bounding box texture sprite (you can [create your own one](https://docs.unity3d.com/Manual/9SliceSprites.html) using a transparent texture or use an inbuilt one) and the font ## Preview If working correctly you should see something like this: ![preview](preview.png) ## Information The onnx model was designed with the same inputs as [sentis-YOLOv8n](https://huggingface.co/unity/sentis-YOLOv8n). If you are using that implementation, you can simply swap out the model and labels with the ones in this project and it should work. ## References For information on how the model was trained and exported to onnx, see the [project github page](https://github.com/DavidAtRedpine/LaboroTomatoYoloV8). ## Unity Sentis Unity Sentis is the inference engine that runs in Unity 3D. More information can be found at [here](https://unity.com/products/sentis) ## License Ultralytics YOLOv8 uses the GPLv3 license. Details [here](https://github.com/autogyro/yolo-V8?tab=readme-ov-file#license). The LaboroTomato dataset uses the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Details [here](https://github.com/laboroai/LaboroTomato/blob/master/README.md#license).