${INFERENCE_MEDIAVISION_BACKEND_DIRECTORY}/src/MvFaceDetection.cpp
${INFERENCE_MEDIAVISION_BACKEND_DIRECTORY}/src/MvFaceLandmark.cpp
${INFERENCE_MEDIAVISION_BACKEND_DIRECTORY}/src/MvObjectDetection.cpp
- ${INFERENCE_MEDIAVISION_BACKEND_DIRECTORY}/src/MvInferenceServiceFactory.cpp
+ ${INFERENCE_MEDIAVISION_BACKEND_DIRECTORY}/src/MvInferenceTaskFactory.cpp
)
LIST(APPEND INFERENCE_LIBRARY_LIST ${INFERENCE_LIBRARY_LIST} mv_common mv_inference mv_object_detection mv_landmark_detection)
* limitations under the License.
*/
-#ifndef __FACE_DETECTION_H__
-#define __FACE_DETECTION_H__
+#ifndef __MV_FACE_DETECTION_H__
+#define __MV_FACE_DETECTION_H__
-#include "IInferenceServiceInterface.h"
+#include "IInferenceTaskInterface.h"
#include "mv_face_detection_internal.h"
#include "SingleoCommonTypes.h"
{
namespace backends
{
-class MvFaceDetection : public IInferenceServiceInterface
+class MvFaceDetection : public IInferenceTaskInterface
{
private:
mv_face_detection_h _handle {};
#ifndef __MV_FACE_LANDMARK_H__
#define __MV_FACE_LANDMARK_H__
-#include "IInferenceServiceInterface.h"
+#include "IInferenceTaskInterface.h"
#include "mv_facial_landmark_internal.h"
#include "SingleoCommonTypes.h"
{
namespace backends
{
-class MvFaceLandmark : public IInferenceServiceInterface
+class MvFaceLandmark : public IInferenceTaskInterface
{
private:
mv_facial_landmark_h _handle {};
+++ /dev/null
-/**
- * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MV_INFERENCE_SERVICE_FACTORY_H__
-#define __MV_INFERENCE_SERVICE_FACTORY_H__
-
-#include "IInferenceServiceFactory.h"
-
-namespace singleo
-{
-namespace inference
-{
-class MvInferenceServiceFactory : public IInferenceServiceFactory
-{
-private:
- static bool _registered;
-
-public:
- MvInferenceServiceFactory() = default;
- virtual ~MvInferenceServiceFactory() = default;
-
- std::unique_ptr<IInferenceServiceInterface> createImageClassification() override;
- std::unique_ptr<IInferenceServiceInterface> createObjectDetection() override;
- std::unique_ptr<IInferenceServiceInterface> createFaceDetection() override;
- std::unique_ptr<IInferenceServiceInterface> createFaceLandmarkDetection() override;
-};
-
-}
-}
-
-#endif
--- /dev/null
+/**
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __MV_INFERENCE_TASK_FACTORY_H__
+#define __MV_INFERENCE_TASK_FACTORY_H__
+
+#include "IInferenceTaskFactory.h"
+
+namespace singleo
+{
+namespace inference
+{
+class MvInferenceTaskFactory : public IInferenceTaskFactory
+{
+private:
+ static bool _registered;
+
+public:
+ MvInferenceTaskFactory() = default;
+ virtual ~MvInferenceTaskFactory() = default;
+
+ std::unique_ptr<IInferenceTaskInterface> createImageClassification() override;
+ std::unique_ptr<IInferenceTaskInterface> createObjectDetection() override;
+ std::unique_ptr<IInferenceTaskInterface> createFaceDetection() override;
+ std::unique_ptr<IInferenceTaskInterface> createFaceLandmarkDetection() override;
+};
+
+}
+}
+
+#endif
* limitations under the License.
*/
-#ifndef __OBJECT_DETECTION_H__
-#define __OBJECT_DETECTION_H__
+#ifndef __MV_OBJECT_DETECTION_H__
+#define __MV_OBJECT_DETECTION_H__
-#include "IInferenceServiceInterface.h"
+#include "IInferenceTaskInterface.h"
#include "mv_object_detection_internal.h"
#include "SingleoCommonTypes.h"
{
namespace backends
{
-class MvObjectDetection : public IInferenceServiceInterface
+class MvObjectDetection : public IInferenceTaskInterface
{
private:
mv_object_detection_h _handle {};
+++ /dev/null
-/**
- * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "InferenceServiceFactory.h"
-#include "MvInferenceServiceFactory.h"
-#include "MvFaceDetection.h"
-#include "MvFaceLandmark.h"
-#include "MvObjectDetection.h"
-#include "SingleoLog.h"
-#include "SingleoException.h"
-
-using namespace std;
-using namespace singleo::exception;
-using namespace singleo::inference::backends;
-
-namespace singleo
-{
-namespace inference
-{
-bool MvInferenceServiceFactory::_registered =
- registerInferenceServiceFactory<MvInferenceServiceFactory>("MvInferenceServiceFactory");
-
-std::unique_ptr<IInferenceServiceInterface> MvInferenceServiceFactory::createImageClassification()
-{
- throw InvalidOperation("Interface not supported yet.");
-}
-
-std::unique_ptr<IInferenceServiceInterface> MvInferenceServiceFactory::createObjectDetection()
-{
- return make_unique<MvObjectDetection>();
-}
-
-std::unique_ptr<IInferenceServiceInterface> MvInferenceServiceFactory::createFaceDetection()
-{
- return make_unique<MvFaceDetection>();
-}
-
-std::unique_ptr<IInferenceServiceInterface> MvInferenceServiceFactory::createFaceLandmarkDetection()
-{
- return make_unique<MvFaceLandmark>();
-}
-
-}
-}
--- /dev/null
+/**
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "InferenceTaskFactory.h"
+#include "MvInferenceTaskFactory.h"
+#include "MvFaceDetection.h"
+#include "MvFaceLandmark.h"
+#include "MvObjectDetection.h"
+#include "SingleoLog.h"
+#include "SingleoException.h"
+
+using namespace std;
+using namespace singleo::exception;
+using namespace singleo::inference::backends;
+
+namespace singleo
+{
+namespace inference
+{
+bool MvInferenceTaskFactory::_registered =
+ registerInferenceTaskFactory<MvInferenceTaskFactory>("MvInferenceTaskFactory");
+
+std::unique_ptr<IInferenceTaskInterface> MvInferenceTaskFactory::createImageClassification()
+{
+ throw InvalidOperation("Interface not supported yet.");
+}
+
+std::unique_ptr<IInferenceTaskInterface> MvInferenceTaskFactory::createObjectDetection()
+{
+ return make_unique<MvObjectDetection>();
+}
+
+std::unique_ptr<IInferenceTaskInterface> MvInferenceTaskFactory::createFaceDetection()
+{
+ return make_unique<MvFaceDetection>();
+}
+
+std::unique_ptr<IInferenceTaskInterface> MvInferenceTaskFactory::createFaceLandmarkDetection()
+{
+ return make_unique<MvFaceLandmark>();
+}
+
+}
+}
+++ /dev/null
-/**
- * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __IINFERENCE_SERVICE_FACTORY_H__
-#define __IINFERENCE_SERVICE_FACTORY_H__
-
-#include <memory>
-
-#include "IInferenceServiceInterface.h"
-
-namespace singleo
-{
-namespace inference
-{
-class IInferenceServiceFactory
-{
-public:
- virtual ~IInferenceServiceFactory() {};
-
- virtual std::unique_ptr<IInferenceServiceInterface> createImageClassification() = 0;
- virtual std::unique_ptr<IInferenceServiceInterface> createObjectDetection() = 0;
- virtual std::unique_ptr<IInferenceServiceInterface> createFaceDetection() = 0;
- virtual std::unique_ptr<IInferenceServiceInterface> createFaceLandmarkDetection() = 0;
-};
-
-}
-}
-
-#endif
\ No newline at end of file
+++ /dev/null
-/**
- * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __IINFERENCE_SERVICE_INTERFACE_H__
-#define __IINFERENCE_SERVICE_INTERFACE_H__
-
-#include "SingleoInferenceTypes.h"
-#include "SingleoCommonTypes.h"
-
-namespace singleo
-{
-namespace inference
-{
-class IInferenceServiceInterface
-{
-public:
- virtual ~IInferenceServiceInterface() {};
-
- virtual void configure() = 0;
- virtual void prepare() = 0;
- virtual void invoke(BaseDataType &input, bool async = false) = 0;
- virtual BaseResultType &result() = 0;
-};
-
-} // inference
-} // singleo
-
-#endif
\ No newline at end of file
--- /dev/null
+/**
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __IINFERENCE_TASK_FACTORY_H__
+#define __IINFERENCE_TASK_FACTORY_H__
+
+#include <memory>
+
+#include "IInferenceTaskInterface.h"
+
+namespace singleo
+{
+namespace inference
+{
+class IInferenceTaskFactory
+{
+public:
+ virtual ~IInferenceTaskFactory() {};
+
+ virtual std::unique_ptr<IInferenceTaskInterface> createImageClassification() = 0;
+ virtual std::unique_ptr<IInferenceTaskInterface> createObjectDetection() = 0;
+ virtual std::unique_ptr<IInferenceTaskInterface> createFaceDetection() = 0;
+ virtual std::unique_ptr<IInferenceTaskInterface> createFaceLandmarkDetection() = 0;
+};
+
+}
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+/**
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __IINFERENCE_TASK_INTERFACE_H__
+#define __IINFERENCE_TASK_INTERFACE_H__
+
+#include "SingleoInferenceTypes.h"
+#include "SingleoCommonTypes.h"
+
+namespace singleo
+{
+namespace inference
+{
+class IInferenceTaskInterface
+{
+public:
+ virtual ~IInferenceTaskInterface() {};
+
+ virtual void configure() = 0;
+ virtual void prepare() = 0;
+ virtual void invoke(BaseDataType &input, bool async = false) = 0;
+ virtual BaseResultType &result() = 0;
+};
+
+} // inference
+} // singleo
+
+#endif
\ No newline at end of file
+++ /dev/null
-/**
- * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __INFERENCE_SERVICE_FACTORY_H__
-#define __INFERENCE_SERVICE_FACTORY_H__
-
-#include <unordered_map>
-#include <vector>
-#include <string>
-#include <memory>
-#include <stdexcept>
-#include "IInferenceServiceFactory.h"
-#include "SingleoException.h"
-#include "SingleoLog.h"
-
-namespace singleo
-{
-namespace inference
-{
-class InferenceServiceFactory
-{
-public:
- using createFunc = std::unique_ptr<IInferenceServiceFactory> (*)();
-
- static InferenceServiceFactory &instance()
- {
- static InferenceServiceFactory factory;
- return factory;
- }
-
- std::unique_ptr<IInferenceServiceFactory> create(const std::string &name)
- {
- auto it = _inference_service_table.find(name);
- if (it != _inference_service_table.end())
- return it->second();
-
- throw singleo::exception::InvalidParameter("Invalid inference service factory.");
- }
-
- void registerBackend(const std::string &name, const createFunc &func)
- {
- _inference_service_table[name] = func;
- }
-
-private:
- InferenceServiceFactory() = default;
- ~InferenceServiceFactory() = default;
-
- std::unordered_map<std::string, createFunc> _inference_service_table;
-};
-
-template<typename FactoryType> bool registerInferenceServiceFactory(const std::string &name)
-{
- InferenceServiceFactory::instance().registerBackend(name, []() {
- return std::unique_ptr<IInferenceServiceFactory>(new FactoryType());
- });
-
- return true;
-}
-
-}
-}
-
-#endif
\ No newline at end of file
--- /dev/null
+/**
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __INFERENCE_TASK_FACTORY_H__
+#define __INFERENCE_TASK_FACTORY_H__
+
+#include <unordered_map>
+#include <vector>
+#include <string>
+#include <memory>
+#include <stdexcept>
+#include "IInferenceTaskFactory.h"
+#include "SingleoException.h"
+#include "SingleoLog.h"
+
+namespace singleo
+{
+namespace inference
+{
+class InferenceTaskFactory
+{
+public:
+ using createFunc = std::unique_ptr<IInferenceTaskFactory> (*)();
+
+ static InferenceTaskFactory &instance()
+ {
+ static InferenceTaskFactory factory;
+ return factory;
+ }
+
+ std::unique_ptr<IInferenceTaskFactory> create(const std::string &name)
+ {
+ auto it = _inference_task_table.find(name);
+ if (it != _inference_task_table.end())
+ return it->second();
+
+ throw singleo::exception::InvalidParameter("Invalid inference service factory.");
+ }
+
+ void registerBackend(const std::string &name, const createFunc &func)
+ {
+ _inference_task_table[name] = func;
+ }
+
+private:
+ InferenceTaskFactory() = default;
+ ~InferenceTaskFactory() = default;
+
+ std::unordered_map<std::string, createFunc> _inference_task_table;
+};
+
+template<typename FactoryType> bool registerInferenceTaskFactory(const std::string &name)
+{
+ InferenceTaskFactory::instance().registerBackend(name, []() {
+ return std::unique_ptr<IInferenceTaskFactory>(new FactoryType());
+ });
+
+ return true;
+}
+
+}
+}
+
+#endif
\ No newline at end of file
#include <algorithm>
#include "SingleoException.h"
#include "AutoZoom.h"
-#include "InferenceServiceFactory.h"
+#include "InferenceTaskFactory.h"
#include "SingleoLog.h"
#include "ImagePreprocessor.h"
#include "ServiceFactory.h"
{
// In default, we will use Inference service factory for Mediavision to use Mediavision framework
// for inference service. TODO. introduce meta config file approach later.
- auto factory = InferenceServiceFactory::instance().create("MvInferenceServiceFactory");
+ auto factory = InferenceTaskFactory::instance().create("MvInferenceTaskFactory");
auto face_detection_node = make_shared<InferenceNode>();
face_detection_node->setName("face_detection");
- face_detection_node->setInferenceService(factory->createFaceDetection());
+ face_detection_node->setInferenceTask(factory->createFaceDetection());
_taskManager = make_unique<TaskManager>();
_taskManager->addNode(face_detection_node);
_postprocessor = make_unique<Postprocessor>();
#include "SingleoCommonTypes.h"
#include "ServiceDataType.h"
-#include "IInferenceServiceInterface.h"
namespace singleo
{
#include "INode.h"
#include "SingleoException.h"
+#include "IInferenceTaskInterface.h"
namespace singleo
{
private:
NodeType _type { NodeType::INFERENCE };
std::string _name;
- std::unique_ptr<inference::IInferenceServiceInterface> _service;
+ std::unique_ptr<inference::IInferenceTaskInterface> _task;
std::vector<std::shared_ptr<INode> > _dependencies;
std::vector<std::shared_ptr<BaseDataType> > _inputs;
std::shared_ptr<BaseDataType> _output;
void wait() override;
void wakeup() override;
- void setInferenceService(std::unique_ptr<inference::IInferenceServiceInterface> &&service);
- inference::IInferenceServiceInterface *getInferenceService();
+ void setInferenceTask(std::unique_ptr<inference::IInferenceTaskInterface> &&task);
+ inference::IInferenceTaskInterface *getInferenceTask();
};
}
#include <memory>
#include <thread>
-#include "IInferenceServiceInterface.h"
+#include "IInferenceTaskInterface.h"
#include "SingleoCommonTypes.h"
#include "INode.h"
return _inputs;
}
-void InferenceNode::setInferenceService(unique_ptr<inference::IInferenceServiceInterface> &&service)
+void InferenceNode::setInferenceTask(unique_ptr<inference::IInferenceTaskInterface> &&task)
{
- _service = move(service);
+ _task = move(task);
}
-IInferenceServiceInterface *InferenceNode::getInferenceService()
+IInferenceTaskInterface *InferenceNode::getInferenceTask()
{
- return _service.get();
+ return _task.get();
}
void InferenceNode::addDependency(std::shared_ptr<INode> node)
// Add the result if dependency node is inference service not callback.
if (n->getType() == NodeType::INFERENCE) {
auto inferenceNode = dynamic_pointer_cast<InferenceNode>(n);
- results.push_back(&inferenceNode->getInferenceService()->result());
+ results.push_back(&inferenceNode->getInferenceTask()->result());
}
}
else // Else if dependency then use output of dependency node(callback node).
input = dynamic_pointer_cast<ImageDataType>(inferenceNode->getDependencies()[0]->getOutput());
- inferenceNode->getInferenceService()->invoke(*input);
+ inferenceNode->getInferenceTask()->invoke(*input);
// Inference request has been completed so release input data if the data was internally allocated by callback node.
if (input->custom)
// Initialize inference service.
if (node->getType() == NodeType::INFERENCE) {
auto inferenceNode = dynamic_pointer_cast<InferenceNode>(node);
- inferenceNode->getInferenceService()->configure();
- inferenceNode->getInferenceService()->prepare();
+ inferenceNode->getInferenceTask()->configure();
+ inferenceNode->getInferenceTask()->prepare();
}
}
// TODO. consider for callback node support as last node.
if (lastNode->getType() == NodeType::INFERENCE) {
auto inferenceNode = dynamic_pointer_cast<InferenceNode>(lastNode);
- auto &result = inferenceNode->getInferenceService()->result();
+ auto &result = inferenceNode->getInferenceTask()->result();
if (result._type == ResultType::FACE_DETECTION) {
auto fd_result = dynamic_cast<FdResultType &>(result);
_results.push_back(make_shared<FdResultType>(fd_result));
#include <memory>
#include <opencv2/opencv.hpp>
-#include "InferenceServiceFactory.h"
-#include "IInferenceServiceInterface.h"
+#include "InferenceTaskFactory.h"
+#include "IInferenceTaskInterface.h"
#include "SingleoCommonTypes.h"
#include "TaskManager.h"
#include "InferenceNode.h"
image_data.byte_per_pixel = cv_image.channels();
image_data.ptr = cv_image.data;
- auto factory = InferenceServiceFactory::instance().create("MvInferenceServiceFactory");
+ auto factory = InferenceTaskFactory::instance().create("MvInferenceTaskFactory");
auto taskManager = make_unique<TaskManager>();
const unsigned int maxIteration = 10;
auto face_detection_node = make_shared<InferenceNode>();
face_detection_node->setName("face_detection");
- face_detection_node->setInferenceService(factory->createFaceDetection());
+ face_detection_node->setInferenceTask(factory->createFaceDetection());
taskManager->addNode(face_detection_node);
auto callback_node = make_shared<CallbackNode>();
auto face_landmark_node = make_shared<InferenceNode>();
face_landmark_node->setName("face_landmark");
- face_landmark_node->setInferenceService(factory->createFaceLandmarkDetection());
+ face_landmark_node->setInferenceTask(factory->createFaceLandmarkDetection());
face_landmark_node->addDependency(callback_node);
taskManager->addNode(face_landmark_node);
image_data.byte_per_pixel = cv_image.channels();
image_data.ptr = cv_image.data;
- auto factory = InferenceServiceFactory::instance().create("MvInferenceServiceFactory");
+ auto factory = InferenceTaskFactory::instance().create("MvInferenceTaskFactory");
auto taskManager = make_unique<TaskManager>();
const unsigned int maxIteration = 10;
auto face_detection_node_a = make_shared<InferenceNode>();
face_detection_node_a->setName("face_detectionA");
- face_detection_node_a->setInferenceService(factory->createFaceDetection());
+ face_detection_node_a->setInferenceTask(factory->createFaceDetection());
taskManager->addNode(face_detection_node_a);
auto face_detection_node_b = make_shared<InferenceNode>();
face_detection_node_b->setName("face_detectionB");
- face_detection_node_b->setInferenceService(factory->createFaceDetection());
+ face_detection_node_b->setInferenceTask(factory->createFaceDetection());
taskManager->addNode(face_detection_node_b);
auto callback_node = make_shared<CallbackNode>();
auto face_landmark_node = make_shared<InferenceNode>();
face_landmark_node->setName("face_landmark");
- face_landmark_node->setInferenceService(factory->createFaceLandmarkDetection());
+ face_landmark_node->setInferenceTask(factory->createFaceLandmarkDetection());
face_landmark_node->addDependency(callback_node);
taskManager->addNode(face_landmark_node);
image_data.byte_per_pixel = cv_image.channels();
image_data.ptr = cv_image.data;
- auto factory = InferenceServiceFactory::instance().create("MvInferenceServiceFactory");
+ auto factory = InferenceTaskFactory::instance().create("MvInferenceTaskFactory");
auto taskManager = make_unique<TaskManager>();
const unsigned int maxIteration = 10;
auto face_detection_node = make_shared<InferenceNode>();
face_detection_node->setName("face_detection");
- face_detection_node->setInferenceService(factory->createFaceDetection());
+ face_detection_node->setInferenceTask(factory->createFaceDetection());
taskManager->addNode(face_detection_node);
auto bridge_callback_node = make_shared<CallbackNode>();
auto face_landmark_node = make_shared<InferenceNode>();
face_landmark_node->setName("face_landmark");
- face_landmark_node->setInferenceService(factory->createFaceLandmarkDetection());
+ face_landmark_node->setInferenceTask(factory->createFaceLandmarkDetection());
face_landmark_node->addDependency(bridge_callback_node);
taskManager->addNode(face_landmark_node);