Path: blob/master/modules/dnn/src/vkcom/include/op_prior_box.hpp
16345 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3//4// Copyright (C) 2018, Intel Corporation, all rights reserved.5// Third party copyrights are property of their respective owners.67#ifndef OPENCV_DNN_VKCOM_OP_PRIOR_BOX_HPP8#define OPENCV_DNN_VKCOM_OP_PRIOR_BOX_HPP910#include "vkcom.hpp"11#include "op_base.hpp"1213namespace cv { namespace dnn { namespace vkcom {1415#ifdef HAVE_VULKAN1617class OpPriorBox: public OpBase18{19public:20OpPriorBox(float step_x,21float step_y,22bool clip,23int num_priors,24std::vector<float>& variance,25std::vector<float>& offsets_x,26std::vector<float>& offsets_y,27std::vector<float>& box_widths,28std::vector<float>& box_heights);29bool forward(std::vector<Tensor>& in, Tensor& out);30void reshapeOutTensor(std::vector<Tensor *>& in, Tensor& out);31virtual bool forward(std::vector<Tensor>& ins,32std::vector<Tensor>& blobs,33std::vector<Tensor>& outs) CV_OVERRIDE;34private:35bool computeGroupCount();3637int global_size_;38int nthreads_;39float step_x_;40float step_y_;41bool clip_;42int num_priors_;43std::vector<float> variance_;44std::vector<float> offsets_x_;45std::vector<float> offsets_y_;46std::vector<float> box_widths_;47std::vector<float> box_heights_;48int img_h_;49int img_w_;50int in_h_;51int in_w_;52int out_channel_;53int out_channel_size_;54Tensor tensor_offsets_x_;55Tensor tensor_offsets_y_;56Tensor tensor_widths_;57Tensor tensor_heights_;58Tensor tensor_variance_;59};6061#endif // HAVE_VULKAN6263}}} // namespace cv::dnn::vkcom6465#endif // OPENCV_DNN_VKCOM_OP_PRIOR_BOX_HPP666768