diff --git a/results/validation/validation_results_openvino_public_models.md b/results/validation/validation_results_openvino_public_models.md index 6c0f3e17d..483ce38ce 100644 --- a/results/validation/validation_results_openvino_public_models.md +++ b/results/validation/validation_results_openvino_public_models.md @@ -17,6 +17,7 @@ Image resolution: 709 x 510 ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| alexnet |0.9896095 Granny Smith
0.0037969 bell pepper
0.0013717 piggy bank, penny bank
0.0011059 acorn
0.0009710 fig| 0.9896095 Granny Smith
0.0037969 bell pepper
0.0013717 piggy bank, penny bank
0.0011059 acorn
0.0009710 fig|0.9896094 Granny Smith
0.0037969 bell pepper
0.0013717 piggy bank, penny bank
0.0011059 acorn
0.0009710 fig| 0.9896094 Granny Smith
0.0037969 bell pepper
0.0013717 piggy bank, penny bank
0.0011059 acorn
0.0009710 fig| caffenet |-|-|0.8602297 Granny Smith
0.0503849 teapot
0.0141509 piggy bank, penny bank
0.0113873 saltshaker, salt shaker
0.0104464 bell pepper|0.8602297 Granny Smith
0.0503849 teapot
0.0141509 piggy bank, penny bank
0.0113873 saltshaker, salt shaker
0.0104464 bell pepper +convnext-tiny |-|-|8.9958448 Granny Smith
1.5541943 orange
1.3344822 crate
1.3133256 military uniform
1.3033276 lemon|8.9958448 Granny Smith
1.5541943 orange
1.3344822 crate
1.3133256 military uniform
1.3033276 lemon densenet-121 |15.7979164 Granny Smith
9.9429455 lemon
9.3676043 orange
8.6181612 banana
7.1164074 tennis ball| 15.7979164 Granny Smith
9.9429455 lemon
9.3676043 orange
8.6181612 banana
7.1164074 tennis ball|15.7979164 Granny Smith
9.9429455 lemon
9.3676043 orange
8.6181612 banana
7.1164074 tennis ball| 15.7979155 Granny Smith
9.9429502 lemon
9.3676109 orange
8.6181631 banana
7.1164064 tennis ball| densenet-121-caffe2 |-|-| 15.7890606 Granny Smith
9.9466267 lemon
9.3717031 orange
8.6204128 banana
7.1169806 tennis ball
|15.7890606 Granny Smith
9.9466267 lemon
9.3717031 orange
8.6204128 banana
7.1169806 tennis ball
| densenet-121-tf |-|-| 0.9993860 Granny Smith
0.0004290 lemon
0.0000779 orange
0.0000480 banana
0.0000217 tennis ball | 0.9993860 Granny Smith
0.0004290 lemon
0.0000779 orange
0.0000480 banana
0.0000217 tennis ball | @@ -50,6 +51,7 @@ hbonet-1.0 |-|-| 14.2947550 Granny Smith
9.1487656 lemon
9.0358143 fig
inception-resnet-v2 |0.9982991 Granny Smith
0.0000684 orange
0.0000573 lemon
0.0000441 banana
0.0000164 Band Aid| 0.9982991 Granny Smith
0.0000684 orange
0.0000573 lemon
0.0000441 banana
0.0000164 Band Aid|0.9982988 Granny Smith
0.0000684 orange
0.0000573 lemon
0.0000441 banana
0.0000164 Band Aid| 0.9982988 Granny Smith
0.0000684 orange
0.0000573 lemon
0.0000441 banana
0.0000164 Band Aid| inception-resnet-v2-tf |-|-| 9.1892214 Granny Smith
4.2343903 pomegranate
3.3494303 lemon
3.2723582 crate
3.2125196 orange | 9.1892214 Granny Smith
4.2343903 pomegranate
3.3494303 lemon
3.2723582 crate
3.2125196 orange | mixnet-l | - | - | 9.0722599 Granny Smith
2.6522577 fig
2.1091993 lemon
1.7248296 crate
1.7041028 bell pepper
| 9.0722599 Granny Smith
2.6522577 fig
2.1091993 lemon
1.7248296 crate
1.7041028 bell pepper
| +levit-128s | - | - | 12.6147156 Granny Smith
4.6038151 scoreboard
4.1789894 tennis ball
3.9634018 bell pepper
3.7529557 fig
| 12.6147156 Granny Smith
4.6038151 scoreboard
4.1789894 tennis ball
3.9634018 bell pepper
3.7529557 fig
| mobilenet-v1-1.0-224 |-|-|0.9441368 Granny Smith
0.0080110 fig
0.0042946 lemon
0.0042536 custard apple
0.0036513 orange|0.9441368 Granny Smith
0.0080110 fig
0.0042946 lemon
0.0042536 custard apple
0.0036513 orange| mobilenet-v1-0.50-224 |-|-| 0.9409788 Granny Smith
0.0422395 bell pepper
0.0039017 fig
0.0032237 piggy bank, penny bank
0.0029516 tennis ball | 0.9409788 Granny Smith
0.0422395 bell pepper
0.0039017 fig
0.0032237 piggy bank, penny bank
0.0029516 tennis ball | mobilenet-v1-0.50-160 |-|-| 0.9844190 Granny Smith
0.0103430 bell pepper
0.0013505 fig
0.0009318 lemon
0.0008557 cucumber, cuke | 0.9844190 Granny Smith
0.0103430 bell pepper
0.0013505 fig
0.0009318 lemon
0.0008557 cucumber, cuke | @@ -74,6 +76,7 @@ regnetx-3.2gf |-|-| 17.9561310 Granny Smith
8.9531708 piggy bank, penny bank< repvgg-a0 |-|-| 18.5661106 Granny Smith
9.8166237 acorn
9.7410116 teapot
9.5852728 fig
9.4273500 piggy bank, penny bank
| 18.5661106 Granny Smith
9.8166237 acorn
9.7410135 teapot
9.5852728 fig
9.4273500 piggy bank, penny bank
| repvgg-b1 |-|-| 16.7964287 Granny Smith
7.4920392 candle, taper, wax light
7.3861318 lemon
7.3710637 purse
7.2753763 cup
| 16.7964249 Granny Smith
7.4920392 candle, taper, wax light
7.3861332 lemon
7.3710628 purse
7.2753773 cup
| repvgg-b3 |-|-| 13.2293644 Granny Smith
3.1549664 lemon
3.0749850 banana
2.7251179 fig
2.6711185 syringe
| 13.2293615 Granny Smith
3.1549661 lemon
3.0749860 banana
2.7251182 fig
2.6711187 syringe
| +resnest-50-pytorch | - | - | 8.5036259 Granny Smith
1.7239144 lemon
1.5759217 orange
1.5090363 pomegranate
1.4204146 tennis ball
|8.5036259 Granny Smith
1.7239144 lemon
1.5759217 orange
1.5090363 pomegranate
1.4204146 tennis ball
| resnet-34-pytorch | - | - | 17.9026833 Granny Smith
9.6216583 banana
9.0624905 lemon
8.7023344 acorn
7.8759065 orange
| 17.9026833 Granny Smith
9.6216583 banana
9.0624905 lemon
8.7023344 acorn
7.8759065 orange
| resnet-50-pytorch | - | - | 14.6118231 Granny Smith
8.5581894 fig
7.5287142 acorn
6.9782834 orange
6.8520727 custard apple
| 14.6118231 Granny Smith
8.5581894 fig
7.5287142 acorn
6.9782834 orange
6.8520727 custard apple
| resnet-v1-50 |0.1277409 banana
0.1127750 Granny Smith
0.0634985 tennis ball
0.0430244 hook, claw
0.0374065 safety pin| 0.1277411 banana
0.1127749 Granny Smith
0.0634985 tennis ball
0.0430244 hook, claw
0.0374065 safety pin|0.1277409 banana
0.1127749 Granny Smith
0.0634985 tennis ball
0.0430244 hook, claw
0.0374065 safety pin| 0.1277410 banana
0.1127741 Granny Smith
0.0634984 tennis ball
0.0430243 hook, claw
0.0374066 safety pin| @@ -117,6 +120,7 @@ Image resolution: 500 x 500 ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| alexnet |0.9979284 junco, snowbird
0.0020288 chickadee
0.0000137 jay
0.0000119 brambling, Fringilla montifringilla
0.0000104 bulbul| 0.9979284 junco, snowbird
0.0020288 chickadee
0.0000137 jay
0.0000119 brambling, Fringilla montifringilla
0.0000104 bulbul|0.9979280 junco, snowbird
0.0020288 chickadee
0.0000137 jay
0.0000119 brambling, Fringilla montifringilla
0.0000104 bulbul| 0.9979280 junco, snowbird
0.0020288 chickadee
0.0000137 jay
0.0000119 brambling, Fringilla montifringilla
0.0000104 bulbul| caffenet |-|-|0.9997593 junco, snowbird
0.0002351 chickadee
0.0000033 brambling, Fringilla montifringilla
0.0000010 bulbul
0.0000007 jay|0.9997593 junco, snowbird
0.0002351 chickadee
0.0000033 brambling, Fringilla montifringilla
0.0000010 bulbul
0.0000007 jay +convnext-tiny |-|-|9.1146841 junco, snowbird
1.5958223 indigo bunting, indigo finch, indigo bird, Passerina cyanea
1.4651693 brambling, Fringilla montifringilla
1.3361528 lacewing, lacewing fly
1.1702007 cricket|9.1146841 junco, snowbird
1.5958223 indigo bunting, indigo finch, indigo bird, Passerina cyanea
1.4651693 brambling, Fringilla montifringilla
1.3361528 lacewing, lacewing fly
1.1702007 cricket densenet-121 |17.8269768 junco, snowbird
11.4734764 brambling, Fringilla montifringilla
11.3202286 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3598928 chickadee
8.2504864 magpie| 17.8269768 junco, snowbird
11.4734764 brambling, Fringilla montifringilla
11.3202286 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3598928 chickadee
8.2504864 magpie|17.8269768 junco, snowbird
11.4734764 brambling, Fringilla montifringilla
11.3202286 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3598928 chickadee
8.2504864 magpie| 17.8269730 junco, snowbird
11.4734774 brambling, Fringilla montifringilla
11.3202305 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3598871 chickadee
8.2504835 magpie| densenet-121-tf |-|-| 0.9999087 junco, snowbird
0.0000453 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000382 brambling, Fringilla montifringilla
0.0000042 chickadee
0.0000009 magpie | 0.9999087 junco, snowbird
0.0000453 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000382 brambling, Fringilla montifringilla
0.0000042 chickadee
0.0000009 magpie | densenet-121-caffe2 |-|-| 17.8101349 junco, snowbird
11.4563322 brambling, Fringilla montifringilla
11.3156567 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3476629 chickadee
8.2407246 magpie
|17.8101349 junco, snowbird
11.4563322 brambling, Fringilla montifringilla
11.3156567 indigo bunting, indigo finch, indigo bird, Passerina cyanea
10.3476629 chickadee
8.2407246 magpie
| @@ -144,6 +148,7 @@ hbonet-1.0 |-|-| 25.9305305 junco, snowbird
18.4999180 chickadee
16.390689 inception-resnet-v2-tf |-|-| 10.2546673 junco, snowbird
5.3206644 brambling, Fringilla montifringilla
3.7312546 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.8738835 hamster
2.7935846 chickadee | 10.2546673 junco, snowbird
5.3206644 brambling, Fringilla montifringilla
3.7312546 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.8738835 hamster
2.7935846 chickadee | inception-resnet-v2 |0.9995078 junco, snowbird
0.0000257 brambling, Fringilla montifringilla
0.0000219 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000217 chickadee
0.0000119 water ouzel, dipper| 0.9995078 junco, snowbird
0.0000257 brambling, Fringilla montifringilla
0.0000219 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000217 chickadee
0.0000119 water ouzel, dipper|0.9995075 junco, snowbird
0.0000257 brambling, Fringilla montifringilla
0.0000219 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000217 chickadee
0.0000119 water ouzel, dipper| 0.9995075 junco, snowbird
0.0000257 brambling, Fringilla montifringilla
0.0000219 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0000217 chickadee
0.0000119 water ouzel, dipper| mixnet-l |-|-| 9.3572559 junco, snowbird
3.3805594 brambling, Fringilla montifringilla
2.2898817 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0944993 water ouzel, dipper
2.0528457 American coot, marsh hen, mud hen, water hen, Fulica americana
| 9.3572559 junco, snowbird
3.3805594 brambling, Fringilla montifringilla
2.2898817 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0944993 water ouzel, dipper
2.0528457 American coot, marsh hen, mud hen, water hen, Fulica americana
| +levit-128s |-|-| 13.0532112 junco, snowbird
6.6422362 American coot, marsh hen, mud hen, water hen, Fulica americana
5.5400190 chickadee
5.5199933 brambling, Fringilla montifringilla
5.3532867 hummingbird
| 13.0532112 junco, snowbird
6.6422362 American coot, marsh hen, mud hen, water hen, Fulica americana
5.5400190 chickadee
5.5199933 brambling, Fringilla montifringilla
5.3532867 hummingbird
| mobilenet-v1-0.50-224 |-|-|0.9531036 junco, snowbird
0.0448372 chickadee
0.0009637 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0007092 jay
0.0002787 brambling, Fringilla montifringilla| 0.9531036 junco, snowbird
0.0448372 chickadee
0.0009637 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0007092 jay
0.0002787 brambling, Fringilla montifringilla | mobilenet-v1-0.50-160 |-|-| 0.8880324 junco, snowbird
0.0335562 chickadee
0.0318311 coucal
0.0251927 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0153771 brambling, Fringilla montifringilla | 0.8880324 junco, snowbird
0.0335562 chickadee
0.0318311 coucal
0.0251927 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0153771 brambling, Fringilla montifringilla | mobilenet-v1-0.25-128 |-|-| 0.9801749 junco, snowbird
0.0190141 chickadee
0.0003644 brambling, Fringilla montifringilla
0.0002570 jay
0.0000603 indigo bunting, indigo finch, indigo bird, Passerina cyanea | 0.9801749 junco, snowbird
0.0190141 chickadee
0.0003644 brambling, Fringilla montifringilla
0.0002570 jay
0.0000603 indigo bunting, indigo finch, indigo bird, Passerina cyanea | @@ -168,6 +173,7 @@ regnetx-3.2gf |-|-| 15.8536377 junco, snowbird
7.8363996 chickadee
7.10865 repvgg-a0 |-|-| 26.3615990 junco, snowbird
19.2394276 chickadee
17.6558838 brambling, Fringilla montifringilla
14.7114887 goldfinch, Carduelis carduelis
14.4735651 indigo bunting, indigo finch, indigo bird, Passerina cyanea
| 26.3615990 junco, snowbird
19.2394276 chickadee
17.6558857 brambling, Fringilla montifringilla
14.7114887 goldfinch, Carduelis carduelis
14.4735651 indigo bunting, indigo finch, indigo bird, Passerina cyanea
| repvgg-b1 |-|-| 19.3077412 junco, snowbird
11.3808165 brambling, Fringilla montifringilla
10.3980274 chickadee
9.7500544 water ouzel, dipper
9.3564234 goldfinch, Carduelis carduelis
| 19.3077450 junco, snowbird
11.3808174 brambling, Fringilla montifringilla
10.3980274 chickadee
9.7500525 water ouzel, dipper
9.3564234 goldfinch, Carduelis carduelis
| repvgg-b3 |-|-| 14.0971823 junco, snowbird
3.1309500 water ouzel, dipper
2.6912327 chickadee
2.2140567 oystercatcher, oyster catcher
1.9939202 quail
| 14.0971823 junco, snowbird
3.1309488 water ouzel, dipper
2.6912310 chickadee
2.2140563 oystercatcher, oyster catcher
1.9939198 quail
| +resnest-50-pytorch | - | - | 8.7988739 junco, snowbird
2.3853698 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0435777 water ouzel, dipper
1.8438135 koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus
1.5064410 wombat
|8.7988739 junco, snowbird
2.3853698 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0435777 water ouzel, dipper
1.8438135 koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus
1.5064410 wombat
| resnet-34-pytorch |-|-| 18.9669666 junco, snowbird
12.0508604 chickadee
10.7637863 brambling, Fringilla montifringilla
10.6569023 indigo bunting, indigo finch, indigo bird, Passerina cyanea
9.0180721 goldfinch, Carduelis carduelis
| 18.9669666 junco, snowbird
12.0508604 chickadee
10.7637863 brambling, Fringilla montifringilla
10.6569023 indigo bunting, indigo finch, indigo bird, Passerina cyanea
9.0180721 goldfinch, Carduelis carduelis
| resnet-50-pytorch |-|-| 8.7988720 junco, snowbird
2.3853679 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0435791 water ouzel, dipper
1.8438132 koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus
1.5064411 wombat | 8.7988720 junco, snowbird
2.3853679 indigo bunting, indigo finch, indigo bird, Passerina cyanea
2.0435791 water ouzel, dipper
1.8438132 koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus
1.5064411 wombat | resnet-v1-50 |0.9975350 junco, snowbird
0.0012899 chickadee
0.0007322 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0003813 brambling, Fringilla montifringilla
0.0000160 bulbul| 0.9975350 junco, snowbird
0.0012899 chickadee
0.0007322 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0003813 brambling, Fringilla montifringilla
0.0000160 bulbul|0.9975340 junco, snowbird
0.0012899 chickadee
0.0007322 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0003813 brambling, Fringilla montifringilla
0.0000160 bulbul| 0.9975340 junco, snowbird
0.0012899 chickadee
0.0007322 indigo bunting, indigo finch, indigo bird, Passerina cyanea
0.0003813 brambling, Fringilla montifringilla
0.0000160 bulbul| @@ -210,6 +216,7 @@ Image resolution: 333 x 500 ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| alexnet |0.9991664 lifeboat
0.0003741 container ship, containership, container vessel
0.0001206 pirate, pirate ship
0.0000820 drilling platform, offshore rig
0.0000784 wreck| 0.9991664 lifeboat
0.0003741 container ship, containership, container vessel
0.0001206 pirate, pirate ship
0.0000820 drilling platform, offshore rig
0.0000784 wreck|0.9991654 lifeboat
0.0003741 container ship, containership, container vessel
0.0001206 pirate, pirate ship
0.0000820 drilling platform, offshore rig
0.0000784 wreck| 0.9991654 lifeboat
0.0003741 container ship, containership, container vessel
0.0001206 pirate, pirate ship
0.0000820 drilling platform, offshore rig
0.0000784 wreck| caffenet |-|-|0.9839840 lifeboat
0.0109296 container ship, containership, container vessel
0.0018576 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0007185 wreck
0.0007133 pirate, pirate ship|0.9839840 lifeboat
0.0109296 container ship, containership, container vessel
0.0018576 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0007185 wreck
0.0007133 pirate, pirate ship| +convnext-tiny |-|-|10.0250597 lifeboat
2.9457746 beacon, lighthouse, beacon light, pharos
2.3076224 drilling platform, offshore rig
2.3043654 breakwater, groin, groyne, mole, bulwark, seawall, jetty
2.1287649 pirate, pirate ship|10.0250597 lifeboat
2.9457746 beacon, lighthouse, beacon light, pharos
2.3076224 drilling platform, offshore rig
2.3043654 breakwater, groin, groyne, mole, bulwark, seawall, jetty
2.1287649 pirate, pirate ship densenet-121 |13.9662323 lifeboat
7.8177419 drilling platform, offshore rig
7.7323365 liner, ocean liner
7.5702801 wreck
7.5621624 pirate, pirate ship| 13.9662323 lifeboat
7.8177419 drilling platform, offshore rig
7.7323365 liner, ocean liner
7.5702801 wreck
7.5621624 pirate, pirate ship|13.9662323 lifeboat
7.8177419 drilling platform, offshore rig
7.7323365 liner, ocean liner
7.5702801 wreck
7.5621624 pirate, pirate ship| 13.9662342 lifeboat
7.8177428 drilling platform, offshore rig
7.7323399 liner, ocean liner
7.5702839 wreck
7.5621653 pirate, pirate ship| densenet-121-caffe2 |-|-| 13.9694653 lifeboat
7.8196640 drilling platform, offshore rig
7.7403646 liner, ocean liner
7.5737677 wreck
7.5640950 pirate, pirate ship
|13.9694653 lifeboat
7.8196640 drilling platform, offshore rig
7.7403646 liner, ocean liner
7.5737677 wreck
7.5640950 pirate, pirate ship
| densenet-121-tf |-|-| 0.9997229 lifeboat
0.0000948 container ship, containership, container vessel
0.0000550 drilling platform, offshore rig
0.0000301 liner, ocean liner
0.0000284 pirate, pirate ship | 0.9997229 lifeboat
0.0000948 container ship, containership, container vessel
0.0000550 drilling platform, offshore rig
0.0000301 liner, ocean liner
0.0000284 pirate, pirate ship | @@ -238,6 +245,7 @@ hbonet-1.0 |-|-| 14.2455597 lifeboat
10.1138754 beacon, lighthouse, beacon li inception-resnet-v2-tf |-|-| 8.9238806 lifeboat
5.3607121 fireboat
4.2531099 beacon, lighthouse, beacon light, pharos
3.9253387 breakwater, groin, groyne, mole, bulwark, seawall, jetty
3.2657926 ambulance | 8.9238806 lifeboat
5.3607121 fireboat
4.2531099 beacon, lighthouse, beacon light, pharos
3.9253387 breakwater, groin, groyne, mole, bulwark, seawall, jetty
3.2657926 ambulance | inception-resnet-v2 |0.9981450 lifeboat
0.0006250 beacon, lighthouse, beacon light, pharos
0.0001983 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0001903 drilling platform, offshore rig
0.0001606 fireboat| 0.9981450 lifeboat
0.0006250 beacon, lighthouse, beacon light, pharos
0.0001983 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0001903 drilling platform, offshore rig
0.0001606 fireboat|0.9981461 lifeboat
0.0006250 beacon, lighthouse, beacon light, pharos
0.0001983 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0001903 drilling platform, offshore rig
0.0001606 fireboat| 0.9981461 lifeboat
0.0006250 beacon, lighthouse, beacon light, pharos
0.0001983 breakwater, groin, groyne, mole, bulwark, seawall, jetty
0.0001903 drilling platform, offshore rig
0.0001606 fireboat| mixnet-l |-|-| 9.2386684 lifeboat
2.3493083 red fox, Vulpes vulpes
2.2269557 drilling platform, offshore rig
1.8156273 marmoset
1.6310525 pirate, pirate ship
| 9.2386684 lifeboat
2.3493083 red fox, Vulpes vulpes
2.2269557 drilling platform, offshore rig
1.8156273 marmoset
1.6310525 pirate, pirate ship
| +levit-128s |-|-| 11.5741949 lifeboat
4.4954772 drilling platform, offshore rig
4.4792624 fireboat
4.2325087 submarine, pigboat, sub, U-boat
4.1533628 container ship, containership, container vessel
| 11.5741949 lifeboat
4.4954772 drilling platform, offshore rig
4.4792624 fireboat
4.2325087 submarine, pigboat, sub, U-boat
4.1533628 container ship, containership, container vessel
| mobilenet-v1-0.25-128 |-|-| 0.8000437 lifeboat
0.0681745 container ship, containership, container vessel
0.0423642 pirate, pirate ship
0.0320394 liner, ocean liner
0.0205678 fireboat | 0.8000437 lifeboat
0.0681745 container ship, containership, container vessel
0.0423642 pirate, pirate ship
0.0320394 liner, ocean liner
0.0205678 fireboat | mobilenet-v1-1.0-224-tf |-|-| 0.9885072 lifeboat
0.0053199 fireboat
0.0021362 liner, ocean liner
0.0006076 pirate, pirate ship
0.0005722 submarine, pigboat, sub, U-boat | 0.9885072 lifeboat
0.0053199 fireboat
0.0021362 liner, ocean liner
0.0006076 pirate, pirate ship
0.0005722 submarine, pigboat, sub, U-boat | mobilenet-v1-0.50-224 |-|-|0.9207528 lifeboat
0.0332536 container ship, containership, container vessel
0.0132192 liner, ocean liner
0.0109554 pirate, pirate ship
0.0074297 fireboat| 0.9207528 lifeboat
0.0332536 container ship, containership, container vessel
0.0132192 liner, ocean liner
0.0109554 pirate, pirate ship
0.0074297 fireboat | @@ -262,6 +270,7 @@ regnetx-3.2gf |-|-| 12.8932257 lifeboat
7.4015594 liner, ocean liner
7.286 repvgg-a0 |-|-| 17.1645527 lifeboat
14.7260294 container ship, containership, container vessel
13.8417206 drilling platform, offshore rig
13.1186981 liner, ocean liner
12.8922091 dock, dockage, docking facility
| 17.1645508 lifeboat
14.7260294 container ship, containership, container vessel
13.8417215 drilling platform, offshore rig
13.1186991 liner, ocean liner
12.8922091 dock, dockage, docking facility
| repvgg-b1 |-|-| 15.2668934 lifeboat
7.8373547 drilling platform, offshore rig
7.8056035 liner, ocean liner
7.7971888 pirate, pirate ship
7.6713920 container ship, containership, container vessel
| 15.2668915 lifeboat
7.8373537 drilling platform, offshore rig
7.8056045 liner, ocean liner
7.7971888 pirate, pirate ship
7.6713920 container ship, containership, container vessel
| repvgg-b3 |-|-| 11.1052351 lifeboat
4.6516218 beacon, lighthouse, beacon light, pharos
4.1327028 breakwater, groin, groyne, mole, bulwark, seawall, jetty
2.4998024 liner, ocean liner
2.3353906 fireboat
| 11.1052341 lifeboat
4.6516223 beacon, lighthouse, beacon light, pharos
4.1327014 breakwater, groin, groyne, mole, bulwark, seawall, jetty
2.4998021 liner, ocean liner
2.3353906 fireboat
| +resnest-50-pytorch | - | - | 9.0618353 lifeboat
2.9507575 drilling platform, offshore rig
2.5070360 container ship, containership, container vessel
2.3743706 pirate, pirate ship
2.0219886 breakwater, groin, groyne, mole, bulwark, seawall, jetty
|9.0618353 lifeboat
2.9507575 drilling platform, offshore rig
2.5070360 container ship, containership, container vessel
2.3743706 pirate, pirate ship
2.0219886 breakwater, groin, groyne, mole, bulwark, seawall, jetty
| resnet-v1-50 |0.8872182 lifeboat
0.0398498 liner, ocean liner
0.0237536 container ship, containership, container vessel
0.0125247 dock, dockage, docking facility
0.0107783 drilling platform, offshore rig| 0.8872181 lifeboat
0.0398499 liner, ocean liner
0.0237536 container ship, containership, container vessel
0.0125247 dock, dockage, docking facility
0.0107783 drilling platform, offshore rig|0.8872179 lifeboat
0.0398498 liner, ocean liner
0.0237536 container ship, containership, container vessel
0.0125247 dock, dockage, docking facility
0.0107783 drilling platform, offshore rig| 0.8872181 lifeboat
0.0398498 liner, ocean liner
0.0237534 container ship, containership, container vessel
0.0125247 dock, dockage, docking facility
0.0107783 drilling platform, offshore rig| resnet-v1-101 |0.6138132 lifeboat
0.1049522 drilling platform, offshore rig
0.0466762 liner, ocean liner
0.0327782 dock, dockage, docking facility
0.0284107 aircraft carrier, carrier, flattop, attack aircraft carrier| 0.6138127 lifeboat
0.1049523 drilling platform, offshore rig
0.0466763 liner, ocean liner
0.0327782 dock, dockage, docking facility
0.0284106 aircraft carrier, carrier, flattop, attack aircraft carrier|0.6138138 lifeboat
0.1049523 drilling platform, offshore rig
0.0466763 liner, ocean liner
0.0327782 dock, dockage, docking facility
0.0284107 aircraft carrier, carrier, flattop, attack aircraft carrier| 0.6138141 lifeboat
0.1049523 drilling platform, offshore rig
0.0466761 liner, ocean liner
0.0327781 dock, dockage, docking facility
0.0284106 aircraft carrier, carrier, flattop, attack aircraft carrier| resnet-v1-152 |0.9505479 lifeboat
0.0083380 drilling platform, offshore rig
0.0072418 aircraft carrier, carrier, flattop, attack aircraft carrier
0.0049709 container ship, containership, container vessel
0.0041877 liner, ocean liner| 0.9505479 lifeboat
0.0083380 drilling platform, offshore rig
0.0072418 aircraft carrier, carrier, flattop, attack aircraft carrier
0.0049709 container ship, containership, container vessel
0.0041877 liner, ocean liner|0.9505481 lifeboat
0.0083380 drilling platform, offshore rig
0.0072418 aircraft carrier, carrier, flattop, attack aircraft carrier
0.0049709 container ship, containership, container vessel
0.0041877 liner, ocean liner| 0.9505481 lifeboat
0.0083380 drilling platform, offshore rig
0.0072418 aircraft carrier, carrier, flattop, attack aircraft carrier
0.0049709 container ship, containership, container vessel
0.0041877 liner, ocean liner| @@ -322,12 +331,16 @@ Bounding boxes (upper left and bottom right corners):
Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf | - | - | Bounding box: (50, 167), (167, 347),
(214, 138), (316, 286),
(306, 153), (442, 312),
(272, 150), (435, 413)| Bounding box: (50, 167), (167, 347),
(214, 138), (316, 286) | +efficientdet-d1-tf | - | - | Bounding box: (64, 215), (210, 438),
(339, 271), (524, 528),
(271, 171), (417, 360),
(389, 191), (553, 371),
(365, 218), (538, 419)| Bounding box: (64, 215), (210, 438),
(339, 271), (524, 528),
(271, 171), (417, 360),
| +retinanet-tf | - | - | Bounding box: (136, 423), (436, 894),
(709, 533), (1114, 1077),
(555, 330), (822, 739),
(344, 502), (702, 980)| Bounding box: (136, 423), (436, 894),
(709, 533), (1114, 1077),
(555, 330), (822, 739),
(344, 502), (702, 980) | ssd_mobilenet_v2_coco | - | - | Bounding box: (76,168), (231,344)| Bounding boxes: (75,165), (232,344),
(380,315), (610,410) | mobilenet-ssd | - | - | Bounding box: (380,315), (630,415) | Bounding box: (377,314), (632,415) | ssd300 | - | - | Bounding box: (380,165), (595,425) | Bounding box: (380,165), (595,425) | ssd512 | - | - | Bounding box: (377,163), (595,425) | Bounding box: (380,165), (595,425) | ssd_mobilenet_v1_fpn_coco | - | - | Bounding boxes: (295, 131), (439, 291),
(375, 217), (582, 425),
(436, 153), (611, 301) | Bounding boxes: (295, 131), (439, 291),
(375, 217), (582, 425),
(436, 153), (611, 301) | ssdlite_mobilenet_v2 | - | - | - | - | +yolo-v3-tiny-tf | - | - | Bounding box: (127, 161), (228, 325),
(43, 139), (127, 286),
(212, 147), (345, 341),
(175, 110), (251, 243) | Bounding box: (127, 161), (228, 325),
(43, 139), (127, 286),
(212, 147), (345, 341),
(175, 110), (251, 243) | ### Test image #2 @@ -345,12 +358,16 @@ Bounding box (upper left and bottom right corners):
Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf | - | - | Bounding box: (100, 104), (357, 450)| Bounding box: (100, 104), (357, 450) | +efficientdet-d1-tf | - | - | Bounding box: (84, 126), (454, 580)| Bounding box: (84, 126), (454, 580) | +retinanet-tf | - | - | Bounding box: (284, 252), (931, 1023)| Bounding box: (284, 252), (931, 1023) | ssd_mobilenet_v2_coco | - | - | Bounding box: (90,100), (356,448) | Bounding box: (90,100), (350,450)| mobilenet-ssd | - | - | Bounding box: (92,95), (361,483) | Bounding box: (94,94), (361,480) | ssd300 | - | - | Bounding box: (68,100), (336,452) | Bounding box: (66,98), (340,455) | ssd512 | - | - | Bounding box: (75,100), (355,445) | Bounding box: (75,100), (355,445)| ssd_mobilenet_v1_fpn_coco | - | - | Bounding box: (89, 98), (345, 440)| Bounding box: (89, 98), (345, 440)| ssdlite_mobilenet_v2 | - | - | Bounding box: (47, 59), (206, 272)| Bounding box: (47, 59), (206, 272)| +yolo-v3-tiny-tf | - | - | Bounding box: (39, 36), (324, 452)| Bounding box: (39, 36), (324, 452)| ### Test image #3 @@ -368,12 +385,16 @@ Bounding box (upper left and bottom right corners):
Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf | - | - | Bounding box: (123, 251), (410, 387)| Bounding box: (123, 251), (410, 387) | +efficientdet-d1-tf | - | - | Bounding box: (155, 321), (515, 482)| Bounding box: (155, 321), (515, 482)| +retinanet-tf | - | - | Bounding box: (334, 654), (1069, 987)| Bounding box: (334, 654), (1069, 987)| ssd_mobilenet_v2_coco | - | - | Bounding box: (81,244), (267,376) | Bounding box: (80,244), (267,376) | mobilenet-ssd | - | - | Bounding box: (80,140), (270,375) | Bounding box: (80,140), (270,375) | ssd300 | - | - | Bounding box: (80,155), (270,375) | Bounding box: (80,157), (274,375) | ssd512 | - | - | Bounding box: (75,170), (172,370) | Bounding box: (73,170), (173,371) | ssd_mobilenet_v1_fpn_coco | - | - | Bounding box: (90, 135), (260, 375)| Bounding box: (90, 135), (260, 375)| ssdlite_mobilenet_v2 | - | - | Bounding boxes: (74, 155), (242, 226), (75, 102), (242, 225)| Bounding boxes: (74, 155), (242, 226), (75, 102), (242, 225)| +yolo-v3-tiny-tf | - | - | Bounding boxes: (134, 105), (288, 319),
(127, 280), (299, 330)| Bounding boxes: (134, 105), (288, 319),
(127, 280), (299, 330)| ### Test image #4 Data source: [MS COCO][ms_coco] @@ -396,6 +417,8 @@ KEYBOARD (241, 342), (496, 461)
Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf |-|-| Bounding box:
TV (84, 35), (317, 318)
MOUSE (406, 359), (447, 397)
KEYBOARD (189, 362), (398, 493)
REMOTE (326, 311), (361, 333)| Bounding box:
TV (84, 35), (317, 318)
MOUSE (406, 359), (447, 397)
KEYBOARD (189, 362), (398, 493)| +efficientdet-d1-tf |-|-| Bounding box:
TV (109, 56), (393, 399)
MOUSE (507, 449), (560, 497)
KEYBOARD (233, 452), (501, 613)| Bounding box:
TV (109, 56), (393, 399)
MOUSE (507, 449), (560, 497)
KEYBOARD (233, 452), (501, 613)| faster_rcnn_inception_resnet_v2_atrous_coco |-|-| Bounding box:
TV (110, 41), (397, 304)
MOUSE (508, 337), (559, 374)
KEYBOARD (241, 342), (496, 461) | Bounding box:
TV (110, 41), (397, 304)
MOUSE (508, 337), (559, 374)
KEYBOARD (241, 342), (496, 461)
| faster_rcnn_inception_v2_coco |-|-| Bounding box:
DINING TABLE (8, 201), (640, 480)
TV (106, 31), (397, 284)
MOUSE (509, 336), (560, 377)
KEYBOARD (231, 339), (495, 462) | Bounding box:
DINING TABLE (8, 201), (640, 480)
TV (106, 31), (397, 284)
MOUSE (509, 336), (560, 377)
KEYBOARD (231, 339), (495, 462)
| faster_rcnn_resnet50_coco |-|-| Bounding box:
TV (104, 34), (400, 282)
MOUSE (510, 336), (563, 373)
KEYBOARD (239, 339), (496, 463) | Bounding box:
TV (104, 34), (400, 282)
MOUSE (510, 336), (563, 373)
KEYBOARD (239, 339), (496, 463)
| @@ -404,6 +427,7 @@ pelee-coco |-|-| Bounding box:
TV (103, 41), (402, 289)
MOUSE (not detecte retinanet-tf |-|-| Bounding box:
TV (104, 40), (390, 298)
MOUSE (507, 337), (559, 373)
KEYBOARD (231, 331), (497, 455) | Bounding box:
TV (104, 40), (390, 298)
MOUSE (507, 337), (559, 373)
KEYBOARD (231, 331), (497, 455)
| ssd_resnet50_v1_fpn_coco |-|-| Bounding box:
TV (113, 40), (396, 305)
MOUSE (508, 337), (559, 373)
KEYBOARD (223, 340), (499, 461) | Bounding box:
TV (113, 40), (396, 305)
MOUSE (508, 337), (559, 373)
KEYBOARD (223, 340), (499, 461)
| ssdlite_mobilenet_v2 |-|-| Bounding box:
TV (45, 23), (182, 181)
MOUSE (238, 209), (261, 229)
KEYBOARD (108, 212), (235, 287) | Bounding box:
TV (45, 23), (182, 181)
MOUSE (238, 209), (261, 229)
KEYBOARD (108, 212), (235, 287)
| +yolo-v3-tiny-tf |-|-| Bounding box:
TV (87, 29), (265, 267)
MOUSE (330, 292), (362, 332)
KEYBOARD (156, 305), (313, 388) | Bounding box:
TV (87, 29), (265, 267)
MOUSE (330, 292), (362, 332)
KEYBOARD (156, 305), (313, 388)
| ### Test image #5 Data source: [MS COCO][ms_coco] @@ -419,6 +443,8 @@ Bounding box (upper left and bottom right corners):
PERSON (86, 84), (394, 18 Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf |-|-| Bounding box:
PERSON (63, 89), (169, 480)
HORSE (108, 74), (429, 457) | Bounding box:
HORSE (108, 74), (429, 457)
| +efficientdet-d1-tf |-|-| Bounding box:
PERSON (77, 118), (197, 607)
HORSE (135, 84), (539, 569) | Bounding box:
PERSON (77, 118), (197, 607)
HORSE (135, 84), (539, 569)| yolo-v3-tf |-|-| Bounding box:
PERSON (86, 84), (394, 188)
HORSE (44, 108), (397, 565) | Bounding box:
PERSON (86, 84), (394, 188)
HORSE (44, 108), (397, 565)
| yolo-v2-tf |-|-| Bounding box:
PERSON (96, 74), (379, 173)
HORSE (48, 122), (385, 590) | Bounding box:
PERSON (96, 74), (379, 173)
HORSE (48, 122), (385, 590)
| yolo-v2-tiny-tf |-|-| Bounding box:
PERSON (84, 70), (413, 195)
HORSE (100, 92), (398, 562) | Bounding box:
PERSON (84, 70), (413, 195)
HORSE (100, 92), (398, 562)
| @@ -426,6 +452,7 @@ pelee-coco |-|-| Bounding box:
PERSON (95, 72), (207, 397) retinanet-tf |-|-| Bounding box:
PERSON (90, 73), (205, 384)
HORSE (145, 61), (542, 378) | Bounding box:
PERSON (90, 73), (205, 384)
HORSE (145, 61), (542, 378)
| ssd_resnet50_v1_fpn_coco |-|-| Bounding box:
PERSON (not detected)
HORSE (134, 57), (534, 389) | Bounding box:
PERSON (not detected)
HORSE (134, 57), (534, 389)
| ssdlite_mobilenet_v2 |-|-| Bounding box:
PERSON (43, 48), (98, 281)
HORSE (57, 42), (251, 271) | Bounding box:
PERSON (43, 48), (98, 281)
HORSE (57, 42), (251, 271)
| +yolo-v3-tiny-tf |-|-| Bounding box: HORSE (74, 44), (352, 382) | Bounding box: HORSE (74, 44), (352, 382)| ### Test image #6 @@ -442,7 +469,10 @@ Bounding box (upper left and bottom right corners):
AEROPLANE (131, 21), (24 Model | C++ (latency mode, the OpenVINO sample) | C++ (throughput mode, the OpenVINO sample) | Python (latency mode, implementation) | Python (throughput mode, implementation) | ---------------------|---------------------------|---------------------------|-----------------------------|------------------------------------| +efficientdet-d0-tf |-|-| Bounding box:
AIRPLANE (64, 173), (449, 333)
| Bounding box:
AIRPLANE (64, 173), (449, 333)
| +efficientdet-d1-tf |-|-| Bounding box:
AIRPLANE (71, 212), (551, 412)
| Bounding box:
AIRPLANE (71, 212), (551, 412)
| yolo-v1-tiny-tf |-|-| Bounding box:
AEROPLANE (131, 21), (248, 414)
| Bounding box:
AEROPLANE (131, 21), (248, 414)
| +yolo-v3-tiny-tf |-|-| Bounding box:
AEROPLANE (-16, 138), (438, 281)
| Bounding box:
AEROPLANE (-16, 138), (438, 281)
| ### Test image #7 Data source: [WIDER FACE Dataset][wider_face_dataset] diff --git a/src/inference/inference_openvino_async_mode.py b/src/inference/inference_openvino_async_mode.py index 9dd89407b..687ccbb88 100644 --- a/src/inference/inference_openvino_async_mode.py +++ b/src/inference/inference_openvino_async_mode.py @@ -137,7 +137,7 @@ def cli_argument_parser(): 'person-detection-action-recognition-teacher', 'driver-action-recognition-encoder', 'reidentification', 'driver-action-recognition-decoder', 'action-recognition-decoder', 'face-detection', 'mask-rcnn', 'yolo_tiny_voc', 'yolo_v2_voc', 'yolo_v2_coco', - 'yolo_v2_tiny_coco', 'yolo_v3', 'yolo_v3_tf'], + 'yolo_v2_tiny_coco', 'yolo_v3', 'yolo_v3_tf', 'retinanet-tf', 'yolo_v3_tiny'], default='feedforward', type=str, dest='task') diff --git a/src/inference/inference_openvino_sync_mode.py b/src/inference/inference_openvino_sync_mode.py index 1d65cd693..d1d116ee2 100644 --- a/src/inference/inference_openvino_sync_mode.py +++ b/src/inference/inference_openvino_sync_mode.py @@ -122,7 +122,7 @@ def cli_argument_parser(): 'action-recognition-encoder', 'driver-action-recognition-encoder', 'reidentification', 'driver-action-recognition-decoder', 'action-recognition-decoder', 'face-detection', 'mask-rcnn', 'yolo_tiny_voc', 'yolo_v2_voc', 'yolo_v2_coco', 'yolo_v2_tiny_coco', - 'yolo_v3', 'yolo_v3_tf'], + 'yolo_v3', 'yolo_v3_tf', 'retinanet-tf', 'yolo_v3_tiny'], default='feedforward', type=str, dest='task') diff --git a/src/inference/io_adapter.py b/src/inference/io_adapter.py index 34984fcc9..b5db4dba2 100644 --- a/src/inference/io_adapter.py +++ b/src/inference/io_adapter.py @@ -183,6 +183,7 @@ def get_slice_input(self, *args, **kwargs): data_gen = self._transformed_input[key] slice_data = [copy.deepcopy(next(data_gen)) for _ in range(self._batch_size)] slice_input[key] = np.stack(slice_data) + return slice_input def get_slice_input_mxnet(self, *args, **kwargs): @@ -333,6 +334,10 @@ def get_io_adapter(args, io_model_wrapper, transformer): return FaceMeshV2CppIO(args, io_model_wrapper, transformer) elif task == 'minifasnet_v2_tflite_cpp': return MiniFASNetV2TFLiteCppIO(args, io_model_wrapper, transformer) + elif task == 'retinanet-tf': + return RetinaNetDetectionIO(args, io_model_wrapper, transformer) + elif task == 'yolo_v3_tiny': + return YoloV3TinyIO(args, io_model_wrapper, transformer) class FeedForwardIO(IOAdapter): @@ -1794,7 +1799,7 @@ def _get_anchors(self): def _get_shapes(self): pass - def __non_max_supression(self, predictions, score_threshold, nms_threshold): + def _non_max_supression(self, predictions, score_threshold, nms_threshold): predictions.sort(key=lambda prediction: prediction[0], reverse=True) valid_detections = [] while len(predictions) > 0: @@ -1829,7 +1834,7 @@ def __non_max_supression(self, predictions, score_threshold, nms_threshold): return valid_detections @staticmethod - def __print_detections(detections, labels_map, image, scales, orig_shape, batch, log): + def _print_detections(detections, labels_map, image, scales, orig_shape, batch, log): image = cv2.resize(image, orig_shape) for detection in detections: left = int(detection[2][0] * scales['W']) @@ -1840,8 +1845,8 @@ def __print_detections(detections, labels_map, image, scales, orig_shape, batch, color = (min(int(class_id / 25 % 5) * 50, 255), min(int(class_id / 5 % 5) * 50, 255), min(int(class_id % 5) * 50, 255)) log.info('Bounding boxes for image {0} for object {1}'.format(batch, class_id)) - log.info('Top left: ({0}, {1})'.format(top, left)) - log.info('Bottom right: ({0}, {1})'.format(bottom, right)) + log.info('Top left: ({0}, {1})'.format(left, top)) + log.info('Bottom right: ({0}, {1})'.format(right, bottom)) label = '<' + labels_map[class_id] + '>' image = cv2.rectangle(image, (left, top), (right, bottom), color, 3) label_size, base_line = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.75, 1) @@ -1908,9 +1913,9 @@ def process_output(self, result, log): h, w, anchors_boxes) if prediction is not None: predictions += prediction - valid_detections = self.__non_max_supression(predictions, self._threshold, 0.4) - image = self.__print_detections(valid_detections, self._labels_map, cv2.UMat(image), - scales, (orig_w, orig_h), batch, log) + valid_detections = self._non_max_supression(predictions, self._threshold, 0.4) + image = self._print_detections(valid_detections, self._labels_map, cv2.UMat(image), + scales, (orig_w, orig_h), batch, log) out_img = os.path.join(os.path.dirname(__file__), f'out_yolo_detection_{batch + 1}.bmp') cv2.imwrite(out_img, image) log.info(f'Result image was saved to {out_img}') @@ -2053,6 +2058,121 @@ def _get_cell_predictions(self, cx, cy, dx, dy, detection, anchor_box_number, im return predictions +class YoloV3TinyIO(yolo): + def __init__(self, args, io_model_wrapper, transformer): + super().__init__(args, io_model_wrapper, transformer) + self.load_labels_map('mscoco_names.txt') + + def _get_anchors(self): + return [ + ((81, 82), (135, 169), (344, 319)), + ((23, 27), (37, 58), (81, 82)), + ] + + def _get_shapes(self): + return [ + (3, 85, 13, 13), + (3, 85, 26, 26), + ] + + def process_output(self, result, log): + if self._is_result_invalid(result): + log.warning('Model output is processed only for the number iteration = 1') + return + + anchors = self._get_anchors() + shapes = self._get_shapes() + outputs = [ + result.get('conv2d_9/Conv2D/YoloRegion'), + result.get('conv2d_12/Conv2D/YoloRegion'), + ] + + if outputs[0] is None or outputs[1] is None: + print('Expected output layers not found in the result') + return + + input_layer_name = next(iter(self._input)) + input_ = self._input[input_layer_name] + ib, h, w, c = input_.shape + + b = outputs[0].shape[0] + images = np.empty((b, h, w, c), dtype=input_.dtype) + + for i in range(b): + images[i] = input_[i % ib] + + for batch in range(b): + image = images[batch].copy() + predictions = [] + orig_h, orig_w = self._original_shapes[next(iter(self._original_shapes))][batch % ib] + scales = {'W': orig_w / w, 'H': orig_h / h} + + for output, shape, anchor_set in zip(outputs, shapes, anchors): + num_anchors, num_attributes, grid_size_x, grid_size_y = shape + output = output[batch].reshape(num_anchors, num_attributes, grid_size_x, grid_size_y) + + for anchor_idx in range(num_anchors): + for cx in range(grid_size_x): + for cy in range(grid_size_y): + detection = output[anchor_idx, :, cy, cx] + prediction = self._get_cell_predictions( + cx, cy, grid_size_x, grid_size_y, + detection, anchor_idx, + h, w, + anchor_set, + scales, + ) + + if prediction: + predictions.extend(prediction) + + valid_detections = self._non_max_supression(predictions, self._threshold, 0.2) + + processed_image = self._print_detections( + valid_detections, + self._labels_map, + image, + scales, + (orig_w, orig_h), + batch, + log, + ) + + out_img = Path(__file__).parent / f'out_detection_{batch + 1}.bmp' + cv2.imwrite(str(out_img), processed_image) + log.info(f'Result image was saved to {out_img}') + + def _get_cell_predictions(self, cx, cy, dx, dy, detection, anchor_box_number, + image_height, image_width, anchors, scales): + tx, ty, tw, th, box_score = detection[:5] + class_logits = detection[5:] + + bbox_center_x = (cx + self._sigmoid(tx)) * (image_width / dx) + bbox_center_y = (cy + self._sigmoid(ty)) * (image_height / dy) + + prior_width, prior_height = anchors[anchor_box_number] + bbox_width = np.exp(tw) * prior_width * scales['W'] + bbox_height = np.exp(th) * prior_height * scales['H'] + + box_confidence = self._sigmoid(box_score) + + class_probs = self._sigmoid(class_logits) + class_confidences = box_confidence * class_probs + + predictions = [] + for class_id, confidence in enumerate(class_confidences): + if confidence >= 0.5: + bbox = [ + float(bbox_center_x - bbox_width / 2), + float(bbox_center_y - bbox_height / 2), + float(bbox_width), + float(bbox_height), + ] + predictions.append([confidence, class_id, bbox]) + + return predictions if predictions else None + + class YoloV7(IOAdapter): def process_output(self, result, log, threshold=0.5): from configs.pytorch_configs.yolo_v7 import non_max_suppression, plot_one_box @@ -2575,3 +2695,88 @@ def process_output(self, result, log): log.info('Information for image:') log.info(f'\t{self._classes[max_idx]} (score: {probs[max_idx]:.5f})') + + +class RetinaNetDetectionIO(IOAdapter): + def __init__(self, args, io_model_wrapper, transformer): + super().__init__(args, io_model_wrapper, transformer) + + def process_output(self, result, log): + if self._is_result_invalid(result): + log.warning('Model output is processed only for the number iteration = 1') + return + input_layer_name = next(iter(self._input)) + result_layer_name = next(iter(result)) + input_ = self._input[input_layer_name] + result = result[result_layer_name] + shapes = self._original_shapes[input_layer_name] + ib = input_.shape[0] + b = result.shape[0] + N = result.shape[2] // ib + images = [] + for i in range(b * ib): + orig_h, orig_w = shapes[i % ib] + image = input_[i % ib] + images.append(cv2.resize(image, (orig_w, orig_h))) + + boxes_dict = {i: {} for i in range(b * ib)} + + for batch in range(b): + boxes = [] + for out_num in range(ib): + isbreak = False + for obj in result[batch][0][out_num * N: (out_num + 1) * N]: + image_number = int(obj[0]) + if image_number < 0: + isbreak = True + break + if obj[2] > self._threshold: + image = images[image_number + batch * ib] + initial_h, initial_w = image.shape[:2] + xmin = int(obj[3] * initial_w) + ymin = int(obj[4] * initial_h) + xmax = int(obj[5] * initial_w) + ymax = int(obj[6] * initial_h) + class_id = int(obj[1]) + score = obj[2] + box = [xmin, ymin, xmax - xmin, ymax - ymin] + + if class_id not in boxes_dict[image_number]: + boxes_dict[image_number][class_id] = {'boxes': [], 'scores': []} + boxes_dict[image_number][class_id]['boxes'].append(box) + boxes_dict[image_number][class_id]['scores'].append(score) + if isbreak: + break + + for image_number, classes in boxes_dict.items(): + if not classes: + continue + + for class_id, data in classes.items(): + boxes = data['boxes'] + scores = data['scores'] + + if len(boxes) == 0: + continue + + indices = cv2.dnn.NMSBoxes(boxes, scores, self._threshold, 0.3) + + if len(indices) > 0: + for i in indices.flatten(): + box = boxes[i] + score = scores[i] + xmin, ymin, width, height = box + xmax = xmin + width + ymax = ymin + height + + cv2.rectangle(images[image_number], (xmin, ymin), (xmax, ymax), (57, 255, 20), 4) + log.info('Bounding boxes for image {0} for object {1}'.format(image_number, class_id)) + log.info('Top left: ({0}, {1})'.format(xmin, ymin)) + log.info('Bottom right: ({0}, {1})'.format(xmax, ymax)) + + count = 0 + for image in images: + out_img = os.path.join(os.path.dirname(__file__), 'out_detection_{0}.bmp'.format(count + 1)) + cv2.imwrite(out_img, image) + log.info('Result image was saved to {0}'.format(out_img)) + count += 1