Skip to content

Commit d990d2d

Browse files
author
Pashchenkov Maxim
committed
Some issues were fixed
1 parent 452ba6a commit d990d2d

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

demos/gaze_estimation_demo/cpp/src/landmarks_estimator.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ namespace gaze_estimation {
1111

1212
LandmarksEstimator::LandmarksEstimator(
1313
InferenceEngine::Core& ie, const std::string& modelPath, const std::string& deviceName) :
14-
ieWrapper(ie, modelPath, modelType, deviceName)
15-
{
14+
ieWrapper(ie, modelPath, modelType, deviceName), numberLandmarks (0u) {
1615
inputBlobName = ieWrapper.expectSingleInput();
1716
ieWrapper.expectImageInput(inputBlobName);
1817

@@ -99,10 +98,7 @@ std::vector<cv::Point2i> LandmarksEstimator::heatMapPostprocess(cv::Rect faceBou
9998

10099
std::vector<cv::Mat> LandmarksEstimator::split(std::vector<float>& data, const std::vector<unsigned long>& shape) {
101100
std::vector<cv::Mat> flattenData(shape[1]);
102-
float* output = new float[data.size()];
103-
for (size_t i = 0; i < data.size(); i++) {
104-
output[i] = data[i];
105-
}
101+
float* output = &data.front();
106102
for (size_t i = 0; i < flattenData.size(); i++) {
107103
flattenData[i] = cv::Mat(shape[2], shape[3], CV_32FC1, output + i * shape[2] * shape[3]);
108104
}

demos/gesture_recognition_demo/cpp_gapi/src/custom_kernels.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ struct Params {
112112
prepared_mat = params.prepared_mat;
113113
last_id.fetch_add(params.last_id);
114114
}
115+
Params& operator=(const Params& params) {
116+
current_frame = params.current_frame;
117+
prepared_mat = params.prepared_mat;
118+
last_id.fetch_add(params.last_id);
119+
}
115120
};
116121
} // namespace BatchState
117122

demos/interactive_face_detection_demo/cpp_gapi/face.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
Face::Face(size_t id, cv::Rect& location):
88
_location(location), _intensity_mean(0.f), _id(id), _age(-1),
9-
_maleScore(0), _femaleScore(0), _yaw(0.f), _pitch(0.f), _roll(0.f) {}
9+
_maleScore(0), _femaleScore(0), _yaw(0.f), _pitch(0.f), _roll(0.f),
10+
_realFaceConfidence(0.f) {}
1011

1112
void Face::updateAge(float value) {
1213
_age = (_age == -1) ? value : 0.95f * _age + 0.05f * value;

demos/interactive_face_detection_demo/cpp_gapi/face.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ struct Face {
4444
float _yaw;
4545
float _pitch;
4646
float _roll;
47-
std::vector<float> _landmarks;
4847
float _realFaceConfidence;
48+
std::vector<float> _landmarks;
4949
};
5050

5151
// ----------------- Utils -----------------

0 commit comments

Comments
 (0)