Repository: Syn-McJ/TFClassify-Unity Branch: master Commit: 68648976f293 Files: 45 Total size: 79.2 MB Directory structure: gitextract_tlcqxye7/ ├── .gitignore ├── Assets/ │ ├── Classify.unity │ ├── Classify.unity.meta │ ├── Detect.unity │ ├── Detect.unity.meta │ ├── Resources/ │ │ ├── coco_labels_list.txt │ │ ├── coco_labels_list.txt.meta │ │ ├── imagenet_comp_graph_label_strings.txt │ │ ├── imagenet_comp_graph_label_strings.txt.meta │ │ ├── ssd_mobilenet_v1_android_export.bytes │ │ ├── ssd_mobilenet_v1_android_export.bytes.meta │ │ ├── tensorflow_inception_graph.bytes │ │ └── tensorflow_inception_graph.bytes.meta │ ├── Resources.meta │ ├── Scripts/ │ │ ├── Classifier.cs │ │ ├── Classifier.cs.meta │ │ ├── Detector.cs │ │ ├── Detector.cs.meta │ │ ├── PhoneCamera.cs │ │ ├── PhoneCamera.cs.meta │ │ ├── TextureTools.cs │ │ └── TextureTools.cs.meta │ └── Scripts.meta ├── LICENSE ├── Packages/ │ └── manifest.json ├── ProjectSettings/ │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ └── XRSettings.asset └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ [Ll]ibrary/ [Tt]emp/ [Oo]bj/ [Bb]uild/ [Bb]uilds/ .vscode/ Assets/AssetStoreTools* # Visual Studio 2015 cache directory /.vs/ # Autogenerated VS/MD/Consulo solution and project files ExportedObj/ .consulo/ *.csproj *.unityproj *.sln *.suo *.tmp *.user *.userprefs *.pidb *.booproj *.svd *.pdb # Unity3D generated meta files *.pidb.meta *.pdb.meta # Unity3D Generated File On Crash Reports sysinfo.txt # Builds *.apk *.unitypackage ================================================ FILE: Assets/Classify.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 0 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &42609963 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 42609967} - component: {fileID: 42609966} - component: {fileID: 42609965} - component: {fileID: 42609964} m_Layer: 5 m_Name: Canvas m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &42609964 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_IgnoreReversedGraphics: 1 m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 --- !u!114 &42609965 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 m_ReferenceResolution: {x: 800, y: 1280} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 0 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 --- !u!223 &42609966 Canvas: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 serializedVersion: 3 m_RenderMode: 0 m_Camera: {fileID: 1583144317} m_PlaneDistance: 100 m_PixelPerfect: 0 m_ReceivesEvents: 1 m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 --- !u!224 &42609967 RectTransform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 42609963} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1375191583} - {fileID: 475302932} m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!1 &205469108 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 205469109} - component: {fileID: 205469111} - component: {fileID: 205469110} m_Layer: 5 m_Name: SearchingText m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &205469109 RectTransform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 205469108} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 475302932} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: -80, y: -180} m_SizeDelta: {x: 600, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &205469110 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 205469108} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 4 m_MaxSize: 46 m_Alignment: 3 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: --- !u!222 &205469111 CanvasRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 205469108} --- !u!1 &475302931 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 475302932} - component: {fileID: 475302934} - component: {fileID: 475302933} m_Layer: 5 m_Name: SnackBar m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &475302932 RectTransform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 475302931} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 205469109} m_Father: {fileID: 42609967} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -100} m_SizeDelta: {x: 0, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &475302933 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 475302931} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 0.392} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 --- !u!222 &475302934 CanvasRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 475302931} --- !u!1 &1375191582 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1375191583} - component: {fileID: 1375191586} - component: {fileID: 1375191585} - component: {fileID: 1375191584} m_Layer: 5 m_Name: Background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1375191583 RectTransform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1375191582} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 42609967} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1375191584 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1375191582} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_AspectMode: 3 m_AspectRatio: 1.6 --- !u!114 &1375191585 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1375191582} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Texture: {fileID: 2800000, guid: db915c4ea74562e4abe32ffe4cff7364, type: 3} m_UVRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 --- !u!222 &1375191586 CanvasRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1375191582} --- !u!1 &1583144314 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1583144318} - component: {fileID: 1583144317} - component: {fileID: 1583144316} - component: {fileID: 1583144315} - component: {fileID: 1583144319} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &1583144315 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 --- !u!124 &1583144316 Behaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 --- !u!20 &1583144317 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &1583144318 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1583144314} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1583144319 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0bc98c2a8aaebb24c98786f1897d9f3b, type: 3} m_Name: m_EditorClassIdentifier: mode: 1 background: {fileID: 1375191585} fitter: {fileID: 1375191584} modelFile: {fileID: 4900000, guid: 6563170825a12804e82a117174111f3b, type: 3} labelsFile: {fileID: 4900000, guid: a59056e24b8072143b54036c646ab35f, type: 3} uiText: {fileID: 205469110} ================================================ FILE: Assets/Classify.unity.meta ================================================ fileFormatVersion: 2 guid: 48a90ec4b8f04ed4b968ac1e6153ac36 DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Detect.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} m_IndirectSpecularColor: {r: 0.37311947, g: 0.38074005, b: 0.35872722, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 0 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 m_PVREnvironmentSampleCount: 500 m_PVREnvironmentReferencePointCount: 2048 m_PVRFilteringMode: 2 m_PVRDenoiserTypeDirect: 0 m_PVRDenoiserTypeIndirect: 0 m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &42609963 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 42609967} - component: {fileID: 42609966} - component: {fileID: 42609965} - component: {fileID: 42609964} m_Layer: 5 m_Name: Canvas m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &42609964 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} m_Name: m_EditorClassIdentifier: m_IgnoreReversedGraphics: 1 m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 m_Bits: 4294967295 --- !u!114 &42609965 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 m_ReferenceResolution: {x: 800, y: 1280} m_ScreenMatchMode: 0 m_MatchWidthOrHeight: 0 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 --- !u!223 &42609966 Canvas: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42609963} m_Enabled: 1 serializedVersion: 3 m_RenderMode: 0 m_Camera: {fileID: 1583144317} m_PlaneDistance: 100 m_PixelPerfect: 0 m_ReceivesEvents: 1 m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 --- !u!224 &42609967 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42609963} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 1375191583} - {fileID: 475302932} m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!1 &205469108 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 205469109} - component: {fileID: 205469111} - component: {fileID: 205469110} m_Layer: 5 m_Name: SearchingText m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &205469109 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 205469108} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 475302932} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 1} m_AnchorMax: {x: 0.5, y: 1} m_AnchoredPosition: {x: -80, y: -180} m_SizeDelta: {x: 600, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &205469110 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 205469108} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 4 m_MaxSize: 46 m_Alignment: 3 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: --- !u!222 &205469111 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 205469108} m_CullTransparentMesh: 0 --- !u!1 &475302931 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 475302932} - component: {fileID: 475302934} - component: {fileID: 475302933} m_Layer: 5 m_Name: SnackBar m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &475302932 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 475302931} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 205469109} m_Father: {fileID: 42609967} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -100} m_SizeDelta: {x: 0, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &475302933 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 475302931} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 0.392} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 --- !u!222 &475302934 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 475302931} m_CullTransparentMesh: 0 --- !u!1 &1375191582 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1375191583} - component: {fileID: 1375191586} - component: {fileID: 1375191585} - component: {fileID: 1375191584} m_Layer: 5 m_Name: Background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!224 &1375191583 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1375191582} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 42609967} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1375191584 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1375191582} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3} m_Name: m_EditorClassIdentifier: m_AspectMode: 4 m_AspectRatio: 1.6 --- !u!114 &1375191585 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1375191582} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Texture: {fileID: 2800000, guid: db915c4ea74562e4abe32ffe4cff7364, type: 3} m_UVRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 --- !u!222 &1375191586 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1375191582} m_CullTransparentMesh: 0 --- !u!1 &1583144314 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1583144318} - component: {fileID: 1583144317} - component: {fileID: 1583144316} - component: {fileID: 1583144315} - component: {fileID: 1583144319} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &1583144315 AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 --- !u!124 &1583144316 Behaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 --- !u!20 &1583144317 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 60 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &1583144318 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583144314} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1583144319 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583144314} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 0bc98c2a8aaebb24c98786f1897d9f3b, type: 3} m_Name: m_EditorClassIdentifier: mode: 0 background: {fileID: 1375191585} fitter: {fileID: 1375191584} modelFile: {fileID: 4900000, guid: dc932743ced7f3f469965a13ea2a3286, type: 3} labelsFile: {fileID: 4900000, guid: 0733b09cfaf45e64a8cad4e9eb12a78e, type: 3} uiText: {fileID: 205469110} ================================================ FILE: Assets/Detect.unity.meta ================================================ fileFormatVersion: 2 guid: 85aa1ed206fe7de4187b8a6fcce4362a timeCreated: 1517147998 licenseType: Free DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Resources/coco_labels_list.txt ================================================ ??? person bicycle car motorcycle airplane bus train truck boat traffic light fire hydrant ??? stop sign parking meter bench bird cat dog horse sheep cow elephant bear zebra giraffe ??? backpack umbrella ??? ??? handbag tie suitcase frisbee skis snowboard sports ball kite baseball bat baseball glove skateboard surfboard tennis racket bottle ??? wine glass cup fork knife spoon bowl banana apple sandwich orange broccoli carrot hot dog pizza donut cake chair couch potted plant bed ??? dining table ??? ??? toilet ??? tv laptop mouse remote keyboard cell phone microwave oven toaster sink refrigerator ??? book clock vase scissors teddy bear hair drier toothbrush ================================================ FILE: Assets/Resources/coco_labels_list.txt.meta ================================================ fileFormatVersion: 2 guid: 0733b09cfaf45e64a8cad4e9eb12a78e TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Resources/imagenet_comp_graph_label_strings.txt ================================================ dummy kit fox English setter Siberian husky Australian terrier English springer grey whale lesser panda Egyptian cat ibex Persian cat cougar gazelle porcupine sea lion malamute badger Great Dane Walker hound Welsh springer spaniel whippet Scottish deerhound killer whale mink African elephant Weimaraner soft-coated wheaten terrier Dandie Dinmont red wolf Old English sheepdog jaguar otterhound bloodhound Airedale hyena meerkat giant schnauzer titi three-toed sloth sorrel black-footed ferret dalmatian black-and-tan coonhound papillon skunk Staffordshire bullterrier Mexican hairless Bouvier des Flandres weasel miniature poodle Cardigan malinois bighorn fox squirrel colobus tiger cat Lhasa impala coyote Yorkshire terrier Newfoundland brown bear red fox Norwegian elkhound Rottweiler hartebeest Saluki grey fox schipperke Pekinese Brabancon griffon West Highland white terrier Sealyham terrier guenon mongoose indri tiger Irish wolfhound wild boar EntleBucher zebra ram French bulldog orangutan basenji leopard Bernese mountain dog Maltese dog Norfolk terrier toy terrier vizsla cairn squirrel monkey groenendael clumber Siamese cat chimpanzee komondor Afghan hound Japanese spaniel proboscis monkey guinea pig white wolf ice bear gorilla borzoi toy poodle Kerry blue terrier ox Scotch terrier Tibetan mastiff spider monkey Doberman Boston bull Greater Swiss Mountain dog Appenzeller Shih-Tzu Irish water spaniel Pomeranian Bedlington terrier warthog Arabian camel siamang miniature schnauzer collie golden retriever Irish terrier affenpinscher Border collie hare boxer silky terrier beagle Leonberg German short-haired pointer patas dhole baboon macaque Chesapeake Bay retriever bull mastiff kuvasz capuchin pug curly-coated retriever Norwich terrier flat-coated retriever hog keeshond Eskimo dog Brittany spaniel standard poodle Lakeland terrier snow leopard Gordon setter dingo standard schnauzer hamster Tibetan terrier Arctic fox wire-haired fox terrier basset water buffalo American black bear Angora bison howler monkey hippopotamus chow giant panda American Staffordshire terrier Shetland sheepdog Great Pyrenees Chihuahua tabby marmoset Labrador retriever Saint Bernard armadillo Samoyed bluetick redbone polecat marmot kelpie gibbon llama miniature pinscher wood rabbit Italian greyhound lion cocker spaniel Irish setter dugong Indian elephant beaver Sussex spaniel Pembroke Blenheim spaniel Madagascar cat Rhodesian ridgeback lynx African hunting dog langur Ibizan hound timber wolf cheetah English foxhound briard sloth bear Border terrier German shepherd otter koala tusker echidna wallaby platypus wombat revolver umbrella schooner soccer ball accordion ant starfish chambered nautilus grand piano laptop strawberry airliner warplane airship balloon space shuttle fireboat gondola speedboat lifeboat canoe yawl catamaran trimaran container ship liner pirate aircraft carrier submarine wreck half track tank missile bobsled dogsled bicycle-built-for-two mountain bike freight car passenger car barrow shopping cart motor scooter forklift electric locomotive steam locomotive amphibian ambulance beach wagon cab convertible jeep limousine minivan Model T racer sports car go-kart golfcart moped snowplow fire engine garbage truck pickup tow truck trailer truck moving van police van recreational vehicle streetcar snowmobile tractor mobile home tricycle unicycle horse cart jinrikisha oxcart bassinet cradle crib four-poster bookcase china cabinet medicine chest chiffonier table lamp file park bench barber chair throne folding chair rocking chair studio couch toilet seat desk pool table dining table entertainment center wardrobe Granny Smith orange lemon fig pineapple banana jackfruit custard apple pomegranate acorn hip ear rapeseed corn buckeye organ upright chime drum gong maraca marimba steel drum banjo cello violin harp acoustic guitar electric guitar cornet French horn trombone harmonica ocarina panpipe bassoon oboe sax flute daisy yellow lady's slipper cliff valley alp volcano promontory sandbar coral reef lakeside seashore geyser hatchet cleaver letter opener plane power drill lawn mower hammer corkscrew can opener plunger screwdriver shovel plow chain saw cock hen ostrich brambling goldfinch house finch junco indigo bunting robin bulbul jay magpie chickadee water ouzel kite bald eagle vulture great grey owl black grouse ptarmigan ruffed grouse prairie chicken peacock quail partridge African grey macaw sulphur-crested cockatoo lorikeet coucal bee eater hornbill hummingbird jacamar toucan drake red-breasted merganser goose black swan white stork black stork spoonbill flamingo American egret little blue heron bittern crane limpkin American coot bustard ruddy turnstone red-backed sandpiper redshank dowitcher oystercatcher European gallinule pelican king penguin albatross great white shark tiger shark hammerhead electric ray stingray barracouta coho tench goldfish eel rock beauty anemone fish lionfish puffer sturgeon gar loggerhead leatherback turtle mud turtle terrapin box turtle banded gecko common iguana American chameleon whiptail agama frilled lizard alligator lizard Gila monster green lizard African chameleon Komodo dragon triceratops African crocodile American alligator thunder snake ringneck snake hognose snake green snake king snake garter snake water snake vine snake night snake boa constrictor rock python Indian cobra green mamba sea snake horned viper diamondback sidewinder European fire salamander common newt eft spotted salamander axolotl bullfrog tree frog tailed frog whistle wing paintbrush hand blower oxygen mask snorkel loudspeaker microphone screen mouse electric fan oil filter strainer space heater stove guillotine barometer rule odometer scale analog clock digital clock wall clock hourglass sundial parking meter stopwatch digital watch stethoscope syringe magnetic compass binoculars projector sunglasses loupe radio telescope bow cannon [ground] assault rifle rifle projectile computer keyboard typewriter keyboard crane lighter abacus cash machine slide rule desktop computer hand-held computer notebook web site harvester thresher printer slot vending machine sewing machine joystick switch hook car wheel paddlewheel pinwheel potter's wheel gas pump carousel swing reel radiator puck hard disc sunglass pick car mirror solar dish remote control disk brake buckle hair slide knot combination lock padlock nail safety pin screw muzzle seat belt ski candle jack-o'-lantern spotlight torch neck brace pier tripod maypole mousetrap spider web trilobite harvestman scorpion black and gold garden spider barn spider garden spider black widow tarantula wolf spider tick centipede isopod Dungeness crab rock crab fiddler crab king crab American lobster spiny lobster crayfish hermit crab tiger beetle ladybug ground beetle long-horned beetle leaf beetle dung beetle rhinoceros beetle weevil fly bee grasshopper cricket walking stick cockroach mantis cicada leafhopper lacewing dragonfly damselfly admiral ringlet monarch cabbage butterfly sulphur butterfly lycaenid jellyfish sea anemone brain coral flatworm nematode conch snail slug sea slug chiton sea urchin sea cucumber iron espresso maker microwave Dutch oven rotisserie toaster waffle iron vacuum dishwasher refrigerator washer Crock Pot frying pan wok caldron coffeepot teapot spatula altar triumphal arch patio steel arch bridge suspension bridge viaduct barn greenhouse palace monastery library apiary boathouse church mosque stupa planetarium restaurant cinema home theater lumbermill coil obelisk totem pole castle prison grocery store bakery barbershop bookshop butcher shop confectionery shoe shop tobacco shop toyshop fountain cliff dwelling yurt dock brass megalith bannister breakwater dam chainlink fence picket fence worm fence stone wall grille sliding door turnstile mountain tent scoreboard honeycomb plate rack pedestal beacon mashed potato bell pepper head cabbage broccoli cauliflower zucchini spaghetti squash acorn squash butternut squash cucumber artichoke cardoon mushroom shower curtain jean carton handkerchief sandal ashcan safe plate necklace croquet ball fur coat thimble pajama running shoe cocktail shaker chest manhole cover modem tub tray balance beam bagel prayer rug kimono hot pot whiskey jug knee pad book jacket spindle ski mask beer bottle crash helmet bottlecap tile roof mask maillot Petri dish football helmet bathing cap teddy bear holster pop bottle photocopier vestment crossword puzzle golf ball trifle suit water tower feather boa cloak red wine drumstick shield Christmas stocking hoopskirt menu stage bonnet meat loaf baseball face powder scabbard sunscreen beer glass hen-of-the-woods guacamole lampshade wool hay bow tie mailbag water jug bucket dishrag soup bowl eggnog mortar trench coat paddle chain swab mixing bowl potpie wine bottle shoji bulletproof vest drilling platform binder cardigan sweatshirt pot birdhouse hamper ping-pong ball pencil box pay-phone consomme apron punching bag backpack groom bearskin pencil sharpener broom mosquito net abaya mortarboard poncho crutch Polaroid camera space bar cup racket traffic light quill radio dough cuirass military uniform lipstick shower cap monitor oscilloscope mitten brassiere French loaf vase milk can rugby ball paper towel earthstar envelope miniskirt cowboy hat trolleybus perfume bathtub hotdog coral fungus bullet train pillow toilet tissue cassette carpenter's kit ladle stinkhorn lotion hair spray academic gown dome crate wig burrito pill bottle chain mail theater curtain window shade barrel washbasin ballpoint basketball bath towel cowboy boot gown window screen agaric cellular telephone nipple barbell mailbox lab coat fire screen minibus packet maze pole horizontal bar sombrero pickelhaube rain barrel wallet cassette player comic book piggy bank street sign bell cote fountain pen Windsor tie volleyball overskirt sarong purse bolo tie bib parachute sleeping bag television swimming trunks measuring cup espresso pizza breastplate shopping basket wooden spoon saltshaker chocolate sauce ballplayer goblet gyromitra stretcher water bottle dial telephone soap dispenser jersey school bus jigsaw puzzle plastic bag reflex camera diaper Band Aid ice lolly velvet tennis ball gasmask doormat Loafer ice cream pretzel quilt maillot tape player clog iPod bolete scuba diver pitcher matchstick bikini sock CD player lens cap thatch vault beaker bubble cheeseburger parallel bars flagpole coffee mug rubber eraser stole carbonara dumbbell ================================================ FILE: Assets/Resources/imagenet_comp_graph_label_strings.txt.meta ================================================ fileFormatVersion: 2 guid: a59056e24b8072143b54036c646ab35f timeCreated: 1517148012 licenseType: Free TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Resources/ssd_mobilenet_v1_android_export.bytes ================================================ [File too large to display: 27.7 MB] ================================================ FILE: Assets/Resources/ssd_mobilenet_v1_android_export.bytes.meta ================================================ fileFormatVersion: 2 guid: dc932743ced7f3f469965a13ea2a3286 TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Resources/tensorflow_inception_graph.bytes ================================================ [File too large to display: 51.4 MB] ================================================ FILE: Assets/Resources/tensorflow_inception_graph.bytes.meta ================================================ fileFormatVersion: 2 guid: 6563170825a12804e82a117174111f3b timeCreated: 1517148011 licenseType: Free TextScriptImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Resources.meta ================================================ fileFormatVersion: 2 guid: fe2bd9c8c57fb0c41bcb64db0c3f0801 folderAsset: yes timeCreated: 1517147999 licenseType: Free DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Scripts/Classifier.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using TensorFlow; using UnityEngine; namespace TFClassify { public class Classifier { private static int IMAGE_MEAN = 117; private static float IMAGE_STD = 1; private static string INPUT_NAME = "input"; private static string OUTPUT_NAME = "output"; private int inputSize; private TFGraph graph; private string[] labels; public Classifier(byte[] model, string[] labels, int inputSize) { #if UNITY_ANDROID TensorFlowSharp.Android.NativeBinding.Init(); #endif this.labels = labels; this.inputSize = inputSize; this.graph = new TFGraph(); this.graph.Import(model, ""); } public Task>> ClassifyAsync(Color32[] data) { return Task.Run(() => { var map = new List>(); using (var session = new TFSession(this.graph)) using (var tensor = TransformInput(data, this.inputSize, this.inputSize)) { var runner = session.GetRunner(); runner.AddInput(graph[INPUT_NAME][0], tensor).Fetch(graph[OUTPUT_NAME][0]); var output = runner.Run(); // output[0].Value() is a vector containing probabilities of // labels for each image in the "batch". The batch size was 1. // Find the most probably label index. var result = output[0]; var rshape = result.Shape; if (result.NumDims != 2 || rshape [0] != 1) { var shape = ""; foreach (var d in rshape) { shape += $"{d} "; } shape = shape.Trim (); Debug.Log("Error: expected to produce a [1 N] shaped tensor where N is the number of labels, instead it produced one with shape [{shape}]"); Environment.Exit (1); } var probabilities = ((float[][])result.GetValue(jagged: true))[0]; for (int i = 0; i < labels.Length; i++) { map.Add(new KeyValuePair(labels[i], probabilities[i] * 100)); } foreach (var ts in output) { ts.Dispose(); } } return map.OrderByDescending(x => x.Value).ToList(); }); } public static TFTensor TransformInput(Color32[] pic, int width, int height) { float[] floatValues = new float[width * height * 3]; for (int i = 0; i < pic.Length; ++i) { var color = pic[i]; floatValues [i * 3 + 0] = (color.r - IMAGE_MEAN) / IMAGE_STD; floatValues [i * 3 + 1] = (color.g - IMAGE_MEAN) / IMAGE_STD; floatValues [i * 3 + 2] = (color.b - IMAGE_MEAN) / IMAGE_STD; } TFShape shape = new TFShape(1, width, height, 3); return TFTensor.FromBuffer(shape, floatValues, 0, floatValues.Length); } } } ================================================ FILE: Assets/Scripts/Classifier.cs.meta ================================================ fileFormatVersion: 2 guid: 787deb880ce1b38428badca49bc61e3b timeCreated: 1517149854 licenseType: Free MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Scripts/Detector.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using TensorFlow; using UnityEngine; namespace TFClassify { public class BoxOutline { public float YMin { get; set; } = 0; public float XMin { get; set; } = 0; public float YMax { get; set; } = 0; public float XMax { get; set; } = 0; public string Label { get; set; } public float Score { get; set; } } public class Detector { private static int IMAGE_MEAN = 117; private static float IMAGE_STD = 1; // Minimum detection confidence to track a detection. private static float MINIMUM_CONFIDENCE = 0.6f; private int inputSize; private TFGraph graph; private string[] labels; public Detector(byte[] model, string[] labels, int inputSize) { #if UNITY_ANDROID TensorFlowSharp.Android.NativeBinding.Init(); #endif this.labels = labels; this.inputSize = inputSize; this.graph = new TFGraph(); this.graph.Import(new TFBuffer(model)); } public Task> DetectAsync(Color32[] data) { return Task.Run(() => { using (var session = new TFSession(this.graph)) using (var tensor = TransformInput(data, this.inputSize, this.inputSize)) { var runner = session.GetRunner(); runner.AddInput(this.graph["image_tensor"][0], tensor) .Fetch(this.graph["detection_boxes"][0], this.graph["detection_scores"][0], this.graph["detection_classes"][0], this.graph["num_detections"][0]); var output = runner.Run(); var boxes = (float[,,])output[0].GetValue(jagged: false); var scores = (float[,])output[1].GetValue(jagged: false); var classes = (float[,])output[2].GetValue(jagged: false); foreach(var ts in output) { ts.Dispose(); } return GetBoxes(boxes, scores, classes, MINIMUM_CONFIDENCE); } }); } public static TFTensor TransformInput(Color32[] pic, int width, int height) { byte[] floatValues = new byte[width * height * 3]; for (int i = 0; i < pic.Length; ++i) { var color = pic[i]; floatValues [i * 3 + 0] = (byte)((color.r - IMAGE_MEAN) / IMAGE_STD); floatValues [i * 3 + 1] = (byte)((color.g - IMAGE_MEAN) / IMAGE_STD); floatValues [i * 3 + 2] = (byte)((color.b - IMAGE_MEAN) / IMAGE_STD); } TFShape shape = new TFShape(1, width, height, 3); return TFTensor.FromBuffer(shape, floatValues, 0, floatValues.Length); } private List GetBoxes(float[,,] boxes, float[,] scores, float[,] classes, double minScore) { var x = boxes.GetLength(0); var y = boxes.GetLength(1); var z = boxes.GetLength(2); float ymin = 0, xmin = 0, ymax = 0, xmax = 0; var results = new List(); for (int i = 0; i < x; i++) { for (int j = 0; j < y; j++) { if (scores [i, j] < minScore) continue; for (int k = 0; k < z; k++) { var box = boxes [i, j, k]; switch (k) { case 0: ymin = box; break; case 1: xmin = box; break; case 2: ymax = box; break; case 3: xmax = box; break; } } int value = Convert.ToInt32(classes[i, j]); var label = this.labels[value]; var boxOutline = new BoxOutline { YMin = ymin, XMin = xmin, YMax = ymax, XMax = xmax, Label = label, Score = scores[i, j], }; results.Add(boxOutline); } } return results; } } } ================================================ FILE: Assets/Scripts/Detector.cs.meta ================================================ fileFormatVersion: 2 guid: da11ba848a6f6304092f9ba436774b18 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Scripts/PhoneCamera.cs ================================================ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using TFClassify; using System.Diagnostics; using System.Threading.Tasks; using Debug = UnityEngine.Debug; using TensorFlow; public enum Mode { Detect, Classify, } public class PhoneCamera : MonoBehaviour { private const int detectImageSize = 300; private const int classifyImageSize = 224; private static Texture2D boxOutlineTexture; private static GUIStyle labelStyle; private bool camAvailable; private WebCamTexture backCamera; private Texture defaultBackground; private Classifier classifier; private Detector detector; private List boxOutlines; private Vector2 backgroundSize; private Vector2 backgroundOrigin; public Mode mode; public RawImage background; public AspectRatioFitter fitter; public TextAsset modelFile; public TextAsset labelsFile; public Text uiText; private void Start() { LoadWorker(); defaultBackground = background.texture; WebCamDevice[] devices = WebCamTexture.devices; if(devices.Length == 0) { this.uiText.text = "No camera detected"; camAvailable = false; return; } for(int i = 0; i < devices.Length; i++) { if(!devices[i].isFrontFacing) { this.backCamera = new WebCamTexture(devices[i].name, Screen.width, Screen.height); } } if(backCamera == null) { this.uiText.text = "Unable to find back camera"; return; } this.backCamera.Play(); this.background.texture = this.backCamera; this.backgroundSize = new Vector2(this.backCamera.width, this.backCamera.height); camAvailable = true; string func = mode == Mode.Classify ? nameof(TFClassify) : nameof(TFDetect); InvokeRepeating(func, 1f, 1f); } private void Update() { if(!this.camAvailable) { return; } float ratio = (float)backCamera.width / (float)backCamera.height; fitter.aspectRatio = ratio; float scaleY = backCamera.videoVerticallyMirrored ? -1f : 1f; background.rectTransform.localScale = new Vector3(1f, scaleY, 1f); int orient = -backCamera.videoRotationAngle; background.rectTransform.localEulerAngles = new Vector3(0, 0, orient); } public void OnGUI() { if (this.boxOutlines != null && this.boxOutlines.Any()) { foreach (var outline in this.boxOutlines) { DrawBoxOutline(outline); } } } private void LoadWorker() { try { if (mode == Mode.Classify) { LoadClassifier(); } else { LoadDetector(); } } catch (TFException ex) { if (ex.Message.EndsWith("is up to date with your GraphDef-generating binary.).")) { this.uiText.text = "Error: TFException. Make sure you model trained with same version of TensorFlow as in Unity plugin."; } throw; } } private void LoadClassifier() { this.classifier = new Classifier( this.modelFile.bytes, Regex.Split(this.labelsFile.text, "\n|\r|\r\n") .Where(s => !String.IsNullOrEmpty(s)).ToArray(), classifyImageSize); } private void LoadDetector() { this.detector = new Detector( this.modelFile.bytes, Regex.Split(this.labelsFile.text, "\n|\r|\r\n") .Where(s => !String.IsNullOrEmpty(s)).ToArray(), detectImageSize); } private async void TFClassify() { var snap = TakeTextureSnap(); var scaled = Scale(snap, classifyImageSize); var rotated = await RotateAsync(scaled.GetPixels32(), scaled.width, scaled.height); try { var probabilities = await this.classifier.ClassifyAsync(rotated); this.uiText.text = String.Empty; for(int i = 0; i < 3; i++) { this.uiText.text += probabilities[i].Key + ": " + String.Format("{0:0.000}%", probabilities[i].Value) + "\n"; } } catch (NullReferenceException) { this.uiText.text = "Error: NullReferenceException. Make sure you set correct INPUT_NAME and OUTPUT_NAME"; } finally { Destroy(snap); Destroy(scaled); } } private async void TFDetect() { UpdateBackgroundOrigin(); var snap = TakeTextureSnap(); var scaled = Scale(snap, detectImageSize); var rotated = await RotateAsync(scaled.GetPixels32(), scaled.width, scaled.height); this.boxOutlines = await this.detector.DetectAsync(rotated); Destroy(snap); Destroy(scaled); } private void UpdateBackgroundOrigin() { var backgroundPosition = this.background.transform.position; this.backgroundOrigin = new Vector2(backgroundPosition.x - this.backgroundSize.x / 2, backgroundPosition.y - this.backgroundSize.y / 2); } private void DrawBoxOutline(BoxOutline outline) { var xMin = outline.XMin * this.backgroundSize.x + this.backgroundOrigin.x; var xMax = outline.XMax * this.backgroundSize.x + this.backgroundOrigin.x; var yMin = outline.YMin * this.backgroundSize.y + this.backgroundOrigin.y; var yMax = outline.YMax * this.backgroundSize.y + this.backgroundOrigin.y; DrawRectangle(new Rect(xMin, yMin, xMax - xMin, yMax - yMin), 4, Color.red); DrawLabel(new Rect(xMin + 10, yMin + 10, 200, 20), $"{outline.Label}: {(int)(outline.Score * 100)}%"); } public static void DrawRectangle(Rect area, int frameWidth, Color color) { // Create a one pixel texture with the right color if (boxOutlineTexture == null) { var texture = new Texture2D(1, 1); texture.SetPixel(0, 0, color); texture.Apply(); boxOutlineTexture = texture; } Rect lineArea = area; lineArea.height = frameWidth; GUI.DrawTexture(lineArea, boxOutlineTexture); // Top line lineArea.y = area.yMax - frameWidth; GUI.DrawTexture(lineArea, boxOutlineTexture); // Bottom line lineArea = area; lineArea.width = frameWidth; GUI.DrawTexture(lineArea, boxOutlineTexture); // Left line lineArea.x = area.xMax - frameWidth; GUI.DrawTexture(lineArea, boxOutlineTexture); // Right line } private static void DrawLabel(Rect position, string text) { if (labelStyle == null) { var style = new GUIStyle(); style.fontSize = 50; style.normal.textColor = Color.red; labelStyle = style; } GUI.Label(position, text, labelStyle); } private Texture2D TakeTextureSnap() { var smallest = backCamera.width < backCamera.height ? backCamera.width : backCamera.height; var snap = TextureTools.CropWithRect(backCamera, new Rect(0, 0, smallest, smallest), TextureTools.RectOptions.Center, 0, 0); return snap; } private Texture2D Scale(Texture2D texture, int imageSize) { var scaled = TextureTools.scaled(texture, imageSize, imageSize, FilterMode.Bilinear); return scaled; } private Task RotateAsync(Color32[] pixels, int width, int height) { return Task.Run(() => { return TextureTools.RotateImageMatrix( pixels, width, height, -90); }); } private Task RotateAsync(Texture2D texture) { return Task.Run(() => { return TextureTools.RotateTexture(texture, -90); }); } private void SaveToFile(Texture2D texture) { File.WriteAllBytes( Application.persistentDataPath + "/" + "snap.png", texture.EncodeToPNG()); } } ================================================ FILE: Assets/Scripts/PhoneCamera.cs.meta ================================================ fileFormatVersion: 2 guid: 0bc98c2a8aaebb24c98786f1897d9f3b timeCreated: 1517148004 licenseType: Free MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Scripts/TextureTools.cs ================================================ using System; using UnityEngine; namespace TFClassify { public class TextureTools { // Based on https://gist.github.com/natsupy/e129936543f9b4663a37ea0762172b3b public enum Options { Crop = 0, Resize = 1 } public enum RectOptions { Center = 0, BottomRight = 1, TopRight = 2, BottomLeft = 3, TopLeft = 4, //Top = 5, //Left = 6, //Right = 7, //Bottom = 8, Custom = 9 } public static Texture2D CropWithRect( WebCamTexture texture, Rect rect, RectOptions rectOptions, int xMod, int yMod) { if(rect.height < 0 || rect.width < 0) { throw new System.ArgumentException("Invalid texture size"); } Texture2D result = new Texture2D((int)rect.width, (int)rect.height); if(rect.width != 0 && rect.height != 0) { float xRect = rect.x; float yRect = rect.y; float widthRect = rect.width; float heightRect = rect.height; switch(rectOptions) { case RectOptions.Center: xRect = (texture.width - rect.width) / 2; yRect = (texture.height - rect.height) / 2; break; case RectOptions.BottomRight: xRect = texture.width - rect.width; break; case RectOptions.BottomLeft: break; case RectOptions.TopLeft: yRect = texture.height - rect.height; break; case RectOptions.TopRight: xRect = texture.width - rect.width; yRect = texture.height - rect.height; break; case RectOptions.Custom: float tempWidth = texture.width - rect.width - xMod; float tempHeight = texture.height - rect.height - yMod; xRect = tempWidth > texture.width ? 0 : tempWidth; yRect = tempHeight > texture.height ? 0 : tempHeight; break; } if (texture.width < rect.x + rect.width || texture.height < rect.y + rect.height || xRect > rect.x + texture.width || yRect > rect.y + texture.height || xRect < 0 || yRect < 0 || rect.width < 0 || rect.height < 0) { throw new System.ArgumentException("Set value crop less than origin texture size"); } result.SetPixels(texture.GetPixels(Mathf.FloorToInt(xRect), Mathf.FloorToInt(yRect), Mathf.FloorToInt(widthRect), Mathf.FloorToInt(heightRect))); result.Apply(); } return result; } /// /// Returns a scaled copy of given texture. /// /// Source texure to scale /// Destination texture width /// Destination texture height /// Filtering mode public static Texture2D scaled(Texture2D src, int width, int height, FilterMode mode = FilterMode.Trilinear) { Rect texR = new Rect(0,0,width,height); _gpu_scale(src,width,height,mode); //Get rendered data back to a new texture Texture2D result = new Texture2D(width, height, TextureFormat.ARGB32, true); result.Resize(width, height); result.ReadPixels(texR,0,0,true); return result; } /// /// Scales the texture data of the given texture. /// /// Texure to scale /// New width /// New height /// Filtering mode public static void scale(Texture2D tex, int width, int height, FilterMode mode = FilterMode.Trilinear) { Rect texR = new Rect(0,0,width,height); _gpu_scale(tex,width,height,mode); // Update new texture tex.Resize(width, height); tex.ReadPixels(texR,0,0,true); tex.Apply(true); //Remove this if you hate us applying textures for you :) } // Internal unility that renders the source texture into the RTT - the scaling method itself. static void _gpu_scale(Texture2D src, int width, int height, FilterMode fmode) { //We need the source texture in VRAM because we render with it src.filterMode = fmode; src.Apply(true); //Using RTT for best quality and performance. Thanks, Unity 5 RenderTexture rtt = new RenderTexture(width, height, 32); //Set the RTT in order to render to it Graphics.SetRenderTarget(rtt); //Setup 2D matrix in range 0..1, so nobody needs to care about sized GL.LoadPixelMatrix(0,1,1,0); //Then clear & draw the texture to fill the entire RTT. GL.Clear(true,true,new Color(0,0,0,0)); Graphics.DrawTexture(new Rect(0,0,1,1),src); } public static Texture2D RotateTexture(Texture2D originTexture, int angle) { var result = RotateImageMatrix( originTexture.GetPixels32(), originTexture.width, originTexture.height, angle); var resultTexture = new Texture2D(originTexture.width, originTexture.height); resultTexture.SetPixels32(result); resultTexture.Apply(); return resultTexture; } public static Color32[] RotateImageMatrix(Color32[] matrix, int width, int height, int angle) { Color32[] pix1 = new Color32[matrix.Length]; int x = 0; int y = 0; Color32[] pix3 = rotateSquare( matrix, width, height, (Math.PI/180*(double)angle)); for (int j = 0; j < height; j++){ for (var i = 0; i < width; i++) { pix1[x + i + width*(j+y)] = pix3[i + j*width]; } } return pix3; } static Color32[] rotateSquare(Color32[] arr, int width, int height, double phi) { int x; int y; int i; int j; double sn = Math.Sin(phi); double cs = Math.Cos(phi); Color32[] arr2 = new Color32[arr.Length]; int xc = width/2; int yc = height/2; for (j=0; j-1) && (x-1) && (y