• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2020 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MINDSPORE_CORE_OPS_PROPOSAL_H_
18 #define MINDSPORE_CORE_OPS_PROPOSAL_H_
19 #include <vector>
20 
21 #include "mindapi/base/types.h"
22 #include "ops/base_operator.h"
23 
24 namespace mindspore {
25 namespace ops {
26 constexpr auto kNameProposal = "Proposal";
27 class MIND_API Proposal : public BaseOperator {
28  public:
29   MIND_API_BASE_MEMBER(Proposal);
Proposal()30   Proposal() : BaseOperator(kNameProposal) {}
31 
32   void Init(const float feat_stride, const float base_size, const float min_size, const std::vector<float> &ratio,
33             const std::vector<float> &scale, const int64_t pre_nms_topn, const int64_t post_nms_topn,
34             const float nms_thresh);
35   void set_feat_stride(const float feat_stride);
36   void set_base_size(const float base_size);
37   void set_min_size(const float min_size);
38   void set_ratio(const std::vector<float> &ratio);
39   void set_scale(const std::vector<float> &scale);
40   void set_pre_nms_topn(const int64_t pre_nms_topn);
41   void set_post_nms_topn(const int64_t post_nms_topn);
42   void set_nms_thresh(const float nms_thresh);
43   float get_feat_stride() const;
44   float get_base_size() const;
45   float get_min_size() const;
46   std::vector<float> get_ratio() const;
47   std::vector<float> get_scale() const;
48   int64_t get_pre_nms_topn() const;
49   int64_t get_post_nms_topn() const;
50   float get_nms_thresh() const;
51 };
52 }  // namespace ops
53 }  // namespace mindspore
54 
55 #endif  // MINDSPORE_CORE_OPS_PROPOSAL_H_
56