|
144 | 144 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
145 | 145 | " resize_initial_size=True,\n", |
146 | 146 | ")\n", |
147 | | - "result = CombineDetections(element_crops, nms_threshold=0.05, match_metric='IOS')" |
| 147 | + "result = CombineDetections(element_crops, nms_threshold=0.05)" |
148 | 148 | ] |
149 | 149 | }, |
150 | 150 | { |
|
203 | 203 | " conf=0.5,\n", |
204 | 204 | " iou=0.7,\n", |
205 | 205 | " thickness=8,\n", |
206 | | - " font_scale=1.1,\n", |
207 | 206 | " show_boxes=True,\n", |
208 | 207 | " delta_colors=3,\n", |
209 | 208 | " show_class=False,\n", |
|
218 | 217 | " classes_ids=result.filtered_classes_id,\n", |
219 | 218 | " classes_names=result.filtered_classes_names,\n", |
220 | 219 | " thickness=8,\n", |
221 | | - " font_scale=1.1,\n", |
222 | 220 | " show_boxes=True,\n", |
223 | 221 | " delta_colors=3,\n", |
224 | 222 | " show_class=False,\n", |
|
306 | 304 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
307 | 305 | " resize_initial_size=False,\n", |
308 | 306 | ")\n", |
309 | | - "result = CombineDetections(element_crops, nms_threshold=0.05, match_metric='IOS')\n", |
| 307 | + "result = CombineDetections(element_crops, nms_threshold=0.05)\n", |
310 | 308 | "\n", |
311 | 309 | "print('Before nms:')\n", |
312 | 310 | "visualize_results(\n", |
|
399 | 397 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
400 | 398 | " resize_initial_size=True,\n", |
401 | 399 | ")\n", |
402 | | - "result = CombineDetections(element_crops, nms_threshold=0.05, match_metric='IOS')\n", |
| 400 | + "result = CombineDetections(element_crops, nms_threshold=0.05)\n", |
403 | 401 | "\n", |
404 | 402 | "print('Basic yolo inference:')\n", |
405 | 403 | "visualize_results_usual_yolo_inference(\n", |
|
410 | 408 | " iou=0.7,\n", |
411 | 409 | " segment=False,\n", |
412 | 410 | " thickness=8,\n", |
413 | | - " font_scale=1.1,\n", |
414 | 411 | " show_boxes=True,\n", |
415 | 412 | " delta_colors=3,\n", |
416 | 413 | " show_class=False,\n", |
|
479 | 476 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
480 | 477 | " resize_initial_size=True,\n", |
481 | 478 | ")\n", |
482 | | - "result = CombineDetections(element_crops, nms_threshold=0.5, match_metric='IOS')" |
| 479 | + "result = CombineDetections(element_crops, nms_threshold=0.5)" |
483 | 480 | ] |
484 | 481 | }, |
485 | 482 | { |
|
539 | 536 | " iou=0.7,\n", |
540 | 537 | " segment=True,\n", |
541 | 538 | " thickness=8,\n", |
542 | | - " font_scale=1.1,\n", |
543 | 539 | " fill_mask=True,\n", |
544 | 540 | " show_boxes=False,\n", |
545 | 541 | " delta_colors=3,\n", |
|
557 | 553 | " classes_names=result.filtered_classes_names,\n", |
558 | 554 | " segment=True,\n", |
559 | 555 | " thickness=8,\n", |
560 | | - " font_scale=1.1,\n", |
561 | 556 | " fill_mask=True,\n", |
562 | 557 | " show_boxes=False,\n", |
563 | 558 | " delta_colors=3,\n", |
|
593 | 588 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
594 | 589 | " resize_initial_size=True,\n", |
595 | 590 | ")\n", |
596 | | - "result = CombineDetections(element_crops, nms_threshold=0.5, match_metric='IOS')" |
| 591 | + "result = CombineDetections(element_crops, nms_threshold=0.5)" |
597 | 592 | ] |
598 | 593 | }, |
599 | 594 | { |
|
646 | 641 | " iou=0.7,\n", |
647 | 642 | " segment=True,\n", |
648 | 643 | " thickness=8,\n", |
649 | | - " font_scale=1.1,\n", |
650 | 644 | " fill_mask=True,\n", |
651 | 645 | " show_boxes=False,\n", |
652 | 646 | " delta_colors=3,\n", |
|
664 | 658 | " classes_names=result.filtered_classes_names,\n", |
665 | 659 | " segment=True,\n", |
666 | 660 | " thickness=8,\n", |
667 | | - " font_scale=1.1,\n", |
668 | 661 | " fill_mask=True,\n", |
669 | 662 | " show_boxes=False,\n", |
670 | 663 | " delta_colors=3,\n", |
|
754 | 747 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
755 | 748 | " resize_initial_size=True,\n", |
756 | 749 | ")\n", |
757 | | - "result = CombineDetections(element_crops, nms_threshold=0.25, match_metric='IOS')\n", |
| 750 | + "result = CombineDetections(element_crops, nms_threshold=0.25)\n", |
758 | 751 | "\n", |
759 | 752 | "print('Basic rtdetr inference:')\n", |
760 | 753 | "visualize_results_usual_yolo_inference(\n", |
|
890 | 883 | " iou=0.8,\n", |
891 | 884 | " resize_initial_size=True,\n", |
892 | 885 | ")\n", |
893 | | - "result = CombineDetections(element_crops, nms_threshold=0.40, match_metric='IOS')\n", |
| 886 | + "result = CombineDetections(element_crops, nms_threshold=0.40)\n", |
894 | 887 | "\n", |
895 | 888 | "print('Basic FastSAM inference:')\n", |
896 | 889 | "visualize_results_usual_yolo_inference(\n", |
|
1034 | 1027 | " imgsz=416,\n", |
1035 | 1028 | " classes_list=[0, 1, 2, 3, 5, 7],\n", |
1036 | 1029 | " resize_initial_size=True,\n", |
1037 | | - " memory_optimize=False\n", |
| 1030 | + " memory_optimize=False,\n", |
| 1031 | + " inference_extra_args={'retina_masks':True}\n", |
1038 | 1032 | ")\n", |
1039 | | - "result = CombineDetections(element_crops, nms_threshold=0.5, match_metric='IOS')\n", |
| 1033 | + "result = CombineDetections(element_crops, nms_threshold=0.5)\n", |
1040 | 1034 | "\n", |
1041 | 1035 | "print('YOLO-Patch-Based-Inference:')\n", |
1042 | 1036 | "visualize_results(\n", |
|
1048 | 1042 | " classes_names=result.filtered_classes_names,\n", |
1049 | 1043 | " segment=True,\n", |
1050 | 1044 | " thickness=6,\n", |
1051 | | - " font_scale=1.1,\n", |
1052 | 1045 | " fill_mask=True,\n", |
1053 | 1046 | " show_boxes=False,\n", |
1054 | 1047 | " delta_colors=3,\n", |
|
1129 | 1122 | " masks=element_crops.crops[i].detected_masks,\n", |
1130 | 1123 | " segment=True,\n", |
1131 | 1124 | " thickness=1,\n", |
1132 | | - " font_scale=1.2,\n", |
1133 | 1125 | " fill_mask=True,\n", |
1134 | 1126 | " show_boxes=True,\n", |
1135 | 1127 | " delta_colors=3,\n", |
|
1145 | 1137 | " masks=element_crops.crops[i].detected_masks_real,\n", |
1146 | 1138 | " segment=True,\n", |
1147 | 1139 | " thickness=1,\n", |
1148 | | - " font_scale=1.2,\n", |
1149 | 1140 | " fill_mask=True,\n", |
1150 | 1141 | " show_boxes=True,\n", |
1151 | 1142 | " delta_colors=3,\n", |
|
0 commit comments