Go to the documentation of this file. 1 #include <catch2/catch_all.hpp>
27 nn->setBlob(std::move(blob));
29 nn->setBlobPath(BLOB_PATH);
37 x_in->out.link(nn->
input);
38 nn->out.link(x_out->input);
43 void test(
bool manualBlob) {
44 using namespace std::chrono;
45 using namespace std::chrono_literals;
51 std::atomic<bool> receivedLogMessage{
false};
57 receivedLogMessage = true;
65 for(
int i = 0; i < 10; i++) {
83 for(
const dai::ADatatype& msg : std::initializer_list<std::reference_wrapper<dai::ADatatype>>{
buffer, nndata1, nndata2, frame}) {
84 std::cout << msgIndex <<
"\n";
86 bool timedOut =
false;
88 REQUIRE(inference !=
nullptr);
89 REQUIRE(timedOut ==
false);
96 REQUIRE(receivedLogMessage ==
false);
99 TEST_CASE(
"Neural network node data checks - setBlobPath") {
102 TEST_CASE(
"Neural network node data checks - setBlob") {
XLinkOut node. Sends messages over XLink.
dai::Pipeline createNeuralNetworkPipeline(bool manualBlob)
Represents the pipeline, set of nodes and connections between them.
void test(bool manualBlob)
const auto MOBILENET_INPUT_TENSOR
NNData & setLayer(const std::string &name, std::vector< std::uint8_t > data)
const auto MOBILENET_CHANNEL
ImgFrame & setWidth(unsigned int width)
NeuralNetwork node. Runs a neural inference on input data.
TEST_CASE("Neural network node data checks - setBlobPath")
void setLogLevel(LogLevel level)
const auto MOBILENET_HEIGHT
std::vector< std::uint8_t > buffer
std::shared_ptr< DataOutputQueue > getOutputQueue(const std::string &name)
std::shared_ptr< N > create()
void setStreamName(const std::string &name)
const size_t MOBILENET_DATA_SIZE
Base message - buffer of binary data.
ImgFrame & setType(Type type)
ImgFrame & setHeight(unsigned int height)
const auto MOBILENET_BLOB_PATH
XLinkIn node. Receives messages over XLink.
std::shared_ptr< DataInputQueue > getInputQueue(const std::string &name)
void setStreamName(const std::string &name)
void setData(const std::vector< std::uint8_t > &data)
int addLogCallback(std::function< void(LogMessage)> callback)
const auto MOBILENET_WIDTH
const auto MOBILENET_OUTPUT_TENSOR
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19