DaoAI World C# SDK INDUSTRIAL 2024.8.0
Loading...
Searching...
No Matches
prediction.h
Go to the documentation of this file.
1#pragma once
2#include "managed_object.h"
3#include "common.h"
4#include "../daoai_dl_sdk/include/export/model.h"
5#include "../daoai_dl_sdk/include/export/prediction.h"
6
7using namespace System::Collections::Generic;
8namespace DaoAI {
9 namespace DeepLearningCLI
10 {
11 namespace Vision
12 {
13 public ref class ObjectDetectionResult : public ManagedObject<DaoAI::DeepLearning::Vision::ObjectDetectionResult>
14 {
15 public:
16
17 ObjectDetectionResult(const DaoAI::DeepLearning::Vision::ObjectDetectionResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::ObjectDetectionResult(result)) {}
18
19 String^ toJSONString();
20
22
23 property int height
24 {
25 int get() {
26 return m_Instance->image_width;
27 }
28 }
29 property int width
30 {
31 int get() {
32 return m_Instance->image_height;
33 }
34 }
35
36 property int num_detections
37 {
38 int get() {
39 return m_Instance->num_detections;
40 }
41 }
42 property cli::array<Box^>^ boxes
43 {
44 cli::array<Box^>^ get() {
45 std::vector<DaoAI::DeepLearning::Box> native_boxes = m_Instance->boxes;
46 cli::array<Box^>^ boxes = gcnew cli::array<Box^>(native_boxes.size());
47 for (int i = 0; i < native_boxes.size(); i++) {
48 boxes[i] = gcnew Box(native_boxes[i]);
49 }
50 return boxes;
51 }
52 }
53 property cli::array<double>^ confidences
54 {
55 cli::array<double>^ get() {
56 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
57 for (int i = 0; i < m_Instance->confidences.size(); i++) {
58 confidences[i] = m_Instance->confidences[i];
59 }
60 return confidences;
61 }
62 }
63 property cli::array<int>^ class_ids
64 {
65 cli::array<int>^ get() {
66 cli::array<int>^ class_ids = gcnew cli::array<int>(m_Instance->class_ids.size());
67 for (int i = 0; i < m_Instance->class_ids.size(); i++) {
68 class_ids[i] = m_Instance->class_ids[i];
69 }
70 return class_ids;
71 }
72 }
73 property cli::array<String^>^ class_labels
74 {
75 cli::array<String^>^ get() {
76 std::vector<std::string> native_labels = m_Instance->class_labels;
77 cli::array<String^>^ labels = gcnew cli::array<String^>(native_labels.size());
78 for (int i = 0; i < native_labels.size(); i++) {
79 labels[i] = gcnew String(native_labels[i].c_str());
80 }
81 return labels;
82 }
83 }
84
85 property String^ decision
86 {
87 String^ get() {
88 return gcnew String(m_Instance->decision.c_str());
89 }
90 }
91 };
92
93 public ref class InstanceSegmentationResult : public ManagedObject<DaoAI::DeepLearning::Vision::InstanceSegmentationResult>
94 {
95 public:
96 InstanceSegmentationResult(const DaoAI::DeepLearning::Vision::InstanceSegmentationResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::InstanceSegmentationResult(result)) {}
97
98 String^ toJSONString();
100
101 property int height
102 {
103 int get() {
104 return m_Instance->image_width;
105 }
106 }
107 property int width
108 {
109 int get() {
110 return m_Instance->image_height;
111 }
112 }
113
114 property int num_detections
115 {
116 int get() {
117 return m_Instance->num_detections;
118 }
119 }
120 property cli::array<Box^>^ boxes
121 {
122 cli::array<Box^>^ get() {
123 std::vector<DaoAI::DeepLearning::Box> native_boxes = m_Instance->boxes;
124 cli::array<Box^>^ boxes = gcnew cli::array<Box^>(native_boxes.size());
125 for (int i = 0; i < native_boxes.size(); i++) {
126 boxes[i] = gcnew Box(native_boxes[i]);
127 }
128 return boxes;
129 }
130 }
131 property cli::array<double>^ confidences
132 {
133 cli::array<double>^ get() {
134 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
135 for (int i = 0; i < m_Instance->confidences.size(); i++) {
136 confidences[i] = m_Instance->confidences[i];
137 }
138 return confidences;
139 }
140 }
141 property cli::array<int>^ class_ids
142 {
143 cli::array<int>^ get() {
144 cli::array<int>^ class_ids = gcnew cli::array<int>(m_Instance->class_ids.size());
145 for (int i = 0; i < m_Instance->class_ids.size(); i++) {
146 confidences[i] = m_Instance->class_ids[i];
147 }
148 return class_ids;
149 }
150 }
151 property cli::array<String^>^ class_labels
152 {
153 cli::array<String^>^ get() {
154 std::vector<std::string> native_labels = m_Instance->class_labels;
155 cli::array<String^>^ labels = gcnew cli::array<String^>(native_labels.size());
156 for (int i = 0; i < native_labels.size(); i++) {
157 labels[i] = gcnew String(native_labels[i].c_str());
158 }
159 return labels;
160 }
161 }
162
163 property cli::array<Mask^>^ masks
164 {
165 cli::array<Mask^>^ get() {
166 std::vector<DaoAI::DeepLearning::Mask> native_masks = m_Instance->masks;
167 cli::array<Mask^>^ masks = gcnew cli::array<Mask^>(native_masks.size());
168 for (int i = 0; i < native_masks.size(); i++) {
169 masks[i] = gcnew Mask(native_masks[i]);
170 }
171 return masks;
172 }
173 }
174 };
175
176 public ref class KeypointDetectionResult : public ManagedObject<DaoAI::DeepLearning::Vision::KeypointDetectionResult>
177 {
178 public:
179 KeypointDetectionResult::KeypointDetectionResult(const DaoAI::DeepLearning::Vision::KeypointDetectionResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::KeypointDetectionResult(result)) {}
180
181 String^ toJSONString();
183
184 property int height
185 {
186 int get() {
187 return m_Instance->image_width;
188 }
189 }
190 property int width
191 {
192 int get() {
193 return m_Instance->image_height;
194 }
195 }
196
197 property int num_detections
198 {
199 int get() {
200 return m_Instance->num_detections;
201 }
202 }
203 property cli::array<Box^>^ boxes
204 {
205 cli::array<Box^>^ get() {
206 std::vector<DaoAI::DeepLearning::Box> native_boxes = m_Instance->boxes;
207 cli::array<Box^>^ boxes = gcnew cli::array<Box^>(native_boxes.size());
208 for (int i = 0; i < native_boxes.size(); i++) {
209 boxes[i] = gcnew Box(native_boxes[i]);
210 }
211 return boxes;
212 }
213 }
214 property cli::array<double>^ confidences
215 {
216 cli::array<double>^ get() {
217 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
218 for (int i = 0; i < m_Instance->confidences.size(); i++) {
219 confidences[i] = m_Instance->confidences[i];
220 }
221 return confidences;
222 }
223 }
224 property cli::array<int>^ class_ids
225 {
226 cli::array<int>^ get() {
227 cli::array<int>^ class_ids = gcnew cli::array<int>(m_Instance->class_ids.size());
228 for (int i = 0; i < m_Instance->class_ids.size(); i++) {
229 class_ids[i] = m_Instance->class_ids[i];
230 }
231 return class_ids;
232 }
233 }
234 property cli::array<String^>^ class_labels
235 {
236 cli::array<String^>^ get() {
237 std::vector<std::string> native_labels = m_Instance->class_labels;
238 cli::array<String^>^ labels = gcnew cli::array<String^>(native_labels.size());
239 for (int i = 0; i < native_labels.size(); i++) {
240 labels[i] = gcnew String(native_labels[i].c_str());
241 }
242 return labels;
243 }
244 }
245
246 property cli::array<Mask^>^ masks
247 {
248 cli::array<Mask^>^ get() {
249 std::vector<DaoAI::DeepLearning::Mask> native_masks = m_Instance->masks;
250 cli::array<Mask^>^ masks = gcnew cli::array<Mask^>(native_masks.size());
251 for (int i = 0; i < native_masks.size(); i++) {
252 masks[i] = gcnew Mask(native_masks[i]);
253 }
254 return masks;
255 }
256 }
257
258 property cli::array<cli::array<Point^>^>^ keypoints
259 {
260 cli::array<cli::array<Point^>^>^ get() {
261 std::vector<std::vector<DaoAI::DeepLearning::Point>> native_keypoints = m_Instance->keypoints;
262 cli::array<cli::array<Point^>^>^ keypoints = gcnew cli::array<cli::array<Point^>^>(native_keypoints.size());
263 for (int i = 0; i < native_keypoints.size(); i++) {
264 keypoints[i] = gcnew cli::array<Point^>(native_keypoints[i].size());
265 for (int j = 0; j < native_keypoints[i].size(); j++) {
266 keypoints[i][j] = gcnew Point(native_keypoints[i][j]);
267 }
268 }
269 return keypoints;
270 }
271 }
272 };
273
274 public ref class OCRResult : public ManagedObject<DaoAI::DeepLearning::Vision::OCRResult>
275 {
276 public:
277 OCRResult::OCRResult(const DaoAI::DeepLearning::Vision::OCRResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::OCRResult(result)) {}
278
279 String^ toJSONString();
281
282 property int height
283 {
284 int get() {
285 return m_Instance->image_width;
286 }
287 }
288 property int width
289 {
290 int get() {
291 return m_Instance->image_height;
292 }
293 }
294
295 property int num_detections
296 {
297 int get() {
298 return m_Instance->num_detections;
299 }
300 }
301 property cli::array<String^>^ texts
302 {
303 cli::array<String^>^ get() {
304 std::vector<std::string> native_texts = m_Instance->texts;
305 cli::array<String^>^ texts = gcnew cli::array<String^>(native_texts.size());
306 for (int i = 0; i < native_texts.size(); i++) {
307 texts[i] = gcnew String(native_texts[i].c_str());
308 }
309 return texts;
310 }
311 }
312
313 property cli::array<Polygon^>^ boxes
314 {
315 cli::array<Polygon^>^ get() {
316 std::vector<DaoAI::DeepLearning::Polygon> native_boxes = m_Instance->boxes;
317 cli::array<Polygon^>^ boxes = gcnew cli::array<Polygon^>(native_boxes.size());
318 for (int i = 0; i < native_boxes.size(); i++) {
319 boxes[i] = gcnew Polygon(native_boxes[i]);
320 }
321 return boxes;
322 }
323 }
324
325 property cli::array<double>^ confidences
326 {
327 cli::array<double>^ get() {
328 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
329 for (int i = 0; i < m_Instance->confidences.size(); i++) {
330 confidences[i] = m_Instance->confidences[i];
331 }
332 return confidences;
333 }
334 }
335 };
336
337 public ref struct Flag : public ManagedObject<DaoAI::DeepLearning::Vision::ClassificationResult::Flag>
338 {
339 public:
340 Flag(DaoAI::DeepLearning::Vision::ClassificationResult::Flag flag) : ManagedObject(new DaoAI::DeepLearning::Vision::ClassificationResult::Flag(flag)) {}
341
342 property double confidence
343 {
344 double get() {
345 return m_Instance->confidence;
346 }
347 void set(double value) {
348 m_Instance->confidence = value;
349 }
350 }
351
352 property String^ label
353 {
354 String^ get() {
355 return gcnew String(m_Instance->label.c_str());
356 }
357
358 void set(String^ value) {
359 m_Instance->label = string_to_char_array(value);
360 }
361 }
362 };
363
364 public ref class ClassificationResult : public ManagedObject<DaoAI::DeepLearning::Vision::ClassificationResult>
365 {
366 public:
367 ClassificationResult::ClassificationResult(const DaoAI::DeepLearning::Vision::ClassificationResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::ClassificationResult(result)) {}
368
369 String^ toJSONString();
371
372 property int height
373 {
374 int get() {
375 return m_Instance->image_width;
376 }
377 }
378 property int width
379 {
380 int get() {
381 return m_Instance->image_height;
382 }
383 }
384
385 property cli::array<Flag^>^ flags
386 {
387 cli::array<Flag^>^ get() {
388 std::vector<DaoAI::DeepLearning::Vision::ClassificationResult::Flag> native_flags = m_Instance->flags;
389 cli::array<Flag^>^ flags = gcnew cli::array<Flag^>(native_flags.size());
390 for (int i = 0; i < native_flags.size(); i++) {
391 flags[i] = gcnew Flag(native_flags[i]);
392 }
393 return flags;
394 }
395 }
396
397 property bool multilabel
398 {
399 bool get() {
400 return m_Instance->multilabel;
401 }
402 }
403 };
404
405 public ref class SupervisedDefectSegmentationResult : public ManagedObject<DaoAI::DeepLearning::Vision::SupervisedDefectSegmentationResult>
406 {
407 public:
408 SupervisedDefectSegmentationResult::SupervisedDefectSegmentationResult(const DaoAI::DeepLearning::Vision::SupervisedDefectSegmentationResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::SupervisedDefectSegmentationResult(result)) {}
409
410 String^ toJSONString();
412
413 property int height
414 {
415 int get() {
416 return m_Instance->image_width;
417 }
418 }
419 property int width
420 {
421 int get() {
422 return m_Instance->image_height;
423 }
424 }
425
426 property Dictionary<String^, Mask^>^ masks
427 {
428 Dictionary<String^, Mask^>^ get() {
429 Dictionary<String^, Mask^>^ masks = gcnew Dictionary<String^, Mask^>();
430 for (auto& pair : m_Instance->masks) {
431 masks[gcnew String(pair.first.c_str())] = gcnew Mask(pair.second);
432 }
433 return masks;
434 }
435 }
436
437 property String^ decision
438 {
439 String^ get() {
440 return gcnew String(m_Instance->decision.c_str());
441 }
442 }
443 };
444
445 public ref class AutoSegmentationResult : public ManagedObject<DaoAI::DeepLearning::Vision::AutoSegmentationResult>
446 {
447 public:
448 AutoSegmentationResult::AutoSegmentationResult(const DaoAI::DeepLearning::Vision::AutoSegmentationResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::AutoSegmentationResult(result)) {}
449
450 String^ toJSONString();
452
453 property int height
454 {
455 int get() {
456 return m_Instance->image_width;
457 }
458 }
459 property int width
460 {
461 int get() {
462 return m_Instance->image_height;
463 }
464 }
465
466 property Mask^ mask
467 {
468 Mask^ get() {
469 return gcnew Mask(m_Instance->mask);
470 }
471 }
472
473 property double confidence
474 {
475 double get() {
476 return m_Instance->confidence;
477 }
478 }
479 };
480
481 public ref class ImageEmbedding : public ManagedObject<DaoAI::DeepLearning::Vision::ImageEmbedding>
482 {
483 public:
484 ImageEmbedding::ImageEmbedding(const DaoAI::DeepLearning::Vision::ImageEmbedding& embedding) : ManagedObject(new DaoAI::DeepLearning::Vision::ImageEmbedding(embedding)) {}
485
486 property int height
487 {
488 int get() {
489 return m_Instance->image_height;
490 }
491 }
492 property int width
493 {
494 int get() {
495 return m_Instance->image_width;
496 }
497 }
498
499 property cli::array<float>^ data
500 {
501 cli::array<float>^ get() {
502 std::vector<float> native_data = m_Instance->data;
503 cli::array<float>^ data = gcnew cli::array<float>(native_data.size());
504 for (int i = 0; i < native_data.size(); i++) {
505 data[i] = native_data[i];
506 }
507 return data;
508 }
509 }
510
511 property cli::array<size_t>^ shape
512 {
513 cli::array<size_t>^ get() {
514 std::vector<size_t> native_shape = m_Instance->shape;
515 cli::array<size_t>^ shape = gcnew cli::array<size_t>(native_shape.size());
516 for (int i = 0; i < native_shape.size(); i++) {
517 shape[i] = native_shape[i];
518 }
519 return shape;
520 }
521 }
522 };
523
524#ifdef INDUSTRIAL
525 public ref class PresenceCheckingResult : public ManagedObject<DaoAI::DeepLearning::Vision::PresenceCheckingResult>
526 {
527 public:
528 PresenceCheckingResult::PresenceCheckingResult(const DaoAI::DeepLearning::Vision::PresenceCheckingResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::PresenceCheckingResult(result)) {}
529
530 String^ toJSONString();
532
533 property int height
534 {
535 int get() {
536 return m_Instance->image_width;
537 }
538 }
539 property int width
540 {
541 int get() {
542 return m_Instance->image_height;
543 }
544 }
545
546 property int num_detections
547 {
548 int get() {
549 return m_Instance->num_detections;
550 }
551 }
552 property cli::array<Box^>^ boxes
553 {
554 cli::array<Box^>^ get() {
555 std::vector<DaoAI::DeepLearning::Box> native_boxes = m_Instance->boxes;
556 cli::array<Box^>^ boxes = gcnew cli::array<Box^>(native_boxes.size());
557 for (int i = 0; i < native_boxes.size(); i++) {
558 boxes[i] = gcnew Box(native_boxes[i]);
559 }
560 return boxes;
561 }
562 }
563 property cli::array<double>^ confidences
564 {
565 cli::array<double>^ get() {
566 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
567 for (int i = 0; i < m_Instance->confidences.size(); i++) {
568 confidences[i] = m_Instance->confidences[i];
569 }
570 return confidences;
571 }
572 }
573 property cli::array<int>^ class_ids
574 {
575 cli::array<int>^ get() {
576 cli::array<int>^ class_ids = gcnew cli::array<int>(m_Instance->class_ids.size());
577 for (int i = 0; i < m_Instance->class_ids.size(); i++) {
578 class_ids[i] = m_Instance->class_ids[i];
579 }
580 return class_ids;
581 }
582 }
583 property cli::array<String^>^ class_labels
584 {
585 cli::array<String^>^ get() {
586 std::vector<std::string> native_labels = m_Instance->class_labels;
587 cli::array<String^>^ labels = gcnew cli::array<String^>(native_labels.size());
588 for (int i = 0; i < native_labels.size(); i++) {
589 labels[i] = gcnew String(native_labels[i].c_str());
590 }
591 return labels;
592 }
593 }
594
595 property String^ decision
596 {
597 String^ get() {
598 return gcnew String(m_Instance->decision.c_str());
599 }
600 }
601 };
602
603 public ref class PositioningResult : public ManagedObject<DaoAI::DeepLearning::Vision::PositioningResult>
604 {
605 public:
606 PositioningResult::PositioningResult(const DaoAI::DeepLearning::Vision::PositioningResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::PositioningResult(result)) {}
607
608 String^ toJSONString();
610
611 property int height
612 {
613 int get() {
614 return m_Instance->image_width;
615 }
616 }
617 property int width
618 {
619 int get() {
620 return m_Instance->image_height;
621 }
622 }
623
624 property int num_detections
625 {
626 int get() {
627 return m_Instance->num_detections;
628 }
629 }
630 property cli::array<Box^>^ boxes
631 {
632 cli::array<Box^>^ get() {
633 std::vector<DaoAI::DeepLearning::Box> native_boxes = m_Instance->boxes;
634 cli::array<Box^>^ boxes = gcnew cli::array<Box^>(native_boxes.size());
635 for (int i = 0; i < native_boxes.size(); i++) {
636 boxes[i] = gcnew Box(native_boxes[i]);
637 }
638 return boxes;
639 }
640 }
641 property cli::array<double>^ confidences
642 {
643 cli::array<double>^ get() {
644 cli::array<double>^ confidences = gcnew cli::array<double>(m_Instance->confidences.size());
645 for (int i = 0; i < m_Instance->confidences.size(); i++) {
646 confidences[i] = m_Instance->confidences[i];
647 }
648 return confidences;
649 }
650 }
651 property cli::array<int>^ class_ids
652 {
653 cli::array<int>^ get() {
654 cli::array<int>^ class_ids = gcnew cli::array<int>(m_Instance->class_ids.size());
655 for (int i = 0; i < m_Instance->class_ids.size(); i++) {
656 class_ids[i] = m_Instance->class_ids[i];
657 }
658 return class_ids;
659 }
660 }
661 property cli::array<String^>^ class_labels
662 {
663 cli::array<String^>^ get() {
664 std::vector<std::string> native_labels = m_Instance->class_labels;
665 cli::array<String^>^ labels = gcnew cli::array<String^>(native_labels.size());
666 for (int i = 0; i < native_labels.size(); i++) {
667 labels[i] = gcnew String(native_labels[i].c_str());
668 }
669 return labels;
670 }
671 }
672
673 property cli::array<Mask^>^ masks
674 {
675 cli::array<Mask^>^ get() {
676 std::vector<DaoAI::DeepLearning::Mask> native_masks = m_Instance->masks;
677 cli::array<Mask^>^ masks = gcnew cli::array<Mask^>(native_masks.size());
678 for (int i = 0; i < native_masks.size(); i++) {
679 masks[i] = gcnew Mask(native_masks[i]);
680 }
681 return masks;
682 }
683 }
684
685 property cli::array<cli::array<Point^>^>^ keypoints
686 {
687 cli::array<cli::array<Point^>^>^ get() {
688 std::vector<std::vector<DaoAI::DeepLearning::Point>> native_keypoints = m_Instance->keypoints;
689 cli::array<cli::array<Point^>^>^ keypoints = gcnew cli::array<cli::array<Point^>^>(native_keypoints.size());
690 for (int i = 0; i < native_keypoints.size(); i++) {
691 keypoints[i] = gcnew cli::array<Point^>(native_keypoints[i].size());
692 for (int j = 0; j < native_keypoints[i].size(); j++) {
693 keypoints[i][j] = gcnew Point(native_keypoints[i][j]);
694 }
695 }
696 return keypoints;
697 }
698 }
699
700 property Point^ center
701 {
702 Point^ get() {
703 return gcnew Point(m_Instance->center);
704 }
705 }
706
707 property double angle
708 {
709 double get() {
710 return m_Instance->angle;
711 }
712 }
713
714 property String^ decision
715 {
716 String^ get() {
717 return gcnew String(m_Instance->decision.c_str());
718 }
719 }
720 };
721
722 public ref struct Region : public ManagedObject<DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult::Region>
723 {
724 public:
725 Region(DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult::Region region) : ManagedObject(new DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult::Region(region)) {}
726
727 property double confidence
728 {
729 double get() {
730 return m_Instance->confidence;
731 }
732 }
733
734 property String^ label
735 {
736 String^ get() {
737 return gcnew String(m_Instance->label.c_str());
738 }
739 }
740
741 property bool defect
742 {
743 bool get() {
744 return m_Instance->defect;
745 }
746 }
747
748 property Box^ box
749 {
750 Box^ get() {
751 return gcnew Box(m_Instance->bbox[0], m_Instance->bbox[1], m_Instance->bbox[2], m_Instance->bbox[3], NAN, Box::Type::XYXY);
752 }
753 }
754 };
755
756 public ref class UnsupervisedDefectSegmentationResult : ManagedObject<DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult>
757 {
758 public:
759 UnsupervisedDefectSegmentationResult::UnsupervisedDefectSegmentationResult(const DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult& result) : ManagedObject(new DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult(result)) {}
760
761 String^ toJSONString();
763
764 property int height
765 {
766 int get() {
767 return m_Instance->image_width;
768 }
769 }
770 property int width
771 {
772 int get() {
773 return m_Instance->image_height;
774 }
775 }
776
777 property Mask^ mask
778 {
779 Mask^ get() {
780 return gcnew Mask(m_Instance->mask);
781 }
782 }
783
784 property double confidence
785 {
786 double get() {
787 return m_Instance->confidence;
788 }
789 }
790
791 property bool defect
792 {
793 bool get() {
794 return m_Instance->defect;
795 }
796 }
797
798 property cli::array<Region^>^ region_defects
799 {
800 cli::array<Region^>^ get() {
801 std::vector<DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult::Region> native_regions = m_Instance->region_defects;
802 cli::array<Region^>^ regions = gcnew cli::array<Region^>(native_regions.size());
803 for (int i = 0; i < native_regions.size(); i++) {
804 regions[i] = gcnew Region(native_regions[i]);
805 }
806 return regions;
807 }
808 }
809 };
810#endif // INDUSTRIAL
811 }
812 }
813}
814
Definition managed_object.h:18
DaoAI::DeepLearning::Vision::ObjectDetectionResult * m_Instance
Definition managed_object.h:20
InstanceSegmentationResult(const DaoAI::DeepLearning::Vision::InstanceSegmentationResult &result)
Definition prediction.h:96
KeypointDetectionResult::KeypointDetectionResult(const DaoAI::DeepLearning::Vision::KeypointDetectionResult &result)
Definition prediction.h:179
ObjectDetectionResult(const DaoAI::DeepLearning::Vision::ObjectDetectionResult &result)
Definition prediction.h:17
Definition common.cpp:6
Definition prediction.h:338
Flag(DaoAI::DeepLearning::Vision::ClassificationResult::Flag flag)
Definition prediction.h:340
Definition prediction.h:723
Region(DaoAI::DeepLearning::Vision::UnsupervisedDefectSegmentationResult::Region region)
Definition prediction.h:725