-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
206 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
#include "Microservice.hpp" | ||
|
||
class LoadImageMicroservice : public Microservice | ||
{ | ||
void DefineInputParameters() override {} | ||
|
||
void DefineOutputParameters() override { DefineOutputParameter<cv::Mat>("image"); } | ||
|
||
void Process() override | ||
{ | ||
LOG_DEBUG("{} processing", GetName()); | ||
auto image = cv::imread(GetProjectDirectoryPath("data/ml/object_detection/datasets/cats/cats2.jpg").string()); | ||
LOG_DEBUG("Loaded image size: {}x{}x{}", image.cols, image.rows, image.channels()); | ||
SetOutputParameter("image", image); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#include "Microservice.hpp" | ||
|
||
class StartMicroservice : public Microservice | ||
{ | ||
void DefineInputParameters() override {} | ||
void DefineOutputParameters() override { DefineOutputParameter<bool>("start"); } | ||
void Process() override { SetOutputParameter("start", true); } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
- [x] use std::any, std::any_cast for input / output parameters / connections | ||
- [x] named inputs / outputs | ||
- [ ] dont duplicate data storage during ms output -> ms input | ||
- [ ] add dedicated start node | ||
- [ ] add parameter id for pins | ||
- [ ] use void* as node/link/pin ids | ||
|
Oops, something went wrong.