File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Tasks/Core Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,10 @@ public sealed class BaseOptions
1010 {
1111 public enum Delegate
1212 {
13- CPU ,
14- GPU ,
13+ CPU = 0 ,
14+ GPU = 1 ,
15+ // Edge TPU acceleration using NNAPI delegate.
16+ EDGETPU_NNAPI = 2 ,
1517 }
1618
1719 public Delegate delegateCase { get ; } = Delegate . CPU ;
@@ -39,7 +41,18 @@ private Proto.Acceleration acceleration
3941 case Delegate . GPU :
4042 return new Proto . Acceleration
4143 {
42- Gpu = new InferenceCalculatorOptions . Types . Delegate . Types . Gpu { } ,
44+ Gpu = new InferenceCalculatorOptions . Types . Delegate . Types . Gpu
45+ {
46+ UseAdvancedGpuApi = true ,
47+ } ,
48+ } ;
49+ case Delegate . EDGETPU_NNAPI :
50+ return new Proto . Acceleration
51+ {
52+ Nnapi = new InferenceCalculatorOptions . Types . Delegate . Types . Nnapi
53+ {
54+ AcceleratorName = "google-edgetpu" ,
55+ } ,
4356 } ;
4457 default :
4558 return null ;
You can’t perform that action at this time.
0 commit comments