derenlei / Unity_Detection2AR

Localize 2D image object detection in 3D Scene with Yolo in Unity Barracuda and ARFoundation.
https://derenlei.medium.com/object-detection-with-localization-using-unity-barracuda-and-arfoundation-794b4eff02f8
MIT License
218 stars 61 forks source link

Add Barracuda GPU worker supports #14

Closed ROBYER1 closed 3 years ago

ROBYER1 commented 3 years ago

Only 2 files should be changed here - both the Detector.cs scripts

All logic is following the supported platforms from here https://docs.unity3d.com/Packages/com.unity.barracuda@1.0/manual/SupportedPlatforms.html

Added platform and rendering system checks to see if the platform allows CPU/GPU Currently IOS has full GPU support with Metal API on IOS11 for all support ARKit Devices However, Android Vulka has GPU support but ARCore currently does not support Vulkan IOS:GPU support is enabled if we are using metal if not fall back to CPU Android:GPU support will be enabled if the device is running Vulkan, if not fall back to CPU

ROBYER1 commented 3 years ago

I forgot to add, this helps on IOS with speed of detection as we can use GPU