├── .gitattributes ├── .github └── workflows │ └── main.yml ├── .gitignore ├── Assets ├── Keypoints.meta ├── Keypoints.unity ├── Keypoints.unity.meta ├── Keypoints │ ├── KeypointMarker.prefab │ ├── KeypointMarker.prefab.meta │ ├── KeypointViewer.cs │ └── KeypointViewer.cs.meta ├── Pexels.meta ├── Pexels │ ├── pexels-fauxels-3184419.jpg │ ├── pexels-fauxels-3184419.jpg.meta │ ├── pexels-jack-sparrow-4046265.jpg │ ├── pexels-jack-sparrow-4046265.jpg.meta │ ├── pexels-karolina-grabowska-4378882.jpg │ └── pexels-karolina-grabowska-4378882.jpg.meta ├── Visualizer.meta ├── Visualizer.unity ├── Visualizer.unity.meta └── Visualizer │ ├── Visualizer.cs │ ├── Visualizer.cs.meta │ ├── Visualizer.shader │ └── Visualizer.shader.meta ├── LICENSE ├── Packages ├── jp.keijiro.bodypix │ ├── LICENSE │ ├── LICENSE.meta │ ├── ONNX.meta │ ├── ONNX │ │ ├── MobileNetV1-x050-stride16.onnx │ │ ├── MobileNetV1-x050-stride16.onnx.meta │ │ ├── MobileNetV1-x050-stride8.onnx │ │ ├── MobileNetV1-x050-stride8.onnx.meta │ │ ├── MobileNetV1-x075-stride16.onnx │ │ ├── MobileNetV1-x075-stride16.onnx.meta │ │ ├── MobileNetV1-x075-stride8.onnx │ │ ├── MobileNetV1-x075-stride8.onnx.meta │ │ ├── MobileNetV1-x100-stride16.onnx │ │ ├── MobileNetV1-x100-stride16.onnx.meta │ │ ├── MobileNetV1-x100-stride8.onnx │ │ └── MobileNetV1-x100-stride8.onnx.meta │ ├── README.md │ ├── README.md.meta │ ├── ResourceSet.meta │ ├── ResourceSet │ │ ├── MobileNetV1-x050-stride16.asset │ │ ├── MobileNetV1-x050-stride16.asset.meta │ │ ├── MobileNetV1-x050-stride8.asset │ │ ├── MobileNetV1-x050-stride8.asset.meta │ │ ├── MobileNetV1-x075-stride16.asset │ │ ├── MobileNetV1-x075-stride16.asset.meta │ │ ├── MobileNetV1-x075-stride8.asset │ │ ├── MobileNetV1-x075-stride8.asset.meta │ │ ├── MobileNetV1-x100-stride16.asset │ │ ├── MobileNetV1-x100-stride16.asset.meta │ │ ├── MobileNetV1-x100-stride8.asset │ │ └── MobileNetV1-x100-stride8.asset.meta │ ├── Runtime.meta │ ├── Runtime │ │ ├── Body.cs │ │ ├── Body.cs.meta │ │ ├── BodyDetector.cs │ │ ├── BodyDetector.cs.meta │ │ ├── BodyPix.Runtime.asmdef │ │ ├── BodyPix.Runtime.asmdef.meta │ │ ├── Config.cs │ │ ├── Config.cs.meta │ │ ├── ResourceSet.cs │ │ └── ResourceSet.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── Common.hlsl │ │ ├── Common.hlsl.meta │ │ ├── Keypoints.compute │ │ ├── Keypoints.compute.meta │ │ ├── Mask.compute │ │ └── Mask.compute.meta │ ├── package.json │ └── package.json.meta ├── 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 ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | * -text 2 | 3 | *.cs text eol=lf diff=csharp 4 | *.shader text eol=lf 5 | *.cginc text eol=lf 6 | *.hlsl text eol=lf 7 | *.compute text eol=lf 8 | 9 | *.meta text eol=lf 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: UPM on npsjs.com 2 | on: 3 | release: 4 | types: [created] 5 | jobs: 6 | publish: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v2 11 | with: 12 | registry-url: 'https://registry.npmjs.org' 13 | - run: npm publish 14 | working-directory: Packages/jp.keijiro.bodypix 15 | env: 16 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows 2 | Thumbs.db 3 | Desktop.ini 4 | 5 | # macOS 6 | .DS_Store 7 | 8 | # Code Editors 9 | /.idea 10 | /.vscode 11 | /*.csproj 12 | /*.sln 13 | *.swp 14 | *.vcxproj.user 15 | 16 | # Unity 17 | /Library 18 | /Logs 19 | /Recordings 20 | /UserSettings 21 | /Temp 22 | 23 | /*.mp4 24 | -------------------------------------------------------------------------------- /Assets/Keypoints.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d89abaae882c4fe2b507f2f8a1f72c4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Keypoints.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: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 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 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &274663181 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: 274663183} 135 | - component: {fileID: 274663182} 136 | m_Layer: 0 137 | m_Name: Main Camera 138 | m_TagString: MainCamera 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!20 &274663182 144 | Camera: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 274663181} 150 | m_Enabled: 1 151 | serializedVersion: 2 152 | m_ClearFlags: 2 153 | m_BackGroundColor: {r: 0, g: 0.058700204, b: 0.1509434, a: 0} 154 | m_projectionMatrixMode: 1 155 | m_GateFitMode: 2 156 | m_FOVAxisMode: 0 157 | m_SensorSize: {x: 36, y: 24} 158 | m_LensShift: {x: 0, y: 0} 159 | m_FocalLength: 50 160 | m_NormalizedViewPortRect: 161 | serializedVersion: 2 162 | x: 0 163 | y: 0 164 | width: 1 165 | height: 1 166 | near clip plane: 0.1 167 | far clip plane: 100 168 | field of view: 60 169 | orthographic: 1 170 | orthographic size: 0.5 171 | m_Depth: 0 172 | m_CullingMask: 173 | serializedVersion: 2 174 | m_Bits: 4294967295 175 | m_RenderingPath: 1 176 | m_TargetTexture: {fileID: 0} 177 | m_TargetDisplay: 0 178 | m_TargetEye: 3 179 | m_HDR: 0 180 | m_AllowMSAA: 0 181 | m_AllowDynamicResolution: 0 182 | m_ForceIntoRT: 0 183 | m_OcclusionCulling: 0 184 | m_StereoConvergence: 10 185 | m_StereoSeparation: 0.022 186 | --- !u!4 &274663183 187 | Transform: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | m_GameObject: {fileID: 274663181} 193 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 194 | m_LocalPosition: {x: 0, y: 0, z: 0} 195 | m_LocalScale: {x: 1, y: 1, z: 1} 196 | m_ConstrainProportionsScale: 0 197 | m_Children: [] 198 | m_Father: {fileID: 0} 199 | m_RootOrder: 0 200 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 201 | --- !u!1 &431196467 202 | GameObject: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | serializedVersion: 6 208 | m_Component: 209 | - component: {fileID: 431196468} 210 | - component: {fileID: 431196470} 211 | - component: {fileID: 431196471} 212 | m_Layer: 5 213 | m_Name: View 214 | m_TagString: Untagged 215 | m_Icon: {fileID: 0} 216 | m_NavMeshLayer: 0 217 | m_StaticEditorFlags: 0 218 | m_IsActive: 1 219 | --- !u!224 &431196468 220 | RectTransform: 221 | m_ObjectHideFlags: 0 222 | m_CorrespondingSourceObject: {fileID: 0} 223 | m_PrefabInstance: {fileID: 0} 224 | m_PrefabAsset: {fileID: 0} 225 | m_GameObject: {fileID: 431196467} 226 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 227 | m_LocalPosition: {x: 0, y: 0, z: 0} 228 | m_LocalScale: {x: 1, y: 1, z: 1} 229 | m_ConstrainProportionsScale: 0 230 | m_Children: 231 | - {fileID: 1869171754} 232 | m_Father: {fileID: 1339821705} 233 | m_RootOrder: 0 234 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 235 | m_AnchorMin: {x: 0, y: 0} 236 | m_AnchorMax: {x: 1, y: 1} 237 | m_AnchoredPosition: {x: 0, y: 0} 238 | m_SizeDelta: {x: 0, y: 0} 239 | m_Pivot: {x: 0.5, y: 0.5} 240 | --- !u!222 &431196470 241 | CanvasRenderer: 242 | m_ObjectHideFlags: 0 243 | m_CorrespondingSourceObject: {fileID: 0} 244 | m_PrefabInstance: {fileID: 0} 245 | m_PrefabAsset: {fileID: 0} 246 | m_GameObject: {fileID: 431196467} 247 | m_CullTransparentMesh: 1 248 | --- !u!114 &431196471 249 | MonoBehaviour: 250 | m_ObjectHideFlags: 0 251 | m_CorrespondingSourceObject: {fileID: 0} 252 | m_PrefabInstance: {fileID: 0} 253 | m_PrefabAsset: {fileID: 0} 254 | m_GameObject: {fileID: 431196467} 255 | m_Enabled: 1 256 | m_EditorHideFlags: 0 257 | m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} 258 | m_Name: 259 | m_EditorClassIdentifier: 260 | m_AspectMode: 2 261 | m_AspectRatio: 1.3333334 262 | --- !u!1 &1106664931 263 | GameObject: 264 | m_ObjectHideFlags: 0 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInstance: {fileID: 0} 267 | m_PrefabAsset: {fileID: 0} 268 | serializedVersion: 6 269 | m_Component: 270 | - component: {fileID: 1106664934} 271 | - component: {fileID: 1106664933} 272 | - component: {fileID: 1106664932} 273 | m_Layer: 0 274 | m_Name: Keypoint Viewer 275 | m_TagString: Untagged 276 | m_Icon: {fileID: 0} 277 | m_NavMeshLayer: 0 278 | m_StaticEditorFlags: 0 279 | m_IsActive: 1 280 | --- !u!114 &1106664932 281 | MonoBehaviour: 282 | m_ObjectHideFlags: 0 283 | m_CorrespondingSourceObject: {fileID: 0} 284 | m_PrefabInstance: {fileID: 0} 285 | m_PrefabAsset: {fileID: 0} 286 | m_GameObject: {fileID: 1106664931} 287 | m_Enabled: 1 288 | m_EditorHideFlags: 0 289 | m_Script: {fileID: 11500000, guid: fb59fc5f660284b628181a2481152058, type: 3} 290 | m_Name: 291 | m_EditorClassIdentifier: 292 | _source: {fileID: 1106664933} 293 | _resources: {fileID: 11400000, guid: c0532b829d2dd49d99fa8e8df757816e, type: 2} 294 | _resolution: {x: 512, y: 384} 295 | _previewUI: {fileID: 1869171756} 296 | _markerPrefab: {fileID: 4461991498135571732, guid: eee3f1712c0734bd3be7bea414530f1b, type: 3} 297 | --- !u!114 &1106664933 298 | MonoBehaviour: 299 | m_ObjectHideFlags: 0 300 | m_CorrespondingSourceObject: {fileID: 0} 301 | m_PrefabInstance: {fileID: 0} 302 | m_PrefabAsset: {fileID: 0} 303 | m_GameObject: {fileID: 1106664931} 304 | m_Enabled: 1 305 | m_EditorHideFlags: 0 306 | m_Script: {fileID: 11500000, guid: 40ff2e515a81541cbb664860588e2c6e, type: 3} 307 | m_Name: 308 | m_EditorClassIdentifier: 309 | _sourceType: 0 310 | _texture: {fileID: 2800000, guid: 75b2c8951439440f0ae8794aebcbebc1, type: 3} 311 | _textureUrl: 312 | _video: {fileID: 0} 313 | _videoUrl: 314 | _webcamName: 315 | _webcamResolution: {x: 1920, y: 1080} 316 | _webcamFrameRate: 30 317 | _outputTexture: {fileID: 0} 318 | _outputResolution: {x: 1440, y: 1080} 319 | _shader: {fileID: 4800000, guid: 3f7d8db4748f54c638a46cec0b0e61f8, type: 3} 320 | --- !u!4 &1106664934 321 | Transform: 322 | m_ObjectHideFlags: 0 323 | m_CorrespondingSourceObject: {fileID: 0} 324 | m_PrefabInstance: {fileID: 0} 325 | m_PrefabAsset: {fileID: 0} 326 | m_GameObject: {fileID: 1106664931} 327 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 328 | m_LocalPosition: {x: 0, y: 0, z: 0} 329 | m_LocalScale: {x: 1, y: 1, z: 1} 330 | m_ConstrainProportionsScale: 0 331 | m_Children: [] 332 | m_Father: {fileID: 0} 333 | m_RootOrder: 2 334 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 335 | --- !u!1 &1339821701 336 | GameObject: 337 | m_ObjectHideFlags: 0 338 | m_CorrespondingSourceObject: {fileID: 0} 339 | m_PrefabInstance: {fileID: 0} 340 | m_PrefabAsset: {fileID: 0} 341 | serializedVersion: 6 342 | m_Component: 343 | - component: {fileID: 1339821705} 344 | - component: {fileID: 1339821704} 345 | - component: {fileID: 1339821703} 346 | - component: {fileID: 1339821702} 347 | m_Layer: 5 348 | m_Name: Canvas 349 | m_TagString: Untagged 350 | m_Icon: {fileID: 0} 351 | m_NavMeshLayer: 0 352 | m_StaticEditorFlags: 0 353 | m_IsActive: 1 354 | --- !u!114 &1339821702 355 | MonoBehaviour: 356 | m_ObjectHideFlags: 0 357 | m_CorrespondingSourceObject: {fileID: 0} 358 | m_PrefabInstance: {fileID: 0} 359 | m_PrefabAsset: {fileID: 0} 360 | m_GameObject: {fileID: 1339821701} 361 | m_Enabled: 1 362 | m_EditorHideFlags: 0 363 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 364 | m_Name: 365 | m_EditorClassIdentifier: 366 | m_IgnoreReversedGraphics: 1 367 | m_BlockingObjects: 0 368 | m_BlockingMask: 369 | serializedVersion: 2 370 | m_Bits: 4294967295 371 | --- !u!114 &1339821703 372 | MonoBehaviour: 373 | m_ObjectHideFlags: 0 374 | m_CorrespondingSourceObject: {fileID: 0} 375 | m_PrefabInstance: {fileID: 0} 376 | m_PrefabAsset: {fileID: 0} 377 | m_GameObject: {fileID: 1339821701} 378 | m_Enabled: 1 379 | m_EditorHideFlags: 0 380 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 381 | m_Name: 382 | m_EditorClassIdentifier: 383 | m_UiScaleMode: 0 384 | m_ReferencePixelsPerUnit: 100 385 | m_ScaleFactor: 1 386 | m_ReferenceResolution: {x: 800, y: 600} 387 | m_ScreenMatchMode: 0 388 | m_MatchWidthOrHeight: 0 389 | m_PhysicalUnit: 3 390 | m_FallbackScreenDPI: 96 391 | m_DefaultSpriteDPI: 96 392 | m_DynamicPixelsPerUnit: 1 393 | m_PresetInfoIsWorld: 0 394 | --- !u!223 &1339821704 395 | Canvas: 396 | m_ObjectHideFlags: 0 397 | m_CorrespondingSourceObject: {fileID: 0} 398 | m_PrefabInstance: {fileID: 0} 399 | m_PrefabAsset: {fileID: 0} 400 | m_GameObject: {fileID: 1339821701} 401 | m_Enabled: 1 402 | serializedVersion: 3 403 | m_RenderMode: 1 404 | m_Camera: {fileID: 274663182} 405 | m_PlaneDistance: 100 406 | m_PixelPerfect: 0 407 | m_ReceivesEvents: 1 408 | m_OverrideSorting: 0 409 | m_OverridePixelPerfect: 0 410 | m_SortingBucketNormalizedSize: 0 411 | m_AdditionalShaderChannelsFlag: 0 412 | m_SortingLayerID: 0 413 | m_SortingOrder: 0 414 | m_TargetDisplay: 0 415 | --- !u!224 &1339821705 416 | RectTransform: 417 | m_ObjectHideFlags: 0 418 | m_CorrespondingSourceObject: {fileID: 0} 419 | m_PrefabInstance: {fileID: 0} 420 | m_PrefabAsset: {fileID: 0} 421 | m_GameObject: {fileID: 1339821701} 422 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 423 | m_LocalPosition: {x: 0, y: 0, z: 0} 424 | m_LocalScale: {x: 0, y: 0, z: 0} 425 | m_ConstrainProportionsScale: 0 426 | m_Children: 427 | - {fileID: 431196468} 428 | m_Father: {fileID: 0} 429 | m_RootOrder: 1 430 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 431 | m_AnchorMin: {x: 0, y: 0} 432 | m_AnchorMax: {x: 0, y: 0} 433 | m_AnchoredPosition: {x: 0, y: 0} 434 | m_SizeDelta: {x: 0, y: 0} 435 | m_Pivot: {x: 0, y: 0} 436 | --- !u!1 &1869171753 437 | GameObject: 438 | m_ObjectHideFlags: 0 439 | m_CorrespondingSourceObject: {fileID: 0} 440 | m_PrefabInstance: {fileID: 0} 441 | m_PrefabAsset: {fileID: 0} 442 | serializedVersion: 6 443 | m_Component: 444 | - component: {fileID: 1869171754} 445 | - component: {fileID: 1869171755} 446 | - component: {fileID: 1869171756} 447 | m_Layer: 5 448 | m_Name: Preview 449 | m_TagString: Untagged 450 | m_Icon: {fileID: 0} 451 | m_NavMeshLayer: 0 452 | m_StaticEditorFlags: 0 453 | m_IsActive: 1 454 | --- !u!224 &1869171754 455 | RectTransform: 456 | m_ObjectHideFlags: 0 457 | m_CorrespondingSourceObject: {fileID: 0} 458 | m_PrefabInstance: {fileID: 0} 459 | m_PrefabAsset: {fileID: 0} 460 | m_GameObject: {fileID: 1869171753} 461 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 462 | m_LocalPosition: {x: 0, y: 0, z: 0} 463 | m_LocalScale: {x: 1, y: 1, z: 1} 464 | m_ConstrainProportionsScale: 0 465 | m_Children: [] 466 | m_Father: {fileID: 431196468} 467 | m_RootOrder: 0 468 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 469 | m_AnchorMin: {x: 0, y: 0} 470 | m_AnchorMax: {x: 1, y: 1} 471 | m_AnchoredPosition: {x: 0, y: 0} 472 | m_SizeDelta: {x: 0, y: 0} 473 | m_Pivot: {x: 0.5, y: 0.5} 474 | --- !u!222 &1869171755 475 | CanvasRenderer: 476 | m_ObjectHideFlags: 0 477 | m_CorrespondingSourceObject: {fileID: 0} 478 | m_PrefabInstance: {fileID: 0} 479 | m_PrefabAsset: {fileID: 0} 480 | m_GameObject: {fileID: 1869171753} 481 | m_CullTransparentMesh: 1 482 | --- !u!114 &1869171756 483 | MonoBehaviour: 484 | m_ObjectHideFlags: 0 485 | m_CorrespondingSourceObject: {fileID: 0} 486 | m_PrefabInstance: {fileID: 0} 487 | m_PrefabAsset: {fileID: 0} 488 | m_GameObject: {fileID: 1869171753} 489 | m_Enabled: 1 490 | m_EditorHideFlags: 0 491 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 492 | m_Name: 493 | m_EditorClassIdentifier: 494 | m_Material: {fileID: 0} 495 | m_Color: {r: 1, g: 1, b: 1, a: 1} 496 | m_RaycastTarget: 1 497 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 498 | m_Maskable: 1 499 | m_OnCullStateChanged: 500 | m_PersistentCalls: 501 | m_Calls: [] 502 | m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0} 503 | m_UVRect: 504 | serializedVersion: 2 505 | x: 0 506 | y: 0 507 | width: 1 508 | height: 1 509 | -------------------------------------------------------------------------------- /Assets/Keypoints.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89af400eb20bd4108af86454ec18b91e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Keypoints/KeypointMarker.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6137921099632638934 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4461991498135571732} 12 | - component: {fileID: 6490706928186325968} 13 | - component: {fileID: 570774262892799599} 14 | m_Layer: 5 15 | m_Name: KeypointMarker 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &4461991498135571732 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 6137921099632638934} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: 33 | - {fileID: 2372182626392270488} 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | m_AnchorMin: {x: 0, y: 0} 38 | m_AnchorMax: {x: 0, y: 0} 39 | m_AnchoredPosition: {x: 100, y: 100} 40 | m_SizeDelta: {x: 12, y: 12} 41 | m_Pivot: {x: 0.5, y: 0.5} 42 | --- !u!222 &6490706928186325968 43 | CanvasRenderer: 44 | m_ObjectHideFlags: 0 45 | m_CorrespondingSourceObject: {fileID: 0} 46 | m_PrefabInstance: {fileID: 0} 47 | m_PrefabAsset: {fileID: 0} 48 | m_GameObject: {fileID: 6137921099632638934} 49 | m_CullTransparentMesh: 1 50 | --- !u!114 &570774262892799599 51 | MonoBehaviour: 52 | m_ObjectHideFlags: 0 53 | m_CorrespondingSourceObject: {fileID: 0} 54 | m_PrefabInstance: {fileID: 0} 55 | m_PrefabAsset: {fileID: 0} 56 | m_GameObject: {fileID: 6137921099632638934} 57 | m_Enabled: 1 58 | m_EditorHideFlags: 0 59 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 60 | m_Name: 61 | m_EditorClassIdentifier: 62 | m_Material: {fileID: 0} 63 | m_Color: {r: 1, g: 0, b: 0.5458698, a: 1} 64 | m_RaycastTarget: 1 65 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 66 | m_Maskable: 1 67 | m_OnCullStateChanged: 68 | m_PersistentCalls: 69 | m_Calls: [] 70 | m_Sprite: {fileID: 0} 71 | m_Type: 0 72 | m_PreserveAspect: 0 73 | m_FillCenter: 1 74 | m_FillMethod: 4 75 | m_FillAmount: 1 76 | m_FillClockwise: 1 77 | m_FillOrigin: 0 78 | m_UseSpriteMesh: 0 79 | m_PixelsPerUnitMultiplier: 1 80 | --- !u!1 &6738031496189894061 81 | GameObject: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | serializedVersion: 6 87 | m_Component: 88 | - component: {fileID: 2372182626392270488} 89 | - component: {fileID: 857082782510381915} 90 | - component: {fileID: 1677703148358668360} 91 | m_Layer: 5 92 | m_Name: Text 93 | m_TagString: Untagged 94 | m_Icon: {fileID: 0} 95 | m_NavMeshLayer: 0 96 | m_StaticEditorFlags: 0 97 | m_IsActive: 1 98 | --- !u!224 &2372182626392270488 99 | RectTransform: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 6738031496189894061} 105 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 106 | m_LocalPosition: {x: 0, y: 0, z: 0} 107 | m_LocalScale: {x: 1, y: 1, z: 1} 108 | m_ConstrainProportionsScale: 0 109 | m_Children: [] 110 | m_Father: {fileID: 4461991498135571732} 111 | m_RootOrder: 0 112 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 113 | m_AnchorMin: {x: 0.5, y: 0.5} 114 | m_AnchorMax: {x: 0.5, y: 0.5} 115 | m_AnchoredPosition: {x: 12, y: 0} 116 | m_SizeDelta: {x: 100, y: 30} 117 | m_Pivot: {x: 0, y: 0.5} 118 | --- !u!222 &857082782510381915 119 | CanvasRenderer: 120 | m_ObjectHideFlags: 0 121 | m_CorrespondingSourceObject: {fileID: 0} 122 | m_PrefabInstance: {fileID: 0} 123 | m_PrefabAsset: {fileID: 0} 124 | m_GameObject: {fileID: 6738031496189894061} 125 | m_CullTransparentMesh: 1 126 | --- !u!114 &1677703148358668360 127 | MonoBehaviour: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_GameObject: {fileID: 6738031496189894061} 133 | m_Enabled: 1 134 | m_EditorHideFlags: 0 135 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 136 | m_Name: 137 | m_EditorClassIdentifier: 138 | m_Material: {fileID: 0} 139 | m_Color: {r: 1, g: 0, b: 0.5458698, a: 1} 140 | m_RaycastTarget: 1 141 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 142 | m_Maskable: 1 143 | m_OnCullStateChanged: 144 | m_PersistentCalls: 145 | m_Calls: [] 146 | m_FontData: 147 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 148 | m_FontSize: 12 149 | m_FontStyle: 0 150 | m_BestFit: 0 151 | m_MinSize: 1 152 | m_MaxSize: 40 153 | m_Alignment: 3 154 | m_AlignByGeometry: 0 155 | m_RichText: 1 156 | m_HorizontalOverflow: 0 157 | m_VerticalOverflow: 0 158 | m_LineSpacing: 1 159 | m_Text: 'Name 160 | 161 | 1.000' 162 | -------------------------------------------------------------------------------- /Assets/Keypoints/KeypointMarker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eee3f1712c0734bd3be7bea414530f1b 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Keypoints/KeypointViewer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UI = UnityEngine.UI; 3 | using Klak.TestTools; 4 | using BodyPix; 5 | 6 | public sealed class KeypointViewer : MonoBehaviour 7 | { 8 | [SerializeField] ImageSource _source = null; 9 | [SerializeField] ResourceSet _resources = null; 10 | [SerializeField] Vector2Int _resolution = new Vector2Int(512, 384); 11 | [SerializeField] UI.RawImage _previewUI = null; 12 | [SerializeField] RectTransform _markerPrefab = null; 13 | 14 | const float ScoreThreshold = 0.3f; 15 | 16 | BodyDetector _detector; 17 | 18 | (RectTransform xform, UI.Text label) [] 19 | _markers = new (RectTransform, UI.Text) [Body.KeypointCount]; 20 | 21 | void Start() 22 | { 23 | // BodyPix detector initialization 24 | _detector = new BodyDetector(_resources, _resolution.x, _resolution.y); 25 | 26 | // Marker population 27 | for (var i = 0; i < Body.KeypointCount; i++) 28 | { 29 | var xform = Instantiate(_markerPrefab, _previewUI.transform); 30 | _markers[i] = (xform, xform.GetComponentInChildren()); 31 | } 32 | } 33 | 34 | void OnDestroy() 35 | => _detector.Dispose(); 36 | 37 | void LateUpdate() 38 | { 39 | // BodyPix detector update 40 | _detector.ProcessImage(_source.AsTexture); 41 | _previewUI.texture = _source.AsTexture; 42 | 43 | // Marker update 44 | var rectSize = _previewUI.rectTransform.rect.size; 45 | for (var i = 0; i < Body.KeypointCount; i++) 46 | { 47 | var key = _detector.Keypoints[i]; 48 | var (xform, label) = _markers[i]; 49 | 50 | // Visibility 51 | var visible = key.Score > ScoreThreshold; 52 | xform.gameObject.SetActive(visible); 53 | if (!visible) continue; 54 | 55 | // Position and label 56 | xform.anchoredPosition = key.Position * rectSize; 57 | label.text = $"{(Body.KeypointID)i}\n{key.Score:0.00}"; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/Keypoints/KeypointViewer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb59fc5f660284b628181a2481152058 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - _source: {instanceID: 0} 8 | - _resources: {fileID: 11400000, guid: c0532b829d2dd49d99fa8e8df757816e, type: 2} 9 | - _previewUI: {instanceID: 0} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /Assets/Pexels.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a6889137fe034e80a07d749c8551831 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Pexels/pexels-fauxels-3184419.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Assets/Pexels/pexels-fauxels-3184419.jpg -------------------------------------------------------------------------------- /Assets/Pexels/pexels-fauxels-3184419.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76fba715a2ca6427bb834088b1b748db 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 1 40 | wrapV: 1 41 | wrapW: 1 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 1 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 2 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: iPhone 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | spriteSheet: 116 | serializedVersion: 2 117 | sprites: [] 118 | outline: [] 119 | physicsShape: [] 120 | bones: [] 121 | spriteID: 5e97eb03825dee720800000000000000 122 | internalID: 0 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | secondaryTextures: [] 128 | nameFileIdTable: {} 129 | spritePackingTag: 130 | pSDRemoveMatte: 0 131 | pSDShowRemoveMatteOption: 0 132 | userData: 133 | assetBundleName: 134 | assetBundleVariant: 135 | -------------------------------------------------------------------------------- /Assets/Pexels/pexels-jack-sparrow-4046265.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Assets/Pexels/pexels-jack-sparrow-4046265.jpg -------------------------------------------------------------------------------- /Assets/Pexels/pexels-jack-sparrow-4046265.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb1cd4376b599471283971a0cf150192 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 1 40 | wrapV: 1 41 | wrapW: 1 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 1 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 2 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: iPhone 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | spriteSheet: 116 | serializedVersion: 2 117 | sprites: [] 118 | outline: [] 119 | physicsShape: [] 120 | bones: [] 121 | spriteID: 5e97eb03825dee720800000000000000 122 | internalID: 0 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | secondaryTextures: [] 128 | nameFileIdTable: {} 129 | spritePackingTag: 130 | pSDRemoveMatte: 0 131 | pSDShowRemoveMatteOption: 0 132 | userData: 133 | assetBundleName: 134 | assetBundleVariant: 135 | -------------------------------------------------------------------------------- /Assets/Pexels/pexels-karolina-grabowska-4378882.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Assets/Pexels/pexels-karolina-grabowska-4378882.jpg -------------------------------------------------------------------------------- /Assets/Pexels/pexels-karolina-grabowska-4378882.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75b2c8951439440f0ae8794aebcbebc1 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | ignoreMasterTextureLimit: 0 28 | grayScaleToAlpha: 0 29 | generateCubemap: 6 30 | cubemapConvolution: 0 31 | seamlessCubemap: 0 32 | textureFormat: 1 33 | maxTextureSize: 2048 34 | textureSettings: 35 | serializedVersion: 2 36 | filterMode: 1 37 | aniso: 1 38 | mipBias: 0 39 | wrapU: 1 40 | wrapV: 1 41 | wrapW: 1 42 | nPOTScale: 0 43 | lightmap: 0 44 | compressionQuality: 50 45 | spriteMode: 1 46 | spriteExtrude: 1 47 | spriteMeshType: 1 48 | alignment: 0 49 | spritePivot: {x: 0.5, y: 0.5} 50 | spritePixelsToUnits: 100 51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 52 | spriteGenerateFallbackPhysicsShape: 1 53 | alphaUsage: 1 54 | alphaIsTransparency: 1 55 | spriteTessellationDetail: -1 56 | textureType: 2 57 | textureShape: 1 58 | singleChannelComponent: 0 59 | flipbookRows: 1 60 | flipbookColumns: 1 61 | maxTextureSizeSet: 0 62 | compressionQualitySet: 0 63 | textureFormatSet: 0 64 | ignorePngGamma: 0 65 | applyGammaDecoding: 0 66 | platformSettings: 67 | - serializedVersion: 3 68 | buildTarget: DefaultTexturePlatform 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | forceMaximumCompressionQuality_BC6H_BC7: 0 79 | - serializedVersion: 3 80 | buildTarget: Standalone 81 | maxTextureSize: 2048 82 | resizeAlgorithm: 0 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 0 89 | androidETC2FallbackOverride: 0 90 | forceMaximumCompressionQuality_BC6H_BC7: 0 91 | - serializedVersion: 3 92 | buildTarget: Server 93 | maxTextureSize: 2048 94 | resizeAlgorithm: 0 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | androidETC2FallbackOverride: 0 102 | forceMaximumCompressionQuality_BC6H_BC7: 0 103 | - serializedVersion: 3 104 | buildTarget: iPhone 105 | maxTextureSize: 2048 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | spriteSheet: 116 | serializedVersion: 2 117 | sprites: [] 118 | outline: [] 119 | physicsShape: [] 120 | bones: [] 121 | spriteID: 5e97eb03825dee720800000000000000 122 | internalID: 0 123 | vertices: [] 124 | indices: 125 | edges: [] 126 | weights: [] 127 | secondaryTextures: [] 128 | nameFileIdTable: {} 129 | spritePackingTag: 130 | pSDRemoveMatte: 0 131 | pSDShowRemoveMatteOption: 0 132 | userData: 133 | assetBundleName: 134 | assetBundleVariant: 135 | -------------------------------------------------------------------------------- /Assets/Visualizer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11832beb8803046fc97747e8c5600d95 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Visualizer.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: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 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 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &55666814 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: 55666817} 135 | - component: {fileID: 55666816} 136 | - component: {fileID: 55666815} 137 | m_Layer: 5 138 | m_Name: Mask 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!114 &55666815 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: 55666814} 151 | m_Enabled: 1 152 | m_EditorHideFlags: 0 153 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 154 | m_Name: 155 | m_EditorClassIdentifier: 156 | m_Material: {fileID: 0} 157 | m_Color: {r: 1, g: 1, b: 1, a: 0.7058824} 158 | m_RaycastTarget: 1 159 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 160 | m_Maskable: 1 161 | m_OnCullStateChanged: 162 | m_PersistentCalls: 163 | m_Calls: [] 164 | m_Texture: {fileID: 0} 165 | m_UVRect: 166 | serializedVersion: 2 167 | x: 0 168 | y: 0 169 | width: 1 170 | height: 1 171 | --- !u!222 &55666816 172 | CanvasRenderer: 173 | m_ObjectHideFlags: 0 174 | m_CorrespondingSourceObject: {fileID: 0} 175 | m_PrefabInstance: {fileID: 0} 176 | m_PrefabAsset: {fileID: 0} 177 | m_GameObject: {fileID: 55666814} 178 | m_CullTransparentMesh: 1 179 | --- !u!224 &55666817 180 | RectTransform: 181 | m_ObjectHideFlags: 0 182 | m_CorrespondingSourceObject: {fileID: 0} 183 | m_PrefabInstance: {fileID: 0} 184 | m_PrefabAsset: {fileID: 0} 185 | m_GameObject: {fileID: 55666814} 186 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 187 | m_LocalPosition: {x: 0, y: 0, z: 0} 188 | m_LocalScale: {x: 1, y: 1, z: 1} 189 | m_ConstrainProportionsScale: 0 190 | m_Children: [] 191 | m_Father: {fileID: 431196468} 192 | m_RootOrder: 1 193 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 194 | m_AnchorMin: {x: 0, y: 0} 195 | m_AnchorMax: {x: 1, y: 1} 196 | m_AnchoredPosition: {x: 0, y: 0} 197 | m_SizeDelta: {x: 0, y: 0} 198 | m_Pivot: {x: 0.5, y: 0.5} 199 | --- !u!1 &251461799 200 | GameObject: 201 | m_ObjectHideFlags: 0 202 | m_CorrespondingSourceObject: {fileID: 0} 203 | m_PrefabInstance: {fileID: 0} 204 | m_PrefabAsset: {fileID: 0} 205 | serializedVersion: 6 206 | m_Component: 207 | - component: {fileID: 251461802} 208 | - component: {fileID: 251461801} 209 | - component: {fileID: 251461800} 210 | m_Layer: 0 211 | m_Name: Visualizer 212 | m_TagString: Untagged 213 | m_Icon: {fileID: 0} 214 | m_NavMeshLayer: 0 215 | m_StaticEditorFlags: 0 216 | m_IsActive: 1 217 | --- !u!114 &251461800 218 | MonoBehaviour: 219 | m_ObjectHideFlags: 0 220 | m_CorrespondingSourceObject: {fileID: 0} 221 | m_PrefabInstance: {fileID: 0} 222 | m_PrefabAsset: {fileID: 0} 223 | m_GameObject: {fileID: 251461799} 224 | m_Enabled: 1 225 | m_EditorHideFlags: 0 226 | m_Script: {fileID: 11500000, guid: 6c0bbc86f6a7e4823b75052870c81cea, type: 3} 227 | m_Name: 228 | m_EditorClassIdentifier: 229 | _source: {fileID: 251461801} 230 | _resources: {fileID: 11400000, guid: c0532b829d2dd49d99fa8e8df757816e, type: 2} 231 | _resolution: {x: 512, y: 384} 232 | _previewUI: {fileID: 1869171756} 233 | _maskUI: {fileID: 55666815} 234 | _drawSkeleton: 1 235 | _shader: {fileID: 4800000, guid: 5dd7f5d1206004095a1ccf893c31eac8, type: 3} 236 | --- !u!114 &251461801 237 | MonoBehaviour: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | m_GameObject: {fileID: 251461799} 243 | m_Enabled: 1 244 | m_EditorHideFlags: 0 245 | m_Script: {fileID: 11500000, guid: 40ff2e515a81541cbb664860588e2c6e, type: 3} 246 | m_Name: 247 | m_EditorClassIdentifier: 248 | _sourceType: 0 249 | _texture: {fileID: 2800000, guid: 75b2c8951439440f0ae8794aebcbebc1, type: 3} 250 | _textureUrl: 251 | _video: {fileID: 0} 252 | _videoUrl: file://Test2.mp4 253 | _webcamName: 254 | _webcamResolution: {x: 1920, y: 1080} 255 | _webcamFrameRate: 30 256 | _outputTexture: {fileID: 0} 257 | _outputResolution: {x: 1440, y: 1080} 258 | _shader: {fileID: 4800000, guid: 3f7d8db4748f54c638a46cec0b0e61f8, type: 3} 259 | --- !u!4 &251461802 260 | Transform: 261 | m_ObjectHideFlags: 0 262 | m_CorrespondingSourceObject: {fileID: 0} 263 | m_PrefabInstance: {fileID: 0} 264 | m_PrefabAsset: {fileID: 0} 265 | m_GameObject: {fileID: 251461799} 266 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 267 | m_LocalPosition: {x: 0, y: 0, z: 0} 268 | m_LocalScale: {x: 1, y: 1, z: 1} 269 | m_ConstrainProportionsScale: 0 270 | m_Children: [] 271 | m_Father: {fileID: 0} 272 | m_RootOrder: 2 273 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 274 | --- !u!1 &274663181 275 | GameObject: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | serializedVersion: 6 281 | m_Component: 282 | - component: {fileID: 274663183} 283 | - component: {fileID: 274663182} 284 | m_Layer: 0 285 | m_Name: Main Camera 286 | m_TagString: MainCamera 287 | m_Icon: {fileID: 0} 288 | m_NavMeshLayer: 0 289 | m_StaticEditorFlags: 0 290 | m_IsActive: 1 291 | --- !u!20 &274663182 292 | Camera: 293 | m_ObjectHideFlags: 0 294 | m_CorrespondingSourceObject: {fileID: 0} 295 | m_PrefabInstance: {fileID: 0} 296 | m_PrefabAsset: {fileID: 0} 297 | m_GameObject: {fileID: 274663181} 298 | m_Enabled: 1 299 | serializedVersion: 2 300 | m_ClearFlags: 2 301 | m_BackGroundColor: {r: 0, g: 0.058700204, b: 0.1509434, a: 0} 302 | m_projectionMatrixMode: 1 303 | m_GateFitMode: 2 304 | m_FOVAxisMode: 0 305 | m_SensorSize: {x: 36, y: 24} 306 | m_LensShift: {x: 0, y: 0} 307 | m_FocalLength: 50 308 | m_NormalizedViewPortRect: 309 | serializedVersion: 2 310 | x: 0 311 | y: 0 312 | width: 1 313 | height: 1 314 | near clip plane: 0.1 315 | far clip plane: 100 316 | field of view: 60 317 | orthographic: 1 318 | orthographic size: 0.5 319 | m_Depth: 0 320 | m_CullingMask: 321 | serializedVersion: 2 322 | m_Bits: 4294967295 323 | m_RenderingPath: 1 324 | m_TargetTexture: {fileID: 0} 325 | m_TargetDisplay: 0 326 | m_TargetEye: 3 327 | m_HDR: 0 328 | m_AllowMSAA: 0 329 | m_AllowDynamicResolution: 0 330 | m_ForceIntoRT: 0 331 | m_OcclusionCulling: 0 332 | m_StereoConvergence: 10 333 | m_StereoSeparation: 0.022 334 | --- !u!4 &274663183 335 | Transform: 336 | m_ObjectHideFlags: 0 337 | m_CorrespondingSourceObject: {fileID: 0} 338 | m_PrefabInstance: {fileID: 0} 339 | m_PrefabAsset: {fileID: 0} 340 | m_GameObject: {fileID: 274663181} 341 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 342 | m_LocalPosition: {x: 0, y: 0, z: 0} 343 | m_LocalScale: {x: 1, y: 1, z: 1} 344 | m_ConstrainProportionsScale: 0 345 | m_Children: [] 346 | m_Father: {fileID: 0} 347 | m_RootOrder: 0 348 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 349 | --- !u!1 &431196467 350 | GameObject: 351 | m_ObjectHideFlags: 0 352 | m_CorrespondingSourceObject: {fileID: 0} 353 | m_PrefabInstance: {fileID: 0} 354 | m_PrefabAsset: {fileID: 0} 355 | serializedVersion: 6 356 | m_Component: 357 | - component: {fileID: 431196468} 358 | - component: {fileID: 431196470} 359 | - component: {fileID: 431196471} 360 | m_Layer: 5 361 | m_Name: View 362 | m_TagString: Untagged 363 | m_Icon: {fileID: 0} 364 | m_NavMeshLayer: 0 365 | m_StaticEditorFlags: 0 366 | m_IsActive: 1 367 | --- !u!224 &431196468 368 | RectTransform: 369 | m_ObjectHideFlags: 0 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInstance: {fileID: 0} 372 | m_PrefabAsset: {fileID: 0} 373 | m_GameObject: {fileID: 431196467} 374 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 375 | m_LocalPosition: {x: 0, y: 0, z: 0} 376 | m_LocalScale: {x: 1, y: 1, z: 1} 377 | m_ConstrainProportionsScale: 0 378 | m_Children: 379 | - {fileID: 1869171754} 380 | - {fileID: 55666817} 381 | m_Father: {fileID: 1339821705} 382 | m_RootOrder: 0 383 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 384 | m_AnchorMin: {x: 0, y: 0} 385 | m_AnchorMax: {x: 1, y: 1} 386 | m_AnchoredPosition: {x: 0, y: 0} 387 | m_SizeDelta: {x: 0, y: 0} 388 | m_Pivot: {x: 0.5, y: 0.5} 389 | --- !u!222 &431196470 390 | CanvasRenderer: 391 | m_ObjectHideFlags: 0 392 | m_CorrespondingSourceObject: {fileID: 0} 393 | m_PrefabInstance: {fileID: 0} 394 | m_PrefabAsset: {fileID: 0} 395 | m_GameObject: {fileID: 431196467} 396 | m_CullTransparentMesh: 1 397 | --- !u!114 &431196471 398 | MonoBehaviour: 399 | m_ObjectHideFlags: 0 400 | m_CorrespondingSourceObject: {fileID: 0} 401 | m_PrefabInstance: {fileID: 0} 402 | m_PrefabAsset: {fileID: 0} 403 | m_GameObject: {fileID: 431196467} 404 | m_Enabled: 1 405 | m_EditorHideFlags: 0 406 | m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} 407 | m_Name: 408 | m_EditorClassIdentifier: 409 | m_AspectMode: 2 410 | m_AspectRatio: 1.3333334 411 | --- !u!1 &1339821701 412 | GameObject: 413 | m_ObjectHideFlags: 0 414 | m_CorrespondingSourceObject: {fileID: 0} 415 | m_PrefabInstance: {fileID: 0} 416 | m_PrefabAsset: {fileID: 0} 417 | serializedVersion: 6 418 | m_Component: 419 | - component: {fileID: 1339821705} 420 | - component: {fileID: 1339821704} 421 | - component: {fileID: 1339821703} 422 | - component: {fileID: 1339821702} 423 | m_Layer: 5 424 | m_Name: Canvas 425 | m_TagString: Untagged 426 | m_Icon: {fileID: 0} 427 | m_NavMeshLayer: 0 428 | m_StaticEditorFlags: 0 429 | m_IsActive: 1 430 | --- !u!114 &1339821702 431 | MonoBehaviour: 432 | m_ObjectHideFlags: 0 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInstance: {fileID: 0} 435 | m_PrefabAsset: {fileID: 0} 436 | m_GameObject: {fileID: 1339821701} 437 | m_Enabled: 1 438 | m_EditorHideFlags: 0 439 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 440 | m_Name: 441 | m_EditorClassIdentifier: 442 | m_IgnoreReversedGraphics: 1 443 | m_BlockingObjects: 0 444 | m_BlockingMask: 445 | serializedVersion: 2 446 | m_Bits: 4294967295 447 | --- !u!114 &1339821703 448 | MonoBehaviour: 449 | m_ObjectHideFlags: 0 450 | m_CorrespondingSourceObject: {fileID: 0} 451 | m_PrefabInstance: {fileID: 0} 452 | m_PrefabAsset: {fileID: 0} 453 | m_GameObject: {fileID: 1339821701} 454 | m_Enabled: 1 455 | m_EditorHideFlags: 0 456 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 457 | m_Name: 458 | m_EditorClassIdentifier: 459 | m_UiScaleMode: 0 460 | m_ReferencePixelsPerUnit: 100 461 | m_ScaleFactor: 1 462 | m_ReferenceResolution: {x: 800, y: 600} 463 | m_ScreenMatchMode: 0 464 | m_MatchWidthOrHeight: 0 465 | m_PhysicalUnit: 3 466 | m_FallbackScreenDPI: 96 467 | m_DefaultSpriteDPI: 96 468 | m_DynamicPixelsPerUnit: 1 469 | m_PresetInfoIsWorld: 0 470 | --- !u!223 &1339821704 471 | Canvas: 472 | m_ObjectHideFlags: 0 473 | m_CorrespondingSourceObject: {fileID: 0} 474 | m_PrefabInstance: {fileID: 0} 475 | m_PrefabAsset: {fileID: 0} 476 | m_GameObject: {fileID: 1339821701} 477 | m_Enabled: 1 478 | serializedVersion: 3 479 | m_RenderMode: 1 480 | m_Camera: {fileID: 274663182} 481 | m_PlaneDistance: 100 482 | m_PixelPerfect: 0 483 | m_ReceivesEvents: 1 484 | m_OverrideSorting: 0 485 | m_OverridePixelPerfect: 0 486 | m_SortingBucketNormalizedSize: 0 487 | m_AdditionalShaderChannelsFlag: 0 488 | m_SortingLayerID: 0 489 | m_SortingOrder: 0 490 | m_TargetDisplay: 0 491 | --- !u!224 &1339821705 492 | RectTransform: 493 | m_ObjectHideFlags: 0 494 | m_CorrespondingSourceObject: {fileID: 0} 495 | m_PrefabInstance: {fileID: 0} 496 | m_PrefabAsset: {fileID: 0} 497 | m_GameObject: {fileID: 1339821701} 498 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 499 | m_LocalPosition: {x: 0, y: 0, z: 0} 500 | m_LocalScale: {x: 0, y: 0, z: 0} 501 | m_ConstrainProportionsScale: 0 502 | m_Children: 503 | - {fileID: 431196468} 504 | m_Father: {fileID: 0} 505 | m_RootOrder: 1 506 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 507 | m_AnchorMin: {x: 0, y: 0} 508 | m_AnchorMax: {x: 0, y: 0} 509 | m_AnchoredPosition: {x: 0, y: 0} 510 | m_SizeDelta: {x: 0, y: 0} 511 | m_Pivot: {x: 0, y: 0} 512 | --- !u!1 &1869171753 513 | GameObject: 514 | m_ObjectHideFlags: 0 515 | m_CorrespondingSourceObject: {fileID: 0} 516 | m_PrefabInstance: {fileID: 0} 517 | m_PrefabAsset: {fileID: 0} 518 | serializedVersion: 6 519 | m_Component: 520 | - component: {fileID: 1869171754} 521 | - component: {fileID: 1869171755} 522 | - component: {fileID: 1869171756} 523 | m_Layer: 5 524 | m_Name: Preview 525 | m_TagString: Untagged 526 | m_Icon: {fileID: 0} 527 | m_NavMeshLayer: 0 528 | m_StaticEditorFlags: 0 529 | m_IsActive: 1 530 | --- !u!224 &1869171754 531 | RectTransform: 532 | m_ObjectHideFlags: 0 533 | m_CorrespondingSourceObject: {fileID: 0} 534 | m_PrefabInstance: {fileID: 0} 535 | m_PrefabAsset: {fileID: 0} 536 | m_GameObject: {fileID: 1869171753} 537 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 538 | m_LocalPosition: {x: 0, y: 0, z: 0} 539 | m_LocalScale: {x: 1, y: 1, z: 1} 540 | m_ConstrainProportionsScale: 0 541 | m_Children: [] 542 | m_Father: {fileID: 431196468} 543 | m_RootOrder: 0 544 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 545 | m_AnchorMin: {x: 0, y: 0} 546 | m_AnchorMax: {x: 1, y: 1} 547 | m_AnchoredPosition: {x: 0, y: 0} 548 | m_SizeDelta: {x: 0, y: 0} 549 | m_Pivot: {x: 0.5, y: 0.5} 550 | --- !u!222 &1869171755 551 | CanvasRenderer: 552 | m_ObjectHideFlags: 0 553 | m_CorrespondingSourceObject: {fileID: 0} 554 | m_PrefabInstance: {fileID: 0} 555 | m_PrefabAsset: {fileID: 0} 556 | m_GameObject: {fileID: 1869171753} 557 | m_CullTransparentMesh: 1 558 | --- !u!114 &1869171756 559 | MonoBehaviour: 560 | m_ObjectHideFlags: 0 561 | m_CorrespondingSourceObject: {fileID: 0} 562 | m_PrefabInstance: {fileID: 0} 563 | m_PrefabAsset: {fileID: 0} 564 | m_GameObject: {fileID: 1869171753} 565 | m_Enabled: 1 566 | m_EditorHideFlags: 0 567 | m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} 568 | m_Name: 569 | m_EditorClassIdentifier: 570 | m_Material: {fileID: 0} 571 | m_Color: {r: 1, g: 1, b: 1, a: 1} 572 | m_RaycastTarget: 1 573 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 574 | m_Maskable: 1 575 | m_OnCullStateChanged: 576 | m_PersistentCalls: 577 | m_Calls: [] 578 | m_Texture: {fileID: 0} 579 | m_UVRect: 580 | serializedVersion: 2 581 | x: 0 582 | y: 0 583 | width: 1 584 | height: 1 585 | -------------------------------------------------------------------------------- /Assets/Visualizer.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48ec58351d355467b959abe74cef934c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Visualizer/Visualizer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using Klak.TestTools; 4 | using BodyPix; 5 | 6 | public sealed class Visualizer : MonoBehaviour 7 | { 8 | [SerializeField] ImageSource _source = null; 9 | [SerializeField] ResourceSet _resources = null; 10 | [SerializeField] Vector2Int _resolution = new Vector2Int(512, 384); 11 | [SerializeField] RawImage _previewUI = null; 12 | [SerializeField] RawImage _maskUI = null; 13 | [SerializeField] bool _drawSkeleton = false; 14 | [SerializeField] Shader _shader = null; 15 | 16 | BodyDetector _detector; 17 | Material _material; 18 | RenderTexture _mask; 19 | 20 | void Start() 21 | { 22 | _detector = new BodyDetector(_resources, _resolution.x, _resolution.y); 23 | 24 | _material = new Material(_shader); 25 | 26 | var reso = _source.OutputResolution; 27 | _mask = new RenderTexture(reso.x, reso.y, 0); 28 | _maskUI.texture = _mask; 29 | } 30 | 31 | void OnDestroy() 32 | { 33 | _detector.Dispose(); 34 | Destroy(_material); 35 | Destroy(_mask); 36 | } 37 | 38 | void LateUpdate() 39 | { 40 | _detector.ProcessImage(_source.AsTexture); 41 | _previewUI.texture = _source.AsTexture; 42 | 43 | Graphics.Blit(_detector.MaskTexture, _mask, _material, 0); 44 | } 45 | 46 | void OnRenderObject() 47 | { 48 | if (!_drawSkeleton) return; 49 | 50 | _material.SetBuffer("_Keypoints", _detector.KeypointBuffer); 51 | _material.SetFloat("_Aspect", (float)_resolution.x / _resolution.y); 52 | 53 | _material.SetPass(1); 54 | Graphics.DrawProceduralNow 55 | (MeshTopology.Triangles, 6, Body.KeypointCount); 56 | 57 | _material.SetPass(2); 58 | Graphics.DrawProceduralNow(MeshTopology.Lines, 2, 12); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/Visualizer/Visualizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c0bbc86f6a7e4823b75052870c81cea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - _source: {instanceID: 0} 8 | - _resources: {fileID: 11400000, guid: c0532b829d2dd49d99fa8e8df757816e, type: 2} 9 | - _previewUI: {instanceID: 0} 10 | - _stencilUI: {instanceID: 0} 11 | - _shader: {fileID: 4800000, guid: 5dd7f5d1206004095a1ccf893c31eac8, type: 3} 12 | executionOrder: 0 13 | icon: {instanceID: 0} 14 | userData: 15 | assetBundleName: 16 | assetBundleVariant: 17 | -------------------------------------------------------------------------------- /Assets/Visualizer/Visualizer.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BodyPix/Visualizer" 2 | { 3 | Properties 4 | { 5 | _MainTex("", 2D) = "black" {} 6 | } 7 | 8 | CGINCLUDE 9 | 10 | #include "UnityCG.cginc" 11 | #include "Packages/jp.keijiro.bodypix/Shaders/Common.hlsl" 12 | 13 | float3 HueToRGB(float h) 14 | { 15 | h = frac(saturate(h)) * 6 - 2; 16 | float3 c = saturate(float3(abs(h - 1) - 1, 2 - abs(h), 2 - abs(h - 2))); 17 | #ifndef UNITY_COLORSPACE_GAMMA 18 | c = GammaToLinearSpace(c); 19 | #endif 20 | return c; 21 | } 22 | 23 | // 24 | // Mask 25 | // 26 | 27 | texture2D _MainTex; 28 | float4 _MainTex_TexelSize; 29 | 30 | void VertexMask(float4 position : POSITION, 31 | float2 texCoord : TEXCOORD, 32 | out float4 outPosition : SV_Position, 33 | out float2 outTexCoord : TEXCOORD) 34 | { 35 | outPosition = UnityObjectToClipPos(position); 36 | outTexCoord = texCoord; 37 | } 38 | 39 | float4 FragmentMask(float4 position : SV_Position, 40 | float2 texCoord : TEXCOORD) : SV_Target 41 | { 42 | BodyPix_Mask mask = 43 | BodyPix_SampleMask(texCoord, _MainTex, _MainTex_TexelSize.zw); 44 | 45 | float3 acc = 0; 46 | for (uint part = 0; part < BODYPIX_PART_COUNT; part++) 47 | { 48 | float score = BodyPix_EvalPart(mask, part); 49 | score = smoothstep(0.47, 0.57, score); 50 | acc += HueToRGB((float)part / BODYPIX_PART_COUNT) * score; 51 | } 52 | 53 | float alpha = BodyPix_EvalSegmentation(mask); 54 | alpha = smoothstep(0.47, 0.57, alpha); 55 | 56 | return float4(acc, alpha); 57 | } 58 | 59 | // 60 | // Keypoints 61 | // 62 | 63 | StructuredBuffer _Keypoints; 64 | float _Aspect; 65 | 66 | void VertexKeypoints(uint vid : SV_VertexID, 67 | uint iid : SV_InstanceID, 68 | out float4 position : SV_Position, 69 | out float4 color : COLOR) 70 | { 71 | float4 key = _Keypoints[iid]; 72 | 73 | const float threshold = 0.5; 74 | float alpha = saturate((key.z - threshold) / (1 - threshold)); 75 | 76 | float x = lerp(-0.5, 0.5, key.x) * _Aspect; 77 | float y = lerp(-0.5, 0.5, key.y); 78 | 79 | float vx = lerp(-0.5, 0.5, vid & 1); 80 | float vy = lerp(-0.5, 0.5, vid < 2 || vid == 5); 81 | 82 | vx *= 0.015 * alpha; 83 | vy *= 0.015 * alpha; 84 | 85 | position = UnityObjectToClipPos(float4(x + vx, y + vy, 1, 1)); 86 | color = float4(1, 1, 0, alpha); 87 | } 88 | 89 | float4 FragmentKeypoints(float4 position : SV_Position, 90 | float4 color : COLOR) : SV_Target 91 | { 92 | return color; 93 | } 94 | 95 | // 96 | // Bones 97 | // 98 | 99 | static const uint bone_connections[12][2] = 100 | { 101 | { BODYPIX_KEYPOINT_LEFT_HIP, BODYPIX_KEYPOINT_LEFT_SHOULDER }, 102 | { BODYPIX_KEYPOINT_LEFT_ELBOW, BODYPIX_KEYPOINT_LEFT_SHOULDER }, 103 | { BODYPIX_KEYPOINT_LEFT_ELBOW, BODYPIX_KEYPOINT_LEFT_WRIST }, 104 | { BODYPIX_KEYPOINT_LEFT_HIP, BODYPIX_KEYPOINT_LEFT_KNEE }, 105 | { BODYPIX_KEYPOINT_LEFT_KNEE, BODYPIX_KEYPOINT_LEFT_ANKLE }, 106 | 107 | { BODYPIX_KEYPOINT_RIGHT_HIP, BODYPIX_KEYPOINT_RIGHT_SHOULDER }, 108 | { BODYPIX_KEYPOINT_RIGHT_ELBOW, BODYPIX_KEYPOINT_RIGHT_SHOULDER }, 109 | { BODYPIX_KEYPOINT_RIGHT_ELBOW, BODYPIX_KEYPOINT_RIGHT_WRIST }, 110 | { BODYPIX_KEYPOINT_RIGHT_HIP, BODYPIX_KEYPOINT_RIGHT_KNEE }, 111 | { BODYPIX_KEYPOINT_RIGHT_KNEE, BODYPIX_KEYPOINT_RIGHT_ANKLE }, 112 | 113 | { BODYPIX_KEYPOINT_LEFT_SHOULDER, BODYPIX_KEYPOINT_RIGHT_SHOULDER }, 114 | { BODYPIX_KEYPOINT_LEFT_HIP, BODYPIX_KEYPOINT_RIGHT_HIP } 115 | }; 116 | 117 | void VertexBones(uint vid : SV_VertexID, 118 | uint iid : SV_InstanceID, 119 | out float4 position : SV_Position, 120 | out float4 color : COLOR) 121 | { 122 | float4 key = _Keypoints[bone_connections[iid][vid]]; 123 | 124 | float x = lerp(-0.5, 0.5, key.x) * _Aspect; 125 | float y = lerp(-0.5, 0.5, key.y); 126 | 127 | const float threshold = 0.3; 128 | bool mask = key.z > threshold; 129 | 130 | position = UnityObjectToClipPos(float4(x, y, 1, 1)); 131 | color = float4(1, 1, 0, mask); 132 | } 133 | 134 | float4 FragmentBones(float4 position : SV_Position, 135 | float4 color : COLOR) : SV_Target 136 | { 137 | clip(color.a - 1); 138 | return color; 139 | } 140 | 141 | ENDCG 142 | 143 | SubShader 144 | { 145 | Pass 146 | { 147 | ZTest Always ZWrite Off Cull Off 148 | CGPROGRAM 149 | #pragma vertex VertexMask 150 | #pragma fragment FragmentMask 151 | ENDCG 152 | } 153 | 154 | Pass 155 | { 156 | ZTest Always ZWrite Off Cull Off 157 | CGPROGRAM 158 | #pragma vertex VertexKeypoints 159 | #pragma fragment FragmentKeypoints 160 | ENDCG 161 | } 162 | 163 | Pass 164 | { 165 | ZTest Always ZWrite Off Cull Off 166 | CGPROGRAM 167 | #pragma vertex VertexBones 168 | #pragma fragment FragmentBones 169 | ENDCG 170 | } 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /Assets/Visualizer/Visualizer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dd7f5d1206004095a1ccf893c31eac8 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 091e83afb9baf4e2cad2ab1322bb73b1 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6abc5afe43fa542dbba244d9a527f7d4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride16.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride16.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride16.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8224a9ba0d1ad4bfc837849d8fe480df 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride8.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride8.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x050-stride8.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 490a5e014f863482eac1fb9272eb5c63 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride16.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride16.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride16.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6be5a816af0104891ba9bfb808b6fe7c 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride8.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride8.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x075-stride8.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff475820fb5ea4db1b073da3f6892ddb 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride16.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride16.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride16.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0ed4c9940f8c480d822b527e10ed951 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride8.onnx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/BodyPixSentis/28429a7ba0465ab3681dd268f53c333094b80fb9/Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride8.onnx -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ONNX/MobileNetV1-x100-stride8.onnx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787193b38c30245749dadcbe198bdf80 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} 11 | dynamicDimConfigs: 12 | - name: unk__349 13 | size: -1 14 | - name: unk__350 15 | size: -1 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/README.md: -------------------------------------------------------------------------------- 1 | BodyPixSentis 2 | ============= 3 | 4 | ![gif](https://user-images.githubusercontent.com/343936/126066328-9bb01b01-d16f-4a38-8b7e-fb463bd0aac2.gif) 5 | ![gif](https://user-images.githubusercontent.com/343936/126066334-c8d7ea3f-a1b2-49c0-b094-cf55d8f80610.gif) 6 | 7 | **BodyPixSentis** is an implementation of the [BodyPix] person segmentation and pose estimation model 8 | that runs on the [Unity Sentis] neural network inference library. 9 | 10 | [BodyPix]: https://blog.tensorflow.org/2019/11/updated-bodypix-2.html 11 | [Unity Sentis]: https://docs.unity3d.com/Packages/com.unity.sentis@latest 12 | 13 | System requirements 14 | ------------------- 15 | 16 | - Unity 2020.3 LTS or later 17 | 18 | About the ONNX file 19 | ------------------- 20 | 21 | I converted the original BodyPix model (provided as tfjs) into ONNX using tfjs-to-tf and tf2onnx. 22 | See [the Colab notebook] for further details. 23 | 24 | [tfjs-to-tf]: https://github.com/patlevin/tfjs-to-tf 25 | [tf2onnx]: https://github.com/onnx/tensorflow-onnx 26 | [the Colab notebook]: 27 | https://colab.research.google.com/drive/1ikOMoqOX7TSBNId0lGaQ_kIyDF2GV3M3?usp=sharing 28 | 29 | ResNet support 30 | -------------- 31 | 32 | This package supports the ResNet architecture (more accurate but slower and bigger models) 33 | but doesn't contain those ONNX files due to the file size limit of GitHub and npm.js. 34 | You can download them from [here][ResNetZip] instead. 35 | 36 | To use those models, create a new BodyPix ResourceSet file and set the model, architecture, 37 | and stride fields accordingly. 38 | 39 | ![ResNet50](https://user-images.githubusercontent.com/343936/127449759-a5294794-4a60-454c-8f9d-7899c14b0d48.png) 40 | 41 | [ResNetZip]: 42 | https://github.com/keijiro/BodyPixSentis/releases/download/1.0.3/ResNet50Models.zip 43 | 44 | How to install 45 | -------------- 46 | 47 | This package uses the [scoped registry] feature to resolve package 48 | dependencies. Open the Package Manager page in the Project Settings window and 49 | add the following entry to the Scoped Registries list: 50 | 51 | - Name: `Keijiro` 52 | - URL: `https://registry.npmjs.com` 53 | - Scope: `jp.keijiro` 54 | 55 | ![Scoped Registry](https://user-images.githubusercontent.com/343936/162576797-ae39ee00-cb40-4312-aacd-3247077e7fa1.png) 56 | 57 | Now you can install the package from My Registries page in the Package Manager 58 | window. 59 | 60 | ![My Registries](https://user-images.githubusercontent.com/343936/162576825-4a9a443d-62f9-48d3-8a82-a3e80b486f04.png) 61 | 62 | [scoped registry]: https://docs.unity3d.com/Manual/upm-scoped.html 63 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96929e774aaaf4b6495fe0cb329bce90 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d90669a815a2b49cd91e83ed37bc2301 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x050-stride16.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x050-stride16 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: 8224a9ba0d1ad4bfc837849d8fe480df, type: 3} 16 | architecture: 0 17 | stride: 16 18 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 19 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 20 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x050-stride16.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f407a69dfb2e1e48a0b559630c28676 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x050-stride8.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x050-stride8 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: 490a5e014f863482eac1fb9272eb5c63, type: 3} 16 | architecture: 0 17 | stride: 8 18 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 19 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 20 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x050-stride8.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f9330a89914fac438cb63225f3b6e25 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x075-stride16.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x075-stride16 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: 6be5a816af0104891ba9bfb808b6fe7c, type: 3} 16 | architecture: 0 17 | stride: 16 18 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 19 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 20 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x075-stride16.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61eaffbefe8a3de4da0adf1edb9161f6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x075-stride8.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x075-stride8 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: ff475820fb5ea4db1b073da3f6892ddb, type: 3} 16 | stride: 8 17 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 18 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 19 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 20 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x075-stride8.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0532b829d2dd49d99fa8e8df757816e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x100-stride16.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x100-stride16 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: e0ed4c9940f8c480d822b527e10ed951, type: 3} 16 | architecture: 0 17 | stride: 16 18 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 19 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 20 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x100-stride16.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e52c12e9e5e58d14da0ca9006fdba3ca 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x100-stride8.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 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: 11500000, guid: 62094df5cdd6f4765bcccbee1a67fe06, type: 3} 13 | m_Name: MobileNetV1-x100-stride8 14 | m_EditorClassIdentifier: 15 | model: {fileID: 5022602860645237092, guid: 787193b38c30245749dadcbe198bdf80, type: 3} 16 | architecture: 0 17 | stride: 8 18 | preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 19 | mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 20 | keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/ResourceSet/MobileNetV1-x100-stride8.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0378911aec1c0b6419ce46ea55d2b844 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4fbafb78eee54f138832a62fa81cd0f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/Body.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using UnityEngine; 3 | 4 | namespace BodyPix { 5 | 6 | public static class Body 7 | { 8 | public const int PartCount = 24; 9 | public const int KeypointCount = 17; 10 | 11 | public enum KeypointID 12 | { 13 | Nose, 14 | LeftEye, RightEye, 15 | LeftEar, RightEar, 16 | LeftShoulder, RightShoulder, 17 | LeftElbow, RightElbow, 18 | LeftWrist, RightWrist, 19 | LeftHip, RightHip, 20 | LeftKnee, RightKnee, 21 | LeftAnkle, RightAnkle 22 | } 23 | 24 | public enum PartID 25 | { 26 | LeftFace, RightFace, 27 | LeftUpperArmFront, LeftUpperArmBack, 28 | RightUpperArmFront, RightUpperArmBack, 29 | LeftLowerArmFront, LeftLowerArmBack, 30 | RightLowerArmFront, RightLowerArmBack, 31 | LeftHand, RightHand, 32 | TorsoFront, TorsoBack, 33 | LeftUpperLegFront, LeftUpperLegBack, 34 | RightUpperLegFront, RightUpperLegBack, 35 | LeftLowerLegFront, LeftLowerLegBack, 36 | RightLowerLegFront, RightLowerLegBack, 37 | LeftFeet, RightFeet 38 | } 39 | } 40 | 41 | [StructLayout(LayoutKind.Sequential)] 42 | public struct Keypoint 43 | { 44 | public Vector2 Position; 45 | public float Score; 46 | public uint Padding; 47 | } 48 | 49 | } // namespace BodyPix 50 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/Body.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71eab9a72ecbf48e494274ea17fc75b9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/BodyDetector.cs: -------------------------------------------------------------------------------- 1 | using Unity.InferenceEngine; 2 | using UnityEngine; 3 | using Klak.NNUtils; 4 | using Klak.NNUtils.Extensions; 5 | 6 | namespace BodyPix { 7 | 8 | public sealed class BodyDetector : System.IDisposable 9 | { 10 | #region Public methods/properties 11 | 12 | public BodyDetector(ResourceSet resources, int width, int height) 13 | => AllocateObjects(resources, width, height); 14 | 15 | public void Dispose() 16 | => DeallocateObjects(); 17 | 18 | public void ProcessImage(Texture sourceTexture) 19 | => RunModel(sourceTexture); 20 | 21 | public System.ReadOnlySpan Keypoints 22 | => _readCache.Cached; 23 | 24 | public RenderTexture MaskTexture 25 | => _output.mask; 26 | 27 | public GraphicsBuffer KeypointBuffer 28 | => _output.keypoints; 29 | 30 | #endregion 31 | 32 | #region Private objects 33 | 34 | ResourceSet _resources; 35 | Config _config; 36 | Worker _worker; 37 | ImagePreprocess _preprocess; 38 | (RenderTexture mask, GraphicsBuffer keypoints) _output; 39 | BufferReader _readCache; 40 | 41 | void AllocateObjects(ResourceSet resources, int width, int height) 42 | { 43 | _resources = resources; 44 | 45 | // NN model 46 | var model = ModelLoader.Load(_resources.model); 47 | _config = new Config(model, _resources, width, height); 48 | 49 | // GPU worker 50 | _worker = new Worker(model, BackendType.GPUCompute); 51 | 52 | // Preprocessing buffers 53 | _preprocess = new ImagePreprocess(_config.InputWidth, _config.InputHeight) 54 | { ColorCoeffs = _config.PreprocessCoeffs }; 55 | 56 | // Output buffers 57 | _output.mask = RTUtil.NewArgbUav(_config.OutputWidth, _config.OutputHeight); 58 | _output.keypoints = BufferUtil.NewStructured(Body.KeypointCount); 59 | 60 | // Read cache 61 | _readCache = new BufferReader(_output.keypoints, Body.KeypointCount); 62 | } 63 | 64 | void DeallocateObjects() 65 | { 66 | _worker?.Dispose(); 67 | _worker = null; 68 | 69 | _preprocess?.Dispose(); 70 | _preprocess = null; 71 | 72 | RTUtil.Destroy(_output.mask); 73 | _output.keypoints?.Dispose(); 74 | _output = (null, null); 75 | } 76 | 77 | #endregion 78 | 79 | #region Main inference function 80 | 81 | void RunModel(Texture source) 82 | { 83 | // Preprocessing 84 | _preprocess.Dispatch(source, _resources.preprocess); 85 | 86 | // NN worker invocation 87 | _worker.Schedule(_preprocess.Tensor); 88 | 89 | // Postprocessing (mask) 90 | var post1 = _resources.mask; 91 | post1.SetBuffer(0, "Segments", _worker.PeekOutputBuffer("segments")); 92 | post1.SetBuffer(0, "Heatmaps", _worker.PeekOutputBuffer("part_heatmaps")); 93 | post1.SetTexture(0, "Output", _output.mask); 94 | post1.SetInts("InputSize", _config.OutputWidth, _config.OutputHeight); 95 | post1.DispatchThreads(0, _config.OutputWidth, _config.OutputHeight, 1); 96 | 97 | // Postprocessing (keypoints) 98 | var post2 = _resources.keypoints; 99 | post2.SetBuffer(0, "Heatmaps", _worker.PeekOutputBuffer("heatmaps")); 100 | post2.SetBuffer(0, "Offsets", _worker.PeekOutputBuffer("short_offsets")); 101 | post2.SetInts("InputSize", _config.OutputWidth, _config.OutputHeight); 102 | post2.SetInt("Stride", _config.Stride); 103 | post2.SetBuffer(0, "Keypoints", _output.keypoints); 104 | post2.Dispatch(0, 1, 1, 1); 105 | 106 | // Cache data invalidation 107 | _readCache.InvalidateCache(); 108 | } 109 | 110 | #endregion 111 | } 112 | 113 | } // namespace BodyPix 114 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/BodyDetector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2914cc2415694c928e6554f0a8b09f8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/BodyPix.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BodyPix.Runtime", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:63a57c8b658089e49a173b0f0c4870a7", 6 | "GUID:41c681fd50d45474baa3849629cd7f0f" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [], 15 | "versionDefines": [], 16 | "noEngineReferences": false 17 | } -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/BodyPix.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7027f72fdb3424c0c883bb2ae30ba4fb 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/Config.cs: -------------------------------------------------------------------------------- 1 | using Unity.InferenceEngine; 2 | using UnityEngine; 3 | 4 | namespace BodyPix { 5 | 6 | struct Config 7 | { 8 | #region Variables from tensor shapes 9 | 10 | public Architecture Architecture { get; private set; } 11 | public int Stride { get; private set; } 12 | public int InputWidth { get; private set; } 13 | public int InputHeight { get; private set; } 14 | public int OutputWidth { get; private set; } 15 | public int OutputHeight { get; private set; } 16 | 17 | #endregion 18 | 19 | #region Coefficients for preprocessing 20 | 21 | public Vector4 PreprocessCoeffs 22 | => Architecture == Architecture.MobileNetV1 ? 23 | new Vector4(-1, -1, -1, 2) : 24 | new Vector4(-123.15f, -115.90f, -103.06f, 255); 25 | 26 | #endregion 27 | 28 | #region Data size calculation properties 29 | 30 | public int InputFootprint => InputWidth * InputHeight * 3; 31 | 32 | #endregion 33 | 34 | #region Constructor 35 | 36 | public Config(Model model, ResourceSet resources, int width, int height) 37 | { 38 | Architecture = resources.architecture; 39 | Stride = resources.stride; 40 | InputWidth = (width + 15) / 16 * 16 + 1; 41 | InputHeight = (height + 15) / 16 * 16 + 1; 42 | OutputWidth = InputWidth / Stride + 1; 43 | OutputHeight = InputHeight / Stride + 1; 44 | } 45 | 46 | #endregion 47 | } 48 | 49 | } // namespace BodyPix 50 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/Config.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13ee793492b6e4c6e834d08f40bf02c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/ResourceSet.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using Unity.InferenceEngine; 3 | 4 | namespace BodyPix { 5 | 6 | public enum Architecture { MobileNetV1, ResNet50 } 7 | 8 | [CreateAssetMenu(fileName = "BodyPix", 9 | menuName = "ScriptableObjects/BodyPix Resource Set")] 10 | public sealed class ResourceSet : ScriptableObject 11 | { 12 | public ModelAsset model; 13 | public Architecture architecture; 14 | public int stride = 8; 15 | public ComputeShader preprocess; 16 | public ComputeShader mask; 17 | public ComputeShader keypoints; 18 | } 19 | 20 | } // namespace BodyPix 21 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Runtime/ResourceSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62094df5cdd6f4765bcccbee1a67fe06 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: 7 | - model: {fileID: 5022602860645237092, guid: ff475820fb5ea4db1b073da3f6892ddb, type: 3} 8 | - preprocess: {fileID: 7200000, guid: 065b9d2f5e685444881e88945bf0492b, type: 3} 9 | - mask: {fileID: 7200000, guid: c22c946b1ee1744b6b57e01fbedd3fd4, type: 3} 10 | - keypoints: {fileID: 7200000, guid: 7f8a40b27a6624527831abb31e5be62b, type: 3} 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | assetBundleVariant: 16 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a51170137f1fc43c6b41bdd16096986e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Common.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef _BODYPIX_SENTIS_COMMON_H_ 2 | #define _BODYPIX_SENTIS_COMMON_H_ 3 | 4 | // Keypoint IDs 5 | #define BODYPIX_KEYPOINT_NOSE 0 6 | #define BODYPIX_KEYPOINT_LEFT_EYE 1 7 | #define BODYPIX_KEYPOINT_RIGHT_EYE 2 8 | #define BODYPIX_KEYPOINT_LEFT_EAR 3 9 | #define BODYPIX_KEYPOINT_RIGHT_EAR 4 10 | #define BODYPIX_KEYPOINT_LEFT_SHOULDER 5 11 | #define BODYPIX_KEYPOINT_RIGHT_SHOULDER 6 12 | #define BODYPIX_KEYPOINT_LEFT_ELBOW 7 13 | #define BODYPIX_KEYPOINT_RIGHT_ELBOW 8 14 | #define BODYPIX_KEYPOINT_LEFT_WRIST 9 15 | #define BODYPIX_KEYPOINT_RIGHT_WRIST 10 16 | #define BODYPIX_KEYPOINT_LEFT_HIP 11 17 | #define BODYPIX_KEYPOINT_RIGHT_HIP 12 18 | #define BODYPIX_KEYPOINT_LEFT_KNEE 13 19 | #define BODYPIX_KEYPOINT_RIGHT_KNEE 14 20 | #define BODYPIX_KEYPOINT_LEFT_ANKLE 15 21 | #define BODYPIX_KEYPOINT_RIGHT_ANKLE 16 22 | #define BODYPIX_KEYPOINT_COUNT 17 23 | 24 | // Part IDs 25 | #define BODYPIX_PART_LEFT_FACE 0 26 | #define BODYPIX_PART_RIGHT_FACE 1 27 | #define BODYPIX_PART_LEFT_UPPER_ARM_FRONT 2 28 | #define BODYPIX_PART_LEFT_UPPER_ARM_BACK 3 29 | #define BODYPIX_PART_RIGHT_UPPER_ARM_FRONT 4 30 | #define BODYPIX_PART_RIGHT_UPPER_ARM_BACK 5 31 | #define BODYPIX_PART_LEFT_LOWER_ARM_FRONT 6 32 | #define BODYPIX_PART_LEFT_LOWER_ARM_BACK 7 33 | #define BODYPIX_PART_RIGHT_LOWER_ARM_FRONT 8 34 | #define BODYPIX_PART_RIGHT_LOWER_ARM_BACK 9 35 | #define BODYPIX_PART_LEFT_HAND 10 36 | #define BODYPIX_PART_RIGHT_HAND 11 37 | #define BODYPIX_PART_TORSO_FRONT 12 38 | #define BODYPIX_PART_TORSO_BACK 13 39 | #define BODYPIX_PART_LEFT_UPPER_LEG_FRONT 14 40 | #define BODYPIX_PART_LEFT_UPPER_LEG_BACK 15 41 | #define BODYPIX_PART_RIGHT_UPPER_LEG_FRONT 16 42 | #define BODYPIX_PART_RIGHT_UPPER_LEG_BACK 17 43 | #define BODYPIX_PART_LEFT_LOWER_LEG_FRONT 18 44 | #define BODYPIX_PART_LEFT_LOWER_LEG_BACK 19 45 | #define BODYPIX_PART_RIGHT_LOWER_LEG_FRONT 20 46 | #define BODYPIX_PART_RIGHT_LOWER_LEG_BACK 21 47 | #define BODYPIX_PART_LEFT_FEET 22 48 | #define BODYPIX_PART_RIGHT_FEET 23 49 | #define BODYPIX_PART_COUNT 24 50 | 51 | // Sigmoid function 52 | float BodyPix_Sigmoid(float x) 53 | { 54 | return 1 / (1 + exp(-x)); 55 | } 56 | 57 | // 58 | // BodyPix mask data helpers 59 | // 60 | 61 | // Mask data structure 62 | struct BodyPix_Mask 63 | { 64 | // Four samples used for bilinear filtering 65 | float4 segm; // Segmentation 66 | float4 part; // Part 67 | 68 | // Sampling point offset 69 | float2 offs; 70 | }; 71 | 72 | // Sampling function 73 | BodyPix_Mask BodyPix_SampleMask(float2 uv, texture2D tex, uint2 tex_size) 74 | { 75 | float2 coord = max(uv * tex_size - 0.5, 0); 76 | 77 | uint4 idx; 78 | idx.xy = coord; 79 | idx.zw = min(idx.xy + 1, tex_size - 1); 80 | 81 | float2 s00 = tex[idx.xy].xw; 82 | float2 s01 = tex[idx.zy].xw; 83 | float2 s10 = tex[idx.xw].xw; 84 | float2 s11 = tex[idx.zw].xw; 85 | 86 | BodyPix_Mask mask; 87 | mask.segm = float4(s00.y, s01.y, s10.y, s11.y); 88 | mask.part = float4(s00.x, s01.x, s10.x, s11.x); 89 | mask.offs = coord - idx.xy; 90 | return mask; 91 | } 92 | 93 | // Bilinear filtering function 94 | float BodyPix_Bilinear(float4 s, float2 p) 95 | { 96 | return lerp(lerp(s.x, s.y, p.x), lerp(s.z, s.w, p.x), p.y); 97 | } 98 | 99 | // Evaluate a segmentation value of sample data 100 | float BodyPix_EvalSegmentation(const in BodyPix_Mask mask) 101 | { 102 | return BodyPix_Bilinear(mask.segm, mask.offs); 103 | } 104 | 105 | // Evaludate a part value of sample data 106 | float BodyPix_EvalPart(const in BodyPix_Mask mask, uint part_id) 107 | { 108 | uint4 flags = (uint4)(mask.part * BODYPIX_PART_COUNT + 0.5) == part_id; 109 | return BodyPix_Bilinear(flags, mask.offs); 110 | } 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Common.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9770839196540453487752da03b474aa 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Keypoints.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel PostprocessKeypoints 2 | 3 | #include "Common.hlsl" 4 | 5 | // Input 6 | StructuredBuffer Heatmaps; 7 | StructuredBuffer Offsets; 8 | uint2 InputSize; 9 | uint Stride; 10 | 11 | // Output 12 | RWStructuredBuffer Keypoints; 13 | 14 | uint GetLinearOffset(uint x, uint y) 15 | { 16 | return (InputSize.y - 1 - y) * InputSize.x + x; 17 | } 18 | 19 | float SampleHeatmap(uint x, uint y, uint index) 20 | { 21 | return Heatmaps[index + BODYPIX_KEYPOINT_COUNT * GetLinearOffset(x, y)]; 22 | } 23 | 24 | float2 SampleOffset(uint x, uint y, uint index) 25 | { 26 | uint offs = index + 2 * BODYPIX_KEYPOINT_COUNT * GetLinearOffset(x, y); 27 | return float2(Offsets[offs + BODYPIX_KEYPOINT_COUNT], -Offsets[offs]); 28 | } 29 | 30 | [numthreads(BODYPIX_KEYPOINT_COUNT, 1, 1)] 31 | void PostprocessKeypoints(uint id : SV_DispatchThreadID) 32 | { 33 | uint2 max_pos = 0; 34 | float max_score = 0; 35 | 36 | for (uint v = 0; v < InputSize.y; v++) 37 | { 38 | for (uint u = 0; u < InputSize.x; u++) 39 | { 40 | uint2 pos = uint2(u, v); 41 | float score = SampleHeatmap(pos.x, pos.y, id); 42 | if (score > max_score) 43 | { 44 | max_pos = pos; 45 | max_score = score; 46 | } 47 | } 48 | } 49 | 50 | float2 offs = SampleOffset(max_pos.x, max_pos.y, id); 51 | float2 pos = (max_pos + offs / Stride + 0.5) / InputSize; 52 | 53 | Keypoints[id] = float4(pos, max_score, 0); 54 | } 55 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Keypoints.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f8a40b27a6624527831abb31e5be62b 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Mask.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel PostprocessMask 2 | 3 | #include "Common.hlsl" 4 | 5 | // Input 6 | StructuredBuffer Segments; 7 | StructuredBuffer Heatmaps; 8 | uint2 InputSize; 9 | 10 | // Output 11 | RWTexture2D Output; 12 | 13 | uint GetLinearOffset(uint x, uint y) 14 | { 15 | return (InputSize.y - 1 - y) * InputSize.x + x; 16 | } 17 | 18 | float SampleSegment(uint x, uint y) 19 | { 20 | return Segments[GetLinearOffset(x, y)]; 21 | } 22 | 23 | float SampleHeatmap(uint x, uint y, uint index) 24 | { 25 | return Heatmaps[index + BODYPIX_PART_COUNT * GetLinearOffset(x, y)]; 26 | } 27 | 28 | [numthreads(8, 8, 1)] 29 | void PostprocessMask(uint2 id : SV_DispatchThreadID) 30 | { 31 | if (!all(id < InputSize)) return; 32 | 33 | float s = BodyPix_Sigmoid(SampleSegment(id.x, id.y)); 34 | 35 | float max_h = SampleHeatmap(id.x, id.y, 0); 36 | uint max_i = 0; 37 | 38 | for (uint i = 1; i < BODYPIX_PART_COUNT; i++) 39 | { 40 | float h = SampleHeatmap(id.x, id.y, i); 41 | if (h > max_h) 42 | { 43 | max_h = h; 44 | max_i = i; 45 | } 46 | } 47 | 48 | Output[id] = float4((float3)max_i / BODYPIX_PART_COUNT, s); 49 | } 50 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/Shaders/Mask.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c22c946b1ee1744b6b57e01fbedd3fd4 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | preprocessorOverride: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Keijiro Takahashi", 3 | "dependencies": { "jp.keijiro.klak.nnutils": "3.0.1" }, 4 | "description": "BodyPix person segmentation and pose estimation model for Unity Sentis.", 5 | "displayName": "BodyPix", 6 | "keywords": [ "unity" ], 7 | "license": "Apache-2.0", 8 | "name": "jp.keijiro.bodypix", 9 | "repository": "github:keijiro/BodyPixSentis", 10 | "unity": "2020.3", 11 | "unityRelease": "0f1", 12 | "version": "4.0.0" 13 | } 14 | -------------------------------------------------------------------------------- /Packages/jp.keijiro.bodypix/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0af6237588dc49eaa6f57eb79d1089b 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "scopedRegistries": [ 3 | { 4 | "name": "Keijiro", 5 | "url": "https://registry.npmjs.com", 6 | "scopes": [ 7 | "jp.keijiro" 8 | ] 9 | } 10 | ], 11 | "dependencies": { 12 | "com.unity.ugui": "2.0.0", 13 | "jp.keijiro.klak.testtools": "3.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ai.inference": { 4 | "version": "2.2.1", 5 | "depth": 2, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.burst": "1.8.17", 9 | "com.unity.collections": "2.4.3", 10 | "com.unity.modules.imageconversion": "1.0.0" 11 | }, 12 | "url": "https://packages.unity.com" 13 | }, 14 | "com.unity.burst": { 15 | "version": "1.8.21", 16 | "depth": 3, 17 | "source": "registry", 18 | "dependencies": { 19 | "com.unity.mathematics": "1.2.1", 20 | "com.unity.modules.jsonserialize": "1.0.0" 21 | }, 22 | "url": "https://packages.unity.com" 23 | }, 24 | "com.unity.collections": { 25 | "version": "2.5.1", 26 | "depth": 3, 27 | "source": "registry", 28 | "dependencies": { 29 | "com.unity.burst": "1.8.17", 30 | "com.unity.test-framework": "1.4.5", 31 | "com.unity.nuget.mono-cecil": "1.11.4", 32 | "com.unity.test-framework.performance": "3.0.3" 33 | }, 34 | "url": "https://packages.unity.com" 35 | }, 36 | "com.unity.ext.nunit": { 37 | "version": "2.0.5", 38 | "depth": 5, 39 | "source": "builtin", 40 | "dependencies": {} 41 | }, 42 | "com.unity.mathematics": { 43 | "version": "1.3.2", 44 | "depth": 4, 45 | "source": "registry", 46 | "dependencies": {}, 47 | "url": "https://packages.unity.com" 48 | }, 49 | "com.unity.nuget.mono-cecil": { 50 | "version": "1.11.4", 51 | "depth": 4, 52 | "source": "registry", 53 | "dependencies": {}, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.test-framework": { 57 | "version": "1.5.1", 58 | "depth": 4, 59 | "source": "builtin", 60 | "dependencies": { 61 | "com.unity.ext.nunit": "2.0.3", 62 | "com.unity.modules.imgui": "1.0.0", 63 | "com.unity.modules.jsonserialize": "1.0.0" 64 | } 65 | }, 66 | "com.unity.test-framework.performance": { 67 | "version": "3.1.0", 68 | "depth": 4, 69 | "source": "registry", 70 | "dependencies": { 71 | "com.unity.test-framework": "1.1.33", 72 | "com.unity.modules.jsonserialize": "1.0.0" 73 | }, 74 | "url": "https://packages.unity.com" 75 | }, 76 | "com.unity.ugui": { 77 | "version": "2.0.0", 78 | "depth": 0, 79 | "source": "builtin", 80 | "dependencies": { 81 | "com.unity.modules.ui": "1.0.0", 82 | "com.unity.modules.imgui": "1.0.0" 83 | } 84 | }, 85 | "jp.keijiro.bodypix": { 86 | "version": "file:jp.keijiro.bodypix", 87 | "depth": 0, 88 | "source": "embedded", 89 | "dependencies": { 90 | "jp.keijiro.klak.nnutils": "3.0.1" 91 | } 92 | }, 93 | "jp.keijiro.klak.nnutils": { 94 | "version": "3.0.1", 95 | "depth": 1, 96 | "source": "registry", 97 | "dependencies": { 98 | "com.unity.ai.inference": "2.2.1" 99 | }, 100 | "url": "https://registry.npmjs.com" 101 | }, 102 | "jp.keijiro.klak.testtools": { 103 | "version": "3.1.0", 104 | "depth": 0, 105 | "source": "registry", 106 | "dependencies": { 107 | "com.unity.modules.audio": "1.0.0", 108 | "com.unity.modules.unitywebrequest": "1.0.0", 109 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 110 | "com.unity.modules.video": "1.0.0" 111 | }, 112 | "url": "https://registry.npmjs.com" 113 | }, 114 | "com.unity.modules.audio": { 115 | "version": "1.0.0", 116 | "depth": 1, 117 | "source": "builtin", 118 | "dependencies": {} 119 | }, 120 | "com.unity.modules.imageconversion": { 121 | "version": "1.0.0", 122 | "depth": 2, 123 | "source": "builtin", 124 | "dependencies": {} 125 | }, 126 | "com.unity.modules.imgui": { 127 | "version": "1.0.0", 128 | "depth": 1, 129 | "source": "builtin", 130 | "dependencies": {} 131 | }, 132 | "com.unity.modules.jsonserialize": { 133 | "version": "1.0.0", 134 | "depth": 4, 135 | "source": "builtin", 136 | "dependencies": {} 137 | }, 138 | "com.unity.modules.ui": { 139 | "version": "1.0.0", 140 | "depth": 1, 141 | "source": "builtin", 142 | "dependencies": {} 143 | }, 144 | "com.unity.modules.unitywebrequest": { 145 | "version": "1.0.0", 146 | "depth": 1, 147 | "source": "builtin", 148 | "dependencies": {} 149 | }, 150 | "com.unity.modules.unitywebrequesttexture": { 151 | "version": "1.0.0", 152 | "depth": 1, 153 | "source": "builtin", 154 | "dependencies": { 155 | "com.unity.modules.unitywebrequest": "1.0.0", 156 | "com.unity.modules.imageconversion": "1.0.0" 157 | } 158 | }, 159 | "com.unity.modules.video": { 160 | "version": "1.0.0", 161 | "depth": 1, 162 | "source": "builtin", 163 | "dependencies": { 164 | "com.unity.modules.audio": "1.0.0", 165 | "com.unity.modules.ui": "1.0.0", 166 | "com.unity.modules.unitywebrequest": "1.0.0" 167 | } 168 | } 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /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: 0 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0.1 19 | m_ClothInterCollisionStiffness: 0.2 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 0 24 | m_ReuseCollisionCallbacks: 1 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_SolverType: 0 37 | m_DefaultMaxAngularSpeed: 50 38 | -------------------------------------------------------------------------------- /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 | - enabled: 1 9 | path: Assets/Visualizer.unity 10 | guid: 48ec58351d355467b959abe74cef934c 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /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_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 1 9 | m_DefaultBehaviorMode: 1 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 4 13 | m_SpritePackerPaddingPower: 1 14 | m_Bc7TextureCompressor: 0 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_EnableTextureStreamingInEditMode: 1 22 | m_EnableTextureStreamingInPlayMode: 1 23 | m_AsyncShaderCompilation: 1 24 | m_CachingShaderPreprocessor: 1 25 | m_PrefabModeAllowAutoSave: 1 26 | m_EnterPlayModeOptionsEnabled: 1 27 | m_EnterPlayModeOptions: 3 28 | m_GameObjectNamingDigits: 1 29 | m_GameObjectNamingScheme: 0 30 | m_AssetNamingUsesSpace: 1 31 | m_UseLegacyProbeSampleCount: 0 32 | m_SerializeInlineMappingsOnOneLine: 1 33 | m_DisableCookiesInLightmapper: 1 34 | m_AssetPipelineMode: 1 35 | m_RefreshImportMode: 0 36 | m_CacheServerMode: 0 37 | m_CacheServerEndpoint: 38 | m_CacheServerNamespacePrefix: default 39 | m_CacheServerEnableDownload: 1 40 | m_CacheServerEnableUpload: 1 41 | m_CacheServerEnableAuth: 0 42 | m_CacheServerEnableTls: 0 43 | -------------------------------------------------------------------------------- /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_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_DefaultRenderingLayerMask: 1 64 | m_LogWhenShaderIsCompiled: 0 65 | -------------------------------------------------------------------------------- /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 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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_StrippingTypes: {} 8 | -------------------------------------------------------------------------------- /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 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /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: 1 16 | m_EnablePackageDependencies: 1 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 1 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_ConfigSource: 0 29 | - m_Id: scoped:project:Keijiro 30 | m_Name: Keijiro 31 | m_Url: https://registry.npmjs.com 32 | m_Scopes: 33 | - jp.keijiro 34 | m_IsDefault: 0 35 | m_Capabilities: 0 36 | m_ConfigSource: 4 37 | m_UserSelectedRegistryName: Keijiro 38 | m_UserAddingNewScopedRegistry: 0 39 | m_RegistryInfoDraft: 40 | m_Modified: 0 41 | m_ErrorMessage: 42 | m_UserModificationsInstanceId: -844 43 | m_OriginalInstanceId: -848 44 | m_LoadAssets: 0 45 | -------------------------------------------------------------------------------- /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: 5 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_SimulationMode: 0 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 28 7 | productGUID: 82488da19fe854f94bc3a83111d73bbe 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: BodyPixSentis 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: 0 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_SpriteBatchMaxVertexCount: 65535 53 | m_SpriteBatchVertexThreshold: 300 54 | m_MTRendering: 1 55 | mipStripping: 0 56 | numberOfMipsStripped: 0 57 | numberOfMipsStrippedPerMipmapLimitGroup: {} 58 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 59 | iosShowActivityIndicatorOnLoading: -1 60 | androidShowActivityIndicatorOnLoading: -1 61 | iosUseCustomAppBackgroundBehavior: 0 62 | allowedAutorotateToPortrait: 1 63 | allowedAutorotateToPortraitUpsideDown: 1 64 | allowedAutorotateToLandscapeRight: 1 65 | allowedAutorotateToLandscapeLeft: 1 66 | useOSAutorotation: 1 67 | use32BitDisplayBuffer: 1 68 | preserveFramebufferAlpha: 0 69 | disableDepthAndStencilBuffers: 0 70 | androidStartInFullscreen: 1 71 | androidRenderOutsideSafeArea: 1 72 | androidUseSwappy: 1 73 | androidBlitType: 0 74 | androidResizeableActivity: 0 75 | androidDefaultWindowWidth: 1920 76 | androidDefaultWindowHeight: 1080 77 | androidMinimumWindowWidth: 400 78 | androidMinimumWindowHeight: 300 79 | androidFullscreenMode: 1 80 | androidAutoRotationBehavior: 1 81 | androidPredictiveBackSupport: 1 82 | androidApplicationEntry: 1 83 | defaultIsNativeResolution: 1 84 | macRetinaSupport: 1 85 | runInBackground: 0 86 | muteOtherAudioSources: 0 87 | Prepare IOS For Recording: 0 88 | Force IOS Speakers When Recording: 0 89 | deferSystemGesturesMode: 0 90 | hideHomeButton: 0 91 | submitAnalytics: 1 92 | usePlayerLog: 1 93 | dedicatedServerOptimizations: 1 94 | bakeCollisionMeshes: 0 95 | forceSingleInstance: 0 96 | useFlipModelSwapchain: 1 97 | resizableWindow: 0 98 | useMacAppStoreValidation: 0 99 | macAppStoreCategory: public.app-category.games 100 | gpuSkinning: 0 101 | meshDeformation: 0 102 | xboxPIXTextureCapture: 0 103 | xboxEnableAvatar: 0 104 | xboxEnableKinect: 0 105 | xboxEnableKinectAutoTracking: 0 106 | xboxEnableFitness: 0 107 | visibleInBackground: 1 108 | allowFullscreenSwitch: 1 109 | fullscreenMode: 3 110 | xboxSpeechDB: 0 111 | xboxEnableHeadOrientation: 0 112 | xboxEnableGuest: 0 113 | xboxEnablePIXSampling: 0 114 | metalFramebufferOnly: 0 115 | xboxOneResolution: 0 116 | xboxOneSResolution: 0 117 | xboxOneXResolution: 3 118 | xboxOneMonoLoggingLevel: 0 119 | xboxOneLoggingLevel: 1 120 | xboxOneDisableEsram: 0 121 | xboxOneEnableTypeOptimization: 0 122 | xboxOnePresentImmediateThreshold: 0 123 | switchQueueCommandMemory: 1048576 124 | switchQueueControlMemory: 16384 125 | switchQueueComputeMemory: 262144 126 | switchNVNShaderPoolsGranularity: 33554432 127 | switchNVNDefaultPoolsGranularity: 16777216 128 | switchNVNOtherPoolsGranularity: 16777216 129 | switchGpuScratchPoolGranularity: 2097152 130 | switchAllowGpuScratchShrinking: 0 131 | switchNVNMaxPublicTextureIDCount: 0 132 | switchNVNMaxPublicSamplerIDCount: 0 133 | switchMaxWorkerMultiple: 8 134 | switchNVNGraphicsFirmwareMemory: 32 135 | vulkanNumSwapchainBuffers: 3 136 | vulkanEnableSetSRGBWrite: 0 137 | vulkanEnablePreTransform: 0 138 | vulkanEnableLateAcquireNextImage: 0 139 | vulkanEnableCommandBufferRecycling: 1 140 | loadStoreDebugModeEnabled: 0 141 | visionOSBundleVersion: 1.0 142 | tvOSBundleVersion: 1.0 143 | bundleVersion: 1.0 144 | preloadedAssets: [] 145 | metroInputSource: 0 146 | wsaTransparentSwapchain: 0 147 | m_HolographicPauseOnTrackingLoss: 1 148 | xboxOneDisableKinectGpuReservation: 1 149 | xboxOneEnable7thCore: 1 150 | vrSettings: 151 | enable360StereoCapture: 0 152 | isWsaHolographicRemotingEnabled: 0 153 | enableFrameTimingStats: 0 154 | enableOpenGLProfilerGPURecorders: 1 155 | allowHDRDisplaySupport: 0 156 | useHDRDisplay: 0 157 | hdrBitDepth: 0 158 | m_ColorGamuts: 00000000 159 | targetPixelDensity: 30 160 | resolutionScalingMode: 0 161 | resetResolutionOnWindowResize: 0 162 | androidSupportedAspectRatio: 1 163 | androidMaxAspectRatio: 2.1 164 | androidMinAspectRatio: 1 165 | applicationIdentifier: 166 | Standalone: com.DefaultCompany.2DProject 167 | buildNumber: 168 | Standalone: 0 169 | VisionOS: 0 170 | iPhone: 0 171 | tvOS: 0 172 | overrideDefaultApplicationIdentifier: 1 173 | AndroidBundleVersionCode: 1 174 | AndroidMinSdkVersion: 23 175 | AndroidTargetSdkVersion: 0 176 | AndroidPreferredInstallLocation: 1 177 | aotOptions: 178 | stripEngineCode: 1 179 | iPhoneStrippingLevel: 0 180 | iPhoneScriptCallOptimization: 0 181 | ForceInternetPermission: 0 182 | ForceSDCardPermission: 0 183 | CreateWallpaper: 0 184 | androidSplitApplicationBinary: 0 185 | keepLoadedShadersAlive: 0 186 | StripUnusedMeshComponents: 0 187 | strictShaderVariantMatching: 0 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSSimulatorArchitecture: 0 191 | iOSTargetOSVersionString: 13.0 192 | tvOSSdkVersion: 0 193 | tvOSSimulatorArchitecture: 0 194 | tvOSRequireExtendedGameController: 0 195 | tvOSTargetOSVersionString: 13.0 196 | VisionOSSdkVersion: 0 197 | VisionOSTargetOSVersionString: 1.0 198 | uIPrerenderedIcon: 0 199 | uIRequiresPersistentWiFi: 0 200 | uIRequiresFullScreen: 1 201 | uIStatusBarHidden: 1 202 | uIExitOnSuspend: 0 203 | uIStatusBarStyle: 0 204 | appleTVSplashScreen: {fileID: 0} 205 | appleTVSplashScreen2x: {fileID: 0} 206 | tvOSSmallIconLayers: [] 207 | tvOSSmallIconLayers2x: [] 208 | tvOSLargeIconLayers: [] 209 | tvOSLargeIconLayers2x: [] 210 | tvOSTopShelfImageLayers: [] 211 | tvOSTopShelfImageLayers2x: [] 212 | tvOSTopShelfImageWideLayers: [] 213 | tvOSTopShelfImageWideLayers2x: [] 214 | iOSLaunchScreenType: 0 215 | iOSLaunchScreenPortrait: {fileID: 0} 216 | iOSLaunchScreenLandscape: {fileID: 0} 217 | iOSLaunchScreenBackgroundColor: 218 | serializedVersion: 2 219 | rgba: 0 220 | iOSLaunchScreenFillPct: 100 221 | iOSLaunchScreenSize: 100 222 | iOSLaunchScreeniPadType: 0 223 | iOSLaunchScreeniPadImage: {fileID: 0} 224 | iOSLaunchScreeniPadBackgroundColor: 225 | serializedVersion: 2 226 | rgba: 0 227 | iOSLaunchScreeniPadFillPct: 100 228 | iOSLaunchScreeniPadSize: 100 229 | iOSLaunchScreenCustomStoryboardPath: 230 | iOSLaunchScreeniPadCustomStoryboardPath: 231 | iOSDeviceRequirements: [] 232 | iOSURLSchemes: [] 233 | macOSURLSchemes: [] 234 | iOSBackgroundModes: 0 235 | iOSMetalForceHardShadows: 0 236 | metalEditorSupport: 1 237 | metalAPIValidation: 1 238 | metalCompileShaderBinary: 0 239 | iOSRenderExtraFrameOnPause: 0 240 | iosCopyPluginsCodeInsteadOfSymlink: 0 241 | appleDeveloperTeamID: 242 | iOSManualSigningProvisioningProfileID: 243 | tvOSManualSigningProvisioningProfileID: 244 | VisionOSManualSigningProvisioningProfileID: 245 | iOSManualSigningProvisioningProfileType: 0 246 | tvOSManualSigningProvisioningProfileType: 0 247 | VisionOSManualSigningProvisioningProfileType: 0 248 | appleEnableAutomaticSigning: 0 249 | iOSRequireARKit: 0 250 | iOSAutomaticallyDetectAndAddCapabilities: 1 251 | appleEnableProMotion: 0 252 | shaderPrecisionModel: 0 253 | clonedFromGUID: 10ad67313f4034357812315f3c407484 254 | templatePackageId: com.unity.template.2d@6.0.0 255 | templateDefaultScene: Assets/Scenes/SampleScene.unity 256 | useCustomMainManifest: 0 257 | useCustomLauncherManifest: 0 258 | useCustomMainGradleTemplate: 0 259 | useCustomLauncherGradleManifest: 0 260 | useCustomBaseGradleTemplate: 0 261 | useCustomGradlePropertiesTemplate: 0 262 | useCustomGradleSettingsTemplate: 0 263 | useCustomProguardFile: 0 264 | AndroidTargetArchitectures: 1 265 | AndroidSplashScreenScale: 0 266 | androidSplashScreen: {fileID: 0} 267 | AndroidKeystoreName: 268 | AndroidKeyaliasName: 269 | AndroidEnableArmv9SecurityFeatures: 0 270 | AndroidEnableArm64MTE: 0 271 | AndroidBuildApkPerCpuArchitecture: 0 272 | AndroidTVCompatibility: 0 273 | AndroidIsGame: 1 274 | AndroidEnableTango: 0 275 | androidEnableBanner: 1 276 | androidUseLowAccuracyLocation: 0 277 | androidUseCustomKeystore: 0 278 | m_AndroidBanners: 279 | - width: 320 280 | height: 180 281 | banner: {fileID: 0} 282 | androidGamepadSupportLevel: 0 283 | AndroidMinifyRelease: 0 284 | AndroidMinifyDebug: 0 285 | AndroidValidateAppBundleSize: 1 286 | AndroidAppBundleSizeToValidate: 150 287 | AndroidReportGooglePlayAppDependencies: 1 288 | androidSymbolsSizeThreshold: 800 289 | m_BuildTargetIcons: [] 290 | m_BuildTargetPlatformIcons: 291 | - m_BuildTarget: iPhone 292 | m_Icons: 293 | - m_Textures: [] 294 | m_Width: 180 295 | m_Height: 180 296 | m_Kind: 0 297 | m_SubKind: iPhone 298 | - m_Textures: [] 299 | m_Width: 120 300 | m_Height: 120 301 | m_Kind: 0 302 | m_SubKind: iPhone 303 | - m_Textures: [] 304 | m_Width: 167 305 | m_Height: 167 306 | m_Kind: 0 307 | m_SubKind: iPad 308 | - m_Textures: [] 309 | m_Width: 152 310 | m_Height: 152 311 | m_Kind: 0 312 | m_SubKind: iPad 313 | - m_Textures: [] 314 | m_Width: 76 315 | m_Height: 76 316 | m_Kind: 0 317 | m_SubKind: iPad 318 | - m_Textures: [] 319 | m_Width: 120 320 | m_Height: 120 321 | m_Kind: 3 322 | m_SubKind: iPhone 323 | - m_Textures: [] 324 | m_Width: 80 325 | m_Height: 80 326 | m_Kind: 3 327 | m_SubKind: iPhone 328 | - m_Textures: [] 329 | m_Width: 80 330 | m_Height: 80 331 | m_Kind: 3 332 | m_SubKind: iPad 333 | - m_Textures: [] 334 | m_Width: 40 335 | m_Height: 40 336 | m_Kind: 3 337 | m_SubKind: iPad 338 | - m_Textures: [] 339 | m_Width: 87 340 | m_Height: 87 341 | m_Kind: 1 342 | m_SubKind: iPhone 343 | - m_Textures: [] 344 | m_Width: 58 345 | m_Height: 58 346 | m_Kind: 1 347 | m_SubKind: iPhone 348 | - m_Textures: [] 349 | m_Width: 29 350 | m_Height: 29 351 | m_Kind: 1 352 | m_SubKind: iPhone 353 | - m_Textures: [] 354 | m_Width: 58 355 | m_Height: 58 356 | m_Kind: 1 357 | m_SubKind: iPad 358 | - m_Textures: [] 359 | m_Width: 29 360 | m_Height: 29 361 | m_Kind: 1 362 | m_SubKind: iPad 363 | - m_Textures: [] 364 | m_Width: 60 365 | m_Height: 60 366 | m_Kind: 2 367 | m_SubKind: iPhone 368 | - m_Textures: [] 369 | m_Width: 40 370 | m_Height: 40 371 | m_Kind: 2 372 | m_SubKind: iPhone 373 | - m_Textures: [] 374 | m_Width: 40 375 | m_Height: 40 376 | m_Kind: 2 377 | m_SubKind: iPad 378 | - m_Textures: [] 379 | m_Width: 20 380 | m_Height: 20 381 | m_Kind: 2 382 | m_SubKind: iPad 383 | - m_Textures: [] 384 | m_Width: 1024 385 | m_Height: 1024 386 | m_Kind: 4 387 | m_SubKind: App Store 388 | - m_BuildTarget: Android 389 | m_Icons: 390 | - m_Textures: [] 391 | m_Width: 432 392 | m_Height: 432 393 | m_Kind: 2 394 | m_SubKind: 395 | - m_Textures: [] 396 | m_Width: 324 397 | m_Height: 324 398 | m_Kind: 2 399 | m_SubKind: 400 | - m_Textures: [] 401 | m_Width: 216 402 | m_Height: 216 403 | m_Kind: 2 404 | m_SubKind: 405 | - m_Textures: [] 406 | m_Width: 162 407 | m_Height: 162 408 | m_Kind: 2 409 | m_SubKind: 410 | - m_Textures: [] 411 | m_Width: 108 412 | m_Height: 108 413 | m_Kind: 2 414 | m_SubKind: 415 | - m_Textures: [] 416 | m_Width: 81 417 | m_Height: 81 418 | m_Kind: 2 419 | m_SubKind: 420 | - m_Textures: [] 421 | m_Width: 192 422 | m_Height: 192 423 | m_Kind: 1 424 | m_SubKind: 425 | - m_Textures: [] 426 | m_Width: 144 427 | m_Height: 144 428 | m_Kind: 1 429 | m_SubKind: 430 | - m_Textures: [] 431 | m_Width: 96 432 | m_Height: 96 433 | m_Kind: 1 434 | m_SubKind: 435 | - m_Textures: [] 436 | m_Width: 72 437 | m_Height: 72 438 | m_Kind: 1 439 | m_SubKind: 440 | - m_Textures: [] 441 | m_Width: 48 442 | m_Height: 48 443 | m_Kind: 1 444 | m_SubKind: 445 | - m_Textures: [] 446 | m_Width: 36 447 | m_Height: 36 448 | m_Kind: 1 449 | m_SubKind: 450 | - m_Textures: [] 451 | m_Width: 192 452 | m_Height: 192 453 | m_Kind: 0 454 | m_SubKind: 455 | - m_Textures: [] 456 | m_Width: 144 457 | m_Height: 144 458 | m_Kind: 0 459 | m_SubKind: 460 | - m_Textures: [] 461 | m_Width: 96 462 | m_Height: 96 463 | m_Kind: 0 464 | m_SubKind: 465 | - m_Textures: [] 466 | m_Width: 72 467 | m_Height: 72 468 | m_Kind: 0 469 | m_SubKind: 470 | - m_Textures: [] 471 | m_Width: 48 472 | m_Height: 48 473 | m_Kind: 0 474 | m_SubKind: 475 | - m_Textures: [] 476 | m_Width: 36 477 | m_Height: 36 478 | m_Kind: 0 479 | m_SubKind: 480 | m_BuildTargetBatching: [] 481 | m_BuildTargetShaderSettings: [] 482 | m_BuildTargetGraphicsJobs: 483 | - m_BuildTarget: MacStandaloneSupport 484 | m_GraphicsJobs: 0 485 | - m_BuildTarget: Switch 486 | m_GraphicsJobs: 0 487 | - m_BuildTarget: MetroSupport 488 | m_GraphicsJobs: 0 489 | - m_BuildTarget: AppleTVSupport 490 | m_GraphicsJobs: 0 491 | - m_BuildTarget: BJMSupport 492 | m_GraphicsJobs: 0 493 | - m_BuildTarget: LinuxStandaloneSupport 494 | m_GraphicsJobs: 0 495 | - m_BuildTarget: PS4Player 496 | m_GraphicsJobs: 0 497 | - m_BuildTarget: iOSSupport 498 | m_GraphicsJobs: 0 499 | - m_BuildTarget: WindowsStandaloneSupport 500 | m_GraphicsJobs: 0 501 | - m_BuildTarget: XboxOnePlayer 502 | m_GraphicsJobs: 0 503 | - m_BuildTarget: LuminSupport 504 | m_GraphicsJobs: 0 505 | - m_BuildTarget: AndroidPlayer 506 | m_GraphicsJobs: 0 507 | - m_BuildTarget: WebGLSupport 508 | m_GraphicsJobs: 0 509 | m_BuildTargetGraphicsJobMode: [] 510 | m_BuildTargetGraphicsAPIs: 511 | - m_BuildTarget: AndroidPlayer 512 | m_APIs: 150000000b000000 513 | m_Automatic: 1 514 | - m_BuildTarget: iOSSupport 515 | m_APIs: 10000000 516 | m_Automatic: 1 517 | m_BuildTargetVRSettings: [] 518 | m_DefaultShaderChunkSizeInMB: 16 519 | m_DefaultShaderChunkCount: 0 520 | openGLRequireES31: 0 521 | openGLRequireES31AEP: 0 522 | openGLRequireES32: 0 523 | m_TemplateCustomTags: {} 524 | mobileMTRendering: 525 | Android: 1 526 | iPhone: 1 527 | tvOS: 1 528 | m_BuildTargetGroupLightmapEncodingQuality: [] 529 | m_BuildTargetGroupHDRCubemapEncodingQuality: [] 530 | m_BuildTargetGroupLightmapSettings: [] 531 | m_BuildTargetGroupLoadStoreDebugModeSettings: [] 532 | m_BuildTargetNormalMapEncoding: [] 533 | m_BuildTargetDefaultTextureCompressionFormat: [] 534 | playModeTestRunnerEnabled: 0 535 | runPlayModeTestAsEditModeTest: 0 536 | actionOnDotNetUnhandledException: 1 537 | editorGfxJobOverride: 1 538 | enableInternalProfiler: 0 539 | logObjCUncaughtExceptions: 1 540 | enableCrashReportAPI: 0 541 | cameraUsageDescription: 542 | locationUsageDescription: 543 | microphoneUsageDescription: 544 | bluetoothUsageDescription: 545 | macOSTargetOSVersion: 11.0 546 | switchNMETAOverride: 547 | switchNetLibKey: 548 | switchSocketMemoryPoolSize: 6144 549 | switchSocketAllocatorPoolSize: 128 550 | switchSocketConcurrencyLimit: 14 551 | switchScreenResolutionBehavior: 2 552 | switchUseCPUProfiler: 0 553 | switchEnableFileSystemTrace: 0 554 | switchLTOSetting: 0 555 | switchApplicationID: 0x01004b9000490000 556 | switchNSODependencies: 557 | switchCompilerFlags: 558 | switchTitleNames_0: 559 | switchTitleNames_1: 560 | switchTitleNames_2: 561 | switchTitleNames_3: 562 | switchTitleNames_4: 563 | switchTitleNames_5: 564 | switchTitleNames_6: 565 | switchTitleNames_7: 566 | switchTitleNames_8: 567 | switchTitleNames_9: 568 | switchTitleNames_10: 569 | switchTitleNames_11: 570 | switchTitleNames_12: 571 | switchTitleNames_13: 572 | switchTitleNames_14: 573 | switchTitleNames_15: 574 | switchPublisherNames_0: 575 | switchPublisherNames_1: 576 | switchPublisherNames_2: 577 | switchPublisherNames_3: 578 | switchPublisherNames_4: 579 | switchPublisherNames_5: 580 | switchPublisherNames_6: 581 | switchPublisherNames_7: 582 | switchPublisherNames_8: 583 | switchPublisherNames_9: 584 | switchPublisherNames_10: 585 | switchPublisherNames_11: 586 | switchPublisherNames_12: 587 | switchPublisherNames_13: 588 | switchPublisherNames_14: 589 | switchPublisherNames_15: 590 | switchIcons_0: {fileID: 0} 591 | switchIcons_1: {fileID: 0} 592 | switchIcons_2: {fileID: 0} 593 | switchIcons_3: {fileID: 0} 594 | switchIcons_4: {fileID: 0} 595 | switchIcons_5: {fileID: 0} 596 | switchIcons_6: {fileID: 0} 597 | switchIcons_7: {fileID: 0} 598 | switchIcons_8: {fileID: 0} 599 | switchIcons_9: {fileID: 0} 600 | switchIcons_10: {fileID: 0} 601 | switchIcons_11: {fileID: 0} 602 | switchIcons_12: {fileID: 0} 603 | switchIcons_13: {fileID: 0} 604 | switchIcons_14: {fileID: 0} 605 | switchIcons_15: {fileID: 0} 606 | switchSmallIcons_0: {fileID: 0} 607 | switchSmallIcons_1: {fileID: 0} 608 | switchSmallIcons_2: {fileID: 0} 609 | switchSmallIcons_3: {fileID: 0} 610 | switchSmallIcons_4: {fileID: 0} 611 | switchSmallIcons_5: {fileID: 0} 612 | switchSmallIcons_6: {fileID: 0} 613 | switchSmallIcons_7: {fileID: 0} 614 | switchSmallIcons_8: {fileID: 0} 615 | switchSmallIcons_9: {fileID: 0} 616 | switchSmallIcons_10: {fileID: 0} 617 | switchSmallIcons_11: {fileID: 0} 618 | switchSmallIcons_12: {fileID: 0} 619 | switchSmallIcons_13: {fileID: 0} 620 | switchSmallIcons_14: {fileID: 0} 621 | switchSmallIcons_15: {fileID: 0} 622 | switchManualHTML: 623 | switchAccessibleURLs: 624 | switchLegalInformation: 625 | switchMainThreadStackSize: 1048576 626 | switchPresenceGroupId: 627 | switchLogoHandling: 0 628 | switchReleaseVersion: 0 629 | switchDisplayVersion: 1.0.0 630 | switchStartupUserAccount: 0 631 | switchSupportedLanguagesMask: 0 632 | switchLogoType: 0 633 | switchApplicationErrorCodeCategory: 634 | switchUserAccountSaveDataSize: 0 635 | switchUserAccountSaveDataJournalSize: 0 636 | switchApplicationAttribute: 0 637 | switchCardSpecSize: -1 638 | switchCardSpecClock: -1 639 | switchRatingsMask: 0 640 | switchRatingsInt_0: 0 641 | switchRatingsInt_1: 0 642 | switchRatingsInt_2: 0 643 | switchRatingsInt_3: 0 644 | switchRatingsInt_4: 0 645 | switchRatingsInt_5: 0 646 | switchRatingsInt_6: 0 647 | switchRatingsInt_7: 0 648 | switchRatingsInt_8: 0 649 | switchRatingsInt_9: 0 650 | switchRatingsInt_10: 0 651 | switchRatingsInt_11: 0 652 | switchRatingsInt_12: 0 653 | switchLocalCommunicationIds_0: 654 | switchLocalCommunicationIds_1: 655 | switchLocalCommunicationIds_2: 656 | switchLocalCommunicationIds_3: 657 | switchLocalCommunicationIds_4: 658 | switchLocalCommunicationIds_5: 659 | switchLocalCommunicationIds_6: 660 | switchLocalCommunicationIds_7: 661 | switchParentalControl: 0 662 | switchAllowsScreenshot: 1 663 | switchAllowsVideoCapturing: 1 664 | switchAllowsRuntimeAddOnContentInstall: 0 665 | switchDataLossConfirmation: 0 666 | switchUserAccountLockEnabled: 0 667 | switchSystemResourceMemory: 16777216 668 | switchSupportedNpadStyles: 22 669 | switchNativeFsCacheSize: 32 670 | switchIsHoldTypeHorizontal: 0 671 | switchSupportedNpadCount: 8 672 | switchEnableTouchScreen: 1 673 | switchSocketConfigEnabled: 0 674 | switchTcpInitialSendBufferSize: 32 675 | switchTcpInitialReceiveBufferSize: 64 676 | switchTcpAutoSendBufferSizeMax: 256 677 | switchTcpAutoReceiveBufferSizeMax: 256 678 | switchUdpSendBufferSize: 9 679 | switchUdpReceiveBufferSize: 42 680 | switchSocketBufferEfficiency: 4 681 | switchSocketInitializeEnabled: 1 682 | switchNetworkInterfaceManagerInitializeEnabled: 1 683 | switchDisableHTCSPlayerConnection: 0 684 | switchUseNewStyleFilepaths: 0 685 | switchUseLegacyFmodPriorities: 0 686 | switchUseMicroSleepForYield: 1 687 | switchEnableRamDiskSupport: 0 688 | switchMicroSleepForYieldTime: 25 689 | switchRamDiskSpaceSize: 12 690 | switchUpgradedPlayerSettingsToNMETA: 0 691 | ps4NPAgeRating: 12 692 | ps4NPTitleSecret: 693 | ps4NPTrophyPackPath: 694 | ps4ParentalLevel: 11 695 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 696 | ps4Category: 0 697 | ps4MasterVersion: 01.00 698 | ps4AppVersion: 01.00 699 | ps4AppType: 0 700 | ps4ParamSfxPath: 701 | ps4VideoOutPixelFormat: 0 702 | ps4VideoOutInitialWidth: 1920 703 | ps4VideoOutBaseModeInitialWidth: 1920 704 | ps4VideoOutReprojectionRate: 60 705 | ps4PronunciationXMLPath: 706 | ps4PronunciationSIGPath: 707 | ps4BackgroundImagePath: 708 | ps4StartupImagePath: 709 | ps4StartupImagesFolder: 710 | ps4IconImagesFolder: 711 | ps4SaveDataImagePath: 712 | ps4SdkOverride: 713 | ps4BGMPath: 714 | ps4ShareFilePath: 715 | ps4ShareOverlayImagePath: 716 | ps4PrivacyGuardImagePath: 717 | ps4ExtraSceSysFile: 718 | ps4NPtitleDatPath: 719 | ps4RemotePlayKeyAssignment: -1 720 | ps4RemotePlayKeyMappingDir: 721 | ps4PlayTogetherPlayerCount: 0 722 | ps4EnterButtonAssignment: 2 723 | ps4ApplicationParam1: 0 724 | ps4ApplicationParam2: 0 725 | ps4ApplicationParam3: 0 726 | ps4ApplicationParam4: 0 727 | ps4DownloadDataSize: 0 728 | ps4GarlicHeapSize: 2048 729 | ps4ProGarlicHeapSize: 2560 730 | playerPrefsMaxSize: 32768 731 | ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh 732 | ps4pnSessions: 1 733 | ps4pnPresence: 1 734 | ps4pnFriends: 1 735 | ps4pnGameCustomData: 1 736 | playerPrefsSupport: 0 737 | enableApplicationExit: 0 738 | resetTempFolder: 1 739 | restrictedAudioUsageRights: 0 740 | ps4UseResolutionFallback: 0 741 | ps4ReprojectionSupport: 0 742 | ps4UseAudio3dBackend: 0 743 | ps4UseLowGarlicFragmentationMode: 1 744 | ps4SocialScreenEnabled: 0 745 | ps4ScriptOptimizationLevel: 2 746 | ps4Audio3dVirtualSpeakerCount: 14 747 | ps4attribCpuUsage: 0 748 | ps4PatchPkgPath: 749 | ps4PatchLatestPkgPath: 750 | ps4PatchChangeinfoPath: 751 | ps4PatchDayOne: 0 752 | ps4attribUserManagement: 0 753 | ps4attribMoveSupport: 0 754 | ps4attrib3DSupport: 0 755 | ps4attribShareSupport: 0 756 | ps4attribExclusiveVR: 0 757 | ps4disableAutoHideSplash: 0 758 | ps4videoRecordingFeaturesUsed: 0 759 | ps4contentSearchFeaturesUsed: 0 760 | ps4CompatibilityPS5: 0 761 | ps4AllowPS5Detection: 0 762 | ps4GPU800MHz: 1 763 | ps4attribEyeToEyeDistanceSettingVR: 0 764 | ps4IncludedModules: [] 765 | ps4attribVROutputEnabled: 0 766 | monoEnv: 767 | splashScreenBackgroundSourceLandscape: {fileID: 0} 768 | splashScreenBackgroundSourcePortrait: {fileID: 0} 769 | blurSplashScreenBackground: 1 770 | spritePackerPolicy: 771 | webGLMemorySize: 32 772 | webGLExceptionSupport: 1 773 | webGLNameFilesAsHashes: 0 774 | webGLShowDiagnostics: 0 775 | webGLDataCaching: 1 776 | webGLDebugSymbols: 0 777 | webGLEmscriptenArgs: 778 | webGLModulesDirectory: 779 | webGLTemplate: APPLICATION:Default 780 | webGLAnalyzeBuildSize: 0 781 | webGLUseEmbeddedResources: 0 782 | webGLCompressionFormat: 0 783 | webGLWasmArithmeticExceptions: 0 784 | webGLLinkerTarget: 1 785 | webGLThreadsSupport: 0 786 | webGLDecompressionFallback: 0 787 | webGLInitialMemorySize: 32 788 | webGLMaximumMemorySize: 2048 789 | webGLMemoryGrowthMode: 2 790 | webGLMemoryLinearGrowthStep: 16 791 | webGLMemoryGeometricGrowthStep: 0.2 792 | webGLMemoryGeometricGrowthCap: 96 793 | webGLEnableWebGPU: 0 794 | webGLPowerPreference: 2 795 | webGLWebAssemblyTable: 0 796 | webGLWebAssemblyBigInt: 0 797 | webGLCloseOnQuit: 0 798 | webWasm2023: 0 799 | scriptingDefineSymbols: {} 800 | additionalCompilerArguments: {} 801 | platformArchitecture: {} 802 | scriptingBackend: 803 | Android: 0 804 | il2cppCompilerConfiguration: {} 805 | il2cppCodeGeneration: {} 806 | il2cppStacktraceInformation: {} 807 | managedStrippingLevel: 808 | Android: 1 809 | EmbeddedLinux: 1 810 | GameCoreScarlett: 1 811 | GameCoreXboxOne: 1 812 | Kepler: 1 813 | Nintendo Switch: 1 814 | PS4: 1 815 | PS5: 1 816 | QNX: 1 817 | ReservedCFE: 1 818 | VisionOS: 1 819 | WebGL: 1 820 | Windows Store Apps: 1 821 | XboxOne: 1 822 | iPhone: 1 823 | tvOS: 1 824 | incrementalIl2cppBuild: {} 825 | suppressCommonWarnings: 1 826 | allowUnsafeCode: 0 827 | useDeterministicCompilation: 1 828 | additionalIl2CppArgs: 829 | scriptingRuntimeVersion: 1 830 | gcIncremental: 1 831 | gcWBarrierValidation: 0 832 | apiCompatibilityLevelPerPlatform: {} 833 | editorAssembliesCompatibilityLevel: 1 834 | m_RenderingPath: 1 835 | m_MobileRenderingPath: 1 836 | metroPackageName: 2D_BuiltInRenderer 837 | metroPackageVersion: 838 | metroCertificatePath: 839 | metroCertificatePassword: 840 | metroCertificateSubject: 841 | metroCertificateIssuer: 842 | metroCertificateNotAfter: 0000000000000000 843 | metroApplicationDescription: 2D_BuiltInRenderer 844 | wsaImages: {} 845 | metroTileShortName: 846 | metroTileShowName: 0 847 | metroMediumTileShowName: 0 848 | metroLargeTileShowName: 0 849 | metroWideTileShowName: 0 850 | metroSupportStreamingInstall: 0 851 | metroLastRequiredScene: 0 852 | metroDefaultTileSize: 1 853 | metroTileForegroundText: 2 854 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 855 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 856 | metroSplashScreenUseBackgroundColor: 0 857 | syncCapabilities: 0 858 | platformCapabilities: {} 859 | metroTargetDeviceFamilies: {} 860 | metroFTAName: 861 | metroFTAFileTypes: [] 862 | metroProtocolName: 863 | vcxProjDefaultLanguage: 864 | XboxOneProductId: 865 | XboxOneUpdateKey: 866 | XboxOneSandboxId: 867 | XboxOneContentId: 868 | XboxOneTitleId: 869 | XboxOneSCId: 870 | XboxOneGameOsOverridePath: 871 | XboxOnePackagingOverridePath: 872 | XboxOneAppManifestOverridePath: 873 | XboxOneVersion: 1.0.0.0 874 | XboxOnePackageEncryption: 0 875 | XboxOnePackageUpdateGranularity: 2 876 | XboxOneDescription: 877 | XboxOneLanguage: 878 | - enus 879 | XboxOneCapability: [] 880 | XboxOneGameRating: {} 881 | XboxOneIsContentPackage: 0 882 | XboxOneEnhancedXboxCompatibilityMode: 0 883 | XboxOneEnableGPUVariability: 1 884 | XboxOneSockets: {} 885 | XboxOneSplashScreen: {fileID: 0} 886 | XboxOneAllowedProductIds: [] 887 | XboxOnePersistentLocalStorageSize: 0 888 | XboxOneXTitleMemory: 8 889 | XboxOneOverrideIdentityName: 890 | XboxOneOverrideIdentityPublisher: 891 | vrEditorSettings: {} 892 | cloudServicesEnabled: {} 893 | luminIcon: 894 | m_Name: 895 | m_ModelFolderPath: 896 | m_PortalFolderPath: 897 | luminCert: 898 | m_CertPath: 899 | m_SignPackage: 1 900 | luminIsChannelApp: 0 901 | luminVersion: 902 | m_VersionCode: 1 903 | m_VersionName: 904 | hmiPlayerDataPath: 905 | hmiForceSRGBBlit: 1 906 | embeddedLinuxEnableGamepadInput: 0 907 | hmiCpuConfiguration: 908 | hmiLogStartupTiming: 0 909 | qnxGraphicConfPath: 910 | apiCompatibilityLevel: 6 911 | captureStartupLogs: {} 912 | activeInputHandler: 0 913 | windowsGamepadBackendHint: 0 914 | cloudProjectId: 915 | framebufferDepthMemorylessMode: 0 916 | qualitySettingsNames: [] 917 | projectName: 918 | organizationId: 919 | cloudEnabled: 0 920 | legacyClampBlendShapeWeights: 0 921 | hmiLoadingImage: {fileID: 0} 922 | platformRequiresReadableAssets: 0 923 | virtualTexturingSupportEnabled: 0 924 | insecureHttpOption: 0 925 | androidVulkanDenyFilterList: [] 926 | androidVulkanAllowFilterList: [] 927 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 6000.0.49f1 2 | m_EditorVersionWithRevision: 6000.0.49f1 (840e0a9776d9) 3 | -------------------------------------------------------------------------------- /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: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Medium 11 | pixelLightCount: 1 12 | shadows: 1 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 20 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 2 22 | textureQuality: 0 23 | anisotropicTextures: 1 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 1 30 | lodBias: 0.7 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 64 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | m_PerPlatformDefaultQuality: 46 | Android: 0 47 | Lumin: 0 48 | Nintendo Switch: 0 49 | PS4: 0 50 | Server: 0 51 | Stadia: 0 52 | Standalone: 0 53 | WebGL: 0 54 | Windows Store Apps: 0 55 | XboxOne: 0 56 | iPhone: 0 57 | tvOS: 0 58 | -------------------------------------------------------------------------------- /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.PhysicsMaterial", 67 | "defaultInstantiationMode": 0 68 | }, 69 | { 70 | "userAdded": false, 71 | "type": "UnityEngine.PhysicsMaterial2D", 72 | "defaultInstantiationMode": 0 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 77 | "defaultInstantiationMode": 0 78 | }, 79 | { 80 | "userAdded": false, 81 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 82 | "defaultInstantiationMode": 0 83 | }, 84 | { 85 | "userAdded": false, 86 | "type": "UnityEngine.Rendering.VolumeProfile", 87 | "defaultInstantiationMode": 0 88 | }, 89 | { 90 | "userAdded": false, 91 | "type": "UnityEditor.SceneAsset", 92 | "defaultInstantiationMode": 0 93 | }, 94 | { 95 | "userAdded": false, 96 | "type": "UnityEngine.Shader", 97 | "defaultInstantiationMode": 1 98 | }, 99 | { 100 | "userAdded": false, 101 | "type": "UnityEngine.ShaderVariantCollection", 102 | "defaultInstantiationMode": 1 103 | }, 104 | { 105 | "userAdded": false, 106 | "type": "UnityEngine.Texture", 107 | "defaultInstantiationMode": 0 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Texture2D", 112 | "defaultInstantiationMode": 0 113 | }, 114 | { 115 | "userAdded": false, 116 | "type": "UnityEngine.Timeline.TimelineAsset", 117 | "defaultInstantiationMode": 0 118 | } 119 | ], 120 | "defaultDependencyTypeInfo": { 121 | "userAdded": false, 122 | "type": "", 123 | "defaultInstantiationMode": 1 124 | }, 125 | "newSceneOverride": 0 126 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /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 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BodyPixSentis 2 | 3 | ![gif](https://user-images.githubusercontent.com/343936/126066328-9bb01b01-d16f-4a38-8b7e-fb463bd0aac2.gif) 4 | ![gif](https://user-images.githubusercontent.com/343936/126066334-c8d7ea3f-a1b2-49c0-b094-cf55d8f80610.gif) 5 | 6 | **BodyPixSentis** is an implementation of the [BodyPix] model for person 7 | segmentation and pose estimation. It runs on the [Unity Inference Engine], 8 | Unity’s official neural network runtime optimized for real-time applications. 9 | 10 | [BodyPix]: https://blog.tensorflow.org/2019/11/updated-bodypix-2.html 11 | [Unity Inference Engine]: https://docs.unity3d.com/Packages/com.unity.ai.inference@latest 12 | 13 | ## System Requirements 14 | 15 | - Unity 6 16 | - Compute shader support 17 | 18 | ## ONNX Model Information 19 | 20 | The original BodyPix model, provided in TensorFlow.js format, has been converted 21 | to ONNX using [tfjs-to-tf] and [tf2onnx]. For details, see [the Colab notebook]. 22 | 23 | [tfjs-to-tf]: https://github.com/patlevin/tfjs-to-tf 24 | [tf2onnx]: https://github.com/onnx/tensorflow-onnx 25 | [the Colab notebook]: 26 | https://colab.research.google.com/drive/1ikOMoqOX7TSBNId0lGaQ_kIyDF2GV3M3?usp=sharing 27 | 28 | ## ResNet Model Support 29 | 30 | This package supports ResNet-based models, which offer higher accuracy but are 31 | larger and slower. Due to GitHub and npm.js file size limits, these ONNX files 32 | are not included in the repository. You can download them from 33 | [ResNetZip] instead. 34 | 35 | To use ResNet models, create a new BodyPix ResourceSet and set the model, 36 | architecture, and stride fields accordingly. 37 | 38 | ![ResNet50](https://user-images.githubusercontent.com/343936/127449759-a5294794-4a60-454c-8f9d-7899c14b0d48.png) 39 | 40 | [ResNetZip]: 41 | https://github.com/keijiro/BodyPixSentis/releases/download/1.0.3/ResNet50Models.zip 42 | 43 | ## Installation 44 | 45 | You can install the BodyPixSentis package (`jp.keijiro.bodypix`) via the 46 | "Keijiro" scoped registry using the Unity Package Manager. To add the registry 47 | to your project, follow [these instructions]. 48 | 49 | [these instructions]: 50 | https://gist.github.com/keijiro/f8c7e8ff29bfe63d86b888901b82644c 51 | --------------------------------------------------------------------------------