Skip to content

Commit d1fb995

Browse files
committed
disable clang format for brace init with method chaining
1 parent 5b40516 commit d1fb995

File tree

5 files changed

+36
-24
lines changed

5 files changed

+36
-24
lines changed

demos/face_detection_mtcnn_demo/cpp_gapi/main.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,25 +189,24 @@ int main(int argc, char* argv[]) {
189189
/** Configure networks **/
190190

191191
// MTCNN Refinement detection network
192+
// clang-format off
192193
auto mtcnnr_net =
193194
cv::gapi::ie::Params<nets::MTCNNRefinement>{
194195
FLAGS_m_r, // path to topology IR
195196
fileNameNoExt(FLAGS_m_r) + ".bin", // path to weights
196197
FLAGS_d_r, // device specifier
197-
}
198-
.cfgOutputLayers({"conv5-2", "prob1"})
199-
.cfgInputLayers({"data"});
198+
}.cfgOutputLayers({"conv5-2", "prob1"})
199+
.cfgInputLayers({"data"});
200200

201201
// MTCNN Output detection network
202202
auto mtcnno_net =
203203
cv::gapi::ie::Params<nets::MTCNNOutput>{
204204
FLAGS_m_o, // path to topology IR
205205
fileNameNoExt(FLAGS_m_o) + ".bin", // path to weights
206206
FLAGS_d_o, // device specifier
207-
}
208-
.cfgOutputLayers({"conv6-2", "conv6-3", "prob1"})
209-
.cfgInputLayers({"data"});
210-
207+
}.cfgOutputLayers({"conv6-2", "conv6-3", "prob1"})
208+
.cfgInputLayers({"data"});
209+
// clang-format off
211210
auto networks_mtcnn = cv::gapi::networks(mtcnnr_net, mtcnno_net);
212211

213212
// MTCNN Proposal detection network

demos/gaze_estimation_demo/cpp_gapi/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,14 @@ int main(int argc, char* argv[]) {
238238
slog::info << "The Facial Landmarks Estimation model " << FLAGS_m_lm << " is loaded to " << FLAGS_d_lm
239239
<< " device." << slog::endl;
240240

241+
// clang-format off
241242
auto gaze_net =
242243
cv::gapi::ie::Params<nets::Gaze>{
243244
FLAGS_m, // path to topology IR
244245
fileNameNoExt(FLAGS_m) + ".bin", // path to weights
245246
FLAGS_d, // device specifier
246-
}
247-
.cfgInputLayers({"left_eye_image", "right_eye_image", "head_pose_angles"});
247+
}.cfgInputLayers({"left_eye_image", "right_eye_image", "head_pose_angles"});
248+
// clang-format on
248249
slog::info << "The Gaze Estimation model " << FLAGS_m << " is loaded to " << FLAGS_d << " device."
249250
<< slog::endl;
250251

demos/gesture_recognition_demo/cpp_gapi/main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,27 +133,29 @@ int main(int argc, char* argv[]) {
133133
auto graph = cv::GComputation(cv::GIn(batch, current_person_id), cv::GOut(fast_frame, tracked, label));
134134
/** ---------------- End of graph ---------------- **/
135135
/** Configure networks **/
136+
// clang-format off
136137
auto person_detection =
137138
cv::gapi::ie::Params<nets::PersonDetection>{
138139
FLAGS_m_d, // path to model
139140
fileNameNoExt(FLAGS_m_d) + ".bin", // path to weights
140141
FLAGS_d_d // device to use
141-
}
142-
.cfgOutputLayers({"boxes"}); // This clarification here because of
142+
}.cfgOutputLayers({"boxes"}); // This clarification here because of
143143
// GAPI take the first layer name from OutputsInfo
144144
// for one output G_API_NET API
145+
// clang-format on
145146
slog::info << "The Person Detection ASL model " << FLAGS_m_d << " is loaded to " << FLAGS_d_d << " device."
146147
<< slog::endl;
147148

149+
// clang-format off
148150
auto action_recognition =
149151
cv::gapi::ie::Params<nets::ActionRecognition>{
150152
FLAGS_m_a, // path to model
151153
fileNameNoExt(FLAGS_m_a) + ".bin", // path to weights
152154
FLAGS_d_a // device to use
153-
}
154-
.cfgOutputLayers({"output"}); // This clarification here because of
155+
}.cfgOutputLayers({"output"}); // This clarification here because of
155156
// GAPI take the first layer name from OutputsInfo
156157
// for one output G_API_NET API
158+
// clang-format on
157159
slog::info << "The Action Recognition model " << FLAGS_m_a << " is loaded to " << FLAGS_d_a << " device."
158160
<< slog::endl;
159161

demos/interactive_face_detection_demo/cpp_gapi/main.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,41 +476,47 @@ int main(int argc, char* argv[]) {
476476
};
477477
slog::info << "The Face Detection model " << FLAGS_m << " is loaded to " << FLAGS_d << " device." << slog::endl;
478478

479+
// clang-format off
479480
auto age_net =
480481
cv::gapi::ie::Params<AgeGender>{
481482
FLAGS_mag, // path to model
482483
fileNameNoExt(FLAGS_mag) + ".bin", // path to weights
483484
FLAGS_dag // device to use
484-
}
485-
.cfgOutputLayers({"age_conv3", "prob"});
485+
}.cfgOutputLayers({"age_conv3", "prob"});
486+
// clang-format on
487+
486488
if (!FLAGS_mag.empty()) {
487489
slog::info << "The Age/Gender Recognition model " << FLAGS_mag << " is loaded to " << FLAGS_dag << " device."
488490
<< slog::endl;
489491
} else {
490492
slog::info << "Age/Gender Recognition DISABLED." << slog::endl;
491493
}
492494

495+
// clang-format off
493496
auto hp_net =
494497
cv::gapi::ie::Params<HeadPose>{
495498
FLAGS_mhp, // path to model
496499
fileNameNoExt(FLAGS_mhp) + ".bin", // path to weights
497500
FLAGS_dhp // device to use
498-
}
499-
.cfgOutputLayers({"angle_y_fc", "angle_p_fc", "angle_r_fc"});
501+
}.cfgOutputLayers({"angle_y_fc", "angle_p_fc", "angle_r_fc"});
502+
// clang-format on
503+
500504
if (!FLAGS_mhp.empty()) {
501505
slog::info << "The Head Pose Estimation model " << FLAGS_mhp << " is loaded to " << FLAGS_dhp << " device."
502506
<< slog::endl;
503507
} else {
504508
slog::info << "Head Pose Estimation DISABLED." << slog::endl;
505509
}
506510

511+
// clang-format off
507512
auto lm_net =
508513
cv::gapi::ie::Params<FacialLandmark>{
509514
FLAGS_mlm, // path to model
510515
fileNameNoExt(FLAGS_mlm) + ".bin", // path to weights
511516
FLAGS_dlm // device to use
512-
}
513-
.cfgOutputLayers({"align_fc3"});
517+
}.cfgOutputLayers({"align_fc3"});
518+
// clang-format on
519+
514520
if (!FLAGS_mlm.empty()) {
515521
slog::info << "The Facial Landmarks Estimation model " << FLAGS_mlm << " is loaded to " << FLAGS_dlm
516522
<< " device." << slog::endl;

demos/smart_classroom_demo/cpp_gapi/include/initialize.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,15 @@ void configNets(const NetsFlagsPack& flags, cv::gapi::GNetPackage& networks, cv:
207207
/** Create action detector net's parameters **/
208208
std::array<std::string, 7> outputBlobList =
209209
isNetForSixActions(flags.m_act) ? action_detector_6 : action_detector_5;
210+
// clang-format off
210211
auto action_net =
211212
cv::gapi::ie::Params<nets::PersonDetActionRec>{
212213
flags.m_act,
213214
fileNameNoExt(flags.m_act) + ".bin",
214215
flags.d_act,
215-
}
216-
.cfgOutputLayers(outputBlobList);
216+
}.cfgOutputLayers(outputBlobList);
217+
// clang-format on
218+
217219
networks += cv::gapi::networks(action_net);
218220
slog::info << "The Person/Action Detection model " << flags.m_act << " is loaded to " << flags.d_act
219221
<< " device." << slog::endl;
@@ -222,14 +224,16 @@ void configNets(const NetsFlagsPack& flags, cv::gapi::GNetPackage& networks, cv:
222224
}
223225
if (!flags.m_fd.empty()) {
224226
/** Create face detector net's parameters **/
227+
// clang-format off
225228
auto det_net =
226229
cv::gapi::ie::Params<nets::FaceDetector>{
227230
flags.m_fd,
228231
fileNameNoExt(flags.m_fd) + ".bin",
229232
flags.d_fd,
230-
}
231-
.cfgInputReshape("data",
232-
{1u, 3u, static_cast<size_t>(flags.inh_fd), static_cast<size_t>(flags.inw_fd)});
233+
}.cfgInputReshape("data",
234+
{1u, 3u, static_cast<size_t>(flags.inh_fd), static_cast<size_t>(flags.inw_fd)});
235+
// clang-format on
236+
233237
networks += cv::gapi::networks(det_net);
234238
slog::info << "The Face Detection model" << flags.m_fd << " is loaded to " << flags.d_fd << " device."
235239
<< slog::endl;

0 commit comments

Comments
 (0)