diff --git a/components/nn/include/maix_nn_self_learn_classifier.hpp b/components/nn/include/maix_nn_self_learn_classifier.hpp index 2604cd08..16d39ad6 100644 --- a/components/nn/include/maix_nn_self_learn_classifier.hpp +++ b/components/nn/include/maix_nn_self_learn_classifier.hpp @@ -7,7 +7,6 @@ #pragma once #include "maix_basic.hpp" -#include "maix_nn_maixcam.hpp" namespace maix::nn { @@ -272,10 +271,7 @@ namespace maix::nn * @return learn epoch(times), 0 means learn nothing. * @maixpy maix.nn.SelfLearnClassifier.learn */ - int learn() - { - return maix_nn_self_learn_classifier_learn(_features, _features_sample, _feature_num); - } + int learn(); /** * Clear all class and samples diff --git a/components/nn/src/maix_nn.cpp b/components/nn/src/maix_nn.cpp index 62e7dc33..216b0f63 100644 --- a/components/nn/src/maix_nn.cpp +++ b/components/nn/src/maix_nn.cpp @@ -197,4 +197,13 @@ namespace maix::nn return _impl->forward_image(img, mean, scale, fit, copy_result); } + int SelfLearnClassifier::learn() + { + #if PLATFORM_MAIXCAM + return maix_nn_self_learn_classifier_learn(_features, _features_sample, _feature_num); + #else + throw err::Exception(err::ERR_NOT_IMPL); + #endif + } + } // namespace maix::nn diff --git a/components/vision/port/linux/maix_jpg_stream.cpp b/components/vision/port/linux/maix_jpg_stream.cpp index 1d62eb15..bd61e2d0 100644 --- a/components/vision/port/linux/maix_jpg_stream.cpp +++ b/components/vision/port/linux/maix_jpg_stream.cpp @@ -18,18 +18,18 @@ namespace maix::http } err::Err JpegStreamer::start() { - + return err::ERR_NOT_IMPL; } err::Err JpegStreamer::stop() { - + return err::ERR_NOT_IMPL; } err::Err JpegStreamer::write(image::Image *img) { - + return err::ERR_NOT_IMPL; } err::Err JpegStreamer::set_html(std::string data) { - + return err::ERR_NOT_IMPL; } } \ No newline at end of file