Skip to content

Commit

Permalink
updated readme and procedure in binning
Browse files Browse the repository at this point in the history
  • Loading branch information
svshivapuja committed Jul 26, 2021
1 parent 4cc225c commit 2f3e984
Show file tree
Hide file tree
Showing 64 changed files with 382 additions and 25 deletions.
25 changes: 20 additions & 5 deletions binning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@ This folder contains the method in which the data-splits are created. This proce


Procedure for generating bins:
1. First put your dataset txt in form of ```image_name,image_count``` in a ```.txt```.
2. To start the training run
```python train.py -d ./dataset_txt/Train_nwpu.txt``` .
3. Run the folowing code to finally print out the top two best binning configurations
```python generate_bins.py```.
#### Step 1

First put your dataset txt in form of ```image_name,image_count``` in a ```.txt```. As an example we have provided the txt files for NWPU dataset.

#### Step 2
To start the training run

```
python train.py -d ./dataset_txt/Train_nwpu.txt
```

If you want to get bins on your dataset, change the -d argument to that path itself.

#### Step 3

After training (Step 2) there are best files generated in the ```select_best``` folder. To print out the top two best binning configurations, run the fowllowing code

```
python generate_bins.py
```


The folder structure of the codes in this folder is:
Expand Down
300 changes: 300 additions & 0 deletions binning/dataset_txt/Train_sta.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
73,322,1
38,362,1
205,137,1
234,462,1
54,507,1
145,350,1
70,419,1
91,320,1
143,1297,1
245,486,1
173,404,1
287,878,1
100,373,1
3,262,1
95,557,1
186,1655,1
278,141,1
273,363,1
104,360,1
288,317,1
18,280,1
181,690,1
151,992,1
169,269,1
192,77,1
121,156,1
14,378,1
129,256,1
174,168,1
109,862,1
172,321,1
209,546,1
71,554,1
74,434,1
161,81,1
230,337,1
43,240,1
28,820,1
248,400,1
281,143,1
67,165,1
152,442,1
130,1177,1
93,273,1
185,978,1
271,271,1
261,129,1
294,2007,1
156,728,1
211,188,1
163,456,1
204,549,1
12,554,1
193,123,1
177,578,1
46,799,1
120,2261,1
24,161,1
47,371,1
9,189,1
167,271,1
141,502,1
228,194,1
229,1332,1
136,701,1
250,472,1
15,165,1
148,102,1
190,270,1
112,2673,1
8,145,1
299,2164,1
284,727,1
217,211,1
164,652,1
65,428,1
226,934,1
44,280,1
61,88,1
188,111,1
179,341,1
241,104,1
291,432,1
56,629,1
260,562,1
131,603,1
85,273,1
139,212,1
89,245,1
244,200,1
26,1082,1
194,296,1
254,581,1
128,1456,1
206,311,1
201,445,1
282,460,1
32,237,1
233,312,1
119,216,1
242,1535,1
60,280,1
165,469,1
166,899,1
154,211,1
236,741,1
197,460,1
64,215,1
59,261,1
199,658,1
219,428,1
213,249,1
78,116,1
292,821,1
135,354,1
114,259,1
4,413,1
249,365,1
175,175,1
227,111,1
96,505,1
58,1591,1
146,284,1
275,141,1
92,2650,1
300,388,1
83,589,1
105,148,1
269,190,1
34,963,1
198,351,1
111,723,1
252,255,1
101,298,1
17,287,1
22,509,1
107,121,1
103,43,1
127,142,1
106,584,1
220,306,1
33,264,1
239,89,1
125,66,1
144,777,1
285,217,1
195,243,1
138,423,1
29,624,1
155,413,1
115,288,1
149,2072,1
72,270,1
134,960,1
246,373,1
153,706,1
133,827,1
295,687,1
251,1205,1
276,382,1
116,614,1
231,443,1
289,360,1
51,569,1
123,252,1
41,402,1
81,297,1
55,206,1
19,707,1
48,753,1
224,248,1
7,1652,1
286,195,1
265,74,1
158,321,1
258,820,1
80,204,1
118,1621,1
84,2153,1
257,274,1
76,697,1
90,103,1
187,408,1
30,623,1
259,160,1
235,190,1
53,257,1
176,423,1
68,201,1
168,915,1
274,106,1
272,50,1
63,248,1
86,255,1
20,408,1
147,369,1
297,619,1
255,405,1
108,733,1
216,85,1
45,761,1
82,239,1
222,768,1
253,975,1
262,2197,1
10,920,1
49,494,1
5,585,1
280,249,1
264,109,1
232,38,1
87,631,1
263,658,1
160,225,1
170,754,1
178,1157,1
126,279,1
162,232,1
243,123,1
279,166,1
23,172,1
2,707,1
1,1546,1
203,1957,1
270,263,1
214,378,1
171,1411,1
52,1141,1
42,143,1
21,257,1
238,301,1
218,606,1
202,216,1
132,200,1
31,976,1
223,275,1
6,554,1
267,1162,1
196,580,1
225,476,1
208,536,1
298,1046,1
140,357,1
40,129,1
142,320,1
212,338,1
36,143,1
110,228,1
77,139,1
191,393,1
27,776,1
221,586,1
237,985,1
137,1357,1
277,205,1
57,303,1
159,238,1
247,588,1
122,466,1
207,131,1
200,100,1
113,544,1
62,644,1
184,1573,1
124,752,1
150,989,1
189,498,1
39,411,1
99,433,1
293,385,1
37,417,1
75,297,1
157,33,1
183,600,1
266,342,1
268,3139,1
296,501,1
98,314,1
66,855,1
94,2232,1
290,209,1
13,388,1
102,185,1
180,468,1
256,39,1
11,248,1
25,220,1
240,243,1
215,303,1
210,750,1
97,222,1
182,403,1
35,652,1
283,1429,1
50,2348,1
88,302,1
79,2020,1
69,367,1
117,358,1
16,161,1
1 change: 1 addition & 0 deletions binning/select_best/mln_mu_sig_340.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0.1": 5.83237034893239, "0.2": 5.817199094701501, "0.3": 5.751289482952601, "0.4": 5.806242239993126, "0.5": 5.7125032451884135, "0.6": 5.704243210949717, "0.7": 5.7210481987202595, "0.8": 5.662918952300095, "0.9": 5.614294414926346}
1 change: 1 addition & 0 deletions binning/select_best/mln_mu_sig_681.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0.1": 8.00989411553447, "0.2": 7.4516007856071935, "0.3": 7.317338816061429, "0.4": 7.431819884655929, "0.5": 7.430538137777815, "0.6": 7.252565078621507, "0.7": 7.229253372888923, "0.8": 7.208483354228068, "0.9": 7.045209386841256}
2 changes: 1 addition & 1 deletion binning/test_jsons/test1124.0_0.1.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions binning/test_jsons/test1124.0_0.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"901.0": 1, "70.0": 1, "2031.0": 1, "2422.0": 1, "2359.0": 1, "1641.0": 1, "1438.0": 1, "1048.0": 1, "1406.0": 1, "857.0": 1, "1307.0": 1, "2322.0": 1, "385.0": 1, "1750.0": 1, "343.0": 1, "1693.0": 1, "764.0": 1, "1734.0": 1, "2195.0": 1, "982.0": 1, "1122.0": 1, "947.0": 1, "681.0": 1, "3063.0": 1, "1428.0": 1, "2786.0": 1, "972.0": 1, "1431.0": 1, "1541.0": 1, "2019.0": 1, "931.0": 1, "2138.0": 1, "886.0": 1, "2768.0": 1, "647.0": 1, "1556.0": 1, "899.0": 1, "348.0": 1, "1937.0": 1, "94.0": 1, "1892.0": 1, "1501.0": 1, "2666.0": 1, "381.0": 1, "2239.0": 1, "1168.0": 1, "78.0": 1, "2013.0": 1, "1888.0": 1, "305.0": 1, "2527.0": 1, "311.0": 1, "547.0": 1, "2437.0": 1, "938.0": 1, "1959.0": 1, "549.0": 1, "1437.0": 1, "2966.0": 1, "1564.0": 1, "853.0": 1, "117.0": 1, "2395.0": 1, "1853.0": 1, "1359.0": 1, "2965.0": 1, "1639.0": 1, "1147.0": 1, "2869.0": 1, "976.0": 1, "2503.0": 1, "2964.0": 1, "1659.0": 1, "2428.0": 1, "2145.0": 1, "2870.0": 1, "2791.0": 1, "1067.0": 1, "201.0": 1, "773.0": 1, "115.0": 1, "2901.0": 1, "1933.0": 1, "2137.0": 1, "1361.0": 1, "712.0": 1, "2103.0": 1, "2610.0": 1, "2769.0": 1, "1135.0": 1, "425.0": 1, "920.0": 1, "868.0": 1, "2102.0": 1, "2110.0": 1, "2793.0": 1, "2037.0": 1, "1867.0": 1, "1162.0": 1, "1554.0": 1, "2656.0": 1, "597.0": 1, "1297.0": 1, "2343.0": 1, "2706.0": 1, "3134.0": 1, "2208.0": 1, "2365.0": 1, "2240.0": 1, "1857.0": 1, "482.0": 1, "2994.0": 1, "47.0": 1, "1084.0": 1, "259.0": 2, "1986.0": 1, "2595.0": 1, "367.0": 1, "1873.0": 1, "72.0": 1, "3066.0": 1, "1728.0": 1, "2900.0": 1, "1141.0": 1, "2658.0": 1, "3015.0": 1, "2431.0": 1, "553.0": 1, "2197.0": 1, "2049.0": 1, "2644.0": 1, "2035.0": 1, "1104.0": 1, "71.0": 1, "1149.0": 1, "3131.0": 1, "303.0": 1, "197.0": 1, "1263.0": 1, "2993.0": 1, "1271.0": 1, "804.0": 1, "1068.0": 1, "815.0": 1, "2273.0": 1, "1288.0": 1, "1932.0": 1, "791.0": 1, "1070.0": 1, "2564.0": 1, "1646.0": 1, "2530.0": 1, "1025.0": 1, "2466.0": 1, "1841.0": 1, "2538.0": 1, "3126.0": 1, "1126.0": 1, "697.0": 2, "3013.0": 1, "825.0": 1, "1874.0": 1, "2403.0": 1, "3065.0": 1, "1103.0": 1, "265.0": 1, "1160.0": 1, "1021.0": 1, "2158.0": 1, "1789.0": 1, "2854.0": 1, "2064.0": 1, "879.0": 1, "1467.0": 1, "81.0": 1, "2485.0": 1, "577.0": 1, "695.0": 1, "2907.0": 1, "1553.0": 1, "2916.0": 1, "1518.0": 1, "1372.0": 1, "2985.0": 1, "301.0": 1, "1205.0": 1, "2761.0": 1, "2669.0": 1, "643.0": 1, "3059.0": 1, "1508.0": 1, "1041.0": 1, "2667.0": 1, "2043.0": 1, "2025.0": 1, "180.0": 1, "3038.0": 1, "1366.0": 1, "1272.0": 1, "1974.0": 1, "831.0": 1, "1573.0": 1, "1821.0": 1, "1151.0": 1, "1545.0": 1, "1192.0": 1, "527.0": 1, "254.0": 1, "74.0": 1, "1544.0": 1, "1373.0": 1, "1210.0": 1, "2427.0": 1, "911.0": 1, "1010.0": 1, "645.0": 1, "2220.0": 1, "2651.0": 1, "444.0": 1, "2980.0": 1, "2287.0": 1, "2824.0": 1, "1588.0": 1, "1493.0": 1, "2888.0": 1, "1376.0": 1, "2758.0": 1, "223.0": 1, "2385.0": 1, "2703.0": 1, "3026.0": 1, "1474.0": 1, "2399.0": 1, "232.0": 1, "1253.0": 1, "714.0": 1, "631.0": 1, "2615.0": 1, "1120.0": 1, "1683.0": 1, "2401.0": 1, "1404.0": 1, "344.0": 1, "2384.0": 1, "1324.0": 1, "653.0": 1, "1595.0": 1, "2229.0": 1, "1802.0": 1, "661.0": 1, "1902.0": 1, "1517.0": 1, "2502.0": 1, "1209.0": 1, "2438.0": 1, "2096.0": 1, "2784.0": 1, "832.0": 1, "1452.0": 1, "3130.0": 1, "2046.0": 1, "1829.0": 1, "1757.0": 1, "208.0": 1, "706.0": 1, "2006.0": 1, "708.0": 1, "2135.0": 1, "2404.0": 1, "1763.0": 1, "2249.0": 1, "436.0": 1, "1402.0": 1, "2554.0": 1, "2783.0": 1, "183.0": 1, "188.0": 1, "2228.0": 1, "2133.0": 1, "2456.0": 1, "1476.0": 1, "2785.0": 1, "466.0": 1, "2960.0": 1, "1257.0": 1, "1013.0": 1, "437.0": 1, "652.0": 1, "1509.0": 1, "2444.0": 1, "2586.0": 1, "2546.0": 1, "951.0": 1, "1114.0": 1, "1193.0": 1, "1543.0": 1, "1325.0": 1, "454.0": 1, "3060.0": 1, "1526.0": 1, "1687.0": 1, "2545.0": 1, "3058.0": 1, "2739.0": 1, "767.0": 1, "1468.0": 1, "1249.0": 1, "2243.0": 1, "452.0": 1, "2070.0": 1, "349.0": 1, "2816.0": 1, "151.0": 1, "994.0": 1, "851.0": 1, "941.0": 1, "2045.0": 1, "2124.0": 1, "2933.0": 1, "2267.0": 1, "1936.0": 1, "1259.0": 1, "2906.0": 1, "1919.0": 1, "2717.0": 1, "1972.0": 1, "3000.0": 1, "3116.0": 1, "1812.0": 1, "2676.0": 1, "1463.0": 1, "2755.0": 1, "216.0": 1, "2939.0": 1, "1293.0": 1, "122.0": 1, "2462.0": 1, "2632.0": 1, "1389.0": 1, "2843.0": 1, "182.0": 1, "286.0": 1, "2453.0": 1, "1268.0": 1, "906.0": 1, "2391.0": 1, "2541.0": 1, "271.0": 1, "2473.0": 1, "446.0": 1, "849.0": 1, "2942.0": 1, "253.0": 1, "1169.0": 1, "2157.0": 1, "1855.0": 1, "1783.0": 1, "2329.0": 1, "903.0": 1, "275.0": 1, "1235.0": 1, "244.0": 1, "1189.0": 1, "2015.0": 1, "1465.0": 1, "2126.0": 1, "1443.0": 1, "1995.0": 1, "2099.0": 1, "2496.0": 1, "2979.0": 1, "222.0": 1, "1410.0": 1, "455.0": 1, "196.0": 1, "1817.0": 1, "2417.0": 1, "1667.0": 1, "1455.0": 1, "1507.0": 1, "692.0": 1, "1225.0": 1, "1032.0": 1, "2701.0": 1, "1620.0": 1, "2798.0": 1, "817.0": 1, "52.0": 1, "1280.0": 1, "1176.0": 1, "2776.0": 1, "1006.0": 1, "2059.0": 1, "310.0": 1, "368.0": 1, "131.0": 2, "1771.0": 1, "1231.0": 1, "144.0": 1, "1530.0": 1, "2447.0": 1, "1931.0": 1, "2407.0": 1, "239.0": 1, "2326.0": 1, "609.0": 1, "3082.0": 1, "164.0": 1, "2583.0": 1, "1657.0": 1, "981.0": 1, "2262.0": 1, "2509.0": 1, "2872.0": 1, "3033.0": 1, "2340.0": 1, "449.0": 1, "2833.0": 1, "480.0": 1, "2389.0": 1, "2763.0": 1, "2207.0": 1, "35.0": 1, "824.0": 1, "3032.0": 1, "1035.0": 1, "1448.0": 1, "2646.0": 1, "1076.0": 1, "1091.0": 1, "2036.0": 1, "58.0": 1, "2278.0": 1, "2128.0": 1, "1355.0": 1, "794.0": 1, "326.0": 1, "181.0": 1, "420.0": 1, "1957.0": 1, "1357.0": 1, "2087.0": 1, "1146.0": 1, "2732.0": 1, "2293.0": 1, "2285.0": 1, "2184.0": 1, "658.0": 1, "2245.0": 1, "1731.0": 1, "2433.0": 1, "3062.0": 1, "1445.0": 1, "997.0": 1, "414.0": 1, "2460.0": 1, "2260.0": 1, "2164.0": 1, "3040.0": 1, "463.0": 1, "75.0": 1, "2713.0": 1, "3096.0": 1, "2159.0": 1, "1066.0": 1, "262.0": 1, "2370.0": 1, "1787.0": 1, "373.0": 1, "1848.0": 1, "486.0": 2, "1309.0": 1, "1099.0": 1, "125.0": 1, "775.0": 1, "983.0": 1, "1609.0": 1, "1004.0": 1, "453.0": 1, "2230.0": 1, "2357.0": 1, "1460.0": 1, "2958.0": 1, "1643.0": 1, "866.0": 1, "2386.0": 1, "1675.0": 1, "1118.0": 1, "3105.0": 1, "1332.0": 1, "746.0": 1, "1316.0": 1, "422.0": 1, "2467.0": 1, "1666.0": 1, "282.0": 1, "1920.0": 1, "2643.0": 1, "1822.0": 1, "2673.0": 1, "1362.0": 1, "1940.0": 1, "249.0": 1, "1831.0": 1, "2766.0": 1, "2680.0": 1, "528.0": 1, "2014.0": 1, "665.0": 1, "1515.0": 1, "797.0": 1, "267.0": 1, "3028.0": 1, "1670.0": 1, "1898.0": 1, "2042.0": 1, "1740.0": 1, "1384.0": 1, "1458.0": 1, "1548.0": 1, "411.0": 1, "2558.0": 1, "750.0": 1, "1227.0": 1, "1043.0": 1, "1871.0": 1, "1183.0": 1, "2592.0": 1, "2480.0": 1, "3102.0": 1, "2647.0": 1, "2381.0": 1, "2697.0": 1, "2265.0": 1, "1365.0": 1, "986.0": 1, "1840.0": 1, "1725.0": 1, "2859.0": 1, "1653.0": 1, "1411.0": 1, "2412.0": 1, "2091.0": 1, "353.0": 1, "1353.0": 1, "2944.0": 1, "419.0": 1, "1213.0": 1, "2589.0": 1, "1605.0": 1, "257.0": 1, "1333.0": 1, "1055.0": 1, "146.0": 1, "379.0": 1, "2252.0": 1, "1990.0": 1, "509.0": 1, "2674.0": 1, "585.0": 1, "392.0": 1, "46.0": 1, "2988.0": 1, "3123.0": 1, "2191.0": 1, "533.0": 1, "1984.0": 1, "2543.0": 1, "2694.0": 1, "1862.0": 1, "537.0": 1, "1575.0": 1, "814.0": 1, "1442.0": 1, "2187.0": 1, "199.0": 1, "2815.0": 1, "945.0": 1, "567.0": 1, "3090.0": 1, "962.0": 1, "2452.0": 1, "1934.0": 1, "564.0": 1, "1732.0": 1, "1628.0": 1, "694.0": 1, "399.0": 1, "212.0": 1, "2871.0": 1, "792.0": 1, "3093.0": 1, "2774.0": 1, "1131.0": 1, "334.0": 1, "869.0": 1, "2418.0": 1, "442.0": 1, "1978.0": 1, "611.0": 1, "73.0": 1, "1619.0": 1, "2873.0": 1, "2879.0": 1, "515.0": 1, "1491.0": 1, "318.0": 1, "971.0": 1, "543.0": 1, "285.0": 1, "1638.0": 1, "2470.0": 1, "1584.0": 1, "168.0": 1, "1722.0": 1, "2156.0": 1, "1958.0": 1, "1011.0": 1, "280.0": 1, "3050.0": 1, "1127.0": 1, "438.0": 1, "1839.0": 1, "1801.0": 1, "1896.0": 1, "177.0": 1, "2151.0": 1, "1547.0": 1, "2744.0": 1, "1522.0": 1, "2618.0": 1, "2188.0": 1, "1692.0": 1, "2141.0": 1, "1941.0": 1, "2330.0": 1, "2168.0": 1, "313.0": 1, "1073.0": 1, "1642.0": 1, "77.0": 1, "2233.0": 1, "2147.0": 1, "768.0": 1, "2949.0": 1, "1535.0": 1, "1310.0": 1, "2153.0": 1, "1171.0": 1, "178.0": 1, "3120.0": 1, "2206.0": 1, "2693.0": 1, "137.0": 1, "3125.0": 1, "2393.0": 1, "2237.0": 1, "1849.0": 1, "1281.0": 1, "459.0": 1, "732.0": 1, "1999.0": 1, "1767.0": 1, "2268.0": 1, "1660.0": 1, "1290.0": 1, "345.0": 1, "485.0": 1, "780.0": 1, "946.0": 1, "2730.0": 1, "484.0": 1, "944.0": 1, "833.0": 1, "2077.0": 1, "1471.0": 1, "677.0": 1}
Loading

0 comments on commit 2f3e984

Please sign in to comment.