From 7a5012bd31367816a476e7bac15a6169abc31190 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Jan 2024 11:18:37 +0800 Subject: [PATCH] fix --- CMakeLists.txt | 2 +- README.en.md | 4 ++-- README.md | 4 ++-- algorithm/common_det/sv_common_det.cpp | 27 +++++++++++++------------- algorithm/veri/sv_veri_det.cpp | 2 +- scripts/x86-intel/openvino-install.sh | 3 ++- video_io/sv_video_output.cpp | 12 ++++++------ 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5947a7e..133163a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,7 +272,7 @@ elseif(PLATFORM STREQUAL "X86_INTEL") # Links to Intel-OpenVINO libraries here sv_world ${OpenCV_LIBS} sv_gimbal ${InferenceEngine_LIBRARIES} - /opt/intel/openvino_2022/runtime/lib/intel64/libopenvino.so + /opt/intel/openvino_2022/runtime/lib/intel64/libopenvino.so ) endif() diff --git a/README.en.md b/README.en.md index 185655b..70687e8 100644 --- a/README.en.md +++ b/README.en.md @@ -38,9 +38,9 @@ SpireCV is an **real-time edge perception SDK** built for **intelligent unmanned - **Platform level**: - [x] X86 + Nvidia GPUs (10 series, 20 series, and 30 series graphics cards recommended) - [x] Jetson (AGX Orin/Xavier、Orin NX/Nano、Xavier NX) - - [ ] Intel CPU (coming soon) - - [ ] Rockchip (coming soon) + - [x] Intel CPU - [ ] HUAWEI Ascend (coming soon) + - [ ] Rockchip (coming soon) ## Demos - **QR code detection** diff --git a/README.md b/README.md index 33c585e..0f47fb3 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ SpireCV是一个专为**智能无人系统**打造的**边缘实时感知SDK** - **平台层**: - [x] X86+Nvidia GPU(推荐10系、20系、30系显卡) - [x] Jetson(AGX Orin/Xavier、Orin NX/Nano、Xavier NX) - - [ ] Intel CPU(推进中) - - [ ] Rockchip(推进中) + - [x] Intel CPU - [ ] HUAWEI Ascend(推进中) + - [ ] Rockchip(推进中) ## 功能展示 - **二维码检测** diff --git a/algorithm/common_det/sv_common_det.cpp b/algorithm/common_det/sv_common_det.cpp index b64420e..73efa00 100644 --- a/algorithm/common_det/sv_common_det.cpp +++ b/algorithm/common_det/sv_common_det.cpp @@ -24,7 +24,7 @@ CommonObjectDetector::CommonObjectDetector(bool input_4k) #endif #ifdef WITH_INTEL - this->_intel_impl = new CommonObjectDetectorIntelImpl; + this->_intel_impl = new CommonObjectDetectorIntelImpl; #endif } CommonObjectDetector::~CommonObjectDetector() @@ -65,22 +65,21 @@ void CommonObjectDetector::detectImpl( boxes_label_, boxes_score_, boxes_seg_, - this->_input_4k - ); + this->_input_4k); #endif #ifdef WITH_INTEL - this->_intel_impl->intelDetect( - this, - img_, - boxes_x_, - boxes_y_, - boxes_w_, - boxes_h_, - boxes_label_, - boxes_score_, - boxes_seg_, - this->_input_4k); + this->_intel_impl->intelDetect( + this, + img_, + boxes_x_, + boxes_y_, + boxes_w_, + boxes_h_, + boxes_label_, + boxes_score_, + boxes_seg_, + this->_input_4k); #endif } diff --git a/algorithm/veri/sv_veri_det.cpp b/algorithm/veri/sv_veri_det.cpp index 591ef98..2c19870 100644 --- a/algorithm/veri/sv_veri_det.cpp +++ b/algorithm/veri/sv_veri_det.cpp @@ -128,7 +128,7 @@ namespace sv } } - void VeriDetector::getSubwindow(cv::Mat &dstCrop, cv::Mat &srcImg, int originalSz, int resizeSz) + void VeriDetector::getSubwindow(cv::Mat &dstCrop, cv::Mat &srcImg, int originalSz, int resizeSz) { cv::Scalar avgChans = mean(srcImg); cv::Size imgSz = srcImg.size(); diff --git a/scripts/x86-intel/openvino-install.sh b/scripts/x86-intel/openvino-install.sh index 812ea24..f6231f6 100755 --- a/scripts/x86-intel/openvino-install.sh +++ b/scripts/x86-intel/openvino-install.sh @@ -15,5 +15,6 @@ sudo -E ./install_dependencies/install_openvino_dependencies.sh cd /opt/intel sudo ln -s openvino_2022.3.1 openvino_2022 -source /opt/intel/openvino_2022/setupvars.sh +echo "source /opt/intel/openvino_2022/setupvars.sh" >> ~/.bashrc +source ~/.bashrc cd ${current_dir} diff --git a/video_io/sv_video_output.cpp b/video_io/sv_video_output.cpp index c2ad5f4..6ea31a1 100644 --- a/video_io/sv_video_output.cpp +++ b/video_io/sv_video_output.cpp @@ -6,10 +6,10 @@ #include "writer_gstreamer_impl.h" #endif #ifdef WITH_FFMPEG -#ifdef PLATFORM_X86_CUDA +#if defined(PLATFORM_X86_CUDA) #include "x86_cuda/bs_push_streamer.h" #include "x86_cuda/bs_video_saver.h" -#else +#elif defined(PLATFORM_X86_INTEL) #include "x86_intel/bs_push_streamer.h" #include "x86_intel/bs_video_saver.h" #endif @@ -42,9 +42,9 @@ bool VideoWriter::setupImpl(std::string file_name_) return this->_gstreamer_impl->gstreamerSetup(this, file_name_); #endif #ifdef WITH_FFMPEG -#ifdef PLATFORM_X86_CUDA +#if defined(PLATFORM_X86_CUDA) std::string enc = "h264_nvenc"; -#else +#elif defined(PLATFORM_X86_INTEL) std::string enc = "h264_vaapi"; #endif return this->_ffmpeg_impl->setup(file_path + file_name_ + ".avi", img_sz.width, img_sz.height, (int)fps, enc, 4); @@ -110,9 +110,9 @@ bool VideoStreamer::setupImpl() #endif #ifdef WITH_FFMPEG std::string rtsp_url = "rtsp://127.0.0.1/live" + url; -#ifdef PLATFORM_X86_CUDA +#if defined(PLATFORM_X86_CUDA) std::string enc = "h264_nvenc"; -#else +#elif defined(PLATFORM_X86_INTEL) std::string enc = "h264_vaapi"; #endif return this->_ffmpeg_impl->setup(rtsp_url, img_sz.width, img_sz.height, 24, enc, bitrate);