Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
2.05k
2.05k
width
int64
2.05k
2.05k
height
int64
2.05k
2.05k
objects
dict
2,048
2,048
{ "bbox": [ [ 1296.5999755859375, 932.9539794921875, 23.2908992767334, 24.432100296020508 ] ], "category": [ 111 ] }
2,048
2,048
{ "bbox": [ [ 1424, 877.3330078125, 77.33329772949219, 86.66670227050781 ], [ 1425.3299560546875, 970.6669921875, 76.00330352783203, 85.33300018310547 ] ], "category": [ 45, 46 ] }
2,048
2,048
{ "bbox": [ [ 1673.27001953125, 942.573974609375, 39.79819869995117, 39.60409927368164 ] ], "category": [ 51 ] }
2,048
2,048
{ "bbox": [ [ 1796.0400390625, 1047.719970703125, 30.861000061035156, 27.532899856567383 ] ], "category": [ 25 ] }
2,048
2,048
{ "bbox": [ [ 52.238800048828125, 856.218994140625, 27.36319923400879, 38.30839920043945 ], [ 82.089599609375, 860.198974609375, 28.85569953918457, 35.820899963378906 ] ], "category": [ 109, 138 ] }
2,048
2,048
{ "bbox": [ [ 1329, 873, 33, 35 ], [ 1327, 909, 33, 32 ], [ 1330, 841, 37, 32 ] ], "category": [ 29, 138, 187 ] }
2,048
2,048
{ "bbox": [ [ 1802, 913, 24, 29 ] ], "category": [ 29 ] }
2,048
2,048
{ "bbox": [ [ 1077.3299560546875, 957.3330078125, 50.66999816894531, 52.000301361083984 ], [ 1080, 1000, 46.66669845581055, 45.33330154418945 ] ], "category": [ 29, 112 ] }
2,048
2,048
{ "bbox": [ [ 238, 693, 155, 202 ], [ 223.33299255371094, 502, 186.11099243164062, 190 ] ], "category": [ 10, 116 ] }
2,048
2,048
{ "bbox": [ [ 499.20599365234375, 655.5560302734375, 30.952699661254883, 84.12650299072266 ], [ 533.3330078125, 675.39697265625, 26.983699798583984, 82.54019927978516 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1280, 684, 51, 54 ], [ 1040, 679, 58, 56 ], [ 793, 687, 53, 56 ], [ 1988, 803, 36, 45 ], [ 683, 694, 54, 52 ], [ 927, 680, ...
2,048
2,048
{ "bbox": [ [ 1454, 884, 23, 28 ], [ 882, 890, 27, 28 ], [ 1406, 879, 21, 31 ], [ 1333, 874, 24, 31 ], [ 1306, 874, 23, 29 ], [ 1358, 876, ...
2,048
2,048
{ "bbox": [ [ 1286.6700439453125, 838.6669921875, 69.33000183105469, 65.33300018310547 ], [ 1252, 850.6669921875, 18.66670036315918, 18.66629981994629 ] ], "category": [ 76, 111 ] }
2,048
2,048
{ "bbox": [ [ 967.10498046875, 927.6320190429688, 46.05289840698242, 46.05220031738281 ], [ 990.7890014648438, 873.6840209960938, 47.368900299072266, 48.68439865112305 ], [ 1019.739990234375, 925, 47.365299224853516, 47.368499...
2,048
2,048
{ "bbox": [ [ 1502, 775, 86, 102 ], [ 1694, 853, 102, 93 ] ], "category": [ 114, 187 ] }
2,048
2,048
{ "bbox": [ [ 1753.1700439453125, 784.1270141601562, 42.06809997558594, 49.206298828125 ], [ 1798.4100341796875, 791.27001953125, 41.27170181274414, 49.99980163574219 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1245.3299560546875, 870.6669921875, 45.336700439453125, 41.33300018310547 ] ], "category": [ 111 ] }
2,048
2,048
{ "bbox": [ [ 317.6470031738281, 978.947021484375, 36.30039978027344, 51.316200256347656 ] ], "category": [ 127 ] }
2,048
2,048
{ "bbox": [ [ 136.50799560546875, 1022.219970703125, 24.6033992767334, 34.12919998168945 ] ], "category": [ 109 ] }
2,048
2,048
{ "bbox": [ [ 1986.8399658203125, 1165.7900390625, 53.949501037597656, 73.68370056152344 ], [ 1463.1600341796875, 1055.260009765625, 31.576799392700195, 35.52949905395508 ], [ 1392.1099853515625, 1056.5799560546875, 31.5741996765136...
2,048
2,048
{ "bbox": [ [ 650.6669921875, 545.3330078125, 85.33300018310547, 78.66699981689453 ], [ 1290.6700439453125, 524, 87.99669647216797, 81.33329772949219 ], [ 966.6669921875, 522.6669921875, 90.66690063476562, 81.33329772949219 ...
2,048
2,048
{ "bbox": [ [ 1582.6700439453125, 841.3330078125, 43.996700286865234, 46.66790008544922 ], [ 1582.6700439453125, 897.3330078125, 43.996700286865234, 45.33369827270508 ], [ 1586.6700439453125, 946.6669921875, 39.996700286865234, ...
2,048
2,048
{ "bbox": [ [ 1625.340087890625, 873.712890625, 26.552978515625, 28.528076171875 ], [ 1655.449951171875, 876.2379760742188, 26.728200912475586, 27.72279930114746 ] ], "category": [ 111, 138 ] }
2,048
2,048
{ "bbox": [ [ 633.3330078125, 874.6669921875, 68.00029754638672, 69.33329772949219 ], [ 565.3330078125, 730.6669921875, 57.33369827270508, 58.66630172729492 ] ], "category": [ 28, 109 ] }
2,048
2,048
{ "bbox": [ [ 278, 649, 81, 96 ], [ 1458, 583, 100, 100 ], [ 1045, 569, 115, 108 ], [ 633, 593, 105, 106 ], [ 837, 575, 113, 106 ], [ 1255, 56...
2,048
2,048
{ "bbox": [ [ 1309.9000244140625, 999.010009765625, 29.573699951171875, 31.25320053100586 ] ], "category": [ 216 ] }
2,048
2,048
{ "bbox": [ [ 1179, 906, 25, 24 ], [ 1626, 809, 93, 92 ], [ 1313, 647, 85, 77 ] ], "category": [ 25, 29, 214 ] }
2,048
2,048
{ "bbox": [ [ 906.5789794921875, 868.4210205078125, 46.053199768066406, 48.683998107910156 ], [ 843.4210205078125, 868.4210205078125, 46.05339813232422, 48.68389892578125 ] ], "category": [ 95, 114 ] }
2,048
2,048
{ "bbox": [ [ 732.4509887695312, 1212.5799560546875, 25.827600479125977, 29.14189910888672 ] ], "category": [ 113 ] }
2,048
2,048
{ "bbox": [ [ 1599.010009765625, 976.2379760742188, 35.64350128173828, 38.61349868774414 ], [ 1775.25, 972.2769775390625, 33.6609001159668, 43.56460189819336 ], [ 1774.260009765625, 908.9110107421875, 31.680599212646484, 42.57...
2,048
2,048
{ "bbox": [ [ 1098.4100341796875, 843.6510009765625, 34.923301696777344, 38.095001220703125 ], [ 1060.3199462890625, 850.7940063476562, 38.09270095825195, 34.1265983581543 ] ], "category": [ 107, 168 ] }
2,048
2,048
{ "bbox": [ [ 915, 951, 43, 41 ] ], "category": [ 218 ] }
2,048
2,048
{ "bbox": [ [ 1566, 682, 46, 46 ], [ 1566, 810, 48, 51 ], [ 1570, 866, 45, 50 ], [ 1572, 939, 43, 45 ], [ 1573, 991, 43, 47 ] ], "category": [ 29, ...
2,048
2,048
{ "bbox": [ [ 224.60299682617188, 932.5399780273438, 18.254100799560547, 23.015600204467773 ], [ 15.079400062561035, 942.8569946289062, 14.285699844360352, 19.841400146484375 ] ], "category": [ 7, 140 ] }
2,048
2,048
{ "bbox": [ [ 1386.6700439453125, 590.6669921875, 67.99669647216797, 61.33300018310547 ] ], "category": [ 117 ] }
2,048
2,048
{ "bbox": [ [ 1331.6800537109375, 923.7620239257812, 22.775400161743164, 19.802400588989258 ], [ 1355.449951171875, 920.7919921875, 21.777700424194336, 22.77239990234375 ] ], "category": [ 114, 138 ] }
2,048
2,048
{ "bbox": [ [ 1592.4200439453125, 886.4539794921875, 23.911500930786133, 25.498199462890625 ], [ 1618.3299560546875, 887.6489868164062, 21.912700653076172, 25.10059928894043 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 93, 984, 35, 48 ] ], "category": [ 12 ] }
2,048
2,048
{ "bbox": [ [ 1142.0699462890625, 947.5239868164062, 16.2091007232666, 17.274499893188477 ], [ 1230.6500244140625, 669.5999755859375, 81.48780059814453, 69.5999984741211 ], [ 1313.5999755859375, 669.0009765625, 79.83650207519531, ...
2,048
2,048
{ "bbox": [ [ 1156, 620, 84, 78 ] ], "category": [ 10 ] }
2,048
2,048
{ "bbox": [ [ 461, 904, 18, 20 ], [ 460, 925, 20, 21 ], [ 462, 950, 18, 21 ], [ 356, 856, 21, 15 ] ], "category": [ 31, 117, 138, 223 ] }
2,048
2,048
{ "bbox": [ [ 936, 756, 60, 54.66699981689453 ] ], "category": [ 113 ] }
2,048
2,048
{ "bbox": [ [ 1244.3199462890625, 1291.47998046875, 29.54360008239746, 35.7953987121582 ], [ 1277.8399658203125, 1295.449951171875, 29.54640007019043, 30.68549919128418 ] ], "category": [ 114, 138 ] }
2,048
2,048
{ "bbox": [ [ 88.80000305175781, 939.2000122070312, 14.399999618530273, 16 ], [ 44.79999923706055, 967.2000122070312, 10.399999618530273, 17.600000381469727 ], [ 1569.5999755859375, 1014.4000244140625, 57.599998474121094, 67.1...
2,048
2,048
{ "bbox": [ [ 466.3999938964844, 932.7999877929688, 53.599998474121094, 72.80000305175781 ] ], "category": [ 155 ] }
2,048
2,048
{ "bbox": [ [ 1097.3699951171875, 936.8419799804688, 36.84049987792969, 38.15800094604492 ], [ 1097.3699951171875, 985.5260009765625, 36.842098236083984, 38.158199310302734 ] ], "category": [ 114, 138 ] }
2,048
2,048
{ "bbox": [ [ 582.177978515625, 1009.9000244140625, 18.812299728393555, 28.713899612426758 ], [ 583.1680297851562, 985.1489868164062, 19.80229949951172, 25.74209976196289 ] ], "category": [ 29, 112 ] }
2,048
2,048
{ "bbox": [ [ 1491, 912, 101, 103 ] ], "category": [ 103 ] }
2,048
2,048
{ "bbox": [ [ 348, 966, 96, 96 ] ], "category": [ 51 ] }
2,048
2,048
{ "bbox": [ [ 781.3330078125, 965.3330078125, 61.33369827270508, 62.66699981689453 ], [ 1614.6700439453125, 844, 37.33000183105469, 41.33330154418945 ], [ 468, 750.6669921875, 57.33359909057617, 66.6666030883789 ], [ ...
2,048
2,048
{ "bbox": [ [ 1703.9200439453125, 727.4509887695312, 168.62399291992188, 168.6269989013672 ], [ 1198.0400390625, 992.156982421875, 37.25410079956055, 43.13710021972656 ] ], "category": [ 214, 216 ] }
2,048
2,048
{ "bbox": [ [ 435.6440124511719, 828.7130126953125, 21.781700134277344, 54.455299377441406 ], [ 382.1780090332031, 810.8909912109375, 26.732900619506836, 56.435699462890625 ], [ 410.8909912109375, 819.802001953125, 22.77239990234375...
2,048
2,048
{ "bbox": [ [ 991.47802734375, 1378.97998046875, 20.454200744628906, 21.020000457763672 ] ], "category": [ 138 ] }
2,048
2,048
{ "bbox": [ [ 1593, 937, 47, 50 ], [ 1380, 939, 44, 43 ], [ 1589, 862, 47, 50 ] ], "category": [ 7, 10, 34 ] }
2,048
2,048
{ "bbox": [ [ 1684.6600341796875, 1253.4100341796875, 69.31999969482422, 56.24909973144531 ] ], "category": [ 189 ] }
2,048
2,048
{ "bbox": [ [ 792.3969116210938, 930.1724243164062, 27.7633056640625, 21.71923828125 ], [ 1376.989990234375, 892.6380004882812, 48.77360153198242, 46.012298583984375 ] ], "category": [ 189, 28 ] }
2,048
2,048
{ "bbox": [ [ 1272, 694.6669921875, 54.66669845581055, 54.66630172729492 ], [ 750.6669921875, 680, 55.999698638916016, 57.33330154418945 ], [ 1014.6699829101562, 681.3330078125, 57.33000183105469, 53.33369827270508 ], ...
2,048
2,048
{ "bbox": [ [ 1375, 979, 38, 34 ], [ 787, 753, 57, 57 ], [ 1079, 836, 40, 39 ], [ 1122, 837, 39, 37 ], [ 466, 776, 50, 52 ] ], "category": [ 7, 10...
2,048
2,048
{ "bbox": [ [ 771.5910034179688, 859.0910034179688, 17.045400619506836, 20.454500198364258 ] ], "category": [ 107 ] }
2,048
2,048
{ "bbox": [ [ 253.33299255371094, 354.6669921875, 117.33399963378906, 148 ] ], "category": [ 114 ] }
2,048
2,048
{ "bbox": [ [ 1158.330078125, 1005.4561157226562, 24.24755859375, 25.81597900390625 ], [ 268, 871, 23, 37 ], [ 109, 647, 55, 86 ], [ 1762, 936, 15, 17 ], [ 195, 988, 17...
2,048
2,048
{ "bbox": [ [ 1172.1400146484375, 982.0889892578125, 17.909799575805664, 17.413000106811523 ], [ 1126.3699951171875, 991.5419921875, 11.43850040435791, 11.443099975585938 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1195.050048828125, 991.0889892578125, 22.771799087524414, 31.683300018310547 ] ], "category": [ 140 ] }
2,048
2,048
{ "bbox": [ [ 780, 742, 45, 47 ], [ 1250, 717, 49, 44 ], [ 885, 727, 34, 60 ], [ 689, 746, 49, 51 ] ], "category": [ 17, 63, 97, 104 ] }
2,048
2,048
{ "bbox": [ [ 1377.6099853515625, 959.2039794921875, 31.340200424194336, 35.32339859008789 ], [ 1375.1199951171875, 1007.4600219726562, 35.82529830932617, 33.333499908447266 ] ], "category": [ 109, 138 ] }
2,048
2,048
{ "bbox": [ [ 1177.3299560546875, 826.6669921875, 45.336700439453125, 45.33300018310547 ] ], "category": [ 114 ] }
2,048
2,048
{ "bbox": [ [ 829.5999755859375, 507.20001220703125, 97.5999984741211, 82.4000015258789 ], [ 1400.800048828125, 516.7999877929688, 91.19999694824219, 81.5999984741211 ], [ 1121.5999755859375, 501.6000061035156, 96.80000305175781, ...
2,048
2,048
{ "bbox": [ [ 1697.3299560546875, 878.6669921875, 96.00330352783203, 166.66600036621094 ] ], "category": [ 51 ] }
2,048
2,048
{ "bbox": [ [ 1305, 946, 87, 85 ], [ 1858, 776, 173, 193 ] ], "category": [ 76, 217 ] }
2,048
2,048
{ "bbox": [ [ 1644.800048828125, 955.2000122070312, 29.600000381469727, 31.200000762939453 ], [ 556.7999877929688, 980.7999877929688, 13.600000381469727, 16 ] ], "category": [ 138, 140 ] }
2,048
2,048
{ "bbox": [ [ 1380, 952, 13.329999923706055, 13.333000183105469 ], [ 1303.3299560546875, 952, 14.003299713134766, 15.33329963684082 ], [ 1825, 982, 35, 46 ], [ 532, 899, 73, 74 ] ], "cat...
2,048
2,048
{ "bbox": [ [ 1680.260009765625, 794.7369995117188, 88.14869689941406, 92.10679626464844 ], [ 1677.6300048828125, 890.7890014648438, 92.08689880371094, 88.15840148925781 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1709.2099609375, 541.8209838867188, 77.6520004272461, 100.28399658203125 ] ], "category": [ 140 ] }
2,048
2,048
{ "bbox": [ [ 997.3510131835938, 986.7550048828125, 19.86750030517578, 22.51650047302246 ], [ 1060.9300537109375, 988.7420043945312, 19.864700317382812, 19.867300033569336 ], [ 1029.1400146484375, 988.0789794921875, 20.5259990692138...
2,048
2,048
{ "bbox": [ [ 0, 315.80633544921875, 66.15388488769531, 167.13189697265625 ], [ 2011, 878, 15, 27 ], [ 97, 532, 104, 149 ], [ 2027, 880, 14, 25 ], [ 108, 681, 98, ...
2,048
2,048
{ "bbox": [ [ 929.364990234375, 946.8250122070312, 15.873100280761719, 15.87339973449707 ], [ 878.5709838867188, 946.031982421875, 12.698800086975098, 16.666400909423828 ] ], "category": [ 12, 140 ] }
2,048
2,048
{ "bbox": [ [ 818.2540283203125, 966.6669921875, 15.873000144958496, 32.53929901123047 ], [ 1571.4300537109375, 870.635009765625, 30.15730094909668, 30.952299118041992 ], [ 1604.760009765625, 871.4290161132812, 28.573299407958984, ...
2,048
2,048
{ "bbox": [ [ 1345, 997, 73, 76 ] ], "category": [ 111 ] }
2,048
2,048
{ "bbox": [ [ 1352.989990234375, 950.3309936523438, 24.498899459838867, 23.178699493408203 ], [ 1352.3199462890625, 979.469970703125, 28.4778995513916, 26.490299224853516 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1177.3299560546875, 965.3330078125, 20.003299713134766, 21.33370018005371 ], [ 1501.3299560546875, 805.3330078125, 42.66999816894531, 49.33369827270508 ], [ 1650.6700439453125, 853.3330078125, 22.663299560546875, ...
2,048
2,048
{ "bbox": [ [ 1041.27001953125, 871.4290161132812, 30.952199935913086, 30.158300399780273 ], [ 1074.5999755859375, 868.2540283203125, 31.74920082092285, 35.714298248291016 ] ], "category": [ 111, 138 ] }
2,048
2,048
{ "bbox": [ [ 1307.2900390625, 907.947021484375, 38.40760040283203, 39.73509979248047 ] ], "category": [ 51 ] }
2,048
2,048
{ "bbox": [ [ 1812, 1115, 30, 35 ], [ 1788, 999, 27, 31 ], [ 1774, 1114, 28, 33 ] ], "category": [ 108, 138, 138 ] }
2,048
2,048
{ "bbox": [ [ 217.64700317382812, 650.9810180664062, 219.60800170898438, 313.7250061035156 ], [ 213.72500610351562, 970.5880126953125, 221.56900024414062, 249.02000427246094 ] ], "category": [ 51, 218 ] }
2,048
2,048
{ "bbox": [ [ 945, 964, 69, 63 ] ], "category": [ 189 ] }
2,048
2,048
{ "bbox": [ [ 1493.3299560546875, 744, 42.66999816894531, 44 ], [ 1746.6700439453125, 768, 34.66659927368164, 42.66669845581055 ], [ 1625.3299560546875, 756, 40.003299713134766, 44 ], [ 1441.3299560546875, ...
2,048
2,048
{ "bbox": [ [ 840, 1037.3299560546875, 40.000301361083984, 42.66999816894531 ], [ 837.3330078125, 993.3330078125, 42.66699981689453, 42.66699981689453 ] ], "category": [ 29, 112 ] }
2,048
2,048
{ "bbox": [ [ 56.862701416015625, 200, 139.21600341796875, 194.1179962158203 ] ], "category": [ 29 ] }
2,048
2,048
{ "bbox": [ [ 578.218017578125, 790.0989990234375, 46.53450012207031, 54.455501556396484 ], [ 441.5840148925781, 803.9600219726562, 45.544700622558594, 48.515201568603516 ] ], "category": [ 12, 140 ] }
2,048
2,048
{ "bbox": [ [ 1416.6700439453125, 898.4130249023438, 27.77440071105957, 30.95210075378418 ], [ 1335.7099609375, 897.6190185546875, 26.988399505615234, 30.95240020751953 ], [ 1110.3199462890625, 899.2080078125, 27.773700714111328, ...
2,048
2,048
{ "bbox": [ [ 318.6669921875, 946.6669921875, 49.33300018310547, 53.33300018310547 ] ], "category": [ 114 ] }
2,048
2,048
{ "bbox": [ [ 1304, 842, 24, 24 ], [ 1334, 841, 26, 25 ], [ 313, 998, 9, 11 ] ], "category": [ 114, 138, 140 ] }
2,048
2,048
{ "bbox": [ [ 1506, 786, 49, 50 ], [ 1397, 784, 49, 49 ] ], "category": [ 45, 125 ] }
2,048
2,048
{ "bbox": [ [ 1454.6700439453125, 854.6669921875, 49.33000183105469, 49.33330154418945 ] ], "category": [ 103 ] }
2,048
2,048
{ "bbox": [ [ 1900, 887.1290283203125, 21.78219985961914, 31.682899475097656 ], [ 1794.06005859375, 878.218017578125, 26.732099533081055, 30.692899703979492 ] ], "category": [ 7, 10 ] }
2,048
2,048
{ "bbox": [ [ 1170.6400146484375, 938.8060302734375, 18.90730094909668, 18.407899856567383 ], [ 1172.1400146484375, 958.208984375, 18.90220069885254, 19.40290069580078 ] ], "category": [ 117, 138 ] }
2,048
2,048
{ "bbox": [ [ 1208.9100341796875, 848.5150146484375, 35.635501861572266, 44.554298400878906 ], [ 1167.3299560546875, 851.4849853515625, 39.60070037841797, 40.594200134277344 ], [ 1251.489990234375, 855.4459838867188, 35.657699584960...
2,048
2,048
{ "bbox": [ [ 1109, 613, 96, 94 ] ], "category": [ 147 ] }
2,048
2,048
{ "bbox": [ [ 1730.01953125, 1183.453125, 25.64501953125, 23.7197265625 ], [ 1681.0899658203125, 1143.780029296875, 24.382600784301758, 24.87929916381836 ], [ 1706.9599609375, 1142.780029296875, 22.3882999420166, 24.8761997222...
2,048
2,048
{ "bbox": [ [ 474.2569885253906, 743.5640258789062, 66.33709716796875, 63.36669921875 ], [ 1194.06005859375, 850.4949951171875, 33.66279983520508, 38.61389923095703 ], [ 1107.9200439453125, 852.4749755859375, 38.61470031738281, ...
End of preview. Expand in Data Studio

finedet/tt100k — Tsinghua-Tencent 100K (2021) in the unified detection format

Source: official TT100K 2021 archive from cg.cs.tsinghua.edu.cn.

Converted by the finedet project into a unified, AutoTrain-compatible layout: image / width / height / objects{bbox, category} with COCO-format [x, y, w, h] boxes in absolute pixels. Boxes are clipped to the image and empty boxes dropped; category ids are densified per the category tables below.

Box format

objects.bbox follows the COCO convention: [x, y, w, h] in absolute pixels, origin at the image's top-left corner.

License

Original dataset: Tsinghua-Tencent 100K, non-commercial (CC BY-NC). Redistributed non-commercially with attribution. https://cg.cs.tsinghua.edu.cn/traffic-sign/

Example images

Boxes are colored by category: near-transparent fill, opaque outline.

Conversion notes

Full native sign vocabulary kept (long tail included), sorted alphabetically for the ClassLabel. The unannotated-heavy 'other' directory is excluded; polygon/ellipse marks contribute their bbox field only.

Splits

  • test: 3016 images
  • train: 6034 images

Categories

This dataset has 232 categories. The full category table has moved to categories.csv (columns: id, original_id, name; original_id is empty for this dataset).

Training with transformers

The boxes are already in the absolute-pixel COCO [x, y, w, h] format that AutoImageProcessor expects, so fine-tuning a detector needs no bbox conversion:

import torch
from datasets import load_dataset
from transformers import (AutoImageProcessor, AutoModelForObjectDetection,
                          Trainer, TrainingArguments)

ds = load_dataset("finedet/tt100k")
obj_feat = ds["train"].features["objects"]
if hasattr(obj_feat, "feature"):
    obj_feat = obj_feat.feature
cat_feat = obj_feat["category"]
names = (cat_feat.feature if hasattr(cat_feat, "feature") else cat_feat).names

checkpoint = "facebook/detr-resnet-50"
processor = AutoImageProcessor.from_pretrained(checkpoint)
model = AutoModelForObjectDetection.from_pretrained(
    checkpoint,
    id2label=dict(enumerate(names)),
    label2id={n: i for i, n in enumerate(names)},
    ignore_mismatched_sizes=True,
)


def transform(batch):
    images = [img.convert("RGB") for img in batch["image"]]
    annotations = [
        {"image_id": i,
         "annotations": [
             {"bbox": box, "category_id": cat, "area": box[2] * box[3], "iscrowd": 0}
             for box, cat in zip(objs["bbox"], objs["category"])
         ]}
        for i, objs in enumerate(batch["objects"])
    ]
    return processor(images=images, annotations=annotations, return_tensors="pt")


def collate(batch):
    return {"pixel_values": torch.stack([x["pixel_values"] for x in batch]),
            "labels": [x["labels"] for x in batch]}


trainer = Trainer(
    model=model,
    args=TrainingArguments(output_dir="out", per_device_train_batch_size=4,
                           num_train_epochs=10, learning_rate=1e-5,
                           remove_unused_columns=False),
    train_dataset=ds["train"].with_transform(transform),
    data_collator=collate,
)
trainer.train()
Downloads last month
32