| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  CPUCropAndResize.hpp
 | 
					
						
							|  |  |  | //  MNN
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by MNN on 2018/08/23.
 | 
					
						
							|  |  |  | //  Copyright © 2018, Alibaba Group Holding Limited
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef CPUCropAndResize_hpp
 | 
					
						
							|  |  |  | #define CPUCropAndResize_hpp
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-27 22:16:57 +08:00
										 |  |  | #include "core/Execution.hpp"
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:49:11 +08:00
										 |  |  | #include "MNN_generated.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace MNN { | 
					
						
							|  |  |  | template <typename T> | 
					
						
							|  |  |  | class CPUCropAndResize : public Execution { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     CPUCropAndResize(Backend* backend, const Op* op); | 
					
						
							|  |  |  |     ~CPUCropAndResize() = default; | 
					
						
							|  |  |  |     virtual ErrorCode onExecute(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs) override; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |     const ErrorCode CropAndResize(const Tensor* image, const Tensor* boxes, const Tensor* boxIndex, Tensor* crops); | 
					
						
							|  |  |  |     CropAndResizeMethod mMethod; | 
					
						
							|  |  |  |     float mExtrapolationValue; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } // namespace MNN
 | 
					
						
							|  |  |  | #endif /* CPUCropAndResize_hpp */
 |