vkashko commited on
Commit
67fa597
1 Parent(s): 6566055

feat: load script

Browse files
Files changed (2) hide show
  1. data/annotations.xml +40 -40
  2. ripe-strawberries-detection.py +158 -0
data/annotations.xml CHANGED
@@ -28,7 +28,7 @@
28
  </task>
29
  <dumped>2023-09-01 08:41:10.115046+00:00</dumped>
30
  </meta>
31
- <image id="0" name="images/0.png" width="1200" height="800">
32
  <box label="strawberry" source="manual" occluded="0" xtl="368.18" ytl="292.79" xbr="460.65" ybr="454.46" z_order="0">
33
  </box>
34
  <box label="strawberry" source="manual" occluded="0" xtl="423.70" ytl="268.56" xbr="537.50" ybr="471.16" z_order="0">
@@ -46,7 +46,7 @@
46
  <box label="strawberry" source="manual" occluded="0" xtl="220.59" ytl="419.56" xbr="327.76" ybr="558.57" z_order="0">
47
  </box>
48
  </image>
49
- <image id="1" name="images/1.png" width="1600" height="900">
50
  <box label="strawberry" source="manual" occluded="1" xtl="413.29" ytl="450.98" xbr="439.44" ybr="494.24" z_order="0">
51
  </box>
52
  <box label="strawberry" source="manual" occluded="1" xtl="680.39" ytl="566.41" xbr="742.46" ybr="657.09" z_order="0">
@@ -96,7 +96,7 @@
96
  <box label="strawberry" source="manual" occluded="0" xtl="349.59" ytl="580.05" xbr="385.55" ybr="634.27" z_order="0">
97
  </box>
98
  </image>
99
- <image id="10" name="images/10.png" width="920" height="425">
100
  <box label="strawberry" source="manual" occluded="1" xtl="271.21" ytl="313.09" xbr="307.17" ybr="375.91" z_order="0">
101
  </box>
102
  <box label="strawberry" source="manual" occluded="1" xtl="307.61" ytl="310.50" xbr="352.00" ybr="371.73" z_order="0">
@@ -118,7 +118,7 @@
118
  <box label="strawberry" source="manual" occluded="0" xtl="90.28" ytl="292.10" xbr="119.56" ybr="335.80" z_order="0">
119
  </box>
120
  </image>
121
- <image id="11" name="images/11.png" width="640" height="480">
122
  <box label="strawberry" source="manual" occluded="0" xtl="563.99" ytl="313.31" xbr="637.78" ybr="420.48" z_order="0">
123
  </box>
124
  <box label="strawberry" source="manual" occluded="0" xtl="75.24" ytl="324.82" xbr="136.18" ybr="420.66" z_order="0">
@@ -142,7 +142,7 @@
142
  <box label="strawberry" source="manual" occluded="0" xtl="510.25" ytl="353.17" xbr="589.90" ybr="462.49" z_order="0">
143
  </box>
144
  </image>
145
- <image id="12" name="images/12.png" width="1920" height="1080">
146
  <box label="strawberry" source="manual" occluded="0" xtl="577.77" ytl="723.82" xbr="718.30" ybr="942.90" z_order="0">
147
  </box>
148
  <box label="strawberry" source="manual" occluded="1" xtl="700.33" ytl="683.31" xbr="836.81" ybr="884.48" z_order="0">
@@ -162,7 +162,7 @@
162
  <box label="strawberry" source="manual" occluded="0" xtl="1478.95" ytl="562.55" xbr="1577.12" ybr="680.25" z_order="0">
163
  </box>
164
  </image>
165
- <image id="13" name="images/13.png" width="807" height="607">
166
  <box label="strawberry" source="manual" occluded="1" xtl="63.97" ytl="309.85" xbr="145.67" ybr="401.23" z_order="0">
167
  </box>
168
  <box label="strawberry" source="manual" occluded="1" xtl="268.54" ytl="333.08" xbr="338.56" ybr="420.20" z_order="0">
@@ -182,7 +182,7 @@
182
  <box label="strawberry" source="manual" occluded="0" xtl="3.63" ytl="284.62" xbr="71.12" ybr="355.88" z_order="0">
183
  </box>
184
  </image>
185
- <image id="14" name="images/14.png" width="2592" height="1936">
186
  <box label="strawberry" source="manual" occluded="1" xtl="1728.84" ytl="1126.72" xbr="1852.72" ybr="1302.40" z_order="0">
187
  </box>
188
  <box label="strawberry" source="manual" occluded="0" xtl="1868.74" ytl="1204.38" xbr="2003.93" ybr="1408.07" z_order="0">
@@ -208,7 +208,7 @@
208
  <box label="strawberry" source="manual" occluded="0" xtl="1497.83" ytl="931.63" xbr="1717.38" ybr="1166.62" z_order="0">
209
  </box>
210
  </image>
211
- <image id="15" name="images/15.png" width="1294" height="970">
212
  <box label="strawberry" source="manual" occluded="0" xtl="1154.50" ytl="597.08" xbr="1228.20" ybr="685.71" z_order="0">
213
  </box>
214
  <box label="strawberry" source="manual" occluded="0" xtl="163.78" ytl="583.92" xbr="356.83" ybr="790.59" z_order="0">
@@ -224,7 +224,7 @@
224
  <box label="strawberry" source="manual" occluded="1" xtl="1169.92" ytl="537.91" xbr="1233.80" ybr="605.94" z_order="0">
225
  </box>
226
  </image>
227
- <image id="16" name="images/16.png" width="2368" height="1624">
228
  <box label="strawberry" source="manual" occluded="1" xtl="331.85" ytl="1119.35" xbr="676.45" ybr="1526.60" z_order="0">
229
  </box>
230
  <box label="strawberry" source="manual" occluded="0" xtl="0.00" ytl="376.15" xbr="307.53" ybr="737.16" z_order="0">
@@ -244,7 +244,7 @@
244
  <box label="strawberry" source="manual" occluded="0" xtl="438.81" ytl="628.26" xbr="847.55" ybr="1066.80" z_order="0">
245
  </box>
246
  </image>
247
- <image id="17" name="images/17.png" width="1000" height="810">
248
  <box label="strawberry" source="manual" occluded="0" xtl="68.55" ytl="507.75" xbr="205.50" ybr="654.49" z_order="0">
249
  </box>
250
  <box label="strawberry" source="manual" occluded="1" xtl="249.40" ytl="560.97" xbr="367.20" ybr="710.81" z_order="0">
@@ -260,7 +260,7 @@
260
  <box label="strawberry" source="manual" occluded="0" xtl="46.96" ytl="428.28" xbr="170.40" ybr="559.50" z_order="0">
261
  </box>
262
  </image>
263
- <image id="18" name="images/18.png" width="2048" height="1536">
264
  <box label="strawberry" source="manual" occluded="0" xtl="1390.21" ytl="547.16" xbr="1580.73" ybr="816.61" z_order="0">
265
  </box>
266
  <box label="strawberry" source="manual" occluded="1" xtl="0.00" ytl="389.14" xbr="161.82" ybr="704.64" z_order="0">
@@ -280,7 +280,7 @@
280
  <box label="strawberry" source="manual" occluded="1" xtl="1582.23" ytl="0.00" xbr="1765.13" ybr="163.13" z_order="0">
281
  </box>
282
  </image>
283
- <image id="19" name="images/19.png" width="960" height="720">
284
  <box label="strawberry" source="manual" occluded="0" xtl="90.83" ytl="317.92" xbr="191.00" ybr="420.30" z_order="0">
285
  </box>
286
  <box label="strawberry" source="manual" occluded="0" xtl="151.21" ytl="390.74" xbr="239.59" ybr="497.91" z_order="0">
@@ -306,7 +306,7 @@
306
  <box label="strawberry" source="manual" occluded="0" xtl="186.89" ytl="295.06" xbr="254.66" ybr="362.31" z_order="0">
307
  </box>
308
  </image>
309
- <image id="2" name="images/2.png" width="1200" height="900">
310
  <box label="strawberry" source="manual" occluded="1" xtl="875.25" ytl="444.03" xbr="979.31" ybr="578.78" z_order="0">
311
  </box>
312
  <box label="strawberry" source="manual" occluded="1" xtl="517.67" ytl="562.22" xbr="617.05" ybr="736.75" z_order="0">
@@ -340,7 +340,7 @@
340
  <box label="strawberry" source="manual" occluded="1" xtl="952.99" ytl="466.35" xbr="1024.36" ybr="562.04" z_order="0">
341
  </box>
342
  </image>
343
- <image id="20" name="images/20.png" width="1680" height="945">
344
  <box label="strawberry" source="manual" occluded="1" xtl="873.33" ytl="697.67" xbr="1028.25" ybr="908.05" z_order="0">
345
  </box>
346
  <box label="strawberry" source="manual" occluded="0" xtl="1082.63" ytl="500.31" xbr="1279.39" ybr="695.62" z_order="0">
@@ -352,7 +352,7 @@
352
  <box label="strawberry" source="manual" occluded="1" xtl="743.72" ytl="724.80" xbr="895.63" ybr="902.02" z_order="0">
353
  </box>
354
  </image>
355
- <image id="21" name="images/21.png" width="1600" height="1200">
356
  <box label="strawberry" source="manual" occluded="0" xtl="190.11" ytl="143.82" xbr="500.96" ybr="510.88" z_order="0">
357
  </box>
358
  <box label="strawberry" source="manual" occluded="1" xtl="567.41" ytl="586.54" xbr="833.79" ybr="926.42" z_order="0">
@@ -372,7 +372,7 @@
372
  <box label="strawberry" source="manual" occluded="1" xtl="401.30" ytl="509.23" xbr="632.47" ybr="816.19" z_order="0">
373
  </box>
374
  </image>
375
- <image id="22" name="images/22.png" width="1200" height="675">
376
  <box label="strawberry" source="manual" occluded="0" xtl="413.97" ytl="428.33" xbr="521.96" ybr="565.26" z_order="0">
377
  </box>
378
  <box label="strawberry" source="manual" occluded="1" xtl="690.93" ytl="379.62" xbr="817.53" ybr="501.05" z_order="0">
@@ -382,7 +382,7 @@
382
  <box label="strawberry" source="manual" occluded="1" xtl="426.21" ytl="319.26" xbr="534.72" ybr="440.68" z_order="0">
383
  </box>
384
  </image>
385
- <image id="23" name="images/23.png" width="1000" height="667">
386
  <box label="strawberry" source="manual" occluded="1" xtl="540.46" ytl="247.68" xbr="595.12" ybr="313.86" z_order="0">
387
  </box>
388
  <box label="strawberry" source="manual" occluded="0" xtl="143.00" ytl="35.65" xbr="198.89" ybr="105.33" z_order="0">
@@ -448,7 +448,7 @@
448
  <box label="strawberry" source="manual" occluded="0" xtl="883.21" ytl="63.60" xbr="943.48" ybr="134.51" z_order="0">
449
  </box>
450
  </image>
451
- <image id="24" name="images/24.png" width="1024" height="683">
452
  <box label="strawberry" source="manual" occluded="0" xtl="205.41" ytl="497.14" xbr="298.99" ybr="649.28" z_order="0">
453
  </box>
454
  <box label="strawberry" source="manual" occluded="0" xtl="781.56" ytl="430.22" xbr="892.40" ybr="626.80" z_order="0">
@@ -460,13 +460,13 @@
460
  <box label="strawberry" source="manual" occluded="1" xtl="0.00" ytl="75.01" xbr="118.93" ybr="266.37" z_order="0">
461
  </box>
462
  </image>
463
- <image id="25" name="images/25.png" width="1080" height="1080">
464
  <box label="strawberry" source="manual" occluded="1" xtl="498.68" ytl="627.65" xbr="704.53" ybr="936.01" z_order="0">
465
  </box>
466
  <box label="strawberry" source="manual" occluded="0" xtl="142.36" ytl="375.50" xbr="364.75" ybr="696.26" z_order="0">
467
  </box>
468
  </image>
469
- <image id="26" name="images/26.png" width="997" height="630">
470
  <box label="strawberry" source="manual" occluded="1" xtl="334.24" ytl="419.32" xbr="381.91" ybr="490.06" z_order="0">
471
  </box>
472
  <box label="strawberry" source="manual" occluded="0" xtl="437.71" ytl="332.45" xbr="521.10" ybr="452.68" z_order="0">
@@ -484,7 +484,7 @@
484
  <box label="strawberry" source="manual" occluded="1" xtl="294.89" ytl="426.68" xbr="333.27" ybr="490.25" z_order="0">
485
  </box>
486
  </image>
487
- <image id="27" name="images/27.png" width="900" height="1200">
488
  <box label="strawberry" source="manual" occluded="0" xtl="423.91" ytl="645.28" xbr="619.70" ybr="812.16" z_order="0">
489
  </box>
490
  <box label="strawberry" source="manual" occluded="0" xtl="516.30" ytl="716.75" xbr="710.11" ybr="876.23" z_order="0">
@@ -498,7 +498,7 @@
498
  <box label="strawberry" source="manual" occluded="0" xtl="163.95" ytl="136.39" xbr="403.70" ybr="366.03" z_order="0">
499
  </box>
500
  </image>
501
- <image id="28" name="images/28.png" width="3000" height="1995">
502
  <box label="strawberry" source="manual" occluded="0" xtl="2262.73" ytl="1167.02" xbr="2658.52" ybr="1584.43" z_order="0">
503
  </box>
504
  <box label="strawberry" source="manual" occluded="0" xtl="2644.52" ytl="1173.38" xbr="3000.00" ybr="1547.53" z_order="0">
@@ -508,7 +508,7 @@
508
  <box label="strawberry" source="manual" occluded="0" xtl="1922.93" ytl="917.22" xbr="2344.60" ybr="1448.66" z_order="0">
509
  </box>
510
  </image>
511
- <image id="29" name="images/29.png" width="1000" height="709">
512
  <box label="strawberry" source="manual" occluded="1" xtl="597.96" ytl="263.15" xbr="655.12" ybr="352.67" z_order="0">
513
  </box>
514
  <box label="strawberry" source="manual" occluded="0" xtl="25.91" ytl="227.89" xbr="118.25" ybr="322.87" z_order="0">
@@ -596,7 +596,7 @@
596
  <box label="strawberry" source="manual" occluded="1" xtl="884.90" ytl="178.06" xbr="957.13" ybr="258.42" z_order="0">
597
  </box>
598
  </image>
599
- <image id="3" name="images/3.png" width="1080" height="652">
600
  <box label="strawberry" source="manual" occluded="0" xtl="585.05" ytl="289.58" xbr="632.46" ybr="360.10" z_order="0">
601
  </box>
602
  <box label="strawberry" source="manual" occluded="0" xtl="86.80" ytl="400.06" xbr="135.95" ybr="468.06" z_order="0">
@@ -636,7 +636,7 @@
636
  <box label="strawberry" source="manual" occluded="0" xtl="386.97" ytl="372.12" xbr="430.89" ybr="437.91" z_order="0">
637
  </box>
638
  </image>
639
- <image id="30" name="images/30.png" width="1024" height="678">
640
  <box label="strawberry" source="manual" occluded="0" xtl="199.87" ytl="531.27" xbr="241.19" ybr="581.12" z_order="0">
641
  </box>
642
  <box label="strawberry" source="manual" occluded="0" xtl="988.76" ytl="362.07" xbr="1024.00" ybr="455.92" z_order="0">
@@ -676,7 +676,7 @@
676
  <box label="strawberry" source="manual" occluded="0" xtl="235.12" ytl="496.03" xbr="279.36" ybr="560.06" z_order="0">
677
  </box>
678
  </image>
679
- <image id="31" name="images/31.png" width="960" height="1051">
680
  <box label="strawberry" source="manual" occluded="0" xtl="310.73" ytl="594.26" xbr="401.29" ybr="669.43" z_order="0">
681
  </box>
682
  <box label="strawberry" source="manual" occluded="1" xtl="335.79" ytl="641.68" xbr="412.34" ybr="720.62" z_order="0">
@@ -698,7 +698,7 @@
698
  <box label="strawberry" source="manual" occluded="0" xtl="0.00" ytl="555.80" xbr="46.80" ybr="604.03" z_order="0">
699
  </box>
700
  </image>
701
- <image id="32" name="images/32.png" width="1910" height="1000">
702
  <box label="strawberry" source="manual" occluded="0" xtl="882.40" ytl="493.71" xbr="1051.76" ybr="745.76" z_order="0">
703
  </box>
704
  <box label="strawberry" source="manual" occluded="1" xtl="519.84" ytl="508.95" xbr="621.15" ybr="645.05" z_order="0">
@@ -720,7 +720,7 @@
720
  <box label="strawberry" source="manual" occluded="0" xtl="1556.67" ytl="209.10" xbr="1910.00" ybr="691.08" z_order="0">
721
  </box>
722
  </image>
723
- <image id="33" name="images/33.png" width="1024" height="768">
724
  <box label="strawberry" source="manual" occluded="1" xtl="12.21" ytl="495.66" xbr="121.08" ybr="624.60" z_order="0">
725
  </box>
726
  <box label="strawberry" source="manual" occluded="1" xtl="253.04" ytl="348.13" xbr="334.85" ybr="463.26" z_order="0">
@@ -746,7 +746,7 @@
746
  <box label="strawberry" source="manual" occluded="0" xtl="189.55" ytl="240.50" xbr="311.53" ybr="382.57" z_order="0">
747
  </box>
748
  </image>
749
- <image id="34" name="images/34.png" width="1600" height="1200">
750
  <box label="strawberry" source="manual" occluded="0" xtl="247.90" ytl="820.63" xbr="348.85" ybr="957.07" z_order="0">
751
  </box>
752
  <box label="strawberry" source="manual" occluded="1" xtl="1481.13" ytl="619.96" xbr="1600.00" ybr="811.86" z_order="0">
@@ -756,7 +756,7 @@
756
  <box label="strawberry" source="manual" occluded="1" xtl="908.57" ytl="881.59" xbr="1055.99" ybr="1047.44" z_order="0">
757
  </box>
758
  </image>
759
- <image id="35" name="images/35.png" width="1000" height="750">
760
  <box label="strawberry" source="manual" occluded="1" xtl="588.23" ytl="540.14" xbr="646.37" ybr="634.00" z_order="0">
761
  </box>
762
  <box label="strawberry" source="manual" occluded="1" xtl="647.48" ytl="521.31" xbr="701.75" ybr="588.59" z_order="0">
@@ -812,7 +812,7 @@
812
  <box label="strawberry" source="manual" occluded="0" xtl="564.48" ytl="550.08" xbr="622.07" ybr="620.96" z_order="0">
813
  </box>
814
  </image>
815
- <image id="36" name="images/36.png" width="550" height="413">
816
  <box label="strawberry" source="manual" occluded="0" xtl="256.10" ytl="110.39" xbr="330.90" ybr="189.96" z_order="0">
817
  </box>
818
  <box label="strawberry" source="manual" occluded="0" xtl="160.93" ytl="126.68" xbr="210.55" ybr="182.23" z_order="0">
@@ -842,7 +842,7 @@
842
  <box label="strawberry" source="manual" occluded="0" xtl="68.65" ytl="201.96" xbr="95.09" ybr="232.53" z_order="0">
843
  </box>
844
  </image>
845
- <image id="37" name="images/37.png" width="600" height="600">
846
  <box label="strawberry" source="manual" occluded="0" xtl="64.44" ytl="232.08" xbr="138.30" ybr="312.45" z_order="0">
847
  </box>
848
  <box label="strawberry" source="manual" occluded="0" xtl="115.34" ytl="282.33" xbr="181.59" ybr="361.17" z_order="0">
@@ -872,13 +872,13 @@
872
  <box label="strawberry" source="manual" occluded="0" xtl="343.45" ytl="353.75" xbr="408.30" ybr="447.33" z_order="0">
873
  </box>
874
  </image>
875
- <image id="38" name="images/38.png" width="1260" height="840">
876
  <box label="strawberry" source="manual" occluded="0" xtl="551.47" ytl="374.65" xbr="745.71" ybr="512.18" z_order="0">
877
  </box>
878
  <box label="strawberry" source="manual" occluded="0" xtl="361.03" ytl="330.14" xbr="513.22" ybr="432.47" z_order="0">
879
  </box>
880
  </image>
881
- <image id="39" name="images/39.png" width="1542" height="854">
882
  <box label="strawberry" source="manual" occluded="1" xtl="383.65" ytl="486.35" xbr="560.15" ybr="741.95" z_order="0">
883
  </box>
884
  <box label="strawberry" source="manual" occluded="0" xtl="299.38" ytl="363.71" xbr="464.90" ybr="679.06" z_order="0">
@@ -894,7 +894,7 @@
894
  <box label="strawberry" source="manual" occluded="1" xtl="508.57" ytl="398.75" xbr="692.92" ybr="658.93" z_order="0">
895
  </box>
896
  </image>
897
- <image id="4" name="images/4.png" width="733" height="733">
898
  <box label="strawberry" source="manual" occluded="1" xtl="553.61" ytl="203.30" xbr="634.97" ybr="290.27" z_order="0">
899
  </box>
900
  <box label="strawberry" source="manual" occluded="1" xtl="28.18" ytl="205.15" xbr="132.41" ybr="280.80" z_order="0">
@@ -926,7 +926,7 @@
926
  <box label="strawberry" source="manual" occluded="0" xtl="603.17" ytl="452.52" xbr="733.00" ybr="675.55" z_order="0">
927
  </box>
928
  </image>
929
- <image id="5" name="images/5.png" width="640" height="640">
930
  <box label="strawberry" source="manual" occluded="0" xtl="321.40" ytl="416.76" xbr="437.72" ybr="549.78" z_order="0">
931
  </box>
932
  <box label="strawberry" source="manual" occluded="1" xtl="290.41" ytl="414.72" xbr="370.36" ybr="513.04" z_order="0">
@@ -942,7 +942,7 @@
942
  <box label="strawberry" source="manual" occluded="1" xtl="354.47" ytl="339.50" xbr="454.80" ybr="443.80" z_order="0">
943
  </box>
944
  </image>
945
- <image id="6" name="images/6.png" width="1600" height="900">
946
  <box label="strawberry" source="manual" occluded="1" xtl="1117.06" ytl="455.36" xbr="1356.15" ybr="707.34" z_order="0">
947
  </box>
948
  <box label="strawberry" source="manual" occluded="0" xtl="1318.45" ytl="425.69" xbr="1572.42" ybr="738.19" z_order="0">
@@ -960,7 +960,7 @@
960
  <box label="strawberry" source="manual" occluded="0" xtl="938.66" ytl="610.45" xbr="1152.03" ybr="862.60" z_order="0">
961
  </box>
962
  </image>
963
- <image id="7" name="images/7.png" width="1000" height="1000">
964
  <box label="strawberry" source="manual" occluded="0" xtl="188.95" ytl="639.95" xbr="394.36" ybr="875.33" z_order="0">
965
  </box>
966
  <box label="strawberry" source="manual" occluded="0" xtl="554.15" ytl="609.52" xbr="740.42" ybr="839.17" z_order="0">
@@ -974,7 +974,7 @@
974
  <box label="strawberry" source="manual" occluded="1" xtl="810.20" ytl="512.69" xbr="965.85" ybr="644.73" z_order="0">
975
  </box>
976
  </image>
977
- <image id="8" name="images/8.png" width="2048" height="1152">
978
  <box label="strawberry" source="manual" occluded="1" xtl="116.49" ytl="873.80" xbr="261.93" ybr="1040.68" z_order="0">
979
  </box>
980
  <box label="strawberry" source="manual" occluded="0" xtl="743.93" ytl="755.83" xbr="821.33" ybr="841.31" z_order="0">
@@ -1036,7 +1036,7 @@
1036
  <box label="strawberry" source="manual" occluded="0" xtl="626.66" ytl="889.73" xbr="741.48" ybr="1021.90" z_order="0">
1037
  </box>
1038
  </image>
1039
- <image id="9" name="images/9.png" width="1600" height="1200">
1040
  <box label="strawberry" source="manual" occluded="0" xtl="731.59" ytl="633.82" xbr="1023.70" ybr="964.51" z_order="0">
1041
  </box>
1042
  <box label="strawberry" source="manual" occluded="1" xtl="841.40" ytl="546.69" xbr="1019.80" ybr="744.95" z_order="0">
 
28
  </task>
29
  <dumped>2023-09-01 08:41:10.115046+00:00</dumped>
30
  </meta>
31
+ <image id="0" name="0.png" width="1200" height="800">
32
  <box label="strawberry" source="manual" occluded="0" xtl="368.18" ytl="292.79" xbr="460.65" ybr="454.46" z_order="0">
33
  </box>
34
  <box label="strawberry" source="manual" occluded="0" xtl="423.70" ytl="268.56" xbr="537.50" ybr="471.16" z_order="0">
 
46
  <box label="strawberry" source="manual" occluded="0" xtl="220.59" ytl="419.56" xbr="327.76" ybr="558.57" z_order="0">
47
  </box>
48
  </image>
49
+ <image id="1" name="1.png" width="1600" height="900">
50
  <box label="strawberry" source="manual" occluded="1" xtl="413.29" ytl="450.98" xbr="439.44" ybr="494.24" z_order="0">
51
  </box>
52
  <box label="strawberry" source="manual" occluded="1" xtl="680.39" ytl="566.41" xbr="742.46" ybr="657.09" z_order="0">
 
96
  <box label="strawberry" source="manual" occluded="0" xtl="349.59" ytl="580.05" xbr="385.55" ybr="634.27" z_order="0">
97
  </box>
98
  </image>
99
+ <image id="10" name="10.png" width="920" height="425">
100
  <box label="strawberry" source="manual" occluded="1" xtl="271.21" ytl="313.09" xbr="307.17" ybr="375.91" z_order="0">
101
  </box>
102
  <box label="strawberry" source="manual" occluded="1" xtl="307.61" ytl="310.50" xbr="352.00" ybr="371.73" z_order="0">
 
118
  <box label="strawberry" source="manual" occluded="0" xtl="90.28" ytl="292.10" xbr="119.56" ybr="335.80" z_order="0">
119
  </box>
120
  </image>
121
+ <image id="11" name="11.png" width="640" height="480">
122
  <box label="strawberry" source="manual" occluded="0" xtl="563.99" ytl="313.31" xbr="637.78" ybr="420.48" z_order="0">
123
  </box>
124
  <box label="strawberry" source="manual" occluded="0" xtl="75.24" ytl="324.82" xbr="136.18" ybr="420.66" z_order="0">
 
142
  <box label="strawberry" source="manual" occluded="0" xtl="510.25" ytl="353.17" xbr="589.90" ybr="462.49" z_order="0">
143
  </box>
144
  </image>
145
+ <image id="12" name="12.png" width="1920" height="1080">
146
  <box label="strawberry" source="manual" occluded="0" xtl="577.77" ytl="723.82" xbr="718.30" ybr="942.90" z_order="0">
147
  </box>
148
  <box label="strawberry" source="manual" occluded="1" xtl="700.33" ytl="683.31" xbr="836.81" ybr="884.48" z_order="0">
 
162
  <box label="strawberry" source="manual" occluded="0" xtl="1478.95" ytl="562.55" xbr="1577.12" ybr="680.25" z_order="0">
163
  </box>
164
  </image>
165
+ <image id="13" name="13.png" width="807" height="607">
166
  <box label="strawberry" source="manual" occluded="1" xtl="63.97" ytl="309.85" xbr="145.67" ybr="401.23" z_order="0">
167
  </box>
168
  <box label="strawberry" source="manual" occluded="1" xtl="268.54" ytl="333.08" xbr="338.56" ybr="420.20" z_order="0">
 
182
  <box label="strawberry" source="manual" occluded="0" xtl="3.63" ytl="284.62" xbr="71.12" ybr="355.88" z_order="0">
183
  </box>
184
  </image>
185
+ <image id="14" name="14.png" width="2592" height="1936">
186
  <box label="strawberry" source="manual" occluded="1" xtl="1728.84" ytl="1126.72" xbr="1852.72" ybr="1302.40" z_order="0">
187
  </box>
188
  <box label="strawberry" source="manual" occluded="0" xtl="1868.74" ytl="1204.38" xbr="2003.93" ybr="1408.07" z_order="0">
 
208
  <box label="strawberry" source="manual" occluded="0" xtl="1497.83" ytl="931.63" xbr="1717.38" ybr="1166.62" z_order="0">
209
  </box>
210
  </image>
211
+ <image id="15" name="15.png" width="1294" height="970">
212
  <box label="strawberry" source="manual" occluded="0" xtl="1154.50" ytl="597.08" xbr="1228.20" ybr="685.71" z_order="0">
213
  </box>
214
  <box label="strawberry" source="manual" occluded="0" xtl="163.78" ytl="583.92" xbr="356.83" ybr="790.59" z_order="0">
 
224
  <box label="strawberry" source="manual" occluded="1" xtl="1169.92" ytl="537.91" xbr="1233.80" ybr="605.94" z_order="0">
225
  </box>
226
  </image>
227
+ <image id="16" name="16.png" width="2368" height="1624">
228
  <box label="strawberry" source="manual" occluded="1" xtl="331.85" ytl="1119.35" xbr="676.45" ybr="1526.60" z_order="0">
229
  </box>
230
  <box label="strawberry" source="manual" occluded="0" xtl="0.00" ytl="376.15" xbr="307.53" ybr="737.16" z_order="0">
 
244
  <box label="strawberry" source="manual" occluded="0" xtl="438.81" ytl="628.26" xbr="847.55" ybr="1066.80" z_order="0">
245
  </box>
246
  </image>
247
+ <image id="17" name="17.png" width="1000" height="810">
248
  <box label="strawberry" source="manual" occluded="0" xtl="68.55" ytl="507.75" xbr="205.50" ybr="654.49" z_order="0">
249
  </box>
250
  <box label="strawberry" source="manual" occluded="1" xtl="249.40" ytl="560.97" xbr="367.20" ybr="710.81" z_order="0">
 
260
  <box label="strawberry" source="manual" occluded="0" xtl="46.96" ytl="428.28" xbr="170.40" ybr="559.50" z_order="0">
261
  </box>
262
  </image>
263
+ <image id="18" name="18.png" width="2048" height="1536">
264
  <box label="strawberry" source="manual" occluded="0" xtl="1390.21" ytl="547.16" xbr="1580.73" ybr="816.61" z_order="0">
265
  </box>
266
  <box label="strawberry" source="manual" occluded="1" xtl="0.00" ytl="389.14" xbr="161.82" ybr="704.64" z_order="0">
 
280
  <box label="strawberry" source="manual" occluded="1" xtl="1582.23" ytl="0.00" xbr="1765.13" ybr="163.13" z_order="0">
281
  </box>
282
  </image>
283
+ <image id="19" name="19.png" width="960" height="720">
284
  <box label="strawberry" source="manual" occluded="0" xtl="90.83" ytl="317.92" xbr="191.00" ybr="420.30" z_order="0">
285
  </box>
286
  <box label="strawberry" source="manual" occluded="0" xtl="151.21" ytl="390.74" xbr="239.59" ybr="497.91" z_order="0">
 
306
  <box label="strawberry" source="manual" occluded="0" xtl="186.89" ytl="295.06" xbr="254.66" ybr="362.31" z_order="0">
307
  </box>
308
  </image>
309
+ <image id="2" name="2.png" width="1200" height="900">
310
  <box label="strawberry" source="manual" occluded="1" xtl="875.25" ytl="444.03" xbr="979.31" ybr="578.78" z_order="0">
311
  </box>
312
  <box label="strawberry" source="manual" occluded="1" xtl="517.67" ytl="562.22" xbr="617.05" ybr="736.75" z_order="0">
 
340
  <box label="strawberry" source="manual" occluded="1" xtl="952.99" ytl="466.35" xbr="1024.36" ybr="562.04" z_order="0">
341
  </box>
342
  </image>
343
+ <image id="20" name="20.png" width="1680" height="945">
344
  <box label="strawberry" source="manual" occluded="1" xtl="873.33" ytl="697.67" xbr="1028.25" ybr="908.05" z_order="0">
345
  </box>
346
  <box label="strawberry" source="manual" occluded="0" xtl="1082.63" ytl="500.31" xbr="1279.39" ybr="695.62" z_order="0">
 
352
  <box label="strawberry" source="manual" occluded="1" xtl="743.72" ytl="724.80" xbr="895.63" ybr="902.02" z_order="0">
353
  </box>
354
  </image>
355
+ <image id="21" name="21.png" width="1600" height="1200">
356
  <box label="strawberry" source="manual" occluded="0" xtl="190.11" ytl="143.82" xbr="500.96" ybr="510.88" z_order="0">
357
  </box>
358
  <box label="strawberry" source="manual" occluded="1" xtl="567.41" ytl="586.54" xbr="833.79" ybr="926.42" z_order="0">
 
372
  <box label="strawberry" source="manual" occluded="1" xtl="401.30" ytl="509.23" xbr="632.47" ybr="816.19" z_order="0">
373
  </box>
374
  </image>
375
+ <image id="22" name="22.png" width="1200" height="675">
376
  <box label="strawberry" source="manual" occluded="0" xtl="413.97" ytl="428.33" xbr="521.96" ybr="565.26" z_order="0">
377
  </box>
378
  <box label="strawberry" source="manual" occluded="1" xtl="690.93" ytl="379.62" xbr="817.53" ybr="501.05" z_order="0">
 
382
  <box label="strawberry" source="manual" occluded="1" xtl="426.21" ytl="319.26" xbr="534.72" ybr="440.68" z_order="0">
383
  </box>
384
  </image>
385
+ <image id="23" name="23.png" width="1000" height="667">
386
  <box label="strawberry" source="manual" occluded="1" xtl="540.46" ytl="247.68" xbr="595.12" ybr="313.86" z_order="0">
387
  </box>
388
  <box label="strawberry" source="manual" occluded="0" xtl="143.00" ytl="35.65" xbr="198.89" ybr="105.33" z_order="0">
 
448
  <box label="strawberry" source="manual" occluded="0" xtl="883.21" ytl="63.60" xbr="943.48" ybr="134.51" z_order="0">
449
  </box>
450
  </image>
451
+ <image id="24" name="24.png" width="1024" height="683">
452
  <box label="strawberry" source="manual" occluded="0" xtl="205.41" ytl="497.14" xbr="298.99" ybr="649.28" z_order="0">
453
  </box>
454
  <box label="strawberry" source="manual" occluded="0" xtl="781.56" ytl="430.22" xbr="892.40" ybr="626.80" z_order="0">
 
460
  <box label="strawberry" source="manual" occluded="1" xtl="0.00" ytl="75.01" xbr="118.93" ybr="266.37" z_order="0">
461
  </box>
462
  </image>
463
+ <image id="25" name="25.png" width="1080" height="1080">
464
  <box label="strawberry" source="manual" occluded="1" xtl="498.68" ytl="627.65" xbr="704.53" ybr="936.01" z_order="0">
465
  </box>
466
  <box label="strawberry" source="manual" occluded="0" xtl="142.36" ytl="375.50" xbr="364.75" ybr="696.26" z_order="0">
467
  </box>
468
  </image>
469
+ <image id="26" name="26.png" width="997" height="630">
470
  <box label="strawberry" source="manual" occluded="1" xtl="334.24" ytl="419.32" xbr="381.91" ybr="490.06" z_order="0">
471
  </box>
472
  <box label="strawberry" source="manual" occluded="0" xtl="437.71" ytl="332.45" xbr="521.10" ybr="452.68" z_order="0">
 
484
  <box label="strawberry" source="manual" occluded="1" xtl="294.89" ytl="426.68" xbr="333.27" ybr="490.25" z_order="0">
485
  </box>
486
  </image>
487
+ <image id="27" name="27.png" width="900" height="1200">
488
  <box label="strawberry" source="manual" occluded="0" xtl="423.91" ytl="645.28" xbr="619.70" ybr="812.16" z_order="0">
489
  </box>
490
  <box label="strawberry" source="manual" occluded="0" xtl="516.30" ytl="716.75" xbr="710.11" ybr="876.23" z_order="0">
 
498
  <box label="strawberry" source="manual" occluded="0" xtl="163.95" ytl="136.39" xbr="403.70" ybr="366.03" z_order="0">
499
  </box>
500
  </image>
501
+ <image id="28" name="28.png" width="3000" height="1995">
502
  <box label="strawberry" source="manual" occluded="0" xtl="2262.73" ytl="1167.02" xbr="2658.52" ybr="1584.43" z_order="0">
503
  </box>
504
  <box label="strawberry" source="manual" occluded="0" xtl="2644.52" ytl="1173.38" xbr="3000.00" ybr="1547.53" z_order="0">
 
508
  <box label="strawberry" source="manual" occluded="0" xtl="1922.93" ytl="917.22" xbr="2344.60" ybr="1448.66" z_order="0">
509
  </box>
510
  </image>
511
+ <image id="29" name="29.png" width="1000" height="709">
512
  <box label="strawberry" source="manual" occluded="1" xtl="597.96" ytl="263.15" xbr="655.12" ybr="352.67" z_order="0">
513
  </box>
514
  <box label="strawberry" source="manual" occluded="0" xtl="25.91" ytl="227.89" xbr="118.25" ybr="322.87" z_order="0">
 
596
  <box label="strawberry" source="manual" occluded="1" xtl="884.90" ytl="178.06" xbr="957.13" ybr="258.42" z_order="0">
597
  </box>
598
  </image>
599
+ <image id="3" name="3.png" width="1080" height="652">
600
  <box label="strawberry" source="manual" occluded="0" xtl="585.05" ytl="289.58" xbr="632.46" ybr="360.10" z_order="0">
601
  </box>
602
  <box label="strawberry" source="manual" occluded="0" xtl="86.80" ytl="400.06" xbr="135.95" ybr="468.06" z_order="0">
 
636
  <box label="strawberry" source="manual" occluded="0" xtl="386.97" ytl="372.12" xbr="430.89" ybr="437.91" z_order="0">
637
  </box>
638
  </image>
639
+ <image id="30" name="30.png" width="1024" height="678">
640
  <box label="strawberry" source="manual" occluded="0" xtl="199.87" ytl="531.27" xbr="241.19" ybr="581.12" z_order="0">
641
  </box>
642
  <box label="strawberry" source="manual" occluded="0" xtl="988.76" ytl="362.07" xbr="1024.00" ybr="455.92" z_order="0">
 
676
  <box label="strawberry" source="manual" occluded="0" xtl="235.12" ytl="496.03" xbr="279.36" ybr="560.06" z_order="0">
677
  </box>
678
  </image>
679
+ <image id="31" name="31.png" width="960" height="1051">
680
  <box label="strawberry" source="manual" occluded="0" xtl="310.73" ytl="594.26" xbr="401.29" ybr="669.43" z_order="0">
681
  </box>
682
  <box label="strawberry" source="manual" occluded="1" xtl="335.79" ytl="641.68" xbr="412.34" ybr="720.62" z_order="0">
 
698
  <box label="strawberry" source="manual" occluded="0" xtl="0.00" ytl="555.80" xbr="46.80" ybr="604.03" z_order="0">
699
  </box>
700
  </image>
701
+ <image id="32" name="32.png" width="1910" height="1000">
702
  <box label="strawberry" source="manual" occluded="0" xtl="882.40" ytl="493.71" xbr="1051.76" ybr="745.76" z_order="0">
703
  </box>
704
  <box label="strawberry" source="manual" occluded="1" xtl="519.84" ytl="508.95" xbr="621.15" ybr="645.05" z_order="0">
 
720
  <box label="strawberry" source="manual" occluded="0" xtl="1556.67" ytl="209.10" xbr="1910.00" ybr="691.08" z_order="0">
721
  </box>
722
  </image>
723
+ <image id="33" name="33.png" width="1024" height="768">
724
  <box label="strawberry" source="manual" occluded="1" xtl="12.21" ytl="495.66" xbr="121.08" ybr="624.60" z_order="0">
725
  </box>
726
  <box label="strawberry" source="manual" occluded="1" xtl="253.04" ytl="348.13" xbr="334.85" ybr="463.26" z_order="0">
 
746
  <box label="strawberry" source="manual" occluded="0" xtl="189.55" ytl="240.50" xbr="311.53" ybr="382.57" z_order="0">
747
  </box>
748
  </image>
749
+ <image id="34" name="34.png" width="1600" height="1200">
750
  <box label="strawberry" source="manual" occluded="0" xtl="247.90" ytl="820.63" xbr="348.85" ybr="957.07" z_order="0">
751
  </box>
752
  <box label="strawberry" source="manual" occluded="1" xtl="1481.13" ytl="619.96" xbr="1600.00" ybr="811.86" z_order="0">
 
756
  <box label="strawberry" source="manual" occluded="1" xtl="908.57" ytl="881.59" xbr="1055.99" ybr="1047.44" z_order="0">
757
  </box>
758
  </image>
759
+ <image id="35" name="35.png" width="1000" height="750">
760
  <box label="strawberry" source="manual" occluded="1" xtl="588.23" ytl="540.14" xbr="646.37" ybr="634.00" z_order="0">
761
  </box>
762
  <box label="strawberry" source="manual" occluded="1" xtl="647.48" ytl="521.31" xbr="701.75" ybr="588.59" z_order="0">
 
812
  <box label="strawberry" source="manual" occluded="0" xtl="564.48" ytl="550.08" xbr="622.07" ybr="620.96" z_order="0">
813
  </box>
814
  </image>
815
+ <image id="36" name="36.png" width="550" height="413">
816
  <box label="strawberry" source="manual" occluded="0" xtl="256.10" ytl="110.39" xbr="330.90" ybr="189.96" z_order="0">
817
  </box>
818
  <box label="strawberry" source="manual" occluded="0" xtl="160.93" ytl="126.68" xbr="210.55" ybr="182.23" z_order="0">
 
842
  <box label="strawberry" source="manual" occluded="0" xtl="68.65" ytl="201.96" xbr="95.09" ybr="232.53" z_order="0">
843
  </box>
844
  </image>
845
+ <image id="37" name="37.png" width="600" height="600">
846
  <box label="strawberry" source="manual" occluded="0" xtl="64.44" ytl="232.08" xbr="138.30" ybr="312.45" z_order="0">
847
  </box>
848
  <box label="strawberry" source="manual" occluded="0" xtl="115.34" ytl="282.33" xbr="181.59" ybr="361.17" z_order="0">
 
872
  <box label="strawberry" source="manual" occluded="0" xtl="343.45" ytl="353.75" xbr="408.30" ybr="447.33" z_order="0">
873
  </box>
874
  </image>
875
+ <image id="38" name="38.png" width="1260" height="840">
876
  <box label="strawberry" source="manual" occluded="0" xtl="551.47" ytl="374.65" xbr="745.71" ybr="512.18" z_order="0">
877
  </box>
878
  <box label="strawberry" source="manual" occluded="0" xtl="361.03" ytl="330.14" xbr="513.22" ybr="432.47" z_order="0">
879
  </box>
880
  </image>
881
+ <image id="39" name="39.png" width="1542" height="854">
882
  <box label="strawberry" source="manual" occluded="1" xtl="383.65" ytl="486.35" xbr="560.15" ybr="741.95" z_order="0">
883
  </box>
884
  <box label="strawberry" source="manual" occluded="0" xtl="299.38" ytl="363.71" xbr="464.90" ybr="679.06" z_order="0">
 
894
  <box label="strawberry" source="manual" occluded="1" xtl="508.57" ytl="398.75" xbr="692.92" ybr="658.93" z_order="0">
895
  </box>
896
  </image>
897
+ <image id="4" name="4.png" width="733" height="733">
898
  <box label="strawberry" source="manual" occluded="1" xtl="553.61" ytl="203.30" xbr="634.97" ybr="290.27" z_order="0">
899
  </box>
900
  <box label="strawberry" source="manual" occluded="1" xtl="28.18" ytl="205.15" xbr="132.41" ybr="280.80" z_order="0">
 
926
  <box label="strawberry" source="manual" occluded="0" xtl="603.17" ytl="452.52" xbr="733.00" ybr="675.55" z_order="0">
927
  </box>
928
  </image>
929
+ <image id="5" name="5.png" width="640" height="640">
930
  <box label="strawberry" source="manual" occluded="0" xtl="321.40" ytl="416.76" xbr="437.72" ybr="549.78" z_order="0">
931
  </box>
932
  <box label="strawberry" source="manual" occluded="1" xtl="290.41" ytl="414.72" xbr="370.36" ybr="513.04" z_order="0">
 
942
  <box label="strawberry" source="manual" occluded="1" xtl="354.47" ytl="339.50" xbr="454.80" ybr="443.80" z_order="0">
943
  </box>
944
  </image>
945
+ <image id="6" name="6.png" width="1600" height="900">
946
  <box label="strawberry" source="manual" occluded="1" xtl="1117.06" ytl="455.36" xbr="1356.15" ybr="707.34" z_order="0">
947
  </box>
948
  <box label="strawberry" source="manual" occluded="0" xtl="1318.45" ytl="425.69" xbr="1572.42" ybr="738.19" z_order="0">
 
960
  <box label="strawberry" source="manual" occluded="0" xtl="938.66" ytl="610.45" xbr="1152.03" ybr="862.60" z_order="0">
961
  </box>
962
  </image>
963
+ <image id="7" name="7.png" width="1000" height="1000">
964
  <box label="strawberry" source="manual" occluded="0" xtl="188.95" ytl="639.95" xbr="394.36" ybr="875.33" z_order="0">
965
  </box>
966
  <box label="strawberry" source="manual" occluded="0" xtl="554.15" ytl="609.52" xbr="740.42" ybr="839.17" z_order="0">
 
974
  <box label="strawberry" source="manual" occluded="1" xtl="810.20" ytl="512.69" xbr="965.85" ybr="644.73" z_order="0">
975
  </box>
976
  </image>
977
+ <image id="8" name="8.png" width="2048" height="1152">
978
  <box label="strawberry" source="manual" occluded="1" xtl="116.49" ytl="873.80" xbr="261.93" ybr="1040.68" z_order="0">
979
  </box>
980
  <box label="strawberry" source="manual" occluded="0" xtl="743.93" ytl="755.83" xbr="821.33" ybr="841.31" z_order="0">
 
1036
  <box label="strawberry" source="manual" occluded="0" xtl="626.66" ytl="889.73" xbr="741.48" ybr="1021.90" z_order="0">
1037
  </box>
1038
  </image>
1039
+ <image id="9" name="9.png" width="1600" height="1200">
1040
  <box label="strawberry" source="manual" occluded="0" xtl="731.59" ytl="633.82" xbr="1023.70" ybr="964.51" z_order="0">
1041
  </box>
1042
  <box label="strawberry" source="manual" occluded="1" xtl="841.40" ytl="546.69" xbr="1019.80" ybr="744.95" z_order="0">
ripe-strawberries-detection.py ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from xml.etree import ElementTree as ET
2
+
3
+ import datasets
4
+
5
+ _CITATION = """\
6
+ @InProceedings{huggingface:dataset,
7
+ title = {ripe-strawberries-detection},
8
+ author = {TrainingDataPro},
9
+ year = {2023}
10
+ }
11
+ """
12
+
13
+ _DESCRIPTION = """\
14
+ The dataset consists of photos of strawberries for the identification and recognition of
15
+ ripe berries.
16
+ The images are annotated with **bounding boxes** that accurately demarcate the location
17
+ of the ripe strawberries within the image.
18
+ Each image in the dataset showcases a strawberry plantation, and includes a diverse
19
+ range of backgrounds, lighting conditions, and orientations. The photos are captured
20
+ from various angles and distances, providing a realistic representation of strawberries.
21
+ The dataset can be utilised for enabling advancements in strawberry production, quality
22
+ control, and greater precision in agricultural practices.
23
+
24
+ """
25
+ _NAME = "ripe-strawberries-detection"
26
+
27
+ _HOMEPAGE = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}"
28
+
29
+ _LICENSE = ""
30
+
31
+ _DATA = f"https://huggingface.co/datasets/TrainingDataPro/{_NAME}/resolve/main/data/"
32
+
33
+ _LABELS = ["strawberry"]
34
+
35
+
36
+ class BotoxInjectionsBeforeAndAfter(datasets.GeneratorBasedBuilder):
37
+ def _info(self):
38
+ return datasets.DatasetInfo(
39
+ description=_DESCRIPTION,
40
+ features=datasets.Features(
41
+ {
42
+ "id": datasets.Value("int32"),
43
+ "name": datasets.Value("string"),
44
+ "image": datasets.Image(),
45
+ "mask": datasets.Image(),
46
+ "width": datasets.Value("uint16"),
47
+ "height": datasets.Value("uint16"),
48
+ "shapes": datasets.Sequence(
49
+ {
50
+ "label": datasets.ClassLabel(
51
+ num_classes=len(_LABELS),
52
+ names=_LABELS,
53
+ ),
54
+ "type": datasets.Value("string"),
55
+ "points": datasets.Sequence(
56
+ datasets.Sequence(
57
+ datasets.Value("float"),
58
+ ),
59
+ ),
60
+ "rotation": datasets.Value("float"),
61
+ "attributes": datasets.Sequence(
62
+ {
63
+ "name": datasets.Value("string"),
64
+ "text": datasets.Value("string"),
65
+ }
66
+ ),
67
+ }
68
+ ),
69
+ }
70
+ ),
71
+ supervised_keys=None,
72
+ homepage=_HOMEPAGE,
73
+ citation=_CITATION,
74
+ )
75
+
76
+ def _split_generators(self, dl_manager):
77
+ images = dl_manager.download(f"{_DATA}images.tar.gz")
78
+ masks = dl_manager.download(f"{_DATA}boxes.tar.gz")
79
+ annotations = dl_manager.download(f"{_DATA}annotations.xml")
80
+ images = dl_manager.iter_archive(images)
81
+ masks = dl_manager.iter_archive(masks)
82
+ return [
83
+ datasets.SplitGenerator(
84
+ name=datasets.Split.TRAIN,
85
+ gen_kwargs={
86
+ "images": images,
87
+ "masks": masks,
88
+ "annotations": annotations,
89
+ },
90
+ ),
91
+ ]
92
+
93
+ @staticmethod
94
+ def parse_shape(shape: ET.Element) -> dict:
95
+ label = shape.get("label")
96
+ shape_type = shape.tag
97
+ rotation = shape.get("rotation", 0.0)
98
+
99
+ points = None
100
+
101
+ if shape_type == "points":
102
+ points = tuple(map(float, shape.get("points").split(",")))
103
+
104
+ elif shape_type == "box":
105
+ points = [
106
+ (float(shape.get("xtl")), float(shape.get("ytl"))),
107
+ (float(shape.get("xbr")), float(shape.get("ybr"))),
108
+ ]
109
+
110
+ elif shape_type == "polygon":
111
+ points = [
112
+ tuple(map(float, point.split(",")))
113
+ for point in shape.get("points").split(";")
114
+ ]
115
+
116
+ attributes = []
117
+
118
+ for attr in shape:
119
+ attr_name = attr.get("name")
120
+ attr_text = attr.text
121
+ attributes.append({"name": attr_name, "text": attr_text})
122
+
123
+ shape_data = {
124
+ "label": label,
125
+ "type": shape_type,
126
+ "points": points,
127
+ "rotation": rotation,
128
+ "attributes": attributes,
129
+ }
130
+
131
+ return shape_data
132
+
133
+ def _generate_examples(self, images, masks, annotations):
134
+ tree = ET.parse(annotations)
135
+ root = tree.getroot()
136
+
137
+ for idx, (
138
+ (image_path, image),
139
+ (mask_path, mask),
140
+ ) in enumerate(zip(images, masks)):
141
+ image_name = image_path.split("/")[-1]
142
+ img = root.find(f"./image[@name='{image_name}']")
143
+
144
+ image_id = img.get("id")
145
+ name = img.get("name")
146
+ width = img.get("width")
147
+ height = img.get("height")
148
+ shapes = [self.parse_shape(shape) for shape in img]
149
+
150
+ yield idx, {
151
+ "id": image_id,
152
+ "name": name,
153
+ "image": {"path": image_path, "bytes": image.read()},
154
+ "mask": {"path": mask_path, "bytes": mask.read()},
155
+ "width": width,
156
+ "height": height,
157
+ "shapes": shapes,
158
+ }