lzhangzz a494a6f6ff
[SDK] sync changes according to performance benchmarks (#297)
* sync SDK changes according to performance benchmarks

* fix end-of-file lint

* fix clang-format issue

* fix clang-format by adding 'clang-format off'

* remove useless casts

* remove 'data' argument of 'operator()'

* change 'Tensor2Img' to 'TensorToImg' according to spec

* correct tensor's name according spec

Co-authored-by: lvhan028 <lvhan_028@163.com>
2021-12-16 13:51:22 +08:00

28 lines
604 B
C++

// Copyright (c) OpenMMLab. All rights reserved.
#ifndef MMDEPLOY_SRC_CODEBASE_MMCLS_MMCLS_H_
#define MMDEPLOY_SRC_CODEBASE_MMCLS_MMCLS_H_
#include "codebase/common.h"
#include "core/device.h"
#include "core/module.h"
#include "core/serialization.h"
namespace mmdeploy::mmcls {
struct ClassifyOutput {
struct Label {
int label_id;
float score;
MMDEPLOY_ARCHIVE_MEMBERS(label_id, score);
};
std::vector<Label> labels;
MMDEPLOY_ARCHIVE_MEMBERS(labels);
};
DECLARE_CODEBASE(MMClassification, mmcls);
} // namespace mmdeploy::mmcls
#endif // MMDEPLOY_SRC_CODEBASE_MMCLS_MMCLS_H_