mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
41 lines
793 B
C
41 lines
793 B
C
|
// Copyright (c) OpenMMLab. All rights reserved.
|
||
|
|
||
|
#ifndef MMDEPLOY_COLLECT_H
|
||
|
#define MMDEPLOY_COLLECT_H
|
||
|
|
||
|
#include "transform.h"
|
||
|
namespace mmdeploy {
|
||
|
|
||
|
class CollectImpl : public Module {
|
||
|
public:
|
||
|
explicit CollectImpl(const Value& args);
|
||
|
~CollectImpl() = default;
|
||
|
|
||
|
Result<Value> Process(const Value& input) override;
|
||
|
|
||
|
protected:
|
||
|
struct collect_arg_t {
|
||
|
std::vector<std::string> keys;
|
||
|
std::vector<std::string> meta_keys;
|
||
|
};
|
||
|
using ArgType = collect_arg_t;
|
||
|
|
||
|
protected:
|
||
|
ArgType arg_;
|
||
|
};
|
||
|
|
||
|
class Collect : public Transform {
|
||
|
public:
|
||
|
explicit Collect(const Value& args, int version = 0);
|
||
|
~Collect() = default;
|
||
|
|
||
|
Result<Value> Process(const Value& input) override;
|
||
|
|
||
|
private:
|
||
|
std::unique_ptr<CollectImpl> impl_;
|
||
|
};
|
||
|
|
||
|
} // namespace mmdeploy
|
||
|
|
||
|
#endif // MMDEPLOY_COLLECT_H
|