David Scripps
		
	commited on
		
		
					Commit 
							
							·
						
						dd84729
	
1
								Parent(s):
							
							a706d11
								
Update readme, remove input code from c# script
Browse files- README.md +3 -3
- RunLaboroTomato.cs +2 -6
    	
        README.md
    CHANGED
    
    | @@ -13,10 +13,10 @@ First get the package `com.unity.sentis` from the package manager. | |
| 13 | 
             
            You will also need the Unity UI package.
         | 
| 14 |  | 
| 15 | 
             
            * Create a new scene in Unity 6.
         | 
| 16 | 
            -
            * Install `com.unity.sentis` version `1.4.0-pre.3` from the package manager
         | 
| 17 | 
             
            * Add the c# script to the Main Camera.
         | 
| 18 | 
             
            * Create a Raw Image in the scene and link it as the `displayImage`
         | 
| 19 | 
            -
            * Drag the  | 
| 20 | 
             
            * Drag the classes.txt on to the labelAssets field
         | 
| 21 | 
             
            * Put a video file in the Assets/StreamingAssets folder and set the name of videoName to the filename in the script ("tomatoes.mp4")
         | 
| 22 | 
             
            * 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
         | 
| @@ -39,4 +39,4 @@ Unity Sentis is the inference engine that runs in Unity 3D. More information can | |
| 39 | 
             
            ## License
         | 
| 40 | 
             
            Ultralytics YOLOv8 uses the GPLv3 license. Details [here](https://github.com/autogyro/yolo-V8?tab=readme-ov-file#license).
         | 
| 41 |  | 
| 42 | 
            -
            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).
         | 
|  | |
| 13 | 
             
            You will also need the Unity UI package.
         | 
| 14 |  | 
| 15 | 
             
            * Create a new scene in Unity 6.
         | 
| 16 | 
            +
            * Install `com.unity.sentis` version `1.4.0-pre.3` from the package manager, and enable the 'Video' built-in module.
         | 
| 17 | 
             
            * Add the c# script to the Main Camera.
         | 
| 18 | 
             
            * Create a Raw Image in the scene and link it as the `displayImage`
         | 
| 19 | 
            +
            * Drag the laboro_tomato_yolov8.sentis file into the model asset field
         | 
| 20 | 
             
            * Drag the classes.txt on to the labelAssets field
         | 
| 21 | 
             
            * Put a video file in the Assets/StreamingAssets folder and set the name of videoName to the filename in the script ("tomatoes.mp4")
         | 
| 22 | 
             
            * 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
         | 
|  | |
| 39 | 
             
            ## License
         | 
| 40 | 
             
            Ultralytics YOLOv8 uses the GPLv3 license. Details [here](https://github.com/autogyro/yolo-V8?tab=readme-ov-file#license).
         | 
| 41 |  | 
| 42 | 
            +
            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).
         | 
    	
        RunLaboroTomato.cs
    CHANGED
    
    | @@ -148,11 +148,7 @@ public class RunLaboroTomato : MonoBehaviour | |
| 148 | 
             
                private void Update()
         | 
| 149 | 
             
                {
         | 
| 150 | 
             
                    ExecuteML();
         | 
| 151 | 
            -
             | 
| 152 | 
            -
                    if (Input.GetKeyDown(KeyCode.Escape))
         | 
| 153 | 
            -
                    {
         | 
| 154 | 
            -
                        Application.Quit();
         | 
| 155 | 
            -
                    }
         | 
| 156 | 
             
                }
         | 
| 157 |  | 
| 158 | 
             
                public void ExecuteML()
         | 
| @@ -272,4 +268,4 @@ public class RunLaboroTomato : MonoBehaviour | |
| 272 | 
             
                    centersToCorners?.Dispose();
         | 
| 273 | 
             
                    engine?.Dispose();
         | 
| 274 | 
             
                }
         | 
| 275 | 
            -
            }
         | 
|  | |
| 148 | 
             
                private void Update()
         | 
| 149 | 
             
                {
         | 
| 150 | 
             
                    ExecuteML();
         | 
| 151 | 
            +
                    
         | 
|  | |
|  | |
|  | |
|  | |
| 152 | 
             
                }
         | 
| 153 |  | 
| 154 | 
             
                public void ExecuteML()
         | 
|  | |
| 268 | 
             
                    centersToCorners?.Dispose();
         | 
| 269 | 
             
                    engine?.Dispose();
         | 
| 270 | 
             
                }
         | 
| 271 | 
            +
            }
         | 
