diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 448886d..140cbc7 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -10962,7 +10962,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aad934041a3d88c45b687ed811756753, type: 3} m_Name: m_EditorClassIdentifier: - ModelFile: {fileID: 5022602860645237092, guid: 0a133a957381bf448918730d57608d88, type: 3} + ModelFile: {fileID: 5022602860645237092, guid: 191bc89fbc388ae4c9f0b290bd0a7776, type: 3} material_t: {fileID: 2100000, guid: d4c3396def303a84d81ff6a10a617c11, type: 2} MinBoxConfidence: 0.3 textureProviderType: 0 diff --git a/Assets/Script/Detection/NN/YOLOv8.cs b/Assets/Script/Detection/NN/YOLOv8.cs index 0d2767f..fa5b37f 100644 --- a/Assets/Script/Detection/NN/YOLOv8.cs +++ b/Assets/Script/Detection/NN/YOLOv8.cs @@ -24,6 +24,7 @@ public List Run(Texture2D image) Profiler.BeginSample("YOLO.Run"); var outputs = ExecuteModel(image); var results = Postprocess(outputs); + //var results = new List(); Profiler.EndSample(); return results; } @@ -44,6 +45,7 @@ private void ExecuteBlocking(Tensor preprocessed) Profiler.EndSample(); } + private IEnumerable PeekOutputs() { foreach (string outputName in nn.model.outputs) diff --git a/Assets/Script/Detection/NN/YOLOv8OutputReader.cs b/Assets/Script/Detection/NN/YOLOv8OutputReader.cs index fe4a7c4..f65405e 100644 --- a/Assets/Script/Detection/NN/YOLOv8OutputReader.cs +++ b/Assets/Script/Detection/NN/YOLOv8OutputReader.cs @@ -11,9 +11,9 @@ public class YOLOv8OutputReader { public static float DiscardThreshold = 0.1f; protected const int ClassesNum = 80; - const int BoxesPerCell = 8400; - const int InputWidth = 640; - const int InputHeight = 640; + const int BoxesPerCell = 2100; + const int InputWidth = 320; + const int InputHeight = 320; public IEnumerable ReadOutput(Tensor output) { diff --git a/Assets/Script/Detection/TextureProviders/TextureProvider.cs b/Assets/Script/Detection/TextureProviders/TextureProvider.cs index 1bae978..67e5dea 100644 --- a/Assets/Script/Detection/TextureProviders/TextureProvider.cs +++ b/Assets/Script/Detection/TextureProviders/TextureProvider.cs @@ -30,7 +30,7 @@ public TextureProvider(int width, int height, TextureFormat format = TextureForm public virtual Texture2D GetTexture() { - return TextureTools.ResizeAndCropToCenter(InputTexture, ref ResultTexture, ResultTexture.width, ResultTexture.height); + return TextureTools.ResizeAndCropToCenter(InputTexture, ref ResultTexture, 640, 640); } public abstract TextureProviderType.ProviderType TypeEnum(); diff --git a/Assets/XR/Settings/OpenXR Package Settings.asset b/Assets/XR/Settings/OpenXR Package Settings.asset index e3aa23a..e92d089 100644 --- a/Assets/XR/Settings/OpenXR Package Settings.asset +++ b/Assets/XR/Settings/OpenXR Package Settings.asset @@ -522,7 +522,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9f34c86d1a130cc45a438373e1e8a4fc, type: 3} m_Name: PlayModeRemotingPlugin Standalone m_EditorClassIdentifier: - m_enabled: 0 + m_enabled: 1 nameUi: Holographic Remoting for Play Mode version: 1.8.1 featureIdInternal: com.microsoft.openxr.feature.playmoderemoting diff --git a/Assets/yolov8n_320 1.onnx b/Assets/yolov8n_320 1.onnx new file mode 100644 index 0000000..0b21eaa Binary files /dev/null and b/Assets/yolov8n_320 1.onnx differ diff --git a/Assets/yolov8n_320 1.onnx.meta b/Assets/yolov8n_320 1.onnx.meta new file mode 100644 index 0000000..666ceb4 --- /dev/null +++ b/Assets/yolov8n_320 1.onnx.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: 191bc89fbc388ae4c9f0b290bd0a7776 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + optimizeModel: 1 + forceArbitraryBatchSize: 1 + treatErrorsAsWarnings: 0 + importMode: 1 + weightsTypeMode: 0 + activationTypeMode: 0