├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── README.md └── YOLOv8Unity ├── .gitignore ├── .vsconfig ├── Assets ├── Scenes.meta ├── Scenes │ ├── Detection.unity │ ├── Detection.unity.meta │ ├── Segmentation.unity │ └── Segmentation.unity.meta ├── Scripts.meta ├── Scripts │ ├── Detector.cs │ ├── Detector.cs.meta │ ├── Extensions.cs │ ├── Extensions.cs.meta │ ├── NN.meta │ ├── NN │ │ ├── BarracudaUtils.cs │ │ ├── BarracudaUtils.cs.meta │ │ ├── DuplicatesSupressor.cs │ │ ├── DuplicatesSupressor.cs.meta │ │ ├── IntersectionOverUnion.cs │ │ ├── IntersectionOverUnion.cs.meta │ │ ├── NNHandler.cs │ │ ├── NNHandler.cs.meta │ │ ├── ResultBox.cs │ │ ├── ResultBox.cs.meta │ │ ├── YOLOv8.cs │ │ ├── YOLOv8.cs.meta │ │ ├── YOLOv8OutputReader.cs │ │ ├── YOLOv8OutputReader.cs.meta │ │ ├── YOLOv8Segmentation.cs │ │ ├── YOLOv8Segmentation.cs.meta │ │ ├── YOLOv8SegmentationOutputReader.cs │ │ └── YOLOv8SegmentationOutputReader.cs.meta │ ├── Scripts.asmdef │ ├── Scripts.asmdef.meta │ ├── Segmentator.cs │ ├── Segmentator.cs.meta │ ├── TextureProviders.meta │ ├── TextureProviders │ │ ├── TextureProvider.cs │ │ ├── TextureProvider.cs.meta │ │ ├── VideoTextureProvider.cs │ │ ├── VideoTextureProvider.cs.meta │ │ ├── WebCamTextureProvider.cs │ │ └── WebCamTextureProvider.cs.meta │ ├── TextureTools.cs │ └── TextureTools.cs.meta ├── Tests.meta ├── Tests │ ├── TestDuplicatesSupressor.cs │ ├── TestDuplicatesSupressor.cs.meta │ ├── TestYOLOHandler.cs │ ├── TestYOLOHandler.cs.meta │ ├── TestYOLOPostprocessor.cs │ ├── TestYOLOPostprocessor.cs.meta │ ├── Tests.asmdef │ ├── Tests.asmdef.meta │ ├── test_image.jpg │ └── test_image.jpg.meta ├── classes.txt └── classes.txt.meta ├── Packages ├── manifest.json └── packages-lock.json └── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── MultiplayerManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages └── com.unity.testtools.codecoverage │ └── Settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio cache directory 2 | .vs/ -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YOLOv8 Unity 2 | YOLOv8 Unity integrates cutting-edge and state-of-the-art Deep Learning models with the Unity engine using the Barracuda library. It contains examples of **Object Detection** and **Instance Segmentation**. 3 | 4 | This project is the direct continuation of my previous project [YOLO-UnityBarracuda](https://github.com/wojciechp6/YOLO-UnityBarracuda). 5 | 6 | ## YOLOv8 7 | [YOLOv8](https://github.com/ultralytics/ultralytics) is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of computer vision tasks. 8 | 9 | This new version of YOLO achieves better accuracy and is even faster than its predecessors. 10 | ![image](https://github.com/wojciechp6/YOLOv8Unity/assets/29753380/7d2dd65f-1564-4be4-83c9-c2c424d31734) 11 | 12 | ## Usage 13 | This project uses Unity 2022.3. 14 | 15 | ### Instance Segmentation 16 | To run segmentation you need to obtain the onnx version of the segmentation model and indicate it in the script. 17 | 1. ~~Download the already converted model from [PINTO model zoo](https://github.com/PINTO0309/PINTO_model_zoo/tree/main/345_YOLOv8)~~ (not available for now) or convert it by yourself using [export command](https://docs.ultralytics.com/usage/cli/#export). 18 | 2. Copy the segmentation model to *Assets*. 19 | 3. Open *Scenes/Segmentation*. 20 | 4. Select *Main Camera*. 21 | 5. In the *Segmentator* component point your segmentation model in the *Model File* field. 22 | 6. Run the scene. 23 | 24 | ### Object Detection 25 | To run object detection you need to obtain the onnx version of the detection model and indicate it in the script. 26 | 1. ~~Download the already converted model from [PINTO model zoo](https://github.com/PINTO0309/PINTO_model_zoo/tree/main/345_YOLOv8)~~ (not available for now) or convert it by yourself using [export command](https://docs.ultralytics.com/usage/cli/#export). 27 | 2. Copy the detection model to *Assets*. 28 | 3. Open *Scenes/Detection*. 29 | 4. Select *Main Camera*. 30 | 5. In the *Detector* component point your detection model in the *Model File* field. 31 | 6. Run the scene. 32 | -------------------------------------------------------------------------------- /YOLOv8Unity/.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | 74 | *.onnx 75 | *.onnx.meta 76 | *.mp4 77 | *.mp4.meta -------------------------------------------------------------------------------- /YOLOv8Unity/.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f58cfca4fa692d242aedfde3f6c4483c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scenes/Detection.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 2113376081} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 3 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | buildHeightMesh: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &5339667 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 5339670} 135 | - component: {fileID: 5339669} 136 | - component: {fileID: 5339668} 137 | m_Layer: 0 138 | m_Name: EventSystem 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &5339668 145 | MonoBehaviour: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 5339667} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | m_SendPointerHoverToParent: 1 157 | m_HorizontalAxis: Horizontal 158 | m_VerticalAxis: Vertical 159 | m_SubmitButton: Submit 160 | m_CancelButton: Cancel 161 | m_InputActionsPerSecond: 10 162 | m_RepeatDelay: 0.5 163 | m_ForceModuleActive: 0 164 | --- !u!114 &5339669 165 | MonoBehaviour: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 5339667} 171 | m_Enabled: 1 172 | m_EditorHideFlags: 0 173 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 174 | m_Name: 175 | m_EditorClassIdentifier: 176 | m_FirstSelected: {fileID: 0} 177 | m_sendNavigationEvents: 1 178 | m_DragThreshold: 10 179 | --- !u!4 &5339670 180 | Transform: 181 | m_ObjectHideFlags: 0 182 | m_CorrespondingSourceObject: {fileID: 0} 183 | m_PrefabInstance: {fileID: 0} 184 | m_PrefabAsset: {fileID: 0} 185 | m_GameObject: {fileID: 5339667} 186 | serializedVersion: 2 187 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 188 | m_LocalPosition: {x: 0, y: 0, z: 0} 189 | m_LocalScale: {x: 1, y: 1, z: 1} 190 | m_ConstrainProportionsScale: 0 191 | m_Children: [] 192 | m_Father: {fileID: 0} 193 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 194 | --- !u!1 &98631260 195 | GameObject: 196 | m_ObjectHideFlags: 0 197 | m_CorrespondingSourceObject: {fileID: 0} 198 | m_PrefabInstance: {fileID: 0} 199 | m_PrefabAsset: {fileID: 0} 200 | serializedVersion: 6 201 | m_Component: 202 | - component: {fileID: 98631264} 203 | - component: {fileID: 98631263} 204 | - component: {fileID: 98631262} 205 | - component: {fileID: 98631261} 206 | m_Layer: 5 207 | m_Name: Canvas 208 | m_TagString: Untagged 209 | m_Icon: {fileID: 0} 210 | m_NavMeshLayer: 0 211 | m_StaticEditorFlags: 0 212 | m_IsActive: 1 213 | --- !u!114 &98631261 214 | MonoBehaviour: 215 | m_ObjectHideFlags: 0 216 | m_CorrespondingSourceObject: {fileID: 0} 217 | m_PrefabInstance: {fileID: 0} 218 | m_PrefabAsset: {fileID: 0} 219 | m_GameObject: {fileID: 98631260} 220 | m_Enabled: 1 221 | m_EditorHideFlags: 0 222 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 223 | m_Name: 224 | m_EditorClassIdentifier: 225 | m_IgnoreReversedGraphics: 1 226 | m_BlockingObjects: 0 227 | m_BlockingMask: 228 | serializedVersion: 2 229 | m_Bits: 4294967295 230 | --- !u!114 &98631262 231 | MonoBehaviour: 232 | m_ObjectHideFlags: 0 233 | m_CorrespondingSourceObject: {fileID: 0} 234 | m_PrefabInstance: {fileID: 0} 235 | m_PrefabAsset: {fileID: 0} 236 | m_GameObject: {fileID: 98631260} 237 | m_Enabled: 1 238 | m_EditorHideFlags: 0 239 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 240 | m_Name: 241 | m_EditorClassIdentifier: 242 | m_UiScaleMode: 0 243 | m_ReferencePixelsPerUnit: 100 244 | m_ScaleFactor: 1 245 | m_ReferenceResolution: {x: 800, y: 600} 246 | m_ScreenMatchMode: 0 247 | m_MatchWidthOrHeight: 0 248 | m_PhysicalUnit: 3 249 | m_FallbackScreenDPI: 96 250 | m_DefaultSpriteDPI: 96 251 | m_DynamicPixelsPerUnit: 1 252 | m_PresetInfoIsWorld: 0 253 | --- !u!223 &98631263 254 | Canvas: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 98631260} 260 | m_Enabled: 1 261 | serializedVersion: 3 262 | m_RenderMode: 0 263 | m_Camera: {fileID: 0} 264 | m_PlaneDistance: 100 265 | m_PixelPerfect: 0 266 | m_ReceivesEvents: 1 267 | m_OverrideSorting: 0 268 | m_OverridePixelPerfect: 0 269 | m_SortingBucketNormalizedSize: 0 270 | m_VertexColorAlwaysGammaSpace: 0 271 | m_AdditionalShaderChannelsFlag: 0 272 | m_UpdateRectTransformForStandalone: 0 273 | m_SortingLayerID: 0 274 | m_SortingOrder: 0 275 | m_TargetDisplay: 0 276 | --- !u!224 &98631264 277 | RectTransform: 278 | m_ObjectHideFlags: 0 279 | m_CorrespondingSourceObject: {fileID: 0} 280 | m_PrefabInstance: {fileID: 0} 281 | m_PrefabAsset: {fileID: 0} 282 | m_GameObject: {fileID: 98631260} 283 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 284 | m_LocalPosition: {x: 0, y: 0, z: 0} 285 | m_LocalScale: {x: 0, y: 0, z: 0} 286 | m_ConstrainProportionsScale: 0 287 | m_Children: 288 | - {fileID: 1780323366} 289 | - {fileID: 968955224} 290 | m_Father: {fileID: 0} 291 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 292 | m_AnchorMin: {x: 0, y: 0} 293 | m_AnchorMax: {x: 0, y: 0} 294 | m_AnchoredPosition: {x: 0, y: 0} 295 | m_SizeDelta: {x: 0, y: 0} 296 | m_Pivot: {x: 0, y: 0} 297 | --- !u!1 &968955223 298 | GameObject: 299 | m_ObjectHideFlags: 0 300 | m_CorrespondingSourceObject: {fileID: 0} 301 | m_PrefabInstance: {fileID: 0} 302 | m_PrefabAsset: {fileID: 0} 303 | serializedVersion: 6 304 | m_Component: 305 | - component: {fileID: 968955224} 306 | - component: {fileID: 968955226} 307 | - component: {fileID: 968955225} 308 | m_Layer: 5 309 | m_Name: Text 310 | m_TagString: Untagged 311 | m_Icon: {fileID: 0} 312 | m_NavMeshLayer: 0 313 | m_StaticEditorFlags: 0 314 | m_IsActive: 1 315 | --- !u!224 &968955224 316 | RectTransform: 317 | m_ObjectHideFlags: 0 318 | m_CorrespondingSourceObject: {fileID: 0} 319 | m_PrefabInstance: {fileID: 0} 320 | m_PrefabAsset: {fileID: 0} 321 | m_GameObject: {fileID: 968955223} 322 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 323 | m_LocalPosition: {x: 0, y: 0, z: 0} 324 | m_LocalScale: {x: 1, y: 1, z: 1} 325 | m_ConstrainProportionsScale: 0 326 | m_Children: [] 327 | m_Father: {fileID: 98631264} 328 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 329 | m_AnchorMin: {x: 0.5, y: 0.5} 330 | m_AnchorMax: {x: 0.5, y: 0.5} 331 | m_AnchoredPosition: {x: -420.47, y: 178.17} 332 | m_SizeDelta: {x: 312.34, y: 204.42} 333 | m_Pivot: {x: 0.5, y: 0.5} 334 | --- !u!114 &968955225 335 | MonoBehaviour: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | m_GameObject: {fileID: 968955223} 341 | m_Enabled: 1 342 | m_EditorHideFlags: 0 343 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 344 | m_Name: 345 | m_EditorClassIdentifier: 346 | m_Material: {fileID: 0} 347 | m_Color: {r: 1, g: 0.57973784, b: 0, a: 1} 348 | m_RaycastTarget: 1 349 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 350 | m_Maskable: 1 351 | m_OnCullStateChanged: 352 | m_PersistentCalls: 353 | m_Calls: [] 354 | m_FontData: 355 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 356 | m_FontSize: 20 357 | m_FontStyle: 0 358 | m_BestFit: 0 359 | m_MinSize: 1 360 | m_MaxSize: 300 361 | m_Alignment: 0 362 | m_AlignByGeometry: 0 363 | m_RichText: 1 364 | m_HorizontalOverflow: 0 365 | m_VerticalOverflow: 0 366 | m_LineSpacing: 1 367 | m_Text: FPS 368 | --- !u!222 &968955226 369 | CanvasRenderer: 370 | m_ObjectHideFlags: 0 371 | m_CorrespondingSourceObject: {fileID: 0} 372 | m_PrefabInstance: {fileID: 0} 373 | m_PrefabAsset: {fileID: 0} 374 | m_GameObject: {fileID: 968955223} 375 | m_CullTransparentMesh: 0 376 | --- !u!1 &1438580885 377 | GameObject: 378 | m_ObjectHideFlags: 0 379 | m_CorrespondingSourceObject: {fileID: 0} 380 | m_PrefabInstance: {fileID: 0} 381 | m_PrefabAsset: {fileID: 0} 382 | serializedVersion: 6 383 | m_Component: 384 | - component: {fileID: 1438580889} 385 | - component: {fileID: 1438580888} 386 | - component: {fileID: 1438580887} 387 | - component: {fileID: 1438580886} 388 | m_Layer: 0 389 | m_Name: Main Camera 390 | m_TagString: MainCamera 391 | m_Icon: {fileID: 0} 392 | m_NavMeshLayer: 0 393 | m_StaticEditorFlags: 0 394 | m_IsActive: 1 395 | --- !u!114 &1438580886 396 | MonoBehaviour: 397 | m_ObjectHideFlags: 0 398 | m_CorrespondingSourceObject: {fileID: 0} 399 | m_PrefabInstance: {fileID: 0} 400 | m_PrefabAsset: {fileID: 0} 401 | m_GameObject: {fileID: 1438580885} 402 | m_Enabled: 1 403 | m_EditorHideFlags: 0 404 | m_Script: {fileID: 11500000, guid: 339c4b6bb28288140952235c57b0905b, type: 3} 405 | m_Name: 406 | m_EditorClassIdentifier: 407 | ModelFile: {fileID: 5022602860645237092, guid: e9ecb803cf8dd764fac799be2017fd1b, type: 3} 408 | ImageUI: {fileID: 1780323367} 409 | MinBoxConfidence: 0.223 410 | textureProviderType: 0 411 | textureProvider: 412 | rid: 1110488524758188042 413 | references: 414 | version: 2 415 | RefIds: 416 | - rid: 1110488524758188042 417 | type: {class: WebCamTextureProvider, ns: Assets.Scripts.TextureProviders, asm: Scripts} 418 | data: 419 | cameraName: 420 | --- !u!81 &1438580887 421 | AudioListener: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 1438580885} 427 | m_Enabled: 1 428 | --- !u!20 &1438580888 429 | Camera: 430 | m_ObjectHideFlags: 0 431 | m_CorrespondingSourceObject: {fileID: 0} 432 | m_PrefabInstance: {fileID: 0} 433 | m_PrefabAsset: {fileID: 0} 434 | m_GameObject: {fileID: 1438580885} 435 | m_Enabled: 1 436 | serializedVersion: 2 437 | m_ClearFlags: 2 438 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 439 | m_projectionMatrixMode: 1 440 | m_GateFitMode: 2 441 | m_FOVAxisMode: 0 442 | m_Iso: 200 443 | m_ShutterSpeed: 0.005 444 | m_Aperture: 16 445 | m_FocusDistance: 10 446 | m_FocalLength: 50 447 | m_BladeCount: 5 448 | m_Curvature: {x: 2, y: 11} 449 | m_BarrelClipping: 0.25 450 | m_Anamorphism: 0 451 | m_SensorSize: {x: 36, y: 24} 452 | m_LensShift: {x: 0, y: 0} 453 | m_NormalizedViewPortRect: 454 | serializedVersion: 2 455 | x: 0 456 | y: 0 457 | width: 1 458 | height: 1 459 | near clip plane: -2.05 460 | far clip plane: 1000 461 | field of view: 60 462 | orthographic: 1 463 | orthographic size: 5 464 | m_Depth: -1 465 | m_CullingMask: 466 | serializedVersion: 2 467 | m_Bits: 4294967295 468 | m_RenderingPath: -1 469 | m_TargetTexture: {fileID: 0} 470 | m_TargetDisplay: 0 471 | m_TargetEye: 3 472 | m_HDR: 1 473 | m_AllowMSAA: 1 474 | m_AllowDynamicResolution: 0 475 | m_ForceIntoRT: 0 476 | m_OcclusionCulling: 0 477 | m_StereoConvergence: 10 478 | m_StereoSeparation: 0.022 479 | --- !u!4 &1438580889 480 | Transform: 481 | m_ObjectHideFlags: 0 482 | m_CorrespondingSourceObject: {fileID: 0} 483 | m_PrefabInstance: {fileID: 0} 484 | m_PrefabAsset: {fileID: 0} 485 | m_GameObject: {fileID: 1438580885} 486 | serializedVersion: 2 487 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 488 | m_LocalPosition: {x: 0, y: 0, z: -10} 489 | m_LocalScale: {x: 1, y: 1, z: 1} 490 | m_ConstrainProportionsScale: 0 491 | m_Children: [] 492 | m_Father: {fileID: 0} 493 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 494 | --- !u!1 &1780323365 495 | GameObject: 496 | m_ObjectHideFlags: 0 497 | m_CorrespondingSourceObject: {fileID: 0} 498 | m_PrefabInstance: {fileID: 0} 499 | m_PrefabAsset: {fileID: 0} 500 | serializedVersion: 6 501 | m_Component: 502 | - component: {fileID: 1780323366} 503 | - component: {fileID: 1780323368} 504 | - component: {fileID: 1780323367} 505 | m_Layer: 5 506 | m_Name: RawImage 507 | m_TagString: Untagged 508 | m_Icon: {fileID: 0} 509 | m_NavMeshLayer: 0 510 | m_StaticEditorFlags: 0 511 | m_IsActive: 1 512 | --- !u!224 &1780323366 513 | RectTransform: 514 | m_ObjectHideFlags: 0 515 | m_CorrespondingSourceObject: {fileID: 0} 516 | m_PrefabInstance: {fileID: 0} 517 | m_PrefabAsset: {fileID: 0} 518 | m_GameObject: {fileID: 1780323365} 519 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 520 | m_LocalPosition: {x: 0, y: 0, z: 0} 521 | m_LocalScale: {x: 1.34, y: 1.34, z: 1.34} 522 | m_ConstrainProportionsScale: 1 523 | m_Children: [] 524 | m_Father: {fileID: 98631264} 525 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 526 | m_AnchorMin: {x: 0.5, y: 0.5} 527 | m_AnchorMax: {x: 0.5, y: 0.5} 528 | m_AnchoredPosition: {x: 0, y: 0} 529 | m_SizeDelta: {x: 640, y: 640} 530 | m_Pivot: {x: 0.5, y: 0.5} 531 | --- !u!114 &1780323367 532 | MonoBehaviour: 533 | m_ObjectHideFlags: 0 534 | m_CorrespondingSourceObject: {fileID: 0} 535 | m_PrefabInstance: {fileID: 0} 536 | m_PrefabAsset: {fileID: 0} 537 | m_GameObject: {fileID: 1780323365} 538 | m_Enabled: 1 539 | m_EditorHideFlags: 0 540 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 541 | m_Name: 542 | m_EditorClassIdentifier: 543 | m_Material: {fileID: 0} 544 | m_Color: {r: 1, g: 1, b: 1, a: 1} 545 | m_RaycastTarget: 1 546 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 547 | m_Maskable: 1 548 | m_OnCullStateChanged: 549 | m_PersistentCalls: 550 | m_Calls: [] 551 | m_Texture: {fileID: 0} 552 | m_UVRect: 553 | serializedVersion: 2 554 | x: 0 555 | y: 0 556 | width: 1 557 | height: 1 558 | --- !u!222 &1780323368 559 | CanvasRenderer: 560 | m_ObjectHideFlags: 0 561 | m_CorrespondingSourceObject: {fileID: 0} 562 | m_PrefabInstance: {fileID: 0} 563 | m_PrefabAsset: {fileID: 0} 564 | m_GameObject: {fileID: 1780323365} 565 | m_CullTransparentMesh: 0 566 | --- !u!850595691 &2113376081 567 | LightingSettings: 568 | m_ObjectHideFlags: 0 569 | m_CorrespondingSourceObject: {fileID: 0} 570 | m_PrefabInstance: {fileID: 0} 571 | m_PrefabAsset: {fileID: 0} 572 | m_Name: Settings.lighting 573 | serializedVersion: 6 574 | m_GIWorkflowMode: 1 575 | m_EnableBakedLightmaps: 0 576 | m_EnableRealtimeLightmaps: 0 577 | m_RealtimeEnvironmentLighting: 1 578 | m_BounceScale: 1 579 | m_AlbedoBoost: 1 580 | m_IndirectOutputScale: 1 581 | m_UsingShadowmask: 1 582 | m_BakeBackend: 1 583 | m_LightmapMaxSize: 1024 584 | m_BakeResolution: 40 585 | m_Padding: 2 586 | m_LightmapCompression: 3 587 | m_AO: 0 588 | m_AOMaxDistance: 1 589 | m_CompAOExponent: 1 590 | m_CompAOExponentDirect: 0 591 | m_ExtractAO: 0 592 | m_MixedBakeMode: 2 593 | m_LightmapsBakeMode: 1 594 | m_FilterMode: 1 595 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 596 | m_ExportTrainingData: 0 597 | m_TrainingDataDestination: TrainingData 598 | m_RealtimeResolution: 2 599 | m_ForceWhiteAlbedo: 0 600 | m_ForceUpdates: 0 601 | m_FinalGather: 0 602 | m_FinalGatherRayCount: 256 603 | m_FinalGatherFiltering: 1 604 | m_PVRCulling: 1 605 | m_PVRSampling: 1 606 | m_PVRDirectSampleCount: 32 607 | m_PVRSampleCount: 512 608 | m_PVREnvironmentSampleCount: 256 609 | m_PVREnvironmentReferencePointCount: 2048 610 | m_LightProbeSampleCountMultiplier: 4 611 | m_PVRBounces: 2 612 | m_PVRMinBounces: 2 613 | m_PVREnvironmentImportanceSampling: 1 614 | m_PVRFilteringMode: 1 615 | m_PVRDenoiserTypeDirect: 1 616 | m_PVRDenoiserTypeIndirect: 1 617 | m_PVRDenoiserTypeAO: 1 618 | m_PVRFilterTypeDirect: 0 619 | m_PVRFilterTypeIndirect: 0 620 | m_PVRFilterTypeAO: 0 621 | m_PVRFilteringGaussRadiusDirect: 1 622 | m_PVRFilteringGaussRadiusIndirect: 5 623 | m_PVRFilteringGaussRadiusAO: 2 624 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 625 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 626 | m_PVRFilteringAtrousPositionSigmaAO: 1 627 | m_PVRTiledBaking: 0 628 | m_NumRaysToShootPerTexel: -1 629 | m_RespectSceneVisibilityWhenBakingGI: 0 630 | --- !u!1660057539 &9223372036854775807 631 | SceneRoots: 632 | m_ObjectHideFlags: 0 633 | m_Roots: 634 | - {fileID: 1438580889} 635 | - {fileID: 98631264} 636 | - {fileID: 5339670} 637 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scenes/Detection.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 319baa1f3be29274bb1c04c9dc5044a0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scenes/Segmentation.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 10 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 0 54 | m_EnableRealtimeLightmaps: 0 55 | m_LightmapEditorSettings: 56 | serializedVersion: 12 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_AtlasSize: 1024 60 | m_AO: 0 61 | m_AOMaxDistance: 1 62 | m_CompAOExponent: 1 63 | m_CompAOExponentDirect: 0 64 | m_ExtractAmbientOcclusion: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_ReflectionCompression: 2 70 | m_MixedBakeMode: 2 71 | m_BakeBackend: 1 72 | m_PVRSampling: 1 73 | m_PVRDirectSampleCount: 32 74 | m_PVRSampleCount: 512 75 | m_PVRBounces: 2 76 | m_PVREnvironmentSampleCount: 256 77 | m_PVREnvironmentReferencePointCount: 2048 78 | m_PVRFilteringMode: 1 79 | m_PVRDenoiserTypeDirect: 1 80 | m_PVRDenoiserTypeIndirect: 1 81 | m_PVRDenoiserTypeAO: 1 82 | m_PVRFilterTypeDirect: 0 83 | m_PVRFilterTypeIndirect: 0 84 | m_PVRFilterTypeAO: 0 85 | m_PVREnvironmentMIS: 1 86 | m_PVRCulling: 1 87 | m_PVRFilteringGaussRadiusDirect: 1 88 | m_PVRFilteringGaussRadiusIndirect: 5 89 | m_PVRFilteringGaussRadiusAO: 2 90 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 91 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 92 | m_PVRFilteringAtrousPositionSigmaAO: 1 93 | m_ExportTrainingData: 0 94 | m_TrainingDataDestination: TrainingData 95 | m_LightProbeSampleCountMultiplier: 4 96 | m_LightingDataAsset: {fileID: 0} 97 | m_LightingSettings: {fileID: 2113376081} 98 | --- !u!196 &4 99 | NavMeshSettings: 100 | serializedVersion: 2 101 | m_ObjectHideFlags: 0 102 | m_BuildSettings: 103 | serializedVersion: 3 104 | agentTypeID: 0 105 | agentRadius: 0.5 106 | agentHeight: 2 107 | agentSlope: 45 108 | agentClimb: 0.4 109 | ledgeDropHeight: 0 110 | maxJumpAcrossDistance: 0 111 | minRegionArea: 2 112 | manualCellSize: 0 113 | cellSize: 0.16666667 114 | manualTileSize: 0 115 | tileSize: 256 116 | buildHeightMesh: 0 117 | maxJobWorkers: 0 118 | preserveTilesOutsideBounds: 0 119 | debug: 120 | m_Flags: 0 121 | m_NavMeshData: {fileID: 0} 122 | --- !u!1 &5339667 123 | GameObject: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | serializedVersion: 6 129 | m_Component: 130 | - component: {fileID: 5339670} 131 | - component: {fileID: 5339669} 132 | - component: {fileID: 5339668} 133 | m_Layer: 0 134 | m_Name: EventSystem 135 | m_TagString: Untagged 136 | m_Icon: {fileID: 0} 137 | m_NavMeshLayer: 0 138 | m_StaticEditorFlags: 0 139 | m_IsActive: 1 140 | --- !u!114 &5339668 141 | MonoBehaviour: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInstance: {fileID: 0} 145 | m_PrefabAsset: {fileID: 0} 146 | m_GameObject: {fileID: 5339667} 147 | m_Enabled: 1 148 | m_EditorHideFlags: 0 149 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 150 | m_Name: 151 | m_EditorClassIdentifier: 152 | m_SendPointerHoverToParent: 1 153 | m_HorizontalAxis: Horizontal 154 | m_VerticalAxis: Vertical 155 | m_SubmitButton: Submit 156 | m_CancelButton: Cancel 157 | m_InputActionsPerSecond: 10 158 | m_RepeatDelay: 0.5 159 | m_ForceModuleActive: 0 160 | --- !u!114 &5339669 161 | MonoBehaviour: 162 | m_ObjectHideFlags: 0 163 | m_CorrespondingSourceObject: {fileID: 0} 164 | m_PrefabInstance: {fileID: 0} 165 | m_PrefabAsset: {fileID: 0} 166 | m_GameObject: {fileID: 5339667} 167 | m_Enabled: 1 168 | m_EditorHideFlags: 0 169 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 170 | m_Name: 171 | m_EditorClassIdentifier: 172 | m_FirstSelected: {fileID: 0} 173 | m_sendNavigationEvents: 1 174 | m_DragThreshold: 10 175 | --- !u!4 &5339670 176 | Transform: 177 | m_ObjectHideFlags: 0 178 | m_CorrespondingSourceObject: {fileID: 0} 179 | m_PrefabInstance: {fileID: 0} 180 | m_PrefabAsset: {fileID: 0} 181 | m_GameObject: {fileID: 5339667} 182 | serializedVersion: 2 183 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 184 | m_LocalPosition: {x: 0, y: 0, z: 0} 185 | m_LocalScale: {x: 1, y: 1, z: 1} 186 | m_ConstrainProportionsScale: 0 187 | m_Children: [] 188 | m_Father: {fileID: 0} 189 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 190 | --- !u!1 &98631260 191 | GameObject: 192 | m_ObjectHideFlags: 0 193 | m_CorrespondingSourceObject: {fileID: 0} 194 | m_PrefabInstance: {fileID: 0} 195 | m_PrefabAsset: {fileID: 0} 196 | serializedVersion: 6 197 | m_Component: 198 | - component: {fileID: 98631264} 199 | - component: {fileID: 98631263} 200 | - component: {fileID: 98631262} 201 | - component: {fileID: 98631261} 202 | m_Layer: 5 203 | m_Name: Canvas 204 | m_TagString: Untagged 205 | m_Icon: {fileID: 0} 206 | m_NavMeshLayer: 0 207 | m_StaticEditorFlags: 0 208 | m_IsActive: 1 209 | --- !u!114 &98631261 210 | MonoBehaviour: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInstance: {fileID: 0} 214 | m_PrefabAsset: {fileID: 0} 215 | m_GameObject: {fileID: 98631260} 216 | m_Enabled: 1 217 | m_EditorHideFlags: 0 218 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 219 | m_Name: 220 | m_EditorClassIdentifier: 221 | m_IgnoreReversedGraphics: 1 222 | m_BlockingObjects: 0 223 | m_BlockingMask: 224 | serializedVersion: 2 225 | m_Bits: 4294967295 226 | --- !u!114 &98631262 227 | MonoBehaviour: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | m_GameObject: {fileID: 98631260} 233 | m_Enabled: 1 234 | m_EditorHideFlags: 0 235 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 236 | m_Name: 237 | m_EditorClassIdentifier: 238 | m_UiScaleMode: 0 239 | m_ReferencePixelsPerUnit: 100 240 | m_ScaleFactor: 1 241 | m_ReferenceResolution: {x: 800, y: 600} 242 | m_ScreenMatchMode: 0 243 | m_MatchWidthOrHeight: 0 244 | m_PhysicalUnit: 3 245 | m_FallbackScreenDPI: 96 246 | m_DefaultSpriteDPI: 96 247 | m_DynamicPixelsPerUnit: 1 248 | m_PresetInfoIsWorld: 0 249 | --- !u!223 &98631263 250 | Canvas: 251 | m_ObjectHideFlags: 0 252 | m_CorrespondingSourceObject: {fileID: 0} 253 | m_PrefabInstance: {fileID: 0} 254 | m_PrefabAsset: {fileID: 0} 255 | m_GameObject: {fileID: 98631260} 256 | m_Enabled: 1 257 | serializedVersion: 3 258 | m_RenderMode: 0 259 | m_Camera: {fileID: 0} 260 | m_PlaneDistance: 100 261 | m_PixelPerfect: 0 262 | m_ReceivesEvents: 1 263 | m_OverrideSorting: 0 264 | m_OverridePixelPerfect: 0 265 | m_SortingBucketNormalizedSize: 0 266 | m_VertexColorAlwaysGammaSpace: 0 267 | m_AdditionalShaderChannelsFlag: 0 268 | m_UpdateRectTransformForStandalone: 0 269 | m_SortingLayerID: 0 270 | m_SortingOrder: 0 271 | m_TargetDisplay: 0 272 | --- !u!224 &98631264 273 | RectTransform: 274 | m_ObjectHideFlags: 0 275 | m_CorrespondingSourceObject: {fileID: 0} 276 | m_PrefabInstance: {fileID: 0} 277 | m_PrefabAsset: {fileID: 0} 278 | m_GameObject: {fileID: 98631260} 279 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 280 | m_LocalPosition: {x: 0, y: 0, z: 0} 281 | m_LocalScale: {x: 0, y: 0, z: 0} 282 | m_ConstrainProportionsScale: 0 283 | m_Children: 284 | - {fileID: 1780323366} 285 | - {fileID: 968955224} 286 | m_Father: {fileID: 0} 287 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 288 | m_AnchorMin: {x: 0, y: 0} 289 | m_AnchorMax: {x: 0, y: 0} 290 | m_AnchoredPosition: {x: 0, y: 0} 291 | m_SizeDelta: {x: 0, y: 0} 292 | m_Pivot: {x: 0, y: 0} 293 | --- !u!1 &968955223 294 | GameObject: 295 | m_ObjectHideFlags: 0 296 | m_CorrespondingSourceObject: {fileID: 0} 297 | m_PrefabInstance: {fileID: 0} 298 | m_PrefabAsset: {fileID: 0} 299 | serializedVersion: 6 300 | m_Component: 301 | - component: {fileID: 968955224} 302 | - component: {fileID: 968955226} 303 | - component: {fileID: 968955225} 304 | m_Layer: 5 305 | m_Name: Text 306 | m_TagString: Untagged 307 | m_Icon: {fileID: 0} 308 | m_NavMeshLayer: 0 309 | m_StaticEditorFlags: 0 310 | m_IsActive: 1 311 | --- !u!224 &968955224 312 | RectTransform: 313 | m_ObjectHideFlags: 0 314 | m_CorrespondingSourceObject: {fileID: 0} 315 | m_PrefabInstance: {fileID: 0} 316 | m_PrefabAsset: {fileID: 0} 317 | m_GameObject: {fileID: 968955223} 318 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 319 | m_LocalPosition: {x: 0, y: 0, z: 0} 320 | m_LocalScale: {x: 1, y: 1, z: 1} 321 | m_ConstrainProportionsScale: 0 322 | m_Children: [] 323 | m_Father: {fileID: 98631264} 324 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 325 | m_AnchorMin: {x: 0.5, y: 0.5} 326 | m_AnchorMax: {x: 0.5, y: 0.5} 327 | m_AnchoredPosition: {x: -420.47, y: 178.17} 328 | m_SizeDelta: {x: 312.34, y: 204.42} 329 | m_Pivot: {x: 0.5, y: 0.5} 330 | --- !u!114 &968955225 331 | MonoBehaviour: 332 | m_ObjectHideFlags: 0 333 | m_CorrespondingSourceObject: {fileID: 0} 334 | m_PrefabInstance: {fileID: 0} 335 | m_PrefabAsset: {fileID: 0} 336 | m_GameObject: {fileID: 968955223} 337 | m_Enabled: 1 338 | m_EditorHideFlags: 0 339 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 340 | m_Name: 341 | m_EditorClassIdentifier: 342 | m_Material: {fileID: 0} 343 | m_Color: {r: 1, g: 0.57973784, b: 0, a: 1} 344 | m_RaycastTarget: 1 345 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 346 | m_Maskable: 1 347 | m_OnCullStateChanged: 348 | m_PersistentCalls: 349 | m_Calls: [] 350 | m_FontData: 351 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 352 | m_FontSize: 20 353 | m_FontStyle: 0 354 | m_BestFit: 0 355 | m_MinSize: 1 356 | m_MaxSize: 300 357 | m_Alignment: 0 358 | m_AlignByGeometry: 0 359 | m_RichText: 1 360 | m_HorizontalOverflow: 0 361 | m_VerticalOverflow: 0 362 | m_LineSpacing: 1 363 | m_Text: FPS 364 | --- !u!222 &968955226 365 | CanvasRenderer: 366 | m_ObjectHideFlags: 0 367 | m_CorrespondingSourceObject: {fileID: 0} 368 | m_PrefabInstance: {fileID: 0} 369 | m_PrefabAsset: {fileID: 0} 370 | m_GameObject: {fileID: 968955223} 371 | m_CullTransparentMesh: 0 372 | --- !u!1 &1438580885 373 | GameObject: 374 | m_ObjectHideFlags: 0 375 | m_CorrespondingSourceObject: {fileID: 0} 376 | m_PrefabInstance: {fileID: 0} 377 | m_PrefabAsset: {fileID: 0} 378 | serializedVersion: 6 379 | m_Component: 380 | - component: {fileID: 1438580889} 381 | - component: {fileID: 1438580888} 382 | - component: {fileID: 1438580887} 383 | - component: {fileID: 1438580890} 384 | m_Layer: 0 385 | m_Name: Main Camera 386 | m_TagString: MainCamera 387 | m_Icon: {fileID: 0} 388 | m_NavMeshLayer: 0 389 | m_StaticEditorFlags: 0 390 | m_IsActive: 1 391 | --- !u!81 &1438580887 392 | AudioListener: 393 | m_ObjectHideFlags: 0 394 | m_CorrespondingSourceObject: {fileID: 0} 395 | m_PrefabInstance: {fileID: 0} 396 | m_PrefabAsset: {fileID: 0} 397 | m_GameObject: {fileID: 1438580885} 398 | m_Enabled: 1 399 | --- !u!20 &1438580888 400 | Camera: 401 | m_ObjectHideFlags: 0 402 | m_CorrespondingSourceObject: {fileID: 0} 403 | m_PrefabInstance: {fileID: 0} 404 | m_PrefabAsset: {fileID: 0} 405 | m_GameObject: {fileID: 1438580885} 406 | m_Enabled: 1 407 | serializedVersion: 2 408 | m_ClearFlags: 2 409 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 410 | m_projectionMatrixMode: 1 411 | m_GateFitMode: 2 412 | m_FOVAxisMode: 0 413 | m_Iso: 200 414 | m_ShutterSpeed: 0.005 415 | m_Aperture: 16 416 | m_FocusDistance: 10 417 | m_FocalLength: 50 418 | m_BladeCount: 5 419 | m_Curvature: {x: 2, y: 11} 420 | m_BarrelClipping: 0.25 421 | m_Anamorphism: 0 422 | m_SensorSize: {x: 36, y: 24} 423 | m_LensShift: {x: 0, y: 0} 424 | m_NormalizedViewPortRect: 425 | serializedVersion: 2 426 | x: 0 427 | y: 0 428 | width: 1 429 | height: 1 430 | near clip plane: 0.3 431 | far clip plane: 1000 432 | field of view: 60 433 | orthographic: 1 434 | orthographic size: 5 435 | m_Depth: -1 436 | m_CullingMask: 437 | serializedVersion: 2 438 | m_Bits: 4294967295 439 | m_RenderingPath: -1 440 | m_TargetTexture: {fileID: 0} 441 | m_TargetDisplay: 0 442 | m_TargetEye: 3 443 | m_HDR: 1 444 | m_AllowMSAA: 1 445 | m_AllowDynamicResolution: 0 446 | m_ForceIntoRT: 0 447 | m_OcclusionCulling: 1 448 | m_StereoConvergence: 10 449 | m_StereoSeparation: 0.022 450 | --- !u!4 &1438580889 451 | Transform: 452 | m_ObjectHideFlags: 0 453 | m_CorrespondingSourceObject: {fileID: 0} 454 | m_PrefabInstance: {fileID: 0} 455 | m_PrefabAsset: {fileID: 0} 456 | m_GameObject: {fileID: 1438580885} 457 | serializedVersion: 2 458 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 459 | m_LocalPosition: {x: 0, y: 0, z: -10} 460 | m_LocalScale: {x: 1, y: 1, z: 1} 461 | m_ConstrainProportionsScale: 0 462 | m_Children: [] 463 | m_Father: {fileID: 0} 464 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 465 | --- !u!114 &1438580890 466 | MonoBehaviour: 467 | m_ObjectHideFlags: 0 468 | m_CorrespondingSourceObject: {fileID: 0} 469 | m_PrefabInstance: {fileID: 0} 470 | m_PrefabAsset: {fileID: 0} 471 | m_GameObject: {fileID: 1438580885} 472 | m_Enabled: 1 473 | m_EditorHideFlags: 0 474 | m_Script: {fileID: 11500000, guid: cb04ba54041edd24dae5d6eee63287b1, type: 3} 475 | m_Name: 476 | m_EditorClassIdentifier: 477 | ModelFile: {fileID: 5022602860645237092, guid: 6bf076fee69af4741a73f074944c03ab, type: 3} 478 | ImageUI: {fileID: 1780323367} 479 | MinBoxConfidence: 0.3 480 | textureProvider: 481 | rid: -2 482 | references: 483 | version: 2 484 | RefIds: 485 | - rid: -2 486 | type: {class: , ns: , asm: } 487 | --- !u!1 &1780323365 488 | GameObject: 489 | m_ObjectHideFlags: 0 490 | m_CorrespondingSourceObject: {fileID: 0} 491 | m_PrefabInstance: {fileID: 0} 492 | m_PrefabAsset: {fileID: 0} 493 | serializedVersion: 6 494 | m_Component: 495 | - component: {fileID: 1780323366} 496 | - component: {fileID: 1780323368} 497 | - component: {fileID: 1780323367} 498 | m_Layer: 5 499 | m_Name: RawImage 500 | m_TagString: Untagged 501 | m_Icon: {fileID: 0} 502 | m_NavMeshLayer: 0 503 | m_StaticEditorFlags: 0 504 | m_IsActive: 1 505 | --- !u!224 &1780323366 506 | RectTransform: 507 | m_ObjectHideFlags: 0 508 | m_CorrespondingSourceObject: {fileID: 0} 509 | m_PrefabInstance: {fileID: 0} 510 | m_PrefabAsset: {fileID: 0} 511 | m_GameObject: {fileID: 1780323365} 512 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 513 | m_LocalPosition: {x: 0, y: 0, z: 0} 514 | m_LocalScale: {x: 1.34, y: 1.34, z: 1.34} 515 | m_ConstrainProportionsScale: 1 516 | m_Children: [] 517 | m_Father: {fileID: 98631264} 518 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 519 | m_AnchorMin: {x: 0.5, y: 0.5} 520 | m_AnchorMax: {x: 0.5, y: 0.5} 521 | m_AnchoredPosition: {x: 0, y: 0} 522 | m_SizeDelta: {x: 640, y: 640} 523 | m_Pivot: {x: 0.5, y: 0.5} 524 | --- !u!114 &1780323367 525 | MonoBehaviour: 526 | m_ObjectHideFlags: 0 527 | m_CorrespondingSourceObject: {fileID: 0} 528 | m_PrefabInstance: {fileID: 0} 529 | m_PrefabAsset: {fileID: 0} 530 | m_GameObject: {fileID: 1780323365} 531 | m_Enabled: 1 532 | m_EditorHideFlags: 0 533 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 534 | m_Name: 535 | m_EditorClassIdentifier: 536 | m_Material: {fileID: 0} 537 | m_Color: {r: 1, g: 1, b: 1, a: 1} 538 | m_RaycastTarget: 1 539 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 540 | m_Maskable: 1 541 | m_OnCullStateChanged: 542 | m_PersistentCalls: 543 | m_Calls: [] 544 | m_Texture: {fileID: 0} 545 | m_UVRect: 546 | serializedVersion: 2 547 | x: 0 548 | y: 0 549 | width: 1 550 | height: 1 551 | --- !u!222 &1780323368 552 | CanvasRenderer: 553 | m_ObjectHideFlags: 0 554 | m_CorrespondingSourceObject: {fileID: 0} 555 | m_PrefabInstance: {fileID: 0} 556 | m_PrefabAsset: {fileID: 0} 557 | m_GameObject: {fileID: 1780323365} 558 | m_CullTransparentMesh: 0 559 | --- !u!850595691 &2113376081 560 | LightingSettings: 561 | m_ObjectHideFlags: 0 562 | m_CorrespondingSourceObject: {fileID: 0} 563 | m_PrefabInstance: {fileID: 0} 564 | m_PrefabAsset: {fileID: 0} 565 | m_Name: Settings.lighting 566 | serializedVersion: 8 567 | m_EnableBakedLightmaps: 0 568 | m_EnableRealtimeLightmaps: 0 569 | m_RealtimeEnvironmentLighting: 1 570 | m_BounceScale: 1 571 | m_AlbedoBoost: 1 572 | m_IndirectOutputScale: 1 573 | m_UsingShadowmask: 1 574 | m_BakeBackend: 1 575 | m_LightmapMaxSize: 1024 576 | m_LightmapSizeFixed: 0 577 | m_UseMipmapLimits: 1 578 | m_BakeResolution: 40 579 | m_Padding: 2 580 | m_LightmapCompression: 3 581 | m_AO: 0 582 | m_AOMaxDistance: 1 583 | m_CompAOExponent: 1 584 | m_CompAOExponentDirect: 0 585 | m_ExtractAO: 0 586 | m_MixedBakeMode: 2 587 | m_LightmapsBakeMode: 1 588 | m_FilterMode: 1 589 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 590 | m_ExportTrainingData: 0 591 | m_TrainingDataDestination: TrainingData 592 | m_RealtimeResolution: 2 593 | m_ForceWhiteAlbedo: 0 594 | m_ForceUpdates: 0 595 | m_PVRCulling: 1 596 | m_PVRSampling: 1 597 | m_PVRDirectSampleCount: 32 598 | m_PVRSampleCount: 512 599 | m_PVREnvironmentSampleCount: 256 600 | m_PVREnvironmentReferencePointCount: 2048 601 | m_LightProbeSampleCountMultiplier: 4 602 | m_PVRBounces: 2 603 | m_PVRMinBounces: 2 604 | m_PVREnvironmentImportanceSampling: 1 605 | m_PVRFilteringMode: 1 606 | m_PVRDenoiserTypeDirect: 1 607 | m_PVRDenoiserTypeIndirect: 1 608 | m_PVRDenoiserTypeAO: 1 609 | m_PVRFilterTypeDirect: 0 610 | m_PVRFilterTypeIndirect: 0 611 | m_PVRFilterTypeAO: 0 612 | m_PVRFilteringGaussRadiusDirect: 1 613 | m_PVRFilteringGaussRadiusIndirect: 5 614 | m_PVRFilteringGaussRadiusAO: 2 615 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 616 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 617 | m_PVRFilteringAtrousPositionSigmaAO: 1 618 | m_RespectSceneVisibilityWhenBakingGI: 0 619 | --- !u!1660057539 &9223372036854775807 620 | SceneRoots: 621 | m_ObjectHideFlags: 0 622 | m_Roots: 623 | - {fileID: 1438580889} 624 | - {fileID: 98631264} 625 | - {fileID: 5339670} 626 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scenes/Segmentation.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 622c760f0d03f0b439b9e3f1b8d3332e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5a24ac328c077a40841a27bc0b5d315 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Detector.cs: -------------------------------------------------------------------------------- 1 | using Assets.Scripts; 2 | using Assets.Scripts.TextureProviders; 3 | using NN; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.ComponentModel; 7 | using System.Runtime.CompilerServices; 8 | using System.Runtime.Serialization; 9 | using Unity.Barracuda; 10 | using UnityEditor; 11 | using UnityEngine; 12 | using UnityEngine.Profiling; 13 | using UnityEngine.UI; 14 | 15 | public class Detector : MonoBehaviour 16 | { 17 | [Tooltip("File of YOLO model.")] 18 | [SerializeField] 19 | protected NNModel ModelFile; 20 | 21 | [Tooltip("RawImage component which will be used to draw resuls.")] 22 | [SerializeField] 23 | protected RawImage ImageUI; 24 | 25 | [Range(0.0f, 1f)] 26 | [Tooltip("The minimum value of box confidence below which boxes won't be drawn.")] 27 | [SerializeField] 28 | protected float MinBoxConfidence = 0.3f; 29 | 30 | [SerializeField] 31 | protected TextureProviderType.ProviderType textureProviderType; 32 | 33 | [SerializeReference] 34 | protected TextureProvider textureProvider = null; 35 | 36 | protected NNHandler nn; 37 | protected Color[] colorArray = new Color[] { Color.red, Color.green, Color.blue, Color.cyan, Color.magenta, Color.yellow }; 38 | 39 | YOLOv8 yolo; 40 | 41 | private void OnEnable() 42 | { 43 | nn = new NNHandler(ModelFile); 44 | yolo = new YOLOv8Segmentation(nn); 45 | 46 | textureProvider = GetTextureProvider(nn.model); 47 | textureProvider.Start(); 48 | } 49 | 50 | private void Update() 51 | { 52 | YOLOv8OutputReader.DiscardThreshold = MinBoxConfidence; 53 | Texture2D texture = GetNextTexture(); 54 | 55 | var boxes = yolo.Run(texture); 56 | DrawResults(boxes, texture); 57 | ImageUI.texture = texture; 58 | } 59 | 60 | protected TextureProvider GetTextureProvider(Model model) 61 | { 62 | var firstInput = model.inputs[0]; 63 | int height = firstInput.shape[5]; 64 | int width = firstInput.shape[6]; 65 | 66 | TextureProvider provider; 67 | switch (textureProviderType) 68 | { 69 | case TextureProviderType.ProviderType.WebCam: 70 | provider = new WebCamTextureProvider(textureProvider as WebCamTextureProvider, width, height); 71 | break; 72 | 73 | case TextureProviderType.ProviderType.Video: 74 | provider = new VideoTextureProvider(textureProvider as VideoTextureProvider, width, height); 75 | break; 76 | default: 77 | throw new InvalidEnumArgumentException(); 78 | } 79 | return provider; 80 | } 81 | 82 | protected Texture2D GetNextTexture() 83 | { 84 | return textureProvider.GetTexture(); 85 | } 86 | 87 | void OnDisable() 88 | { 89 | nn.Dispose(); 90 | textureProvider.Stop(); 91 | } 92 | 93 | protected void DrawResults(IEnumerable results, Texture2D img) 94 | { 95 | results.ForEach(box => DrawBox(box, img)); 96 | } 97 | 98 | protected virtual void DrawBox(ResultBox box, Texture2D img) 99 | { 100 | Color boxColor = colorArray[box.bestClassIndex % colorArray.Length]; 101 | int boxWidth = (int)(box.score / MinBoxConfidence); 102 | TextureTools.DrawRectOutline(img, box.rect, boxColor, boxWidth, rectIsNormalized: false, revertY: true); 103 | } 104 | 105 | private void OnValidate() 106 | { 107 | Type t = TextureProviderType.GetProviderType(textureProviderType); 108 | if (textureProvider == null || t != textureProvider.GetType()) 109 | { 110 | if (nn == null) 111 | textureProvider = RuntimeHelpers.GetUninitializedObject(t) as TextureProvider; 112 | else 113 | { 114 | textureProvider = GetTextureProvider(nn.model); 115 | textureProvider.Start(); 116 | } 117 | 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Detector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 339c4b6bb28288140952235c57b0905b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | static class Extensions 7 | { 8 | public static string ArrayToString(this IEnumerable enumerable) 9 | { 10 | string str = "["; 11 | foreach (var e in enumerable) 12 | { 13 | str += e; 14 | } 15 | str += "]"; 16 | return str; 17 | } 18 | 19 | public static T[] GetRange(this ICollection collection, int start = 0, int end = -1) 20 | { 21 | end = end < 0 ? end = collection.Count + end + 1 : end; 22 | var arr = Array.CreateInstance(typeof(T), end - start); 23 | for (int i = start, j = 0; i < end; i++, j++) 24 | { 25 | var v = collection.ElementAt(i); 26 | arr.SetValue(v, j); 27 | } 28 | return (T[])arr; 29 | } 30 | 31 | public static int MaxIdx(this ICollection collection) 32 | { 33 | int idx = 0; 34 | float max = collection.ElementAt(0); 35 | for (int i = 1; i < collection.Count; i++) 36 | { 37 | if (collection.ElementAt(i) > max) 38 | { 39 | idx = i; 40 | max = collection.ElementAt(i); 41 | } 42 | } 43 | return idx; 44 | } 45 | 46 | public static void ForEach(this IEnumerable enumerable, Action func) 47 | { 48 | foreach (var e in enumerable) 49 | func(e); 50 | } 51 | 52 | public static void ForEach(this ICollection collection, Action func) 53 | { 54 | for (int i = 0; i < collection.Count; i++) 55 | func(collection.ElementAt(i), i); 56 | } 57 | 58 | public static IList Update(this IList collection, Func func) 59 | { 60 | for (int i = 0; i < collection.Count; i++) 61 | collection[i] = func(collection[i]); 62 | return collection; 63 | } 64 | 65 | public static IList Update(this IList collection, Func func) 66 | { 67 | for (int i = 0; i < collection.Count; i++) 68 | collection[i] = func(collection[i], i); 69 | return collection; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Extensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03c3d8a202473b64b918d01605e8d318 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3c7c7fd8b8367543b0a3e8e2bb787a4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/BarracudaUtils.cs: -------------------------------------------------------------------------------- 1 | using Unity.Barracuda; 2 | 3 | public class BarracudaUtils 4 | { 5 | 6 | public static IOps CreateOps(WorkerFactory.Type type, bool verbose = false) 7 | { 8 | WorkerFactory.ValidateType(type); 9 | switch (type) 10 | { 11 | case WorkerFactory.Type.ComputePrecompiled: 12 | return new PrecompiledComputeOps(verbose: verbose); 13 | 14 | case WorkerFactory.Type.Compute: 15 | return new ComputeOps(verbose: verbose); 16 | 17 | case WorkerFactory.Type.ComputeRef: 18 | return new ReferenceComputeOps(); 19 | 20 | case WorkerFactory.Type.CSharp: 21 | return new UnsafeArrayCPUOps(); 22 | 23 | default: 24 | return new ReferenceCPUOps(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/BarracudaUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a0c57a1cd9bc79458a4ff790e450afe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/DuplicatesSupressor.cs: -------------------------------------------------------------------------------- 1 | using NN; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEngine.Profiling; 6 | 7 | public static class DuplicatesSupressor 8 | { 9 | const float OVERLAP_TRESHOLD = 0.3f; 10 | 11 | static public List RemoveDuplicats(List boxes) where T : ResultBox 12 | { 13 | Profiler.BeginSample("DuplicatesSupressor.RemoveDuplicats"); 14 | 15 | if (boxes.Count == 0) 16 | return boxes; 17 | 18 | List result_boxes = new(); 19 | 20 | for (int classIndex = 0; classIndex < 80; classIndex++) 21 | { 22 | 23 | var classBoxes = boxes.Where(box => box.bestClassIndex == classIndex).ToList(); 24 | RemoveDuplicatesForClass(classBoxes); 25 | classBoxes = classBoxes.Where(box => box.score > 0).ToList(); 26 | result_boxes.AddRange(classBoxes); 27 | } 28 | 29 | Profiler.EndSample(); 30 | 31 | return result_boxes; 32 | } 33 | 34 | private static void RemoveDuplicatesForClass(List boxes) where T : ResultBox 35 | { 36 | SortBoxesByScore(boxes); 37 | for (int i = 0; i < boxes.Count; i++) 38 | { 39 | T i_box = boxes[i]; 40 | if (i_box.score == 0) 41 | continue; 42 | 43 | for (int j = i + 1; j < boxes.Count; j++) 44 | { 45 | T j_box = boxes[j]; 46 | float iou = IntersectionOverUnion.CalculateIOU(i_box.rect, j_box.rect); 47 | if (iou >= OVERLAP_TRESHOLD && i_box.score > j_box.score) 48 | { 49 | j_box.score = 0; 50 | boxes[j] = j_box; 51 | } 52 | } 53 | } 54 | } 55 | 56 | private static List SortBoxesByScore(List boxes) where T : ResultBox 57 | { 58 | Comparison boxClassValueComparer = 59 | (box1, box2) => box2.score.CompareTo(box1.score); 60 | boxes.Sort(boxClassValueComparer); 61 | return boxes; 62 | } 63 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/DuplicatesSupressor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b5950ade92703446a63d634931cf711 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/IntersectionOverUnion.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public static class IntersectionOverUnion 4 | { 5 | public static float CalculateIOU(Rect box1, Rect box2) 6 | { 7 | float intersect_w = IntervalOverlap(box1.xMin, box1.xMax, box2.xMin, box2.xMax); 8 | float intersect_h = IntervalOverlap(box1.yMin, box1.yMax, box2.yMin, box2.yMax); 9 | 10 | float intersect = intersect_w * intersect_h; 11 | 12 | float union = box1.width * box1.height + box2.width * box2.height - intersect; 13 | return intersect / union; 14 | } 15 | 16 | static float IntervalOverlap(float box1_min, float box1_max, float box2_min, float box2_max) 17 | { 18 | if (box2_min < box1_min) 19 | { 20 | if (box2_max < box1_min) 21 | return 0; 22 | else 23 | return Mathf.Min(box1_max, box2_max) - box1_min; 24 | } 25 | else 26 | { 27 | if (box1_max < box2_min) 28 | return 0; 29 | else 30 | return Mathf.Min(box1_max, box2_max) - box2_min; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/IntersectionOverUnion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e7d3c52de9692f45a7b0e925d4d913f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/NNHandler.cs: -------------------------------------------------------------------------------- 1 | using Unity.Barracuda; 2 | 3 | public class NNHandler : System.IDisposable 4 | { 5 | public Model model; 6 | public IWorker worker; 7 | 8 | public NNHandler(NNModel nnmodel) 9 | { 10 | model = ModelLoader.Load(nnmodel); 11 | worker = WorkerFactory.CreateWorker(model); 12 | } 13 | 14 | public void Dispose() 15 | { 16 | worker.Dispose(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/NNHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 429073cb05548b8478fe911064c8ec63 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/ResultBox.cs: -------------------------------------------------------------------------------- 1 | using Unity.Barracuda; 2 | using UnityEngine; 3 | 4 | namespace NN 5 | { 6 | public class ResultBox 7 | { 8 | public readonly Rect rect; 9 | public float score; 10 | public readonly int bestClassIndex; 11 | 12 | public ResultBox(Rect rect, float score, int bestClassIndex) 13 | { 14 | this.rect = rect; 15 | this.score = score; 16 | this.bestClassIndex = bestClassIndex; 17 | } 18 | } 19 | 20 | public class ResultBoxWithMasksIndices : ResultBox 21 | { 22 | public readonly Tensor maskInd; 23 | 24 | public ResultBoxWithMasksIndices(ResultBox box, Tensor maskInd) : base(box.rect, box.score, box.bestClassIndex) 25 | { 26 | this.maskInd = maskInd; 27 | } 28 | 29 | ~ResultBoxWithMasksIndices() 30 | { 31 | maskInd.tensorOnDevice.Dispose(); 32 | } 33 | } 34 | 35 | public class ResultBoxWithMask : ResultBox 36 | { 37 | public readonly Tensor masks; 38 | 39 | public ResultBoxWithMask(ResultBox box, Tensor masks) : base(box.rect, box.score, box.bestClassIndex) 40 | { 41 | this.masks = masks; 42 | } 43 | 44 | ~ResultBoxWithMask() 45 | { 46 | masks.tensorOnDevice.Dispose(); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/ResultBox.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621e95da1b421944c929a3adb508128a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Unity.Barracuda; 5 | using UnityEngine; 6 | using UnityEngine.Profiling; 7 | 8 | namespace NN 9 | { 10 | public class YOLOv8 11 | { 12 | protected YOLOv8OutputReader outputReader; 13 | 14 | private NNHandler nn; 15 | 16 | public YOLOv8(NNHandler nn) 17 | { 18 | this.nn = nn; 19 | outputReader = new(); 20 | } 21 | 22 | public List Run(Texture2D image) 23 | { 24 | Profiler.BeginSample("YOLO.Run"); 25 | var outputs = ExecuteModel(image); 26 | var results = Postprocess(outputs); 27 | Profiler.EndSample(); 28 | return results; 29 | } 30 | 31 | protected Tensor[] ExecuteModel(Texture2D image) 32 | { 33 | Tensor input = new Tensor(image); 34 | ExecuteBlocking(input); 35 | input.tensorOnDevice.Dispose(); 36 | return PeekOutputs().ToArray(); 37 | } 38 | 39 | private void ExecuteBlocking(Tensor preprocessed) 40 | { 41 | Profiler.BeginSample("YOLO.Execute"); 42 | nn.worker.Execute(preprocessed); 43 | nn.worker.FlushSchedule(blocking: true); 44 | Profiler.EndSample(); 45 | } 46 | 47 | private IEnumerable PeekOutputs() 48 | { 49 | foreach (string outputName in nn.model.outputs) 50 | { 51 | Tensor output = nn.worker.PeekOutput(outputName); 52 | yield return output; 53 | } 54 | } 55 | 56 | protected List Postprocess(Tensor[] outputs) 57 | { 58 | Profiler.BeginSample("YOLOv8Postprocessor.Postprocess"); 59 | Tensor boxesOutput = outputs[0]; 60 | List boxes = outputReader.ReadOutput(boxesOutput).ToList(); 61 | boxes = DuplicatesSupressor.RemoveDuplicats(boxes); 62 | Profiler.EndSample(); 63 | return boxes; 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1950919eb25ee54daa76495fe825a13 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8OutputReader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Unity.Barracuda; 5 | using UnityEngine; 6 | using UnityEngine.Profiling; 7 | 8 | namespace NN 9 | { 10 | public class YOLOv8OutputReader 11 | { 12 | public static float DiscardThreshold = 0.1f; 13 | protected const int ClassesNum = 80; 14 | const int BoxesPerCell = 8400; 15 | const int InputWidth = 640; 16 | const int InputHeight = 640; 17 | 18 | public IEnumerable ReadOutput(Tensor output) 19 | { 20 | float[,] array = ReadOutputToArray(output); 21 | foreach (ResultBox result in ReadBoxes(array)) 22 | yield return result; 23 | } 24 | 25 | 26 | private float[,] ReadOutputToArray(Tensor output) 27 | { 28 | var reshapedOutput = output.Reshape(new[] { 1, 1, BoxesPerCell, -1 }); 29 | var array = TensorToArray2D(reshapedOutput); 30 | reshapedOutput.Dispose(); 31 | return array; 32 | } 33 | 34 | private IEnumerable ReadBoxes(float[,] array) 35 | { 36 | int boxes = array.GetLength(0); 37 | for (int box_index = 0; box_index < boxes; box_index++) 38 | { 39 | ResultBox box = ReadBox(array, box_index); 40 | if (box != null) 41 | yield return box; 42 | } 43 | } 44 | 45 | protected virtual ResultBox ReadBox(float[,] array, int box) 46 | { 47 | (int highestClassIndex, float highestScore) = DecodeBestBoxIndexAndScore(array, box); 48 | 49 | if (highestScore < DiscardThreshold) 50 | return null; 51 | 52 | Rect box_rect = DecodeBoxRectangle(array, box); 53 | 54 | ResultBox result = new( 55 | rect: box_rect, 56 | score: highestScore, 57 | bestClassIndex: highestClassIndex); 58 | return result; 59 | } 60 | 61 | private (int, float) DecodeBestBoxIndexAndScore(float[,] array, int box) 62 | { 63 | const int classesOffset = 4; 64 | 65 | int highestClassIndex = 0; 66 | float highestScore = 0; 67 | 68 | for (int i = 0; i < ClassesNum; i++) 69 | { 70 | float currentClassScore = array[box, i + classesOffset]; 71 | if (currentClassScore > highestScore) 72 | { 73 | highestScore = currentClassScore; 74 | highestClassIndex = i; 75 | } 76 | } 77 | 78 | return (highestClassIndex, highestScore); 79 | } 80 | 81 | private Rect DecodeBoxRectangle(float[,] data, int box) 82 | { 83 | const int boxCenterXIndex = 0; 84 | const int boxCenterYIndex = 1; 85 | const int boxWidthIndex = 2; 86 | const int boxHeightIndex = 3; 87 | 88 | float centerX = data[box, boxCenterXIndex]; 89 | float centerY = data[box, boxCenterYIndex]; 90 | float width = data[box, boxWidthIndex]; 91 | float height = data[box, boxHeightIndex]; 92 | 93 | float xMin = centerX - width / 2; 94 | float yMin = centerY - height / 2; 95 | xMin = xMin < 0 ? 0 : xMin; 96 | yMin = yMin < 0 ? 0 : yMin; 97 | var rect = new Rect(xMin, yMin, width, height); 98 | rect.xMax = rect.xMax > InputWidth ? InputWidth : rect.xMax; 99 | rect.yMax = rect.yMax > InputHeight ? InputHeight : rect.yMax; 100 | 101 | return rect; 102 | } 103 | 104 | private float[,] TensorToArray2D(Tensor tensor) 105 | { 106 | float[,] output = new float[tensor.width, tensor.channels]; 107 | var data = tensor.AsFloats(); 108 | int bytes = Buffer.ByteLength(data); 109 | Buffer.BlockCopy(data, 0, output, 0, bytes); 110 | return output; 111 | } 112 | } 113 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8OutputReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f0b9df638ccaf542b02b03ce8b1d546 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8Segmentation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Runtime.InteropServices; 4 | using Unity.Barracuda; 5 | using UnityEngine; 6 | using UnityEngine.Profiling; 7 | 8 | namespace NN 9 | { 10 | public class YOLOv8Segmentation : YOLOv8 11 | { 12 | private IOps ops; 13 | 14 | public YOLOv8Segmentation(NNHandler nn) : base(nn) 15 | { 16 | outputReader = new YOLOv8SegmentationOutputReader(); 17 | ops = BarracudaUtils.CreateOps(WorkerFactory.Type.ComputePrecompiled); 18 | } 19 | 20 | public new List Run(Texture2D image) 21 | { 22 | Profiler.BeginSample("YOLO.Run"); 23 | var outputs = ExecuteModel(image); 24 | var results = Postprocess(outputs); 25 | Profiler.EndSample(); 26 | return results; 27 | } 28 | 29 | protected new List Postprocess(Tensor[] outputs) 30 | { 31 | Profiler.BeginSample("YOLOv8SegmentationPostprocessor.Postprocess"); 32 | List boxes = base.Postprocess(outputs); 33 | 34 | Tensor masksOutput = outputs[1]; 35 | List boxesWithIndices = boxes.Select(box => (ResultBoxWithMasksIndices)box).ToList(); 36 | List boxesWithMasks = DecodeMasks(masksOutput, boxesWithIndices); 37 | Profiler.EndSample(); 38 | return boxesWithMasks; 39 | } 40 | 41 | private List DecodeMasks(Tensor masks, List boxes) 42 | { 43 | Profiler.BeginSample("YOLOv8SegmentationPostprocessor.DecodeMasks"); 44 | 45 | if (boxes.Count == 0) 46 | return new(); 47 | 48 | var allMaskScoresArray = boxes.Select(box => box.maskInd).ToArray(); 49 | Tensor allMaskScoresTensor = ops.Concat(allMaskScoresArray, axis: 0); 50 | boxes.ForEach(box => box.maskInd.tensorOnDevice.Dispose()); 51 | 52 | Tensor allMaskScoresReshaped = ops.Reshape(allMaskScoresTensor, new TensorShape(boxes.Count, 1, 1, allMaskScoresTensor.channels)); 53 | allMaskScoresTensor.tensorOnDevice.Dispose(); 54 | 55 | Tensor boxMasks = ops.Mul(new[] { masks, allMaskScoresReshaped }); 56 | allMaskScoresReshaped.tensorOnDevice.Dispose(); 57 | 58 | Tensor reducedBoxMask = ops.ReduceSum(boxMasks, axis: -1); 59 | boxMasks.tensorOnDevice.Dispose(); 60 | 61 | Tensor downscaledMasks = ops.Sigmoid(reducedBoxMask); 62 | reducedBoxMask.tensorOnDevice.Dispose(); 63 | 64 | int[] downscaleFactor = new[] { 4, 4 }; 65 | boxMasks = ops.Upsample2D(downscaledMasks, downscaleFactor, true); 66 | downscaledMasks.tensorOnDevice.Dispose(); 67 | 68 | List resultMasks = SeparateAndCutMasks(boxes, boxMasks).ToList(); 69 | boxMasks.tensorOnDevice.Dispose(); 70 | 71 | Profiler.EndSample(); 72 | return resultMasks; 73 | } 74 | 75 | private IEnumerable SeparateAndCutMasks(List boxes, Tensor boxMasks) 76 | { 77 | for (int i = 0; i < boxes.Count; i++) 78 | { 79 | ResultBoxWithMasksIndices box = boxes[i]; 80 | RectInt rect = new RectInt((int)box.rect.xMin, (int)box.rect.yMin, (int)box.rect.width, (int)box.rect.height); 81 | 82 | int[] startIndexes = new[] { i, rect.yMin, rect.xMin, 0 }; 83 | int[] stopIndexes = new[] { i + 1, rect.yMax, rect.xMax, boxMasks.channels }; 84 | int[] strides = new[] { 1, 1, 1, 1 }; 85 | Tensor maskSlice = ops.StridedSlice(boxMasks, startIndexes, stopIndexes, strides); 86 | 87 | int xEndPad = boxMasks.width - rect.xMin - maskSlice.width; 88 | int yEndPad = boxMasks.height - rect.yMin - maskSlice.height; 89 | int[] padsSize = new[] { rect.xMin, rect.yMin, 0, xEndPad, yEndPad, 0 }; 90 | Tensor padded = ops.Border2D(maskSlice, padsSize, 0); 91 | 92 | ResultBoxWithMask resultMask = new(box, padded); 93 | 94 | maskSlice.tensorOnDevice.Dispose(); 95 | box.maskInd.tensorOnDevice.Dispose(); 96 | 97 | yield return resultMask; 98 | } 99 | } 100 | } 101 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8Segmentation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 094a202255a104c4f821f399420f91d6 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8SegmentationOutputReader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using Unity.Barracuda; 6 | using UnityEngine; 7 | using UnityEngine.Profiling; 8 | 9 | namespace NN 10 | { 11 | public class YOLOv8SegmentationOutputReader : YOLOv8OutputReader 12 | { 13 | protected override ResultBox ReadBox(float[,] array, int box) 14 | { 15 | ResultBox resultBox = base.ReadBox(array, box); 16 | if (resultBox == null) 17 | return null; 18 | 19 | float[] masksScore = Array2DTo1DCopy(array, box, 4 + ClassesNum, 32); 20 | Tensor masksScoresTensor = new(1, masksScore.Length, masksScore); 21 | 22 | ResultBoxWithMasksIndices result = new(resultBox, masksScoresTensor); 23 | return result; 24 | } 25 | 26 | private static T[] Array2DTo1DCopy(T[,] inputArray, int firstDimmension, int secondDimmension, int count) 27 | { 28 | int tSize = Marshal.SizeOf(); 29 | int start = firstDimmension * inputArray.GetLength(1) + secondDimmension; 30 | T[] output = new T[count]; 31 | Buffer.BlockCopy(inputArray, start * tSize, output, 0, count * tSize); 32 | return output; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/NN/YOLOv8SegmentationOutputReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6a06d81afcd34d4c80c4d72df29fd2d -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Scripts.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Scripts", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:5c2b5ba89f9e74e418232e154bc5cc7a" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Scripts.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81c727f4f42fbf84c9174f87287ae204 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Segmentator.cs: -------------------------------------------------------------------------------- 1 | using NN; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | namespace Assets.Scripts 6 | { 7 | public class Segmentator : Detector 8 | { 9 | YOLOv8Segmentation yolo; 10 | 11 | // Use this for initialization 12 | void OnEnable() 13 | { 14 | nn = new NNHandler(ModelFile); 15 | yolo = new YOLOv8Segmentation(nn); 16 | 17 | textureProvider = GetTextureProvider(nn.model); 18 | textureProvider.Start(); 19 | } 20 | 21 | // Update is called once per frame 22 | void Update() 23 | { 24 | YOLOv8OutputReader.DiscardThreshold = MinBoxConfidence; 25 | Texture2D texture = GetNextTexture(); 26 | 27 | var boxes = yolo.Run(texture); 28 | DrawResults(boxes, texture); 29 | ImageUI.texture = texture; 30 | } 31 | 32 | void OnDisable() 33 | { 34 | nn.Dispose(); 35 | textureProvider.Stop(); 36 | } 37 | 38 | protected override void DrawBox(ResultBox box, Texture2D img) 39 | { 40 | base.DrawBox(box, img); 41 | 42 | ResultBoxWithMask boxWithMask = box as ResultBoxWithMask; 43 | Color boxColor = colorArray[box.bestClassIndex % colorArray.Length]; 44 | TextureTools.RenderMaskOnTexture(boxWithMask.masks, img, boxColor); 45 | boxWithMask.masks.tensorOnDevice.Dispose(); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/Segmentator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb04ba54041edd24dae5d6eee63287b1 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57eb1db03db442a489512118b621ad5c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/TextureProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.ComponentModel; 4 | using System.Runtime.CompilerServices; 5 | using UnityEngine; 6 | using UnityEngine.Profiling; 7 | using UnityEngine.Video; 8 | 9 | namespace Assets.Scripts.TextureProviders 10 | { 11 | [Serializable] 12 | public abstract class TextureProvider 13 | { 14 | protected Texture2D ResultTexture; 15 | protected Texture InputTexture; 16 | 17 | public TextureProvider(int width, int height, TextureFormat format = TextureFormat.RGB24) 18 | { 19 | ResultTexture = new Texture2D(width, height, format, mipChain: false); 20 | } 21 | 22 | ~TextureProvider() 23 | { 24 | Stop(); 25 | } 26 | 27 | public abstract void Start(); 28 | 29 | public abstract void Stop(); 30 | 31 | public virtual Texture2D GetTexture() 32 | { 33 | return TextureTools.ResizeAndCropToCenter(InputTexture, ref ResultTexture, ResultTexture.width, ResultTexture.height); 34 | } 35 | 36 | public abstract TextureProviderType.ProviderType TypeEnum(); 37 | } 38 | 39 | 40 | public static class TextureProviderType 41 | { 42 | static TextureProvider[] providers; 43 | 44 | static TextureProviderType() 45 | { 46 | providers = new TextureProvider[]{ 47 | RuntimeHelpers.GetUninitializedObject(typeof(WebCamTextureProvider)) as WebCamTextureProvider, 48 | RuntimeHelpers.GetUninitializedObject(typeof(VideoTextureProvider)) as VideoTextureProvider }; 49 | } 50 | 51 | public enum ProviderType 52 | { 53 | WebCam, 54 | Video 55 | } 56 | 57 | static public Type GetProviderType(ProviderType type) 58 | { 59 | foreach(var provider in providers) 60 | { 61 | if (provider.TypeEnum() == type) 62 | return provider.GetType(); 63 | } 64 | throw new InvalidEnumArgumentException(); 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/TextureProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4a864ef3cc102245a74e180908a0955 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/VideoTextureProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | using UnityEngine.Video; 5 | 6 | namespace Assets.Scripts.TextureProviders 7 | { 8 | [Serializable] 9 | public class VideoTextureProvider : TextureProvider 10 | { 11 | [SerializeField] 12 | private VideoClip videoClip; 13 | [SerializeField] 14 | private bool loopClip = true; 15 | private VideoPlayer player; 16 | 17 | public VideoTextureProvider(int width, int height, TextureFormat format = TextureFormat.RGB24) : base(width, height, format) 18 | { 19 | } 20 | 21 | public VideoTextureProvider(VideoTextureProvider provider, int width, int height, TextureFormat format = TextureFormat.RGB24) : this(width, height, format) 22 | { 23 | if (provider == null) 24 | return; 25 | 26 | videoClip = provider.videoClip; 27 | loopClip = provider.loopClip; 28 | } 29 | 30 | public override void Start() 31 | { 32 | player = new GameObject("Video Player").AddComponent(); 33 | player.renderMode = VideoRenderMode.APIOnly; 34 | player.audioOutputMode = VideoAudioOutputMode.None; 35 | player.clip = videoClip; 36 | } 37 | 38 | public override void Stop() 39 | { 40 | GameObject.Destroy(player.gameObject); 41 | } 42 | 43 | public override TextureProviderType.ProviderType TypeEnum() 44 | { 45 | return TextureProviderType.ProviderType.Video; 46 | } 47 | 48 | public override Texture2D GetTexture() 49 | { 50 | bool reachedEnd = (ulong)player.frame == player.frameCount - 1; 51 | if (reachedEnd && loopClip) 52 | player.frame = 0; 53 | 54 | player.StepForward(); 55 | InputTexture = player.texture ? player.texture : ResultTexture; 56 | return base.GetTexture(); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/VideoTextureProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f34ecdc59ebd4b4da011b23b15a95e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/WebCamTextureProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | using UnityEngine.Profiling; 5 | 6 | namespace Assets.Scripts.TextureProviders 7 | { 8 | [Serializable] 9 | public class WebCamTextureProvider : TextureProvider 10 | { 11 | [Tooltip("Leave empty for automatic selection.")] 12 | [SerializeField] 13 | private string cameraName; 14 | private WebCamTexture webCamTexture; 15 | 16 | public WebCamTextureProvider(int width, int height, TextureFormat format = TextureFormat.RGB24, string cameraName = null) : base(width, height, format) 17 | { 18 | cameraName = cameraName != null ? cameraName : SelectCameraDevice(); 19 | webCamTexture = new WebCamTexture(cameraName); 20 | InputTexture = webCamTexture; 21 | } 22 | 23 | public WebCamTextureProvider(WebCamTextureProvider provider,int width, int height, TextureFormat format = TextureFormat.RGB24) : this(width, height, format, provider?.cameraName) 24 | { 25 | } 26 | 27 | public override void Start() 28 | { 29 | webCamTexture.Play(); 30 | } 31 | 32 | public override void Stop() 33 | { 34 | webCamTexture.Stop(); 35 | } 36 | 37 | public override TextureProviderType.ProviderType TypeEnum() 38 | { 39 | return TextureProviderType.ProviderType.WebCam; 40 | } 41 | 42 | /// 43 | /// Return first backfaced camera name if avaible, otherwise first possible 44 | /// 45 | private string SelectCameraDevice() 46 | { 47 | if (WebCamTexture.devices.Length == 0) 48 | throw new Exception("Any camera isn't avaible!"); 49 | 50 | foreach (var cam in WebCamTexture.devices) 51 | { 52 | if (!cam.isFrontFacing) 53 | return cam.name; 54 | } 55 | return WebCamTexture.devices[0].name; 56 | } 57 | 58 | } 59 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureProviders/WebCamTextureProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b06e037c89b05384ebadef66cc889d7b -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using System.Xml.Linq; 4 | using Unity.Barracuda; 5 | using UnityEngine; 6 | using UnityEngine.UIElements; 7 | 8 | class TextureTools 9 | { 10 | public static Texture2D ResizeAndCropToCenter(Texture texture, ref Texture2D result, int width, int height) 11 | { 12 | float widthRatio = width / (float)texture.width; 13 | float heightRatio = height / (float)texture.height; 14 | float ratio = widthRatio > heightRatio ? widthRatio : heightRatio; 15 | 16 | Vector2Int renderTexturetSize = new((int)(texture.width * ratio), (int)(texture.height * ratio)); 17 | RenderTexture renderTexture = RenderTexture.GetTemporary(renderTexturetSize.x, renderTexturetSize.y); 18 | Graphics.Blit(texture, renderTexture); 19 | 20 | RenderTexture previousRenderTexture = RenderTexture.active; 21 | RenderTexture.active = renderTexture; 22 | 23 | int xOffset = (renderTexturetSize.x - width) / 2; 24 | int yOffset = (renderTexturetSize.y - width) / 2; 25 | result.ReadPixels(new Rect(xOffset, yOffset, width, height), destX: 0, destY: 0); 26 | result.Apply(); 27 | 28 | RenderTexture.active = previousRenderTexture; 29 | RenderTexture.ReleaseTemporary(renderTexture); 30 | return result; 31 | } 32 | 33 | /// 34 | /// Draw rectange outline on texture 35 | /// 36 | /// Width of outline 37 | /// Are rect values normalized? 38 | /// Pass true if y axis has opposite direction than texture axis 39 | public static void DrawRectOutline(Texture2D texture, Rect rect, Color color, int width = 1, bool rectIsNormalized = true, bool revertY = false) 40 | { 41 | if (rectIsNormalized) 42 | { 43 | rect.x *= texture.width; 44 | rect.y *= texture.height; 45 | rect.width *= texture.width; 46 | rect.height *= texture.height; 47 | } 48 | 49 | if (revertY) 50 | rect.y = rect.y * -1 + texture.height - rect.height; 51 | 52 | if (rect.width <= 0 || rect.height <= 0) 53 | return; 54 | 55 | DrawRect(texture, rect.x, rect.y, rect.width + width, width, color); 56 | DrawRect(texture, rect.x, rect.y + rect.height, rect.width + width, width, color); 57 | 58 | DrawRect(texture, rect.x, rect.y, width, rect.height + width, color); 59 | DrawRect(texture, rect.x + rect.width, rect.y, width, rect.height + width, color); 60 | texture.Apply(); 61 | } 62 | 63 | static private void DrawRect(Texture2D texture, float x, float y, float width, float height, Color color) 64 | { 65 | if (x > texture.width || y > texture.height) 66 | return; 67 | 68 | if (x < 0) 69 | { 70 | width += x; 71 | x = 0; 72 | } 73 | if (y < 0) 74 | { 75 | height += y; 76 | y = 0; 77 | } 78 | 79 | width = x + width > texture.width ? texture.width - x : width; 80 | height = y + height > texture.height ? texture.height - y : height; 81 | 82 | x = (int)x; 83 | y = (int)y; 84 | width = (int)width; 85 | height = (int)height; 86 | 87 | if (width <= 0 || height <= 0) 88 | return; 89 | 90 | int pixelsCount = (int)width * (int)height; 91 | Color32[] colors = new Color32[pixelsCount]; 92 | Array.Fill(colors, color); 93 | 94 | texture.SetPixels32((int)x, (int)y, (int)width, (int)height, colors); 95 | } 96 | 97 | public static void RenderMaskOnTexture(Tensor mask, Texture2D texture, Color color, float maskFactor = 0.25f) 98 | { 99 | IOps ops = BarracudaUtils.CreateOps(WorkerFactory.Type.ComputePrecompiled); 100 | Tensor imgTensor = new(texture); 101 | Tensor factorTensor = new(1, 3, new[] { color.r * maskFactor, color.g * maskFactor, color.b * maskFactor }); 102 | Tensor colorMask = ops.Mul(new[] { mask, factorTensor }); 103 | Tensor imgWithMasks = ops.Add(new[] { imgTensor, colorMask }); 104 | 105 | RenderTensorToTexture(imgWithMasks, texture); 106 | 107 | factorTensor.tensorOnDevice.Dispose(); 108 | imgTensor.tensorOnDevice.Dispose(); 109 | colorMask.tensorOnDevice.Dispose(); 110 | imgWithMasks.tensorOnDevice.Dispose(); 111 | } 112 | 113 | private static void RenderTensorToTexture(Tensor tensor, Texture2D texture) 114 | { 115 | RenderTexture renderTexture = tensor.ToRenderTexture(); 116 | RenderTexture.active = renderTexture; 117 | texture.ReadPixels(new Rect(0, 0, renderTexture.width, renderTexture.height), 0, 0); 118 | texture.Apply(); 119 | RenderTexture.active = null; 120 | renderTexture.Release(); 121 | } 122 | } 123 | 124 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Scripts/TextureTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecd893de37912cb47a717075419473f4 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a5690c6ac34c55468bcda283e14d14a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestDuplicatesSupressor.cs: -------------------------------------------------------------------------------- 1 | using NN; 2 | using NUnit.Framework; 3 | using NUnit.Framework.Internal; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | namespace Tests 8 | { 9 | public class TestDuplicatesSupressor 10 | { 11 | [Test] 12 | public void ShouldZeroSecondBoxWhenInOrder() 13 | { 14 | List boxes = new(); 15 | 16 | int bestClass = 1; 17 | float box1ClassScore = 0.9f; 18 | float box2ClassScore = 0.7f; 19 | ResultBox box1 = CreateTestResultBox(bestClass, box1ClassScore); 20 | ResultBox box2 = CreateTestResultBox(bestClass, box2ClassScore); 21 | boxes.Add(box1); 22 | boxes.Add(box2); 23 | 24 | DuplicatesSupressor.RemoveDuplicats(boxes); 25 | 26 | Assert.AreEqual(box1ClassScore, box1.score); 27 | Assert.AreEqual(0, box2.score); 28 | } 29 | 30 | [Test] 31 | public void ShouldZeroFirstBoxWhenOutOfOrder() 32 | { 33 | List boxes = new(); 34 | 35 | int bestClass = 1; 36 | float box1ClassScore = 0.7f; 37 | float box2ClassScore = 0.9f; 38 | ResultBox box1 = CreateTestResultBox(bestClass, box1ClassScore); 39 | ResultBox box2 = CreateTestResultBox(bestClass, box2ClassScore); 40 | boxes.Add(box1); 41 | boxes.Add(box2); 42 | 43 | DuplicatesSupressor.RemoveDuplicats(boxes); 44 | 45 | Assert.AreEqual(0, box1.score); 46 | Assert.AreEqual(box2ClassScore, box2.score); 47 | } 48 | 49 | [Test] 50 | public void ShouldNotZeroWhenDifferentClasses() 51 | { 52 | List boxes = new(); 53 | 54 | int box1BestClass = 1; 55 | int box2BestClass = 5; 56 | float box1ClassScore = 0.7f; 57 | float box2ClassScore = 0.9f; 58 | ResultBox box1 = CreateTestResultBox(box1BestClass, box1ClassScore); 59 | ResultBox box2 = CreateTestResultBox(box2BestClass, box2ClassScore); 60 | boxes.Add(box1); 61 | boxes.Add(box2); 62 | 63 | DuplicatesSupressor.RemoveDuplicats(boxes); 64 | 65 | Assert.AreEqual(box1ClassScore, box1.score); 66 | Assert.AreEqual(box2ClassScore, box2.score); 67 | } 68 | 69 | [Test] 70 | public void ShouldZeroWhenCloseRects() 71 | { 72 | List boxes = new(); 73 | 74 | int bestClass = 1; 75 | float box1ClassScore = 0.7f; 76 | float box2ClassScore = 0.9f; 77 | Rect box1Rect = new(0.1f, 0.1f, 0.9f, 0.9f); 78 | Rect box2Rect = new(0.11f, 0.12f, 0.88f, 0.87f); 79 | ResultBox box1 = CreateTestResultBox(bestClass, box1ClassScore, box1Rect); 80 | ResultBox box2 = CreateTestResultBox(bestClass, box2ClassScore, box2Rect); 81 | boxes.Add(box1); 82 | boxes.Add(box2); 83 | 84 | DuplicatesSupressor.RemoveDuplicats(boxes); 85 | 86 | Assert.AreEqual(0, box1.score); 87 | Assert.AreEqual(box2ClassScore, box2.score); 88 | } 89 | 90 | ResultBox CreateTestResultBox(int bestClass, float classScore, Rect rect) 91 | { 92 | ResultBox box = new( 93 | bestClassIndex: bestClass, 94 | rect: rect, 95 | score: classScore); 96 | return box; 97 | } 98 | 99 | ResultBox CreateTestResultBox(int bestClass, float classScore) 100 | { 101 | Rect rect = new(0, 0, 1, 1); 102 | return CreateTestResultBox(bestClass, classScore, rect); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestDuplicatesSupressor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 830c9a64a24c5534cae9708a8b2b3f91 -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestYOLOHandler.cs: -------------------------------------------------------------------------------- 1 | using NN; 2 | using NUnit.Framework; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using Unity.Barracuda; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | namespace Tests 10 | { 11 | public class TestYOLOHandler 12 | { 13 | const string MODEL_PATH = "Assets/YOLOv2 Tiny.onnx"; 14 | const string IMAGE_PATH = "Assets/Tests/test_image.jpg"; 15 | const float min_confidence = 0.15f; 16 | private YOLOv8 yolo; 17 | NNHandler nnHandler; 18 | private Texture2D test_image; 19 | 20 | [SetUp] 21 | public void Setup() 22 | { 23 | NNModel model = AssetDatabase.LoadAssetAtPath(MODEL_PATH); 24 | nnHandler = new(model); 25 | yolo = new YOLOv8(nnHandler); 26 | test_image = AssetDatabase.LoadAssetAtPath(IMAGE_PATH); 27 | } 28 | 29 | [TearDown] 30 | public void TearDown() 31 | { 32 | nnHandler.Dispose(); 33 | } 34 | 35 | [Test] 36 | public void CreatesSuccessfully() 37 | { 38 | Assert.NotNull(yolo); 39 | } 40 | 41 | [Test] 42 | public void NotZeroResult() 43 | { 44 | // when 45 | var results = yolo.Run(test_image); 46 | Assert.NotZero(results.Count); 47 | } 48 | 49 | [Test] 50 | public void TwoConfidentResults() 51 | { 52 | // when 53 | var results = yolo.Run(test_image); 54 | var confident_results = GetConfidentResults(results); 55 | 56 | // then 57 | Assert.AreEqual(2, confident_results.Count); 58 | } 59 | 60 | [Test] 61 | public void ConfidentResultsHasRightClasses() 62 | { 63 | // given 64 | int firstExpectedClass = 14; 65 | int secondExpectedClass = 19; 66 | 67 | // when 68 | var results = yolo.Run(test_image); 69 | var confident_results = GetConfidentResults(results); 70 | 71 | // then 72 | Assert.AreEqual(firstExpectedClass, confident_results[0].bestClassIndex); 73 | Assert.AreEqual(secondExpectedClass, confident_results[1].bestClassIndex); 74 | } 75 | 76 | [Test] 77 | public void ConfidentResultsHasRightBoxes() 78 | { 79 | // given 80 | Rect firstExpectedRect = new(x: -3.34f, y: 53.32f, width: 229.38f, height: 318.09f); 81 | Rect secondExpectedRect = new(x:234.16f, y:83.54f, width:94.07f, height:129.21f); 82 | 83 | // when 84 | var results = yolo.Run(test_image); 85 | var confident_results = GetConfidentResults(results); 86 | 87 | // then 88 | AssertAreRectsEqual(firstExpectedRect, confident_results[0].rect); 89 | AssertAreRectsEqual(secondExpectedRect, confident_results[1].rect); 90 | } 91 | 92 | private List GetConfidentResults(List rawResults) where T : ResultBox 93 | { 94 | return rawResults.Where(box => box.score > min_confidence).ToList(); 95 | } 96 | 97 | private void AssertAreRectsEqual(Rect expected, Rect actual) 98 | { 99 | const float delta = 0.01f; 100 | Assert.AreEqual(expected.xMin, actual.xMin, delta); 101 | Assert.AreEqual(expected.xMax, actual.xMax, delta); 102 | Assert.AreEqual(expected.yMin, actual.yMin, delta); 103 | Assert.AreEqual(expected.yMax, actual.yMax, delta); 104 | } 105 | 106 | } 107 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestYOLOHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e6578489b6392649856180fa2f5c58c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestYOLOPostprocessor.cs: -------------------------------------------------------------------------------- 1 | //using NN; 2 | //using NUnit.Framework; 3 | //using System.Collections.Generic; 4 | //using Unity.Barracuda; 5 | 6 | //namespace Tests 7 | //{ 8 | // public class TestYOLOPostprocessor 9 | // { 10 | // public Tensor CreateInputTensorWithGivenParameters(float[] scores, int[] classIndexes) 11 | // { 12 | // const int boxScoreIndex = 4; 13 | // const int classesOffset = 5; 14 | 15 | // const int boxesPerCell = 5; 16 | // const int boxSize = 25; 17 | 18 | // Assert.AreEqual(scores.Length, classIndexes.Length, "Scores and classIndexes should have same lenght."); 19 | // Assert.LessOrEqual(scores.Length, boxesPerCell, "Scores and classIndexes lenght can't be larger than boxesPerCell number"); 20 | 21 | // float[,,,] testInput = new float[1, 1, 1, 125]; 22 | 23 | // for (int box = 0; box < scores.Length; box++) 24 | // { 25 | // int targetClassIndex = classIndexes[box]; 26 | // int offset = box * boxSize; 27 | // testInput[0, 0, 0, offset + boxScoreIndex] = scores[box]; 28 | // testInput[0, 0, 0, offset + classesOffset + targetClassIndex] = 0.9f; 29 | // } 30 | 31 | // Tensor testTensor = new(new[] { 1, 1, 1, 125 }, testInput); 32 | // return testTensor; 33 | // } 34 | 35 | // public Tensor CreateInputTensorWithDefaultParameters() 36 | // { 37 | // return CreateInputTensorWithGivenParameters(new[] { 100f }, new[] { 8 }); 38 | // } 39 | 40 | // [Test] 41 | // public void ReadsTensorSuccessfully() 42 | // { 43 | // Tensor testTensor = CreateInputTensorWithDefaultParameters(); 44 | // List results = YOLOv2Postprocessor.DecodeNNOut(testTensor); 45 | 46 | // Assert.AreEqual(1, results.Count); 47 | // } 48 | 49 | // [Test] 50 | // public void RightBestClass() 51 | // { 52 | // const int targetClassIndex = 10; 53 | // Tensor testTensor = CreateInputTensorWithGivenParameters(new[] { 100f }, new[] { targetClassIndex }); 54 | 55 | // List results = YOLOv2Postprocessor.DecodeNNOut(testTensor); 56 | // Assert.AreEqual(targetClassIndex, results[0].bestClassIndex); 57 | // } 58 | 59 | // [Test] 60 | // public void RemovesBoxWithLowScore() 61 | // { 62 | // const int targetClassIndex = 10; 63 | // const float targetScore = -1000f; 64 | // Tensor testTensor = CreateInputTensorWithGivenParameters(new[] { targetScore }, new[] { targetClassIndex }); 65 | 66 | // List results = YOLOv2Postprocessor.DecodeNNOut(testTensor); 67 | // Assert.AreEqual(0, results.Count); 68 | // } 69 | // } 70 | //} -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/TestYOLOPostprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26ca68c215f03c54292368fb8df91a72 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tests", 3 | "rootNamespace": "", 4 | "references": [ 5 | "Scripts", 6 | "UnityEngine.TestRunner", 7 | "UnityEditor.TestRunner", 8 | "Unity.Barracuda" 9 | ], 10 | "includePlatforms": [], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [ 15 | "nunit.framework.dll" 16 | ], 17 | "autoReferenced": false, 18 | "defineConstraints": [ 19 | "UNITY_INCLUDE_TESTS" 20 | ], 21 | "versionDefines": [], 22 | "noEngineReferences": false 23 | } -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55f12c81a0885434683a0f8dbe495518 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/test_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wojciechp6/YOLOv8Unity/afed436561a0a1048a3f728ff79b76c16bfd0a52/YOLOv8Unity/Assets/Tests/test_image.jpg -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/Tests/test_image.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dba49d2cb2d2c434d84e39ecba01f07d 3 | TextureImporter: 4 | internalIDToNameTable: 5 | - first: 6 | 213: -7163560672449412920 7 | second: test_image_0 8 | externalObjects: {} 9 | serializedVersion: 13 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 1 13 | sRGBTexture: 1 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapsPreserveCoverage: 0 18 | alphaTestReferenceValue: 0.5 19 | mipMapFadeDistanceStart: 1 20 | mipMapFadeDistanceEnd: 3 21 | bumpmap: 22 | convertToNormalMap: 0 23 | externalNormalMap: 0 24 | heightScale: 0.25 25 | normalMapFilter: 0 26 | flipGreenChannel: 0 27 | isReadable: 1 28 | streamingMipmaps: 0 29 | streamingMipmapsPriority: 0 30 | vTOnly: 0 31 | ignoreMipmapLimit: 0 32 | grayScaleToAlpha: 0 33 | generateCubemap: 6 34 | cubemapConvolution: 0 35 | seamlessCubemap: 0 36 | textureFormat: 1 37 | maxTextureSize: 2048 38 | textureSettings: 39 | serializedVersion: 2 40 | filterMode: 1 41 | aniso: 1 42 | mipBias: 0 43 | wrapU: 1 44 | wrapV: 1 45 | wrapW: 1 46 | nPOTScale: 0 47 | lightmap: 0 48 | compressionQuality: 50 49 | spriteMode: 1 50 | spriteExtrude: 1 51 | spriteMeshType: 1 52 | alignment: 0 53 | spritePivot: {x: 0.5, y: 0.5} 54 | spritePixelsToUnits: 100 55 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 56 | spriteGenerateFallbackPhysicsShape: 1 57 | alphaUsage: 1 58 | alphaIsTransparency: 0 59 | spriteTessellationDetail: -1 60 | textureType: 0 61 | textureShape: 1 62 | singleChannelComponent: 0 63 | flipbookRows: 1 64 | flipbookColumns: 1 65 | maxTextureSizeSet: 0 66 | compressionQualitySet: 0 67 | textureFormatSet: 0 68 | ignorePngGamma: 0 69 | applyGammaDecoding: 0 70 | swizzle: 50462976 71 | cookieLightType: 0 72 | platformSettings: 73 | - serializedVersion: 3 74 | buildTarget: DefaultTexturePlatform 75 | maxTextureSize: 2048 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | ignorePlatformSupport: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: Standalone 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 1 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | ignorePlatformSupport: 0 97 | androidETC2FallbackOverride: 0 98 | forceMaximumCompressionQuality_BC6H_BC7: 0 99 | spriteSheet: 100 | serializedVersion: 2 101 | sprites: 102 | - serializedVersion: 2 103 | name: test_image_0 104 | rect: 105 | serializedVersion: 2 106 | x: 0 107 | y: 0 108 | width: 640 109 | height: 480 110 | alignment: 0 111 | pivot: {x: 0, y: 0} 112 | border: {x: 0, y: 0, z: 0, w: 0} 113 | outline: [] 114 | physicsShape: [] 115 | tessellationDetail: -1 116 | bones: [] 117 | spriteID: 8c0c1b7c58be59c90800000000000000 118 | internalID: -7163560672449412920 119 | vertices: [] 120 | indices: 121 | edges: [] 122 | weights: [] 123 | outline: [] 124 | physicsShape: [] 125 | bones: [] 126 | spriteID: 127 | internalID: 0 128 | vertices: [] 129 | indices: 130 | edges: [] 131 | weights: [] 132 | secondaryTextures: [] 133 | nameFileIdTable: 134 | test_image_0: -7163560672449412920 135 | mipmapLimitGroupName: 136 | pSDRemoveMatte: 0 137 | userData: 138 | assetBundleName: 139 | assetBundleVariant: 140 | -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/classes.txt: -------------------------------------------------------------------------------- 1 | names: 2 | 0: person 3 | 1: bicycle 4 | 2: car 5 | 3: motorcycle 6 | 4: airplane 7 | 5: bus 8 | 6: train 9 | 7: truck 10 | 8: boat 11 | 9: traffic light 12 | 10: fire hydrant 13 | 11: stop sign 14 | 12: parking meter 15 | 13: bench 16 | 14: bird 17 | 15: cat 18 | 16: dog 19 | 17: horse 20 | 18: sheep 21 | 19: cow 22 | 20: elephant 23 | 21: bear 24 | 22: zebra 25 | 23: giraffe 26 | 24: backpack 27 | 25: umbrella 28 | 26: handbag 29 | 27: tie 30 | 28: suitcase 31 | 29: frisbee 32 | 30: skis 33 | 31: snowboard 34 | 32: sports ball 35 | 33: kite 36 | 34: baseball bat 37 | 35: baseball glove 38 | 36: skateboard 39 | 37: surfboard 40 | 38: tennis racket 41 | 39: bottle 42 | 40: wine glass 43 | 41: cup 44 | 42: fork 45 | 43: knife 46 | 44: spoon 47 | 45: bowl 48 | 46: banana 49 | 47: apple 50 | 48: sandwich 51 | 49: orange 52 | 50: broccoli 53 | 51: carrot 54 | 52: hot dog 55 | 53: pizza 56 | 54: donut 57 | 55: cake 58 | 56: chair 59 | 57: couch 60 | 58: potted plant 61 | 59: bed 62 | 60: dining table 63 | 61: toilet 64 | 62: tv 65 | 63: laptop 66 | 64: mouse 67 | 65: remote 68 | 66: keyboard 69 | 67: cell phone 70 | 68: microwave 71 | 69: oven 72 | 70: toaster 73 | 71: sink 74 | 72: refrigerator 75 | 73: book 76 | 74: clock 77 | 75: vase 78 | 76: scissors 79 | 77: teddy bear 80 | 78: hair drier 81 | 79: toothbrush -------------------------------------------------------------------------------- /YOLOv8Unity/Assets/classes.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecd45296a51a652418468f3a35aaafee 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.barracuda": "3.0.0", 4 | "com.unity.burst": "1.8.11", 5 | "com.unity.ide.visualstudio": "2.0.22", 6 | "com.unity.memoryprofiler": "1.1.0", 7 | "com.unity.ugui": "2.0.0", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.androidjni": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /YOLOv8Unity/Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.barracuda": { 4 | "version": "3.0.0", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.burst": "1.6.0", 9 | "com.unity.modules.jsonserialize": "1.0.0", 10 | "com.unity.modules.imageconversion": "1.0.0" 11 | }, 12 | "url": "https://packages.unity.com" 13 | }, 14 | "com.unity.burst": { 15 | "version": "1.8.11", 16 | "depth": 0, 17 | "source": "registry", 18 | "dependencies": { 19 | "com.unity.mathematics": "1.2.1" 20 | }, 21 | "url": "https://packages.unity.com" 22 | }, 23 | "com.unity.editorcoroutines": { 24 | "version": "1.0.0", 25 | "depth": 1, 26 | "source": "registry", 27 | "dependencies": {}, 28 | "url": "https://packages.unity.com" 29 | }, 30 | "com.unity.ext.nunit": { 31 | "version": "1.0.6", 32 | "depth": 2, 33 | "source": "registry", 34 | "dependencies": {}, 35 | "url": "https://packages.unity.com" 36 | }, 37 | "com.unity.ide.visualstudio": { 38 | "version": "2.0.22", 39 | "depth": 0, 40 | "source": "registry", 41 | "dependencies": { 42 | "com.unity.test-framework": "1.1.9" 43 | }, 44 | "url": "https://packages.unity.com" 45 | }, 46 | "com.unity.mathematics": { 47 | "version": "1.2.6", 48 | "depth": 1, 49 | "source": "registry", 50 | "dependencies": {}, 51 | "url": "https://packages.unity.com" 52 | }, 53 | "com.unity.memoryprofiler": { 54 | "version": "1.1.0", 55 | "depth": 0, 56 | "source": "registry", 57 | "dependencies": { 58 | "com.unity.editorcoroutines": "1.0.0" 59 | }, 60 | "url": "https://packages.unity.com" 61 | }, 62 | "com.unity.test-framework": { 63 | "version": "1.1.33", 64 | "depth": 1, 65 | "source": "registry", 66 | "dependencies": { 67 | "com.unity.ext.nunit": "1.0.6", 68 | "com.unity.modules.imgui": "1.0.0", 69 | "com.unity.modules.jsonserialize": "1.0.0" 70 | }, 71 | "url": "https://packages.unity.com" 72 | }, 73 | "com.unity.ugui": { 74 | "version": "2.0.0", 75 | "depth": 0, 76 | "source": "builtin", 77 | "dependencies": { 78 | "com.unity.modules.ui": "1.0.0", 79 | "com.unity.modules.imgui": "1.0.0" 80 | } 81 | }, 82 | "com.unity.modules.ai": { 83 | "version": "1.0.0", 84 | "depth": 0, 85 | "source": "builtin", 86 | "dependencies": {} 87 | }, 88 | "com.unity.modules.androidjni": { 89 | "version": "1.0.0", 90 | "depth": 0, 91 | "source": "builtin", 92 | "dependencies": {} 93 | }, 94 | "com.unity.modules.animation": { 95 | "version": "1.0.0", 96 | "depth": 0, 97 | "source": "builtin", 98 | "dependencies": {} 99 | }, 100 | "com.unity.modules.assetbundle": { 101 | "version": "1.0.0", 102 | "depth": 0, 103 | "source": "builtin", 104 | "dependencies": {} 105 | }, 106 | "com.unity.modules.audio": { 107 | "version": "1.0.0", 108 | "depth": 0, 109 | "source": "builtin", 110 | "dependencies": {} 111 | }, 112 | "com.unity.modules.cloth": { 113 | "version": "1.0.0", 114 | "depth": 0, 115 | "source": "builtin", 116 | "dependencies": { 117 | "com.unity.modules.physics": "1.0.0" 118 | } 119 | }, 120 | "com.unity.modules.director": { 121 | "version": "1.0.0", 122 | "depth": 0, 123 | "source": "builtin", 124 | "dependencies": { 125 | "com.unity.modules.audio": "1.0.0", 126 | "com.unity.modules.animation": "1.0.0" 127 | } 128 | }, 129 | "com.unity.modules.imageconversion": { 130 | "version": "1.0.0", 131 | "depth": 0, 132 | "source": "builtin", 133 | "dependencies": {} 134 | }, 135 | "com.unity.modules.imgui": { 136 | "version": "1.0.0", 137 | "depth": 0, 138 | "source": "builtin", 139 | "dependencies": {} 140 | }, 141 | "com.unity.modules.jsonserialize": { 142 | "version": "1.0.0", 143 | "depth": 0, 144 | "source": "builtin", 145 | "dependencies": {} 146 | }, 147 | "com.unity.modules.particlesystem": { 148 | "version": "1.0.0", 149 | "depth": 0, 150 | "source": "builtin", 151 | "dependencies": {} 152 | }, 153 | "com.unity.modules.physics": { 154 | "version": "1.0.0", 155 | "depth": 0, 156 | "source": "builtin", 157 | "dependencies": {} 158 | }, 159 | "com.unity.modules.physics2d": { 160 | "version": "1.0.0", 161 | "depth": 0, 162 | "source": "builtin", 163 | "dependencies": {} 164 | }, 165 | "com.unity.modules.screencapture": { 166 | "version": "1.0.0", 167 | "depth": 0, 168 | "source": "builtin", 169 | "dependencies": { 170 | "com.unity.modules.imageconversion": "1.0.0" 171 | } 172 | }, 173 | "com.unity.modules.subsystems": { 174 | "version": "1.0.0", 175 | "depth": 1, 176 | "source": "builtin", 177 | "dependencies": { 178 | "com.unity.modules.jsonserialize": "1.0.0" 179 | } 180 | }, 181 | "com.unity.modules.terrain": { 182 | "version": "1.0.0", 183 | "depth": 0, 184 | "source": "builtin", 185 | "dependencies": {} 186 | }, 187 | "com.unity.modules.terrainphysics": { 188 | "version": "1.0.0", 189 | "depth": 0, 190 | "source": "builtin", 191 | "dependencies": { 192 | "com.unity.modules.physics": "1.0.0", 193 | "com.unity.modules.terrain": "1.0.0" 194 | } 195 | }, 196 | "com.unity.modules.tilemap": { 197 | "version": "1.0.0", 198 | "depth": 0, 199 | "source": "builtin", 200 | "dependencies": { 201 | "com.unity.modules.physics2d": "1.0.0" 202 | } 203 | }, 204 | "com.unity.modules.ui": { 205 | "version": "1.0.0", 206 | "depth": 0, 207 | "source": "builtin", 208 | "dependencies": {} 209 | }, 210 | "com.unity.modules.uielements": { 211 | "version": "1.0.0", 212 | "depth": 0, 213 | "source": "builtin", 214 | "dependencies": { 215 | "com.unity.modules.ui": "1.0.0", 216 | "com.unity.modules.imgui": "1.0.0", 217 | "com.unity.modules.jsonserialize": "1.0.0" 218 | } 219 | }, 220 | "com.unity.modules.umbra": { 221 | "version": "1.0.0", 222 | "depth": 0, 223 | "source": "builtin", 224 | "dependencies": {} 225 | }, 226 | "com.unity.modules.unityanalytics": { 227 | "version": "1.0.0", 228 | "depth": 0, 229 | "source": "builtin", 230 | "dependencies": { 231 | "com.unity.modules.unitywebrequest": "1.0.0", 232 | "com.unity.modules.jsonserialize": "1.0.0" 233 | } 234 | }, 235 | "com.unity.modules.unitywebrequest": { 236 | "version": "1.0.0", 237 | "depth": 0, 238 | "source": "builtin", 239 | "dependencies": {} 240 | }, 241 | "com.unity.modules.unitywebrequestassetbundle": { 242 | "version": "1.0.0", 243 | "depth": 0, 244 | "source": "builtin", 245 | "dependencies": { 246 | "com.unity.modules.assetbundle": "1.0.0", 247 | "com.unity.modules.unitywebrequest": "1.0.0" 248 | } 249 | }, 250 | "com.unity.modules.unitywebrequestaudio": { 251 | "version": "1.0.0", 252 | "depth": 0, 253 | "source": "builtin", 254 | "dependencies": { 255 | "com.unity.modules.unitywebrequest": "1.0.0", 256 | "com.unity.modules.audio": "1.0.0" 257 | } 258 | }, 259 | "com.unity.modules.unitywebrequesttexture": { 260 | "version": "1.0.0", 261 | "depth": 0, 262 | "source": "builtin", 263 | "dependencies": { 264 | "com.unity.modules.unitywebrequest": "1.0.0", 265 | "com.unity.modules.imageconversion": "1.0.0" 266 | } 267 | }, 268 | "com.unity.modules.unitywebrequestwww": { 269 | "version": "1.0.0", 270 | "depth": 0, 271 | "source": "builtin", 272 | "dependencies": { 273 | "com.unity.modules.unitywebrequest": "1.0.0", 274 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 275 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 276 | "com.unity.modules.audio": "1.0.0", 277 | "com.unity.modules.assetbundle": "1.0.0", 278 | "com.unity.modules.imageconversion": "1.0.0" 279 | } 280 | }, 281 | "com.unity.modules.vehicles": { 282 | "version": "1.0.0", 283 | "depth": 0, 284 | "source": "builtin", 285 | "dependencies": { 286 | "com.unity.modules.physics": "1.0.0" 287 | } 288 | }, 289 | "com.unity.modules.video": { 290 | "version": "1.0.0", 291 | "depth": 0, 292 | "source": "builtin", 293 | "dependencies": { 294 | "com.unity.modules.audio": "1.0.0", 295 | "com.unity.modules.ui": "1.0.0", 296 | "com.unity.modules.unitywebrequest": "1.0.0" 297 | } 298 | }, 299 | "com.unity.modules.vr": { 300 | "version": "1.0.0", 301 | "depth": 0, 302 | "source": "builtin", 303 | "dependencies": { 304 | "com.unity.modules.jsonserialize": "1.0.0", 305 | "com.unity.modules.physics": "1.0.0", 306 | "com.unity.modules.xr": "1.0.0" 307 | } 308 | }, 309 | "com.unity.modules.wind": { 310 | "version": "1.0.0", 311 | "depth": 0, 312 | "source": "builtin", 313 | "dependencies": {} 314 | }, 315 | "com.unity.modules.xr": { 316 | "version": "1.0.0", 317 | "depth": 0, 318 | "source": "builtin", 319 | "dependencies": { 320 | "com.unity.modules.physics": "1.0.0", 321 | "com.unity.modules.jsonserialize": "1.0.0", 322 | "com.unity.modules.subsystems": "1.0.0" 323 | } 324 | } 325 | } 326 | } 327 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/MultiplayerManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!655991488 &1 4 | MultiplayerManager: 5 | m_ObjectHideFlags: 0 6 | m_EnableMultiplayerRoles: 0 7 | m_ActiveMultiplayerRole: 0 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_Modified: 0 32 | m_ErrorMessage: 33 | m_UserModificationsInstanceId: -830 34 | m_OriginalInstanceId: -832 35 | m_LoadAssets: 0 36 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [] 4 | } 5 | } -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 27 7 | productGUID: c93666e84fb82534185b6ac0c042fe79 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: YOLOv8Unity 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | unsupportedMSAAFallback: 0 52 | m_SpriteBatchVertexThreshold: 300 53 | m_MTRendering: 1 54 | mipStripping: 0 55 | numberOfMipsStripped: 0 56 | numberOfMipsStrippedPerMipmapLimitGroup: {} 57 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 58 | iosShowActivityIndicatorOnLoading: -1 59 | androidShowActivityIndicatorOnLoading: -1 60 | iosUseCustomAppBackgroundBehavior: 0 61 | allowedAutorotateToPortrait: 1 62 | allowedAutorotateToPortraitUpsideDown: 1 63 | allowedAutorotateToLandscapeRight: 1 64 | allowedAutorotateToLandscapeLeft: 1 65 | useOSAutorotation: 1 66 | use32BitDisplayBuffer: 1 67 | preserveFramebufferAlpha: 0 68 | disableDepthAndStencilBuffers: 0 69 | androidStartInFullscreen: 1 70 | androidRenderOutsideSafeArea: 1 71 | androidUseSwappy: 1 72 | androidBlitType: 0 73 | androidResizableWindow: 0 74 | androidDefaultWindowWidth: 1920 75 | androidDefaultWindowHeight: 1080 76 | androidMinimumWindowWidth: 400 77 | androidMinimumWindowHeight: 300 78 | androidFullscreenMode: 1 79 | androidApplicationEntry: 2 80 | defaultIsNativeResolution: 1 81 | macRetinaSupport: 1 82 | runInBackground: 1 83 | captureSingleScreen: 0 84 | muteOtherAudioSources: 0 85 | Prepare IOS For Recording: 0 86 | Force IOS Speakers When Recording: 0 87 | deferSystemGesturesMode: 0 88 | hideHomeButton: 0 89 | submitAnalytics: 1 90 | usePlayerLog: 1 91 | dedicatedServerOptimizations: 0 92 | bakeCollisionMeshes: 0 93 | forceSingleInstance: 0 94 | useFlipModelSwapchain: 1 95 | resizableWindow: 0 96 | useMacAppStoreValidation: 0 97 | macAppStoreCategory: public.app-category.games 98 | gpuSkinning: 1 99 | meshDeformation: 2 100 | xboxPIXTextureCapture: 0 101 | xboxEnableAvatar: 0 102 | xboxEnableKinect: 0 103 | xboxEnableKinectAutoTracking: 0 104 | xboxEnableFitness: 0 105 | visibleInBackground: 1 106 | allowFullscreenSwitch: 1 107 | fullscreenMode: 1 108 | xboxSpeechDB: 0 109 | xboxEnableHeadOrientation: 0 110 | xboxEnableGuest: 0 111 | xboxEnablePIXSampling: 0 112 | metalFramebufferOnly: 0 113 | xboxOneResolution: 0 114 | xboxOneSResolution: 0 115 | xboxOneXResolution: 3 116 | xboxOneMonoLoggingLevel: 0 117 | xboxOneLoggingLevel: 1 118 | xboxOneDisableEsram: 0 119 | xboxOneEnableTypeOptimization: 0 120 | xboxOnePresentImmediateThreshold: 0 121 | switchQueueCommandMemory: 0 122 | switchQueueControlMemory: 16384 123 | switchQueueComputeMemory: 262144 124 | switchNVNShaderPoolsGranularity: 33554432 125 | switchNVNDefaultPoolsGranularity: 16777216 126 | switchNVNOtherPoolsGranularity: 16777216 127 | switchGpuScratchPoolGranularity: 2097152 128 | switchAllowGpuScratchShrinking: 0 129 | switchNVNMaxPublicTextureIDCount: 0 130 | switchNVNMaxPublicSamplerIDCount: 0 131 | switchMaxWorkerMultiple: 8 132 | switchNVNGraphicsFirmwareMemory: 32 133 | vulkanNumSwapchainBuffers: 3 134 | vulkanEnableSetSRGBWrite: 0 135 | vulkanEnablePreTransform: 1 136 | vulkanEnableLateAcquireNextImage: 0 137 | vulkanEnableCommandBufferRecycling: 1 138 | loadStoreDebugModeEnabled: 0 139 | bundleVersion: 0.1 140 | preloadedAssets: [] 141 | metroInputSource: 0 142 | wsaTransparentSwapchain: 0 143 | m_HolographicPauseOnTrackingLoss: 1 144 | xboxOneDisableKinectGpuReservation: 1 145 | xboxOneEnable7thCore: 1 146 | vrSettings: 147 | enable360StereoCapture: 0 148 | isWsaHolographicRemotingEnabled: 0 149 | enableFrameTimingStats: 0 150 | enableOpenGLProfilerGPURecorders: 1 151 | allowHDRDisplaySupport: 0 152 | useHDRDisplay: 0 153 | hdrBitDepth: 0 154 | m_ColorGamuts: 00000000 155 | targetPixelDensity: 30 156 | resolutionScalingMode: 0 157 | resetResolutionOnWindowResize: 0 158 | androidSupportedAspectRatio: 1 159 | androidMaxAspectRatio: 2.1 160 | androidMinAspectRatio: 1 161 | applicationIdentifier: 162 | Standalone: com.DefaultCompany.YOLOv8Unity 163 | buildNumber: 164 | Bratwurst: 0 165 | Standalone: 0 166 | iPhone: 0 167 | tvOS: 0 168 | overrideDefaultApplicationIdentifier: 0 169 | AndroidBundleVersionCode: 1 170 | AndroidMinSdkVersion: 23 171 | AndroidTargetSdkVersion: 0 172 | AndroidPreferredInstallLocation: 1 173 | aotOptions: 174 | stripEngineCode: 1 175 | iPhoneStrippingLevel: 0 176 | iPhoneScriptCallOptimization: 0 177 | ForceInternetPermission: 0 178 | ForceSDCardPermission: 0 179 | CreateWallpaper: 0 180 | androidSplitApplicationBinary: 0 181 | keepLoadedShadersAlive: 0 182 | StripUnusedMeshComponents: 1 183 | strictShaderVariantMatching: 0 184 | VertexChannelCompressionMask: 4054 185 | iPhoneSdkVersion: 988 186 | iOSTargetOSVersionString: 13.0 187 | tvOSSdkVersion: 0 188 | tvOSRequireExtendedGameController: 0 189 | tvOSTargetOSVersionString: 13.0 190 | bratwurstSdkVersion: 0 191 | bratwurstTargetOSVersionString: 13.0 192 | uIPrerenderedIcon: 0 193 | uIRequiresPersistentWiFi: 0 194 | uIRequiresFullScreen: 1 195 | uIStatusBarHidden: 1 196 | uIExitOnSuspend: 0 197 | uIStatusBarStyle: 0 198 | appleTVSplashScreen: {fileID: 0} 199 | appleTVSplashScreen2x: {fileID: 0} 200 | tvOSSmallIconLayers: [] 201 | tvOSSmallIconLayers2x: [] 202 | tvOSLargeIconLayers: [] 203 | tvOSLargeIconLayers2x: [] 204 | tvOSTopShelfImageLayers: [] 205 | tvOSTopShelfImageLayers2x: [] 206 | tvOSTopShelfImageWideLayers: [] 207 | tvOSTopShelfImageWideLayers2x: [] 208 | iOSLaunchScreenType: 0 209 | iOSLaunchScreenPortrait: {fileID: 0} 210 | iOSLaunchScreenLandscape: {fileID: 0} 211 | iOSLaunchScreenBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreenFillPct: 100 215 | iOSLaunchScreenSize: 100 216 | iOSLaunchScreenCustomXibPath: 217 | iOSLaunchScreeniPadType: 0 218 | iOSLaunchScreeniPadImage: {fileID: 0} 219 | iOSLaunchScreeniPadBackgroundColor: 220 | serializedVersion: 2 221 | rgba: 0 222 | iOSLaunchScreeniPadFillPct: 100 223 | iOSLaunchScreeniPadSize: 100 224 | iOSLaunchScreeniPadCustomXibPath: 225 | iOSLaunchScreenCustomStoryboardPath: 226 | iOSLaunchScreeniPadCustomStoryboardPath: 227 | iOSDeviceRequirements: [] 228 | iOSURLSchemes: [] 229 | macOSURLSchemes: [] 230 | iOSBackgroundModes: 0 231 | iOSMetalForceHardShadows: 0 232 | metalEditorSupport: 1 233 | metalAPIValidation: 1 234 | iOSRenderExtraFrameOnPause: 0 235 | iosCopyPluginsCodeInsteadOfSymlink: 0 236 | appleDeveloperTeamID: 237 | iOSManualSigningProvisioningProfileID: 238 | tvOSManualSigningProvisioningProfileID: 239 | bratwurstManualSigningProvisioningProfileID: 240 | iOSManualSigningProvisioningProfileType: 0 241 | tvOSManualSigningProvisioningProfileType: 0 242 | bratwurstManualSigningProvisioningProfileType: 0 243 | appleEnableAutomaticSigning: 0 244 | iOSRequireARKit: 0 245 | iOSAutomaticallyDetectAndAddCapabilities: 1 246 | appleEnableProMotion: 0 247 | shaderPrecisionModel: 0 248 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 249 | templatePackageId: com.unity.template.3d@8.1.4 250 | templateDefaultScene: Assets/Scenes/SampleScene.unity 251 | useCustomMainManifest: 0 252 | useCustomLauncherManifest: 0 253 | useCustomMainGradleTemplate: 0 254 | useCustomLauncherGradleManifest: 0 255 | useCustomBaseGradleTemplate: 0 256 | useCustomGradlePropertiesTemplate: 0 257 | useCustomGradleSettingsTemplate: 0 258 | useCustomProguardFile: 0 259 | AndroidTargetArchitectures: 2 260 | AndroidTargetDevices: 0 261 | AndroidSplashScreenScale: 0 262 | androidSplashScreen: {fileID: 0} 263 | AndroidKeystoreName: 264 | AndroidKeyaliasName: 265 | AndroidEnableArmv9SecurityFeatures: 0 266 | AndroidEnableArm64MTE: 0 267 | AndroidBuildApkPerCpuArchitecture: 0 268 | AndroidTVCompatibility: 0 269 | AndroidIsGame: 1 270 | AndroidEnableTango: 0 271 | androidEnableBanner: 1 272 | androidUseLowAccuracyLocation: 0 273 | androidUseCustomKeystore: 0 274 | m_AndroidBanners: 275 | - width: 320 276 | height: 180 277 | banner: {fileID: 0} 278 | androidGamepadSupportLevel: 0 279 | chromeosInputEmulation: 1 280 | AndroidMinifyRelease: 0 281 | AndroidMinifyDebug: 0 282 | AndroidValidateAppBundleSize: 1 283 | AndroidAppBundleSizeToValidate: 150 284 | AndroidReportGooglePlayAppDependencies: 1 285 | m_BuildTargetIcons: [] 286 | m_BuildTargetPlatformIcons: [] 287 | m_BuildTargetBatching: 288 | - m_BuildTarget: Standalone 289 | m_StaticBatching: 1 290 | m_DynamicBatching: 0 291 | - m_BuildTarget: tvOS 292 | m_StaticBatching: 1 293 | m_DynamicBatching: 0 294 | - m_BuildTarget: Android 295 | m_StaticBatching: 1 296 | m_DynamicBatching: 0 297 | - m_BuildTarget: iPhone 298 | m_StaticBatching: 1 299 | m_DynamicBatching: 0 300 | - m_BuildTarget: WebGL 301 | m_StaticBatching: 0 302 | m_DynamicBatching: 0 303 | m_BuildTargetShaderSettings: [] 304 | m_BuildTargetGraphicsJobs: 305 | - m_BuildTarget: MacStandaloneSupport 306 | m_GraphicsJobs: 0 307 | - m_BuildTarget: Switch 308 | m_GraphicsJobs: 1 309 | - m_BuildTarget: MetroSupport 310 | m_GraphicsJobs: 1 311 | - m_BuildTarget: AppleTVSupport 312 | m_GraphicsJobs: 0 313 | - m_BuildTarget: BJMSupport 314 | m_GraphicsJobs: 1 315 | - m_BuildTarget: LinuxStandaloneSupport 316 | m_GraphicsJobs: 1 317 | - m_BuildTarget: PS4Player 318 | m_GraphicsJobs: 1 319 | - m_BuildTarget: iOSSupport 320 | m_GraphicsJobs: 0 321 | - m_BuildTarget: WindowsStandaloneSupport 322 | m_GraphicsJobs: 1 323 | - m_BuildTarget: XboxOnePlayer 324 | m_GraphicsJobs: 1 325 | - m_BuildTarget: LuminSupport 326 | m_GraphicsJobs: 0 327 | - m_BuildTarget: AndroidPlayer 328 | m_GraphicsJobs: 0 329 | - m_BuildTarget: WebGLSupport 330 | m_GraphicsJobs: 0 331 | m_BuildTargetGraphicsJobMode: 332 | - m_BuildTarget: PS4Player 333 | m_GraphicsJobMode: 0 334 | - m_BuildTarget: XboxOnePlayer 335 | m_GraphicsJobMode: 0 336 | m_BuildTargetGraphicsAPIs: 337 | - m_BuildTarget: AndroidPlayer 338 | m_APIs: 150000000b000000 339 | m_Automatic: 1 340 | - m_BuildTarget: iOSSupport 341 | m_APIs: 10000000 342 | m_Automatic: 1 343 | - m_BuildTarget: AppleTVSupport 344 | m_APIs: 10000000 345 | m_Automatic: 1 346 | - m_BuildTarget: WebGLSupport 347 | m_APIs: 0b000000 348 | m_Automatic: 1 349 | m_BuildTargetVRSettings: 350 | - m_BuildTarget: Standalone 351 | m_Enabled: 0 352 | m_Devices: 353 | - Oculus 354 | - OpenVR 355 | m_DefaultShaderChunkSizeInMB: 16 356 | m_DefaultShaderChunkCount: 0 357 | openGLRequireES31: 0 358 | openGLRequireES31AEP: 0 359 | openGLRequireES32: 0 360 | m_TemplateCustomTags: {} 361 | mobileMTRendering: 362 | Android: 1 363 | iPhone: 1 364 | tvOS: 1 365 | m_BuildTargetGroupLightmapEncodingQuality: 366 | - m_BuildTarget: Android 367 | m_EncodingQuality: 1 368 | - m_BuildTarget: iPhone 369 | m_EncodingQuality: 1 370 | - m_BuildTarget: tvOS 371 | m_EncodingQuality: 1 372 | m_BuildTargetGroupHDRCubemapEncodingQuality: 373 | - m_BuildTarget: Android 374 | m_EncodingQuality: 1 375 | - m_BuildTarget: iPhone 376 | m_EncodingQuality: 1 377 | - m_BuildTarget: tvOS 378 | m_EncodingQuality: 1 379 | m_BuildTargetGroupLightmapSettings: [] 380 | m_BuildTargetGroupLoadStoreDebugModeSettings: [] 381 | m_BuildTargetNormalMapEncoding: 382 | - m_BuildTarget: Android 383 | m_Encoding: 1 384 | - m_BuildTarget: iPhone 385 | m_Encoding: 1 386 | - m_BuildTarget: tvOS 387 | m_Encoding: 1 388 | m_BuildTargetDefaultTextureCompressionFormat: 389 | - serializedVersion: 2 390 | m_BuildTarget: Android 391 | m_Formats: 03000000 392 | playModeTestRunnerEnabled: 0 393 | runPlayModeTestAsEditModeTest: 0 394 | actionOnDotNetUnhandledException: 1 395 | enableInternalProfiler: 0 396 | logObjCUncaughtExceptions: 1 397 | enableCrashReportAPI: 0 398 | cameraUsageDescription: 399 | locationUsageDescription: 400 | microphoneUsageDescription: 401 | bluetoothUsageDescription: 402 | macOSTargetOSVersion: 10.13.0 403 | switchNMETAOverride: 404 | switchNetLibKey: 405 | switchSocketMemoryPoolSize: 6144 406 | switchSocketAllocatorPoolSize: 128 407 | switchSocketConcurrencyLimit: 14 408 | switchScreenResolutionBehavior: 2 409 | switchUseCPUProfiler: 0 410 | switchEnableFileSystemTrace: 0 411 | switchLTOSetting: 0 412 | switchApplicationID: 0x01004b9000490000 413 | switchNSODependencies: 414 | switchCompilerFlags: 415 | switchTitleNames_0: 416 | switchTitleNames_1: 417 | switchTitleNames_2: 418 | switchTitleNames_3: 419 | switchTitleNames_4: 420 | switchTitleNames_5: 421 | switchTitleNames_6: 422 | switchTitleNames_7: 423 | switchTitleNames_8: 424 | switchTitleNames_9: 425 | switchTitleNames_10: 426 | switchTitleNames_11: 427 | switchTitleNames_12: 428 | switchTitleNames_13: 429 | switchTitleNames_14: 430 | switchTitleNames_15: 431 | switchPublisherNames_0: 432 | switchPublisherNames_1: 433 | switchPublisherNames_2: 434 | switchPublisherNames_3: 435 | switchPublisherNames_4: 436 | switchPublisherNames_5: 437 | switchPublisherNames_6: 438 | switchPublisherNames_7: 439 | switchPublisherNames_8: 440 | switchPublisherNames_9: 441 | switchPublisherNames_10: 442 | switchPublisherNames_11: 443 | switchPublisherNames_12: 444 | switchPublisherNames_13: 445 | switchPublisherNames_14: 446 | switchPublisherNames_15: 447 | switchIcons_0: {fileID: 0} 448 | switchIcons_1: {fileID: 0} 449 | switchIcons_2: {fileID: 0} 450 | switchIcons_3: {fileID: 0} 451 | switchIcons_4: {fileID: 0} 452 | switchIcons_5: {fileID: 0} 453 | switchIcons_6: {fileID: 0} 454 | switchIcons_7: {fileID: 0} 455 | switchIcons_8: {fileID: 0} 456 | switchIcons_9: {fileID: 0} 457 | switchIcons_10: {fileID: 0} 458 | switchIcons_11: {fileID: 0} 459 | switchIcons_12: {fileID: 0} 460 | switchIcons_13: {fileID: 0} 461 | switchIcons_14: {fileID: 0} 462 | switchIcons_15: {fileID: 0} 463 | switchSmallIcons_0: {fileID: 0} 464 | switchSmallIcons_1: {fileID: 0} 465 | switchSmallIcons_2: {fileID: 0} 466 | switchSmallIcons_3: {fileID: 0} 467 | switchSmallIcons_4: {fileID: 0} 468 | switchSmallIcons_5: {fileID: 0} 469 | switchSmallIcons_6: {fileID: 0} 470 | switchSmallIcons_7: {fileID: 0} 471 | switchSmallIcons_8: {fileID: 0} 472 | switchSmallIcons_9: {fileID: 0} 473 | switchSmallIcons_10: {fileID: 0} 474 | switchSmallIcons_11: {fileID: 0} 475 | switchSmallIcons_12: {fileID: 0} 476 | switchSmallIcons_13: {fileID: 0} 477 | switchSmallIcons_14: {fileID: 0} 478 | switchSmallIcons_15: {fileID: 0} 479 | switchManualHTML: 480 | switchAccessibleURLs: 481 | switchLegalInformation: 482 | switchMainThreadStackSize: 1048576 483 | switchPresenceGroupId: 484 | switchLogoHandling: 0 485 | switchReleaseVersion: 0 486 | switchDisplayVersion: 1.0.0 487 | switchStartupUserAccount: 0 488 | switchSupportedLanguagesMask: 0 489 | switchLogoType: 0 490 | switchApplicationErrorCodeCategory: 491 | switchUserAccountSaveDataSize: 0 492 | switchUserAccountSaveDataJournalSize: 0 493 | switchApplicationAttribute: 0 494 | switchCardSpecSize: -1 495 | switchCardSpecClock: -1 496 | switchRatingsMask: 0 497 | switchRatingsInt_0: 0 498 | switchRatingsInt_1: 0 499 | switchRatingsInt_2: 0 500 | switchRatingsInt_3: 0 501 | switchRatingsInt_4: 0 502 | switchRatingsInt_5: 0 503 | switchRatingsInt_6: 0 504 | switchRatingsInt_7: 0 505 | switchRatingsInt_8: 0 506 | switchRatingsInt_9: 0 507 | switchRatingsInt_10: 0 508 | switchRatingsInt_11: 0 509 | switchRatingsInt_12: 0 510 | switchLocalCommunicationIds_0: 511 | switchLocalCommunicationIds_1: 512 | switchLocalCommunicationIds_2: 513 | switchLocalCommunicationIds_3: 514 | switchLocalCommunicationIds_4: 515 | switchLocalCommunicationIds_5: 516 | switchLocalCommunicationIds_6: 517 | switchLocalCommunicationIds_7: 518 | switchParentalControl: 0 519 | switchAllowsScreenshot: 1 520 | switchAllowsVideoCapturing: 1 521 | switchAllowsRuntimeAddOnContentInstall: 0 522 | switchDataLossConfirmation: 0 523 | switchUserAccountLockEnabled: 0 524 | switchSystemResourceMemory: 16777216 525 | switchSupportedNpadStyles: 22 526 | switchNativeFsCacheSize: 32 527 | switchIsHoldTypeHorizontal: 0 528 | switchSupportedNpadCount: 8 529 | switchEnableTouchScreen: 1 530 | switchSocketConfigEnabled: 0 531 | switchTcpInitialSendBufferSize: 32 532 | switchTcpInitialReceiveBufferSize: 64 533 | switchTcpAutoSendBufferSizeMax: 256 534 | switchTcpAutoReceiveBufferSizeMax: 256 535 | switchUdpSendBufferSize: 9 536 | switchUdpReceiveBufferSize: 42 537 | switchSocketBufferEfficiency: 4 538 | switchSocketInitializeEnabled: 1 539 | switchNetworkInterfaceManagerInitializeEnabled: 1 540 | switchDisableHTCSPlayerConnection: 0 541 | switchUseNewStyleFilepaths: 1 542 | switchUseLegacyFmodPriorities: 0 543 | switchUseMicroSleepForYield: 1 544 | switchEnableRamDiskSupport: 0 545 | switchMicroSleepForYieldTime: 25 546 | switchRamDiskSpaceSize: 12 547 | ps4NPAgeRating: 12 548 | ps4NPTitleSecret: 549 | ps4NPTrophyPackPath: 550 | ps4ParentalLevel: 11 551 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 552 | ps4Category: 0 553 | ps4MasterVersion: 01.00 554 | ps4AppVersion: 01.00 555 | ps4AppType: 0 556 | ps4ParamSfxPath: 557 | ps4VideoOutPixelFormat: 0 558 | ps4VideoOutInitialWidth: 1920 559 | ps4VideoOutBaseModeInitialWidth: 1920 560 | ps4VideoOutReprojectionRate: 60 561 | ps4PronunciationXMLPath: 562 | ps4PronunciationSIGPath: 563 | ps4BackgroundImagePath: 564 | ps4StartupImagePath: 565 | ps4StartupImagesFolder: 566 | ps4IconImagesFolder: 567 | ps4SaveDataImagePath: 568 | ps4SdkOverride: 569 | ps4BGMPath: 570 | ps4ShareFilePath: 571 | ps4ShareOverlayImagePath: 572 | ps4PrivacyGuardImagePath: 573 | ps4ExtraSceSysFile: 574 | ps4NPtitleDatPath: 575 | ps4RemotePlayKeyAssignment: -1 576 | ps4RemotePlayKeyMappingDir: 577 | ps4PlayTogetherPlayerCount: 0 578 | ps4EnterButtonAssignment: 1 579 | ps4ApplicationParam1: 0 580 | ps4ApplicationParam2: 0 581 | ps4ApplicationParam3: 0 582 | ps4ApplicationParam4: 0 583 | ps4DownloadDataSize: 0 584 | ps4GarlicHeapSize: 2048 585 | ps4ProGarlicHeapSize: 2560 586 | playerPrefsMaxSize: 32768 587 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 588 | ps4pnSessions: 1 589 | ps4pnPresence: 1 590 | ps4pnFriends: 1 591 | ps4pnGameCustomData: 1 592 | playerPrefsSupport: 0 593 | enableApplicationExit: 0 594 | resetTempFolder: 1 595 | restrictedAudioUsageRights: 0 596 | ps4UseResolutionFallback: 0 597 | ps4ReprojectionSupport: 0 598 | ps4UseAudio3dBackend: 0 599 | ps4UseLowGarlicFragmentationMode: 1 600 | ps4SocialScreenEnabled: 0 601 | ps4ScriptOptimizationLevel: 0 602 | ps4Audio3dVirtualSpeakerCount: 14 603 | ps4attribCpuUsage: 0 604 | ps4PatchPkgPath: 605 | ps4PatchLatestPkgPath: 606 | ps4PatchChangeinfoPath: 607 | ps4PatchDayOne: 0 608 | ps4attribUserManagement: 0 609 | ps4attribMoveSupport: 0 610 | ps4attrib3DSupport: 0 611 | ps4attribShareSupport: 0 612 | ps4attribExclusiveVR: 0 613 | ps4disableAutoHideSplash: 0 614 | ps4videoRecordingFeaturesUsed: 0 615 | ps4contentSearchFeaturesUsed: 0 616 | ps4CompatibilityPS5: 0 617 | ps4AllowPS5Detection: 0 618 | ps4GPU800MHz: 1 619 | ps4attribEyeToEyeDistanceSettingVR: 0 620 | ps4IncludedModules: [] 621 | ps4attribVROutputEnabled: 0 622 | monoEnv: 623 | splashScreenBackgroundSourceLandscape: {fileID: 0} 624 | splashScreenBackgroundSourcePortrait: {fileID: 0} 625 | blurSplashScreenBackground: 1 626 | spritePackerPolicy: 627 | webGLMemorySize: 16 628 | webGLExceptionSupport: 1 629 | webGLNameFilesAsHashes: 0 630 | webGLShowDiagnostics: 0 631 | webGLDataCaching: 1 632 | webGLDebugSymbols: 0 633 | webGLEmscriptenArgs: 634 | webGLModulesDirectory: 635 | webGLTemplate: APPLICATION:Default 636 | webGLAnalyzeBuildSize: 0 637 | webGLUseEmbeddedResources: 0 638 | webGLCompressionFormat: 1 639 | webGLWasmArithmeticExceptions: 0 640 | webGLLinkerTarget: 1 641 | webGLThreadsSupport: 0 642 | webGLDecompressionFallback: 0 643 | webGLInitialMemorySize: 32 644 | webGLMaximumMemorySize: 2048 645 | webGLMemoryGrowthMode: 2 646 | webGLMemoryLinearGrowthStep: 16 647 | webGLMemoryGeometricGrowthStep: 0.2 648 | webGLMemoryGeometricGrowthCap: 96 649 | webGLEnableWebGPU: 0 650 | webGLPowerPreference: 2 651 | webGLWebAssemblyTable: 0 652 | webGLWebAssemblyBigInt: 0 653 | webGLCloseOnQuit: 0 654 | scriptingDefineSymbols: {} 655 | additionalCompilerArguments: {} 656 | platformArchitecture: {} 657 | scriptingBackend: 658 | Android: 1 659 | il2cppCompilerConfiguration: {} 660 | il2cppCodeGeneration: {} 661 | il2cppStacktraceInformation: {} 662 | managedStrippingLevel: 663 | Android: 1 664 | Bratwurst: 1 665 | EmbeddedLinux: 1 666 | GameCoreScarlett: 1 667 | GameCoreXboxOne: 1 668 | Nintendo Switch: 1 669 | PS4: 1 670 | PS5: 1 671 | QNX: 1 672 | WebGL: 1 673 | Windows Store Apps: 1 674 | XboxOne: 1 675 | iPhone: 1 676 | tvOS: 1 677 | incrementalIl2cppBuild: {} 678 | suppressCommonWarnings: 1 679 | allowUnsafeCode: 0 680 | useDeterministicCompilation: 1 681 | additionalIl2CppArgs: 682 | scriptingRuntimeVersion: 1 683 | gcIncremental: 1 684 | gcWBarrierValidation: 0 685 | apiCompatibilityLevelPerPlatform: {} 686 | editorAssembliesCompatibilityLevel: 1 687 | m_RenderingPath: 1 688 | m_MobileRenderingPath: 1 689 | metroPackageName: YOLOv8Unity 690 | metroPackageVersion: 691 | metroCertificatePath: 692 | metroCertificatePassword: 693 | metroCertificateSubject: 694 | metroCertificateIssuer: 695 | metroCertificateNotAfter: 0000000000000000 696 | metroApplicationDescription: YOLOv8Unity 697 | wsaImages: {} 698 | metroTileShortName: 699 | metroTileShowName: 0 700 | metroMediumTileShowName: 0 701 | metroLargeTileShowName: 0 702 | metroWideTileShowName: 0 703 | metroSupportStreamingInstall: 0 704 | metroLastRequiredScene: 0 705 | metroDefaultTileSize: 1 706 | metroTileForegroundText: 2 707 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 708 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 709 | metroSplashScreenUseBackgroundColor: 0 710 | platformCapabilities: {} 711 | metroTargetDeviceFamilies: {} 712 | metroFTAName: 713 | metroFTAFileTypes: [] 714 | metroProtocolName: 715 | vcxProjDefaultLanguage: 716 | XboxOneProductId: 717 | XboxOneUpdateKey: 718 | XboxOneSandboxId: 719 | XboxOneContentId: 720 | XboxOneTitleId: 721 | XboxOneSCId: 722 | XboxOneGameOsOverridePath: 723 | XboxOnePackagingOverridePath: 724 | XboxOneAppManifestOverridePath: 725 | XboxOneVersion: 1.0.0.0 726 | XboxOnePackageEncryption: 0 727 | XboxOnePackageUpdateGranularity: 2 728 | XboxOneDescription: 729 | XboxOneLanguage: 730 | - enus 731 | XboxOneCapability: [] 732 | XboxOneGameRating: {} 733 | XboxOneIsContentPackage: 0 734 | XboxOneEnhancedXboxCompatibilityMode: 0 735 | XboxOneEnableGPUVariability: 1 736 | XboxOneSockets: {} 737 | XboxOneSplashScreen: {fileID: 0} 738 | XboxOneAllowedProductIds: [] 739 | XboxOnePersistentLocalStorageSize: 0 740 | XboxOneXTitleMemory: 8 741 | XboxOneOverrideIdentityName: 742 | XboxOneOverrideIdentityPublisher: 743 | vrEditorSettings: {} 744 | cloudServicesEnabled: 745 | UNet: 1 746 | luminIcon: 747 | m_Name: 748 | m_ModelFolderPath: 749 | m_PortalFolderPath: 750 | luminCert: 751 | m_CertPath: 752 | m_SignPackage: 1 753 | luminIsChannelApp: 0 754 | luminVersion: 755 | m_VersionCode: 1 756 | m_VersionName: 757 | hmiPlayerDataPath: 758 | hmiForceSRGBBlit: 0 759 | embeddedLinuxEnableGamepadInput: 0 760 | hmiCpuConfiguration: 761 | hmiLogStartupTiming: 0 762 | qnxGraphicConfPath: 763 | apiCompatibilityLevel: 6 764 | captureStartupLogs: {} 765 | activeInputHandler: 0 766 | windowsGamepadBackendHint: 0 767 | cloudProjectId: c6477427-2b43-4af6-bcd1-6779173bcbc8 768 | framebufferDepthMemorylessMode: 0 769 | qualitySettingsNames: [] 770 | projectName: YOLOv8Unity 771 | organizationId: wojty 772 | cloudEnabled: 0 773 | legacyClampBlendShapeWeights: 0 774 | hmiLoadingImage: {fileID: 0} 775 | platformRequiresReadableAssets: 0 776 | virtualTexturingSupportEnabled: 0 777 | insecureHttpOption: 0 778 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.20f1 2 | m_EditorVersionWithRevision: 2022.3.20f1 (61c2feb0970d) 3 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | GameCoreScarlett: 5 223 | GameCoreXboxOne: 5 224 | Nintendo 3DS: 5 225 | Nintendo Switch: 5 226 | PS4: 5 227 | PS5: 5 228 | Stadia: 5 229 | Standalone: 5 230 | WebGL: 3 231 | Windows Store Apps: 5 232 | XboxOne: 5 233 | iPhone: 2 234 | tvOS: 2 235 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "defaultInstantiationMode": 0 8 | }, 9 | { 10 | "userAdded": false, 11 | "type": "UnityEditor.Animations.AnimatorController", 12 | "defaultInstantiationMode": 0 13 | }, 14 | { 15 | "userAdded": false, 16 | "type": "UnityEngine.AnimatorOverrideController", 17 | "defaultInstantiationMode": 0 18 | }, 19 | { 20 | "userAdded": false, 21 | "type": "UnityEditor.Audio.AudioMixerController", 22 | "defaultInstantiationMode": 0 23 | }, 24 | { 25 | "userAdded": false, 26 | "type": "UnityEngine.ComputeShader", 27 | "defaultInstantiationMode": 1 28 | }, 29 | { 30 | "userAdded": false, 31 | "type": "UnityEngine.Cubemap", 32 | "defaultInstantiationMode": 0 33 | }, 34 | { 35 | "userAdded": false, 36 | "type": "UnityEngine.GameObject", 37 | "defaultInstantiationMode": 0 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEditor.LightingDataAsset", 42 | "defaultInstantiationMode": 0 43 | }, 44 | { 45 | "userAdded": false, 46 | "type": "UnityEngine.LightingSettings", 47 | "defaultInstantiationMode": 0 48 | }, 49 | { 50 | "userAdded": false, 51 | "type": "UnityEngine.Material", 52 | "defaultInstantiationMode": 0 53 | }, 54 | { 55 | "userAdded": false, 56 | "type": "UnityEditor.MonoScript", 57 | "defaultInstantiationMode": 1 58 | }, 59 | { 60 | "userAdded": false, 61 | "type": "UnityEngine.PhysicMaterial", 62 | "defaultInstantiationMode": 0 63 | }, 64 | { 65 | "userAdded": false, 66 | "type": "UnityEngine.PhysicsMaterial2D", 67 | "defaultInstantiationMode": 0 68 | }, 69 | { 70 | "userAdded": false, 71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 72 | "defaultInstantiationMode": 0 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 77 | "defaultInstantiationMode": 0 78 | }, 79 | { 80 | "userAdded": false, 81 | "type": "UnityEngine.Rendering.VolumeProfile", 82 | "defaultInstantiationMode": 0 83 | }, 84 | { 85 | "userAdded": false, 86 | "type": "UnityEditor.SceneAsset", 87 | "defaultInstantiationMode": 1 88 | }, 89 | { 90 | "userAdded": false, 91 | "type": "UnityEngine.Shader", 92 | "defaultInstantiationMode": 1 93 | }, 94 | { 95 | "userAdded": false, 96 | "type": "UnityEngine.ShaderVariantCollection", 97 | "defaultInstantiationMode": 1 98 | }, 99 | { 100 | "userAdded": false, 101 | "type": "UnityEngine.Texture", 102 | "defaultInstantiationMode": 0 103 | }, 104 | { 105 | "userAdded": false, 106 | "type": "UnityEngine.Texture2D", 107 | "defaultInstantiationMode": 0 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Timeline.TimelineAsset", 112 | "defaultInstantiationMode": 0 113 | } 114 | ], 115 | "defaultDependencyTypeInfo": { 116 | "userAdded": false, 117 | "type": "", 118 | "defaultInstantiationMode": 1 119 | }, 120 | "newSceneOverride": 0 121 | } -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /YOLOv8Unity/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } --------------------------------------------------------------------------------