public SegementationFilter(ResourceSet resource, int w = 1920, int h = 1080) { this.resource = resource; config = new Config(resource, w, h); worker = ModelLoader.Load(resource.model).CreateWorker(); buffers.preprocess = new ComputeBuffer(config.InputFootPrint, sizeof(float)); buffers.segment = RTUtil.NewFloat(config.OutputWidth, config.OutputHeight); buffers.parts = RTUtil.NewFloat(config.OutputWidth * 24, config.OutputHeight); buffers.heatmaps = RTUtil.NewFloat(config.OutputWidth * KeyPointCount, config.OutputHeight); buffers.offsets = RTUtil.NewFloat(config.OutputWidth * KeyPointCount * 2, config.OutputHeight); buffers.mask = RTUtil.NewUAV(config.OutputWidth, config.OutputHeight); buffers.keypoints = new GraphicsBuffer(GraphicsBuffer.Target.Structured, KeyPointCount, sizeof(float) * 4); }