From 5847ac3bd5c58930c47b68dd2bb7ae457e6223eb Mon Sep 17 00:00:00 2001 From: Gines Hidalgo Date: Thu, 15 Oct 2020 22:53:06 -0400 Subject: [PATCH] Improved error message --- doc/release_notes.md | 3 ++- src/openpose/net/netCaffe.cpp | 9 ++++++--- src/openpose/net/netOpenCv.cpp | 9 ++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/release_notes.md b/doc/release_notes.md index f3c105f8..aa6df6f9 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -416,11 +416,12 @@ OpenPose Library - Release Notes ## Current version - Future OpenPose 1.6.1 1. Main improvements: + 1. Some parts of the documentation have been explained better. 2. Functions or parameters renamed: 3. Main bugs fixed: 1. 90 and 270-degree rotations working again. 2. C++ tutorial API demos only try to cv::imshow the image if it is not empty (avoding the assert that it would trigger otherwise). -4. Changes/additions that affect the compatibility with the OpenPose Unity Plugin: + 3. Several typos fixed in the documentation. diff --git a/src/openpose/net/netCaffe.cpp b/src/openpose/net/netCaffe.cpp index e8505154..986ca11f 100644 --- a/src/openpose/net/netCaffe.cpp +++ b/src/openpose/net/netCaffe.cpp @@ -51,9 +51,12 @@ namespace op { try { - const std::string message{".\nPossible causes:\n\t1. Not downloading the OpenPose trained models." - "\n\t2. Not running OpenPose from the same directory where the `model`" - " folder is located.\n\t3. Using paths with spaces."}; + const std::string message{".\nPossible causes:\n" + "\t1. Not downloading the OpenPose trained models.\n" + "\t2. Not running OpenPose from the root directory (i.e., where the `model` folder is located, but do not move the `model` folder!). E.g.,\n" + "\t\tRight example for the Windows portable binary: `cd {OpenPose_root_path}; bin/openpose.exe`\n" + "\t\tWrong example for the Windows portable binary: `cd {OpenPose_root_path}/bin; openpose.exe`\n" + "\t3. Using paths with spaces."}; if (!existFile(mCaffeProto)) error("Prototxt file not found: " + mCaffeProto + message, __LINE__, __FUNCTION__, __FILE__); if (!existFile(mCaffeTrainedModel)) diff --git a/src/openpose/net/netOpenCv.cpp b/src/openpose/net/netOpenCv.cpp index ac48be82..d2378fad 100644 --- a/src/openpose/net/netOpenCv.cpp +++ b/src/openpose/net/netOpenCv.cpp @@ -40,9 +40,12 @@ namespace op mNet{cv::dnn::readNetFromCaffe(caffeProto, caffeTrainedModel)}, spOutputBlob{new caffe::Blob(1,1,1,1)} { - const std::string message{".\nPossible causes:\n\t1. Not downloading the OpenPose trained models." - "\n\t2. Not running OpenPose from the same directory where the `model`" - " folder is located.\n\t3. Using paths with spaces."}; + const std::string message{".\nPossible causes:\n" + "\t1. Not downloading the OpenPose trained models.\n" + "\t2. Not running OpenPose from the root directory (i.e., where the `model` folder is located, but do not move the `model` folder!). E.g.,\n" + "\t\tRight example for the Windows portable binary: `cd {OpenPose_root_path}; bin/openpose.exe`\n" + "\t\tWrong example for the Windows portable binary: `cd {OpenPose_root_path}/bin; openpose.exe`\n" + "\t3. Using paths with spaces."}; if (!existFile(mCaffeProto)) error("Prototxt file not found: " + mCaffeProto + message, __LINE__, __FUNCTION__, __FILE__); if (!existFile(mCaffeTrainedModel)) -- GitLab