basicvsr.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #pragma once
  15. #include "ultra_infer/vision/sr/ppsr/ppmsvsr.h"
  16. namespace ultra_infer {
  17. namespace vision {
  18. namespace sr {
  19. class ULTRAINFER_DECL BasicVSR : public PPMSVSR {
  20. public:
  21. /**
  22. * Set path of model file and configuration file, and the configuration of
  23. * runtime
  24. * @param[in] model_file Path of model file, e.g BasicVSR/model.pdmodel
  25. * @param[in] params_file Path of parameter file, e.g BasicVSR/model.pdiparams
  26. * @param[in] custom_option RuntimeOption for inference, the default will use
  27. * cpu, and choose the backend defined in `valid_cpu_backends`
  28. * @param[in] model_format Model format of the loaded model, default is Paddle
  29. * format
  30. */
  31. BasicVSR(const std::string &model_file, const std::string &params_file,
  32. const RuntimeOption &custom_option = RuntimeOption(),
  33. const ModelFormat &model_format = ModelFormat::PADDLE);
  34. /// model name contained BasicVSR
  35. std::string ModelName() const override { return "BasicVSR"; }
  36. };
  37. } // namespace sr
  38. } // namespace vision
  39. } // namespace ultra_infer