From 38e9f34cbdbf972b9044d4dca4811e259be144e4 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Fri, 4 Jan 2019 21:01:49 +0800 Subject: [PATCH] format files and adjust architecture --- .gitignore | 3 + .../project.pbxproj | 112 +++- .../Base.lproj/Main.storyboard | 12 +- .../LoadPointerViewController.h | 13 - .../{Net => }/MetalHelper.swift | 3 - .../paddle-mobile-demo/Net}/CPUCompute.h | 0 .../paddle-mobile-demo/Net}/CPUCompute.mm | 0 .../paddle-mobile-demo/Net}/Genet.swift | 26 +- .../paddle-mobile-demo/Net}/MobileNet.swift | 12 +- .../Net/MobileNetCombined.swift | 33 + .../Net}/MobileNetSSD.swift | 21 +- .../Net}/MobilenetSSD_AR.swift | 77 +-- .../paddle-mobile-demo/Net/PaddleMobile.swift | 9 - .../Net/PreProcessKernel.metal | 20 - .../paddle-mobile-demo/Net/YoloNet.swift | 34 + .../OCDemo/LoadPointerViewController.h | 19 + .../{ => OCDemo}/LoadPointerViewController.m | 24 +- .../OCDemo/OCDemoViewController.h | 22 + .../OCDemo/OCDemoViewController.m | 19 + .../OCInterface}/PaddleMobileGPU.h | 5 +- .../OCInterface}/PaddleMobileGPU.m | 9 +- .../OCInterface}/SuperResolutionNet.swift | 24 +- .../paddle-mobile-demo/ViewController.swift | 33 +- .../metal/BatchNormKernel.metal | 0 .../metal/BatchNormRelu.metal | 0 .../metal/BilinearInterp.inc.metal | 0 .../metal/BilinearInterp.metal | 0 .../metal/BoxCoder.inc.metal | 0 .../paddle-mobile-demo}/metal/BoxCoder.metal | 0 .../paddle-mobile-demo}/metal/Common.metal | 0 .../metal/ConcatKernel.inc.metal | 0 .../metal/ConcatKernel.metal | 0 .../metal/ConvAddBNReluKernel.metal | 0 .../metal/ConvAddMetal.metal | 0 .../metal/ConvAddPrelu.inc.metal | 0 .../metal/ConvAddPreluKernel.metal | 0 .../metal/ConvBNReluKernel.metal | 0 .../metal/ConvKernel.metal | 0 .../metal/ConvTransposeKernel.metal | 0 .../metal/Elementwise.metal | 0 .../metal/ElementwiseAddPreluKernel.inc.metal | 0 .../metal/ElementwiseAddPreluKernel.metal | 0 .../metal/FetchKernel.inc.metal | 0 .../metal/FetchKernel.metal | 0 .../paddle-mobile-demo}/metal/Kernels.metal | 0 .../paddle-mobile-demo}/metal/Macro.metal | 0 .../metal/NMSFetchResultKernel.metal | 0 .../metal/PoolKernel.inc.metal | 0 .../metal/PoolKernel.metal | 0 .../metal/PreluKernel.metal | 0 .../metal/PriorBoxKernel.metal | 0 .../metal/ReluKernel.metal | 0 .../metal/ReshapeKernel.inc.metal | 0 .../metal/ReshapeKernel.metal | 0 .../metal/ResizeBilinear.metal | 0 .../paddle-mobile-demo}/metal/Shape.metal | 0 .../metal/Softmax.inc.metal | 0 .../paddle-mobile-demo}/metal/Softmax.metal | 0 .../paddle-mobile-demo}/metal/Split.inc.metal | 0 .../paddle-mobile-demo}/metal/Split.metal | 0 .../metal/TransposeKernel.inc.metal | 0 .../metal/TransposeKernel.metal | 0 .../paddle-mobile.xcodeproj/project.pbxproj | 106 ++- .../paddle-mobile/API/GlobalConfig.swift | 38 ++ .../paddle-mobile/paddle-mobile/API/Net.swift | 87 +++ .../paddle-mobile/{ => API}/Runner.swift | 136 ++-- .../CustomNet/MobileNetCombined.swift | 47 -- .../paddle-mobile/CustomNet/YoloNet.swift | 49 -- metal/paddle-mobile/paddle-mobile/Net.swift | 98 --- .../{ => Src}/Common/Errors.swift | 0 .../{ => Src}/Common/Extensions.swift | 0 .../{ => Src}/Common/MetalExtension.swift | 32 +- .../Common/PaddleMobileUnitTest.swift | 5 +- .../{ => Src}/Common/Tools.swift | 0 .../{ => Src}/Common/Types.swift | 14 +- .../{ => Src}/Operators/Base/OpCreator.swift | 6 +- .../{ => Src}/Operators/Base/OpParam.swift | 0 .../{ => Src}/Operators/Base/Operator.swift | 53 +- .../{ => Src}/Operators/BatchNormOp.swift | 0 .../Operators/BilinearInterpOp.swift | 0 .../{ => Src}/Operators/BoxcoderOp.swift | 0 .../{ => Src}/Operators/CNNMPSConvOp.swift | 0 .../{ => Src}/Operators/ConcatOp.swift | 0 .../Operators/ConvAddAddPreluOp.swift | 0 .../Operators/ConvAddBatchNormReluOp.swift | 0 .../{ => Src}/Operators/ConvAddOp.swift | 1 + .../{ => Src}/Operators/ConvAddPreluOp.swift | 0 .../{ => Src}/Operators/ConvBNReluOp.swift | 0 .../{ => Src}/Operators/ConvOp.swift | 0 .../{ => Src}/Operators/ConvTransposeOp.swift | 0 .../{ => Src}/Operators/DepthwiseConvOp.swift | 8 - .../{ => Src}/Operators/DwConvBNReluOp.swift | 0 .../Operators/ElementwiseAddOp.swift | 2 +- .../Operators/ElementwiseAddPreluOp.swift | 2 +- .../{ => Src}/Operators/FeedOp.swift | 2 +- .../{ => Src}/Operators/FetchOp.swift | 10 +- .../{ => Src}/Operators/FlattenOp.swift | 0 .../Operators/Kernels/Base/Kernel.swift | 42 +- .../Operators/Kernels/BatchNormKernel.swift | 16 +- .../Kernels/BatchNormReluKernel.swift | 0 .../Kernels/BilinearInterpKernel.swift | 12 +- .../Operators/Kernels/BoxcoderKernel.swift | 12 +- .../Operators/Kernels/CNNConvKernel.swift | 0 .../{ => Src}/Operators/Kernels/Concat.swift | 0 .../Operators/Kernels/ConcatKernel.swift | 16 +- .../Kernels/ConvAddAddPreluKernel.swift | 74 +-- .../Kernels/ConvAddBatchNormReluKernel.swift | 36 +- .../Operators/Kernels/ConvAddKernel.swift | 32 +- .../Kernels/ConvAddPreluKernel.swift | 74 +-- .../Operators/Kernels/ConvBNReluKernel.swift | 34 +- .../Operators/Kernels/ConvKernel.swift | 8 +- .../Kernels/ConvTransposeKernel.swift | 14 +- .../Kernels/ElementwiseAddKernel.swift | 12 +- .../Kernels/ElementwiseAddPreluKernel.swift | 22 +- .../Operators/Kernels/FlattenKernel.swift | 12 +- .../Kernels/MulticlassNMSKernel.swift | 14 +- .../Operators/Kernels/PoolKernel.swift | 12 +- .../Operators/Kernels/PreluKernel.swift | 22 +- .../Operators/Kernels/PriorBoxKernel.swift | 23 +- .../Operators/Kernels/ReluKernel.swift | 10 +- .../Operators/Kernels/ReshapeKernel.swift | 16 +- .../Kernels/ResizeBilinearKernel.swift | 22 +- .../Src/Operators/Kernels/Scale.swift | 22 + .../Operators/Kernels/ShapeKernel.swift | 12 +- .../Operators/Kernels/SoftmaxKernel.swift | 12 +- .../Operators/Kernels/SplitKernel.swift | 12 +- .../Kernels/Texture2DTo2DArrayKernel.swift | 12 +- .../Operators/Kernels/TransposeKernel.swift | 10 +- .../Kernels/metal/BatchNormKernel.metal | 42 ++ .../Kernels/metal/BatchNormRelu.metal | 36 + .../Kernels/metal/BilinearInterp.inc.metal | 49 ++ .../Kernels/metal/BilinearInterp.metal | 29 + .../Kernels/metal/BoxCoder.inc.metal | 54 ++ .../Operators/Kernels/metal/BoxCoder.metal | 23 + .../Src/Operators/Kernels/metal/Common.metal | 120 ++++ .../Kernels/metal/ConcatKernel.inc.metal | 318 +++++++++ .../Kernels/metal/ConcatKernel.metal | 171 +++++ .../Kernels/metal/ConvAddBNReluKernel.metal | 310 +++++++++ .../Kernels/metal/ConvAddMetal.metal | 622 ++++++++++++++++++ .../Kernels/metal/ConvAddPrelu.inc.metal | 447 +++++++++++++ .../Kernels/metal/ConvAddPreluKernel.metal | 65 ++ .../Kernels/metal/ConvBNReluKernel.metal | 297 +++++++++ .../Operators/Kernels/metal/ConvKernel.metal | 280 ++++++++ .../Kernels/metal/ConvTransposeKernel.metal | 174 +++++ .../Operators/Kernels/metal/Elementwise.metal | 100 +++ .../metal/ElementwiseAddPreluKernel.inc.metal | 91 +++ .../metal/ElementwiseAddPreluKernel.metal | 75 +++ .../Kernels/metal/FetchKernel.inc.metal | 46 ++ .../Operators/Kernels/metal/FetchKernel.metal | 40 ++ .../Src/Operators/Kernels/metal/Kernels.metal | 69 ++ .../Src/Operators/Kernels/metal/Macro.metal | 29 + .../Kernels/metal/NMSFetchResultKernel.metal | 80 +++ .../Kernels/metal/PoolKernel.inc.metal | 44 ++ .../Operators/Kernels/metal/PoolKernel.metal | 36 + .../Operators/Kernels/metal/PreluKernel.metal | 151 +++++ .../Kernels/metal/PriorBoxKernel.metal | 367 +++++++++++ .../Operators/Kernels/metal/ReluKernel.metal | 41 ++ .../Kernels/metal/ReshapeKernel.inc.metal | 66 ++ .../Kernels/metal/ReshapeKernel.metal | 150 +++++ .../Kernels/metal/ResizeBilinear.metal | 75 +++ .../Src/Operators/Kernels/metal/Scale.metal | 30 + .../Src/Operators/Kernels/metal/Shape.metal | 21 + .../Operators/Kernels/metal/Softmax.inc.metal | 61 ++ .../Src/Operators/Kernels/metal/Softmax.metal | 29 + .../Operators/Kernels/metal/Split.inc.metal | 122 ++++ .../Src/Operators/Kernels/metal/Split.metal | 64 ++ .../Kernels/metal/TransposeKernel.inc.metal | 60 ++ .../Kernels/metal/TransposeKernel.metal | 63 ++ .../{ => Src}/Operators/MulticlassNMSOp.swift | 7 +- .../{ => Src}/Operators/PoolOp.swift | 0 .../{ => Src}/Operators/PreluOp.swift | 0 .../{ => Src}/Operators/PriorBoxOp.swift | 0 .../{ => Src}/Operators/ReluOp.swift | 1 + .../{ => Src}/Operators/ReshapeOp.swift | 0 .../Operators/ResizeBilinearOp.swift | 0 .../{ => Src}/Operators/ShapeOp.swift | 0 .../{ => Src}/Operators/SoftmaxOp.swift | 0 .../{ => Src}/Operators/SplitOp.swift | 0 .../{ => Src}/Operators/TransposeOp.swift | 0 .../{ => Src}/Program/Attribute.swift | 0 .../{ => Src}/Program/BlockDesc.swift | 10 +- .../{ => Src}/Program/OpDesc.swift | 0 .../{ => Src}/Program/Program.swift | 8 +- .../{ => Src}/Program/ProgramDesc.swift | 2 +- .../{ => Src}/Program/ProgramOptimize.swift | 0 .../{ => Src}/Program/Scope.swift | 6 +- .../{ => Src}/Program/TensorDesc.swift | 0 .../{ => Src}/Program/VarDesc.swift | 14 +- .../{ => Src}/Program/framework.pb.swift | 0 .../paddle-mobile/Src/framework/Dim.swift | 55 ++ .../{ => Src}/framework/Executor.swift | 56 +- .../{ => Src}/framework/Loader.swift | 0 .../{ => Src}/framework/Tensor.swift | 4 +- .../{ => Src}/framework/Texture.swift | 6 +- .../paddle-mobile/framework/Dim.swift | 60 -- .../paddle-mobile/paddle_mobile.h | 2 - 196 files changed, 6034 insertions(+), 985 deletions(-) delete mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/LoadPointerViewController.h rename metal/paddle-mobile-demo/paddle-mobile-demo/{Net => }/MetalHelper.swift (99%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/CPUCompute.h (100%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/CPUCompute.mm (100%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/Genet.swift (67%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/MobileNet.swift (86%) create mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/Net/MobileNetCombined.swift rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/MobileNetSSD.swift (83%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/Net}/MobilenetSSD_AR.swift (71%) delete mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/Net/PaddleMobile.swift create mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/Net/YoloNet.swift create mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/OCDemo/LoadPointerViewController.h rename metal/paddle-mobile-demo/paddle-mobile-demo/{ => OCDemo}/LoadPointerViewController.m (90%) create mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/OCDemo/OCDemoViewController.h create mode 100644 metal/paddle-mobile-demo/paddle-mobile-demo/OCDemo/OCDemoViewController.m rename metal/{paddle-mobile/paddle-mobile => paddle-mobile-demo/paddle-mobile-demo/OCInterface}/PaddleMobileGPU.h (97%) rename metal/{paddle-mobile/paddle-mobile => paddle-mobile-demo/paddle-mobile-demo/OCInterface}/PaddleMobileGPU.m (89%) rename metal/{paddle-mobile/paddle-mobile/CustomNet => paddle-mobile-demo/paddle-mobile-demo/OCInterface}/SuperResolutionNet.swift (81%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BatchNormKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BatchNormRelu.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BilinearInterp.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BilinearInterp.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BoxCoder.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/BoxCoder.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Common.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConcatKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConcatKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvAddBNReluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvAddMetal.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvAddPrelu.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvAddPreluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvBNReluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ConvTransposeKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Elementwise.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ElementwiseAddPreluKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ElementwiseAddPreluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/FetchKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/FetchKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Kernels.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Macro.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/NMSFetchResultKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/PoolKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/PoolKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/PreluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/PriorBoxKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ReluKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ReshapeKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ReshapeKernel.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/ResizeBilinear.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Shape.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Softmax.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Softmax.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Split.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/Split.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/TransposeKernel.inc.metal (100%) rename metal/{paddle-mobile/paddle-mobile/Operators/Kernels => paddle-mobile-demo/paddle-mobile-demo}/metal/TransposeKernel.metal (100%) create mode 100644 metal/paddle-mobile/paddle-mobile/API/GlobalConfig.swift create mode 100644 metal/paddle-mobile/paddle-mobile/API/Net.swift rename metal/paddle-mobile/paddle-mobile/{ => API}/Runner.swift (52%) delete mode 100644 metal/paddle-mobile/paddle-mobile/CustomNet/MobileNetCombined.swift delete mode 100644 metal/paddle-mobile/paddle-mobile/CustomNet/YoloNet.swift delete mode 100644 metal/paddle-mobile/paddle-mobile/Net.swift rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/Errors.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/Extensions.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/MetalExtension.swift (96%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/PaddleMobileUnitTest.swift (98%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/Tools.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Common/Types.swift (96%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Base/OpCreator.swift (91%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Base/OpParam.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Base/Operator.swift (89%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/BatchNormOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/BilinearInterpOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/BoxcoderOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/CNNMPSConvOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConcatOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvAddAddPreluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvAddBatchNormReluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvAddOp.swift (99%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvAddPreluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvBNReluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ConvTransposeOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/DepthwiseConvOp.swift (90%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/DwConvBNReluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ElementwiseAddOp.swift (98%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ElementwiseAddPreluOp.swift (99%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/FeedOp.swift (98%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/FetchOp.swift (88%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/FlattenOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/Base/Kernel.swift (72%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/BatchNormKernel.swift (76%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/BatchNormReluKernel.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/BilinearInterpKernel.swift (87%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/BoxcoderKernel.swift (83%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/CNNConvKernel.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/Concat.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConcatKernel.swift (88%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvAddAddPreluKernel.swift (75%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvAddBatchNormReluKernel.swift (88%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvAddKernel.swift (82%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvAddPreluKernel.swift (74%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvBNReluKernel.swift (88%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvKernel.swift (88%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ConvTransposeKernel.swift (84%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ElementwiseAddKernel.swift (91%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ElementwiseAddPreluKernel.swift (84%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/FlattenKernel.swift (86%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/MulticlassNMSKernel.swift (79%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/PoolKernel.swift (81%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/PreluKernel.swift (77%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/PriorBoxKernel.swift (87%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ReluKernel.swift (75%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ReshapeKernel.swift (84%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ResizeBilinearKernel.swift (86%) create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/Scale.swift rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/ShapeKernel.swift (70%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/SoftmaxKernel.swift (78%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/SplitKernel.swift (89%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/Texture2DTo2DArrayKernel.swift (81%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/Kernels/TransposeKernel.swift (86%) create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BatchNormKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BatchNormRelu.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BilinearInterp.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BilinearInterp.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BoxCoder.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/BoxCoder.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Common.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConcatKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConcatKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvAddBNReluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvAddMetal.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvAddPrelu.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvAddPreluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvBNReluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ConvTransposeKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Elementwise.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ElementwiseAddPreluKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ElementwiseAddPreluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/FetchKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/FetchKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Kernels.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Macro.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/NMSFetchResultKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/PoolKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/PoolKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/PreluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/PriorBoxKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ReluKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ReshapeKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ReshapeKernel.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/ResizeBilinear.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Scale.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Shape.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Softmax.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Softmax.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Split.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/Split.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/TransposeKernel.inc.metal create mode 100644 metal/paddle-mobile/paddle-mobile/Src/Operators/Kernels/metal/TransposeKernel.metal rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/MulticlassNMSOp.swift (89%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/PoolOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/PreluOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/PriorBoxOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ReluOp.swift (98%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ReshapeOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ResizeBilinearOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/ShapeOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/SoftmaxOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/SplitOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Operators/TransposeOp.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/Attribute.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/BlockDesc.swift (92%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/OpDesc.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/Program.swift (87%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/ProgramDesc.swift (96%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/ProgramOptimize.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/Scope.swift (92%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/TensorDesc.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/VarDesc.swift (92%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/Program/framework.pb.swift (100%) create mode 100644 metal/paddle-mobile/paddle-mobile/Src/framework/Dim.swift rename metal/paddle-mobile/paddle-mobile/{ => Src}/framework/Executor.swift (72%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/framework/Loader.swift (100%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/framework/Tensor.swift (99%) rename metal/paddle-mobile/paddle-mobile/{ => Src}/framework/Texture.swift (96%) delete mode 100644 metal/paddle-mobile/paddle-mobile/framework/Dim.swift diff --git a/.gitignore b/.gitignore index 8e4725d6ac..4b3c7a0921 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,6 @@ metal/paddle-mobile/paddle-mobile/CPU/libpaddle-mobile.a metal/paddle-mobile-demo/paddle-mobile-demo/images metal/paddle-mobile-demo/paddle-mobile-demo/models +metal/paddle-mobile-demo/paddle-mobile-demo/Resources +metal/paddle-mobile-demo/paddle-mobile-demo/Resources/images +metal/paddle-mobile-demo/paddle-mobile-demo/Resources/models diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj b/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj index 20353bf9d5..75e48f2d89 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj +++ b/metal/paddle-mobile-demo/paddle-mobile-demo.xcodeproj/project.pbxproj @@ -10,13 +10,26 @@ 30D0ED21F392CFA3885B1002 /* Pods_paddle_mobile_demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18896810981724F8A0FED62A /* Pods_paddle_mobile_demo.framework */; }; C2CBB49021B778EA0020DC6C /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = FC4FD97B2140EE250073E130 /* libc++.tbd */; }; C2E67E5E21524E460013F575 /* LoadPointerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2E67E5D21524E460013F575 /* LoadPointerViewController.m */; }; - FC013928210204A3008100E3 /* PreProcessKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC013927210204A3008100E3 /* PreProcessKernel.metal */; }; FC039B8220E11C550081E9F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC039B8120E11C550081E9F8 /* AppDelegate.swift */; }; FC039B8420E11C550081E9F8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC039B8320E11C550081E9F8 /* ViewController.swift */; }; FC039B8720E11C550081E9F8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC039B8520E11C550081E9F8 /* Main.storyboard */; }; FC039B8920E11C560081E9F8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FC039B8820E11C560081E9F8 /* Assets.xcassets */; }; FC039B8C20E11C560081E9F8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FC039B8A20E11C560081E9F8 /* LaunchScreen.storyboard */; }; FC203FB221CBFDBA00B37166 /* test.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FC203FA921CBFDBA00B37166 /* test.jpg */; }; + FC2BFCBC21DF0A8600C262B2 /* 00001.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FC2BFCBB21DF0A8600C262B2 /* 00001.jpg */; }; + FC2BFCBE21DF15D900C262B2 /* 123.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FC2BFCBD21DF15D900C262B2 /* 123.jpg */; }; + FC2BFCC021DF279900C262B2 /* classify-img-output.png in Resources */ = {isa = PBXBuildFile; fileRef = FC2BFCBF21DF279900C262B2 /* classify-img-output.png */; }; + FC2BFD3021DF3FEA00C262B2 /* MobilenetSSD_AR.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2A21DF3FE900C262B2 /* MobilenetSSD_AR.swift */; }; + FC2BFD3121DF3FEA00C262B2 /* Genet.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2B21DF3FE900C262B2 /* Genet.swift */; }; + FC2BFD3221DF3FEA00C262B2 /* MobileNetSSD.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2C21DF3FE900C262B2 /* MobileNetSSD.swift */; }; + FC2BFD3321DF3FEA00C262B2 /* YoloNet.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2D21DF3FE900C262B2 /* YoloNet.swift */; }; + FC2BFD3421DF3FEA00C262B2 /* MobileNetCombined.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2E21DF3FEA00C262B2 /* MobileNetCombined.swift */; }; + FC2BFD3521DF3FEA00C262B2 /* MobileNet.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD2F21DF3FEA00C262B2 /* MobileNet.swift */; }; + FC2BFD3821DF46DE00C262B2 /* OCDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD3721DF46DE00C262B2 /* OCDemoViewController.m */; }; + FC2BFD3C21DF480400C262B2 /* CPUCompute.mm in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD3B21DF480400C262B2 /* CPUCompute.mm */; }; + FC2BFD3E21DF5CE800C262B2 /* PreProcessKernel.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD3D21DF5CE800C262B2 /* PreProcessKernel.metal */; }; + FC2BFD4321DF5E1E00C262B2 /* PaddleMobileGPU.m in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD4021DF5E1E00C262B2 /* PaddleMobileGPU.m */; }; + FC2BFD4421DF5E1E00C262B2 /* SuperResolutionNet.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2BFD4221DF5E1E00C262B2 /* SuperResolutionNet.swift */; }; FC5E03B221DCE8D90016C137 /* mingren_input_data in Resources */ = {isa = PBXBuildFile; fileRef = FC5E03B121DCE8D90016C137 /* mingren_input_data */; }; FC704C1921D2375300F98BAB /* super_params in Resources */ = {isa = PBXBuildFile; fileRef = FC704C1721D2375300F98BAB /* super_params */; }; FC704C1A21D2375300F98BAB /* super_model in Resources */ = {isa = PBXBuildFile; fileRef = FC704C1821D2375300F98BAB /* super_model */; }; @@ -31,7 +44,6 @@ FC9797C321D608E000F2FD90 /* mobilenet_params in Resources */ = {isa = PBXBuildFile; fileRef = FC9797C121D608DF00F2FD90 /* mobilenet_params */; }; FC9797C721D609FB00F2FD90 /* synset.txt in Resources */ = {isa = PBXBuildFile; fileRef = FC9797C621D609FB00F2FD90 /* synset.txt */; }; FC9797CF21D6506F00F2FD90 /* mingren.jpg in Resources */ = {isa = PBXBuildFile; fileRef = FC9797CE21D6506F00F2FD90 /* mingren.jpg */; }; - FC9797D121D6616600F2FD90 /* BufferToTexture.metal in Sources */ = {isa = PBXBuildFile; fileRef = FC9797D021D6616600F2FD90 /* BufferToTexture.metal */; }; FCBCCC552122EF5500D94F7E /* MetalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCBCCC542122EF5400D94F7E /* MetalHelper.swift */; }; FCCED60521D7646E00BE8D5F /* test_image_super in Resources */ = {isa = PBXBuildFile; fileRef = FCCED60421D7646E00BE8D5F /* test_image_super */; }; FCEBEC2C20E1391F00C0B14D /* paddle_mobile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */; }; @@ -59,7 +71,6 @@ 878829884E1A14D7044721D5 /* Pods-paddle-mobile-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-paddle-mobile-demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-paddle-mobile-demo/Pods-paddle-mobile-demo.debug.xcconfig"; sourceTree = ""; }; C2E67E5C21524E460013F575 /* LoadPointerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadPointerViewController.h; sourceTree = ""; }; C2E67E5D21524E460013F575 /* LoadPointerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadPointerViewController.m; sourceTree = ""; }; - FC013927210204A3008100E3 /* PreProcessKernel.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = PreProcessKernel.metal; sourceTree = ""; }; FC039B7E20E11C550081E9F8 /* paddle-mobile-demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "paddle-mobile-demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; FC039B8120E11C550081E9F8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; FC039B8320E11C550081E9F8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -69,6 +80,23 @@ FC039B8D20E11C560081E9F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; FC203FA921CBFDBA00B37166 /* test.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = test.jpg; sourceTree = ""; }; FC27991121343A39000B6BAD /* paddle-mobile-demo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "paddle-mobile-demo-Bridging-Header.h"; sourceTree = ""; }; + FC2BFCBB21DF0A8600C262B2 /* 00001.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 00001.jpg; sourceTree = ""; }; + FC2BFCBD21DF15D900C262B2 /* 123.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 123.jpg; sourceTree = ""; }; + FC2BFCBF21DF279900C262B2 /* classify-img-output.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "classify-img-output.png"; sourceTree = ""; }; + FC2BFD2A21DF3FE900C262B2 /* MobilenetSSD_AR.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MobilenetSSD_AR.swift; sourceTree = ""; }; + FC2BFD2B21DF3FE900C262B2 /* Genet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Genet.swift; sourceTree = ""; }; + FC2BFD2C21DF3FE900C262B2 /* MobileNetSSD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MobileNetSSD.swift; sourceTree = ""; }; + FC2BFD2D21DF3FE900C262B2 /* YoloNet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YoloNet.swift; sourceTree = ""; }; + FC2BFD2E21DF3FEA00C262B2 /* MobileNetCombined.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MobileNetCombined.swift; sourceTree = ""; }; + FC2BFD2F21DF3FEA00C262B2 /* MobileNet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MobileNet.swift; sourceTree = ""; }; + FC2BFD3621DF46DE00C262B2 /* OCDemoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OCDemoViewController.h; sourceTree = ""; }; + FC2BFD3721DF46DE00C262B2 /* OCDemoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OCDemoViewController.m; sourceTree = ""; }; + FC2BFD3A21DF480300C262B2 /* CPUCompute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPUCompute.h; sourceTree = ""; }; + FC2BFD3B21DF480400C262B2 /* CPUCompute.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CPUCompute.mm; sourceTree = ""; }; + FC2BFD3D21DF5CE800C262B2 /* PreProcessKernel.metal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.metal; path = PreProcessKernel.metal; sourceTree = ""; }; + FC2BFD4021DF5E1E00C262B2 /* PaddleMobileGPU.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PaddleMobileGPU.m; sourceTree = ""; }; + FC2BFD4121DF5E1E00C262B2 /* PaddleMobileGPU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaddleMobileGPU.h; sourceTree = ""; }; + FC2BFD4221DF5E1E00C262B2 /* SuperResolutionNet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SuperResolutionNet.swift; sourceTree = ""; }; FC4FD97B2140EE250073E130 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; FC5E03B121DCE8D90016C137 /* mingren_input_data */ = {isa = PBXFileReference; lastKnownFileType = file; path = mingren_input_data; sourceTree = ""; }; FC704C1721D2375300F98BAB /* super_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = super_params; sourceTree = ""; }; @@ -84,7 +112,6 @@ FC9797C121D608DF00F2FD90 /* mobilenet_params */ = {isa = PBXFileReference; lastKnownFileType = file; path = mobilenet_params; sourceTree = ""; }; FC9797C621D609FB00F2FD90 /* synset.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = synset.txt; sourceTree = ""; }; FC9797CE21D6506F00F2FD90 /* mingren.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = mingren.jpg; sourceTree = ""; }; - FC9797D021D6616600F2FD90 /* BufferToTexture.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = BufferToTexture.metal; sourceTree = ""; }; FCBCCC542122EF5400D94F7E /* MetalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetalHelper.swift; sourceTree = ""; }; FCCED60421D7646E00BE8D5F /* test_image_super */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_image_super; sourceTree = ""; }; FCEBEC2B20E1391F00C0B14D /* paddle_mobile.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = paddle_mobile.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -145,8 +172,11 @@ FC039B8020E11C550081E9F8 /* paddle-mobile-demo */ = { isa = PBXGroup; children = ( - FC203FA821CBFDBA00B37166 /* images */, - FC203FAA21CBFDBA00B37166 /* models */, + FC2BFD4F21DF892500C262B2 /* Resources */, + FCBCCC542122EF5400D94F7E /* MetalHelper.swift */, + FC2BFD3F21DF5DDF00C262B2 /* OCInterface */, + FC27991121343A39000B6BAD /* paddle-mobile-demo-Bridging-Header.h */, + FC2BFD3921DF46F000C262B2 /* OCDemo */, FC803BCA214D27920094B8E5 /* VideoCapture */, FC8CFED2213519540094D569 /* Net */, FC039B8120E11C550081E9F8 /* AppDelegate.swift */, @@ -155,10 +185,7 @@ FC039B8820E11C560081E9F8 /* Assets.xcassets */, FC039B8A20E11C560081E9F8 /* LaunchScreen.storyboard */, FC039B8D20E11C560081E9F8 /* Info.plist */, - FC27991121343A39000B6BAD /* paddle-mobile-demo-Bridging-Header.h */, FCF437E7214B6DDB00943429 /* MultiPredictViewController.swift */, - C2E67E5C21524E460013F575 /* LoadPointerViewController.h */, - C2E67E5D21524E460013F575 /* LoadPointerViewController.m */, ); path = "paddle-mobile-demo"; sourceTree = ""; @@ -166,14 +193,16 @@ FC203FA821CBFDBA00B37166 /* images */ = { isa = PBXGroup; children = ( + FC2BFCBF21DF279900C262B2 /* classify-img-output.png */, + FC2BFCBD21DF15D900C262B2 /* 123.jpg */, + FC2BFCBB21DF0A8600C262B2 /* 00001.jpg */, FC5E03B121DCE8D90016C137 /* mingren_input_data */, FCCED60421D7646E00BE8D5F /* test_image_super */, FC9797CE21D6506F00F2FD90 /* mingren.jpg */, FC9797BD21D6045B00F2FD90 /* banana.jpeg */, FC203FA921CBFDBA00B37166 /* test.jpg */, ); - name = images; - path = ../../images; + path = images; sourceTree = ""; }; FC203FAA21CBFDBA00B37166 /* models */ = { @@ -183,8 +212,37 @@ FC704C1B21D237FC00F98BAB /* vision_model */, FC704C1621D2375300F98BAB /* superresoltion */, ); - name = models; - path = ../../models; + path = models; + sourceTree = ""; + }; + FC2BFD3921DF46F000C262B2 /* OCDemo */ = { + isa = PBXGroup; + children = ( + C2E67E5C21524E460013F575 /* LoadPointerViewController.h */, + C2E67E5D21524E460013F575 /* LoadPointerViewController.m */, + FC2BFD3621DF46DE00C262B2 /* OCDemoViewController.h */, + FC2BFD3721DF46DE00C262B2 /* OCDemoViewController.m */, + ); + path = OCDemo; + sourceTree = ""; + }; + FC2BFD3F21DF5DDF00C262B2 /* OCInterface */ = { + isa = PBXGroup; + children = ( + FC2BFD4121DF5E1E00C262B2 /* PaddleMobileGPU.h */, + FC2BFD4021DF5E1E00C262B2 /* PaddleMobileGPU.m */, + FC2BFD4221DF5E1E00C262B2 /* SuperResolutionNet.swift */, + ); + path = OCInterface; + sourceTree = ""; + }; + FC2BFD4F21DF892500C262B2 /* Resources */ = { + isa = PBXGroup; + children = ( + FC203FA821CBFDBA00B37166 /* images */, + FC203FAA21CBFDBA00B37166 /* models */, + ); + path = Resources; sourceTree = ""; }; FC704C1621D2375300F98BAB /* superresoltion */ = { @@ -235,9 +293,15 @@ FC8CFED2213519540094D569 /* Net */ = { isa = PBXGroup; children = ( - FC013927210204A3008100E3 /* PreProcessKernel.metal */, - FCBCCC542122EF5400D94F7E /* MetalHelper.swift */, - FC9797D021D6616600F2FD90 /* BufferToTexture.metal */, + FC2BFD3A21DF480300C262B2 /* CPUCompute.h */, + FC2BFD3B21DF480400C262B2 /* CPUCompute.mm */, + FC2BFD3D21DF5CE800C262B2 /* PreProcessKernel.metal */, + FC2BFD2B21DF3FE900C262B2 /* Genet.swift */, + FC2BFD2F21DF3FEA00C262B2 /* MobileNet.swift */, + FC2BFD2E21DF3FEA00C262B2 /* MobileNetCombined.swift */, + FC2BFD2A21DF3FE900C262B2 /* MobilenetSSD_AR.swift */, + FC2BFD2C21DF3FE900C262B2 /* MobileNetSSD.swift */, + FC2BFD2D21DF3FE900C262B2 /* YoloNet.swift */, ); path = Net; sourceTree = ""; @@ -319,16 +383,19 @@ FC9797CF21D6506F00F2FD90 /* mingren.jpg in Resources */, FC704C2221D237FC00F98BAB /* combined_mobilenet_params in Resources */, FC704C1921D2375300F98BAB /* super_params in Resources */, + FC2BFCBE21DF15D900C262B2 /* 123.jpg in Resources */, FC039B8920E11C560081E9F8 /* Assets.xcassets in Resources */, FC9797C721D609FB00F2FD90 /* synset.txt in Resources */, FC5E03B221DCE8D90016C137 /* mingren_input_data in Resources */, FC704C1A21D2375300F98BAB /* super_model in Resources */, FC039B8720E11C550081E9F8 /* Main.storyboard in Resources */, FC9797C221D608E000F2FD90 /* mobilenet_model in Resources */, + FC2BFCC021DF279900C262B2 /* classify-img-output.png in Resources */, FC203FB221CBFDBA00B37166 /* test.jpg in Resources */, FC704C2321D237FC00F98BAB /* combined_mobilenet_model in Resources */, FC9797C321D608E000F2FD90 /* mobilenet_params in Resources */, FC704C2421D237FC00F98BAB /* yolo_params in Resources */, + FC2BFCBC21DF0A8600C262B2 /* 00001.jpg in Resources */, FC9797BE21D6045B00F2FD90 /* banana.jpeg in Resources */, FC704C2521D237FC00F98BAB /* yolo_model in Resources */, ); @@ -380,15 +447,24 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + FC2BFD3221DF3FEA00C262B2 /* MobileNetSSD.swift in Sources */, + FC2BFD3C21DF480400C262B2 /* CPUCompute.mm in Sources */, + FC2BFD4321DF5E1E00C262B2 /* PaddleMobileGPU.m in Sources */, FC039B8420E11C550081E9F8 /* ViewController.swift in Sources */, FC803BCE214D27930094B8E5 /* VideoCapture.swift in Sources */, - FC013928210204A3008100E3 /* PreProcessKernel.metal in Sources */, FCF437E8214B6DDB00943429 /* MultiPredictViewController.swift in Sources */, + FC2BFD3021DF3FEA00C262B2 /* MobilenetSSD_AR.swift in Sources */, + FC2BFD3321DF3FEA00C262B2 /* YoloNet.swift in Sources */, + FC2BFD3421DF3FEA00C262B2 /* MobileNetCombined.swift in Sources */, FCBCCC552122EF5500D94F7E /* MetalHelper.swift in Sources */, FC803BCD214D27930094B8E5 /* FPSCounter.swift in Sources */, + FC2BFD3521DF3FEA00C262B2 /* MobileNet.swift in Sources */, C2E67E5E21524E460013F575 /* LoadPointerViewController.m in Sources */, + FC2BFD3121DF3FEA00C262B2 /* Genet.swift in Sources */, FC039B8220E11C550081E9F8 /* AppDelegate.swift in Sources */, - FC9797D121D6616600F2FD90 /* BufferToTexture.metal in Sources */, + FC2BFD4421DF5E1E00C262B2 /* SuperResolutionNet.swift in Sources */, + FC2BFD3E21DF5CE800C262B2 /* PreProcessKernel.metal in Sources */, + FC2BFD3821DF46DE00C262B2 /* OCDemoViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard b/metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard index d72694fdac..4060bb7b35 100644 --- a/metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard +++ b/metal/paddle-mobile-demo/paddle-mobile-demo/Base.lproj/Main.storyboard @@ -1,12 +1,11 @@ - + - - + @@ -20,7 +19,7 @@