mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* fix sdk model's pipeline.json * resize INT64 mask * refactor unit tests * fix api in model.h * remove 'customs' from meta info * fix zip model * fix clang-format issue * put tc on each backend into a SECTION * change SECTION title * add DYNAMIC_SECTION for capi unit test * change 'devices' to 'device_names' * change trt to tensorrt * remove uncessary check * add color_type 'color_ignore_orientation' which is used in ocr * 'min_width', 'max_width' and 'backend' might be null in pipeline config * fix clang-format issue * remove useless code
32 lines
857 B
C++
32 lines
857 B
C++
// Copyright (c) OpenMMLab. All rights reserved.
|
|
|
|
// clang-format off
|
|
#include "catch.hpp"
|
|
// clang-format on
|
|
|
|
#include "core/model.h"
|
|
#include "core/net.h"
|
|
#include "test_resource.h"
|
|
|
|
using namespace mmdeploy;
|
|
|
|
TEST_CASE("test openvino net", "[openvino_net]") {
|
|
auto& gResource = MMDeployTestResources::Get();
|
|
auto model_list = gResource.LocateModelResources("mmcls/openvino");
|
|
REQUIRE(!model_list.empty());
|
|
|
|
Model model(model_list.front());
|
|
REQUIRE(model);
|
|
|
|
auto backend("openvino");
|
|
auto creator = Registry<Net>::Get().GetCreator(backend);
|
|
REQUIRE(creator);
|
|
|
|
Device device{"cpu"};
|
|
auto stream = Stream::GetDefault(device);
|
|
Value net_config{{"context", {{"device", device}, {"model", model}, {"stream", stream}}},
|
|
{"name", model.meta().models[0].name}};
|
|
auto net = creator->Create(net_config);
|
|
REQUIRE(net);
|
|
}
|