FLImaging 6.5.16.1
BackendLabel.h
1#pragma once
2
3#if _MSC_VER >= 1900 && defined(_M_X64)
4
5#include "BackendBase.h"
6
7namespace FLImaging
8{
9 namespace AI
10 {
11 template <typename T>
12 class FL_EXPORT CTensor;
13
14 template <typename T>
15 class FL_EXPORT CTensorImagesWithMaskLabels;
16
17 template <typename T>
18 class FL_EXPORT CBackendLabel : public CBackendBase<T>
19 {
20 public:
21 CBackendLabel();
22 CBackendLabel(const CBackendLabel<T>& bl);
23 virtual ~CBackendLabel();
24
25 virtual const CResult LabelForSegmentation(const CTensor<T>* pTsrOperand, CTensor<T>* pTsrResult, bool bMaskingMode = false);
26 virtual const CResult LabelForClassifier(const CTensor<T>* pTsrOperand, CTensor<T>* pTsrResult, int64_t i64ClassCount);
27 virtual const CResult LabelForObjectDetection(const CTensor<T>* pTsrOperand, std::vector<CTensor<T>>& vctResultBoxes, std::vector<CTensor<T>>& vctResultLabels, bool bCuda, bool bRevertAngle = false);
28 virtual const CResult LabelForInstanceSegmentationMask(const CTensor<T>* pTsrOperand, int64_t i64MaskWidth, int64_t i64MaskHeight, std::vector<CTensor<T>>& vctResultMasks);
29 virtual const CResult LabelForInstanceSegmentation(const CTensor<T>* pTsrOperand, int64_t i64MaskWidth, int64_t i64MaskHeight, std::vector<CTensor<T>>& vctResultBoxesShared, std::vector<CTensor<T>>& vctResultLabelsShared, std::vector<CTensor<T>>& vctResultMasksShared, int64_t i64DeviceIndex, int64_t i64MemoryIndex);
30 virtual const CResult LabelShapeForInstanceSegmentation(const CTensor<T>* pTsrOperand, int64_t i64MaskWidth, int64_t i64MaskHeight, std::vector<std::vector<int64_t>>& vctResultBoxes, std::vector<std::vector<int64_t>>& vctResultLabels, std::vector<std::vector<int64_t>>& vctResultMasks);
31 virtual const CResult LabelForInstanceSegmentation(const CTensor<T>* pTsrOperand, int64_t i64MaskWidth, int64_t i64MaskHeight, std::vector<CTensor<T>>& vctResultBoxes, std::vector<CTensor<T>>& vctResultLabels, std::vector<CTensor<T>>& vctResultMasks);
32 virtual const CResult LabelForStringBasedOCR(const CTensor<T>* pTsrOperand, int64_t i64LongestLabelLength, int64_t i64CharacterCount, const std::map<wchar_t, uint32_t>* pMpCharToClassNum, CTensor<T>* pTsrResult);
33
34 DeclareGetClassType();
35 SupportToDuplicateObjectWithoutCreateNewObject(CBackendLabel<T>, *this);
36
37
38 protected:
39 virtual bool ValidLabel(const Foundation::CFLFigure* pFig);
40 virtual const CResult LabelForSegmentationMaskImage(const CTensorImagesWithMaskLabels<T>* pTsrOperand, CTensor<T>* pTsrResult);
41 };
42 }
43}
44
45#endif