Skip to content

Commit

Permalink
add depth anything model
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeShewill-CV committed Jan 25, 2024
1 parent 54ca041 commit b07977b
Show file tree
Hide file tree
Showing 2 changed files with 692 additions and 7 deletions.
78 changes: 73 additions & 5 deletions src/models/mono_depth_estimation/depth_anything.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,81 @@
/************************************************
* Copyright MaybeShewill-CV. All Rights Reserved.
* Author: MaybeShewill-CV
* File: DepthAnything.h
* File: depth_anything.h
* Date: 24-1-25
************************************************/

#ifndef MORTRED_MODEL_SERVER_DEPTHANYTHING_H
#define MORTRED_MODEL_SERVER_DEPTHANYTHING_H
#ifndef MORTRED_MODEL_SERVER_DEPTH_ANYTHING_H
#define MORTRED_MODEL_SERVER_DEPTH_ANYTHING_H

class DepthAnything {};
#include <memory>

#endif // MORTRED_MODEL_SERVER_DEPTHANYTHING_H
#include "toml/toml.hpp"

#include "common/status_code.h"
#include "models/base_model.h"
#include "models/model_io_define.h"

namespace jinq {
namespace models {
namespace mono_depth_estimation {

template <typename INPUT, typename OUTPUT>
class DepthAnything : public jinq::models::BaseAiModel<INPUT, OUTPUT> {
public:
/***
* constructor
* @param config
*/
DepthAnything();

/***
*
*/
~DepthAnything() override;

/***
* constructor
* @param transformer
*/
DepthAnything(const DepthAnything &transformer) = delete;

/***
* constructor
* @param transformer
* @return
*/
DepthAnything &operator=(const DepthAnything &transformer) = delete;

/***
*
* @param toml
* @return
*/
jinq::common::StatusCode init(const decltype(toml::parse("")) &cfg) override;

/***
*
* @param input
* @param output
* @return
*/
jinq::common::StatusCode run(const INPUT &input, OUTPUT &output) override;

/***
* if model successfully initialized
* @return
*/
bool is_successfully_initialized() const override;

private:
class Impl;
std::unique_ptr<Impl> _m_pimpl;
};
} // namespace mono_depth_estimation
} // namespace models
} // namespace jinq

#include "depth_anything.inl"

#endif // MORTRED_MODEL_SERVER_DEPTH_ANYTHING_H
Loading

0 comments on commit b07977b

Please sign in to comment.