Skip to content
Snippets Groups Projects
Commit 7d4c582b authored by FangManLin's avatar FangManLin
Browse files

fix lenet bug

fix lenet
parent c49e90d9
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
model_path=$1
output_model_name=$2
/usr/local/Ascend/atc/bin/atc \
atc \
--model=$model_path \
--framework=1 \
--output=$output_model_name \
......
......@@ -37,7 +37,7 @@ function param_check() {
param_check
docker run -it \
docker run -u root -it \
--device=/dev/davinci0 \
--device=/dev/davinci_manager \
--device=/dev/devmm_svm \
......
......@@ -65,10 +65,10 @@ APP_ERROR LenetOpencv::DeInit() {
return APP_ERR_OK;
}
APP_ERROR LenetOpencv::ReadImage(const std::string &imgPath, cv::Mat &imageMat) {
void LenetOpencv::ReadImage(const std::string &imgPath, cv::Mat &imageMat) {
imageMat = cv::imread(imgPath, cv::IMREAD_COLOR);
}
APP_ERROR LenetOpencv::ResizeImage(const cv::Mat &srcImageMat, cv::Mat &dstImageMat) {
void LenetOpencv::ResizeImage(const cv::Mat &srcImageMat, cv::Mat &dstImageMat) {
static constexpr uint32_t resizeHeight = 32;
static constexpr uint32_t resizeWidth = 32;
......@@ -127,7 +127,7 @@ APP_ERROR LenetOpencv::Process(const std::string &imgPath) {
std::vector<MxBase::TensorBase> inputs = {};
std::vector<MxBase::TensorBase> outputs = {};
TensorBase tensorBase;
ret = CVMatToTensorBase(imageMat, tensorBase);
APP_ERROR ret = CVMatToTensorBase(imageMat, tensorBase);
if (ret != APP_ERR_OK) {
LogError << "CVMatToTensorBase failed, ret=" << ret << ".";
return ret;
......
......@@ -33,6 +33,6 @@ warn() { echo >&2 -e "\033[1;31m[WARN ][MxStream] $1\033[1;37m" ; }
info() { echo -e "\033[1;34m[INFO ][MxStream] $1\033[1;37m" ; }
warn() { echo >&2 -e "\033[1;31m[WARN ][MxStream] $1\033[1;37m" ; }
python3.7 main.py $image_path $result_dir
python3 main.py $image_path $result_dir
exit 0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment