提交 3caf642d 编写于 作者: G gineshidalgo99

Added CUDA 10 compatibility by default

上级 5295f2f3
......@@ -18,7 +18,8 @@ endmacro()
# This list will be used for CUDA_ARCH = All option
if (UNIX AND NOT APPLE)
set(Caffe_known_gpu_archs "20 21(20) 30 35 50 52 60 61")
set(Caffe_known_gpu_archs "30 35 50 52 60 61")
# set(Caffe_known_gpu_archs "20 21(20) 30 35 50 52 60 61")
elseif (WIN32)
set(Caffe_known_gpu_archs "30 35 50 52 60 61")
endif ()
......@@ -76,7 +77,8 @@ endfunction()
# op_select_nvcc_arch_flags(out_variable)
function(op_select_nvcc_arch_flags out_variable)
# List of arch names
set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "All" "Manual")
set(__archs_names "Kepler" "Maxwell" "Pascal" "All" "Manual")
# set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "All" "Manual")
set(__archs_name_default "All")
if (NOT CMAKE_CROSSCOMPILING)
list(APPEND __archs_names "Auto")
......
......@@ -3,6 +3,7 @@
#include <openpose/core/common.hpp>
#include <openpose/filestream/enumClasses.hpp>
#include <openpose/pose/enumClasses.hpp>
#include <openpose/filestream/jsonOfstream.hpp>
namespace op
......@@ -20,15 +21,16 @@ namespace op
* @param filePathToSave const std::string parameter with the final file path where the generated json file
* will be saved.
*/
explicit CocoJsonSaver(const std::string& filePathToSave, const bool humanReadable = true,
const CocoJsonFormat cocoJsonFormat = CocoJsonFormat::Body,
const int mCocoJsonVariant = 0);
explicit CocoJsonSaver(
const std::string& filePathToSave, const PoseModel poseModel, const bool humanReadable = true,
const CocoJsonFormat cocoJsonFormat = CocoJsonFormat::Body, const int mCocoJsonVariant = 0);
virtual ~CocoJsonSaver();
void record(const Array<float>& poseKeypoints, const Array<float>& poseScores, const std::string& imageName);
private:
const PoseModel mPoseModel;
const CocoJsonFormat mCocoJsonFormat;
const int mCocoJsonVariant;
JsonOfstream mJsonOfstream;
......
......@@ -621,7 +621,7 @@ namespace op
// If humanFormat: bigger size (& maybe slower to process), but easier for user to read it
const auto humanFormat = true;
const auto cocoJsonSaver = std::make_shared<CocoJsonSaver>(
wrapperStructOutput.writeCocoJson, humanFormat,
wrapperStructOutput.writeCocoJson, wrapperStructPose.poseModel, humanFormat,
(wrapperStructPose.poseModel != PoseModel::CAR_22
&& wrapperStructPose.poseModel != PoseModel::CAR_12
? CocoJsonFormat::Body : CocoJsonFormat::Car),
......@@ -633,8 +633,9 @@ namespace op
{
// If humanFormat: bigger size (& maybe slower to process), but easier for user to read it
const auto humanFormat = true;
const auto cocoJsonSaver = std::make_shared<CocoJsonSaver>(wrapperStructOutput.writeCocoFootJson,
humanFormat, CocoJsonFormat::Foot);
const auto cocoJsonSaver = std::make_shared<CocoJsonSaver>(
wrapperStructOutput.writeCocoFootJson, wrapperStructPose.poseModel, humanFormat,
CocoJsonFormat::Foot);
outputWs.emplace_back(std::make_shared<WCocoJsonSaver<TDatumsSP>>(cocoJsonSaver));
}
// Write frames as desired image format on hard disk
......
......@@ -439,8 +439,8 @@ namespace op
" detection from 4 cameras is about 2-3 pixels. It might be simply a wrong OpenPose"
" detection. If this message appears very frequently, your calibration parameters"
" might be wrong.", Priority::High);
// log("Reprojection error: " + std::to_string(reprojectionErrorTotal)); // To debug reprojection error
}
// log("Reprojection error: " + std::to_string(reprojectionErrorTotal)); // To debug reprojection error
}
}
catch (const std::exception& e)
......
......@@ -3,8 +3,10 @@
namespace op
{
CocoJsonSaver::CocoJsonSaver(const std::string& filePathToSave, const bool humanReadable,
const CocoJsonFormat cocoJsonFormat, const int cocoJsonVariant) :
CocoJsonSaver::CocoJsonSaver(const std::string& filePathToSave, const PoseModel poseModel,
const bool humanReadable, const CocoJsonFormat cocoJsonFormat,
const int cocoJsonVariant) :
mPoseModel{poseModel},
mCocoJsonFormat{cocoJsonFormat},
mCocoJsonVariant{cocoJsonVariant},
mJsonOfstream{filePathToSave, humanReadable},
......@@ -59,6 +61,8 @@ namespace op
indexesInCocoOrder = std::vector<int>{0, 14,13,16,15, 4,1,5,2,6, 3,10,7,11, 8, 12, 9};
else if (numberBodyParts == 18)
indexesInCocoOrder = std::vector<int>{0, 15,14,17,16, 5,2,6,3,7, 4,11,8,12, 9, 13,10};
else if (mPoseModel == PoseModel::BODY_25B)
indexesInCocoOrder = std::vector<int>{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
else if (numberBodyParts == 19 || numberBodyParts == 25 || numberBodyParts == 59)
indexesInCocoOrder = std::vector<int>{0, 16,15,18,17, 5,2,6,3,7, 4,12,9,13,10, 14,11};
// else if (numberBodyParts == 23)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册