载入中...
搜索中...
未找到
SmrNeuralProvider.h
浏览该文件的文档.
1#pragma once
2
7
8#include <string>
9#include <vector>
10
11namespace eve::animation {
12
19public:
21 SmrNeuralProvider() = default;
22
24 [[nodiscard]] std::string name() const override;
25
33 [[nodiscard]] bool isReady(const AnimRetargetProfile* profile) const override;
34
40 [[nodiscard]] Result<SmrNeuralResult> retarget(const SmrNeuralRequest& request) override;
41
42private:
43 mutable SmrOnnxRunner onnx_;
44 mutable std::string loadedPath_;
45 mutable bool modelLoaded_ = false;
46 SmrMeshRetNet net_{};
47
48 [[nodiscard]] Result<void> ensureOnnx(const AnimRetargetProfile& profile) const;
49 [[nodiscard]] Result<SmrNeuralResult> applyRot6d(const SmrNeuralRequest& request, const SmrFeatureBatch& features,
50 const std::vector<float>& rot6d, const std::string& backend) const;
51};
52
53} // namespace eve::animation
const GltfImportRequest & request
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Settings and diagnostics for offline skeletal animation retargeting.
Definition AnimClip.h:27
Optional MeshRet/SMR neural retarget provider (implemented by animation_tensor).
Builtin MeshRet-style PointNet + Transformer retarget (links eve::tensor). @thread Owner thread; not ...
Capability provider selecting ONNX MeshRet or builtin tensor MeshRet. @ownership Owned by AnimationTe...
std::string name() const override
Name.
SmrNeuralProvider()=default
Constructs a SmrNeuralProvider.
Result< SmrNeuralResult > retarget(const SmrNeuralRequest &request) override
Run inference and rewrite request.targetClip local rotations. @lifetime See SmrNeuralRequest; pointer...
bool isReady(const AnimRetargetProfile *profile) const override
True when ONNX is loadable for the profile path, or builtin MeshRet is usable.
MeshRet-compatible ONNX runner on CPU via eve::tensor::OnnxModel.
Packed MeshRet-style features for one retarget inference window.
Definition SmrFeatures.h:15
Inputs for neural MeshRet-style skinned motion retarget.