|
1 |
| -This directory contains 2 Python files. |
2 |
| -Supporting py Scripts |
3 |
| -|_merge.py |
4 |
| -|_delete_extra_Index.py |
| 1 | +# Image Range Merge Scripts |
5 | 2 |
|
| 3 | +This directory contains two Python files that assist in merging and cleaning CSV files after multiple runs of the main Jupyter Notebook. |
6 | 4 |
|
| 5 | +## Python Scripts: |
| 6 | +- **merge.py** |
| 7 | +- **delete_extra_Index.py** |
7 | 8 |
|
8 |
| -These Py scripts only needed to run when the main .ipynb file `main_team_qstar_amazon` ran several times targeting different range of images in the test dataset to extract info resulting in more than 1 CSV files. |
9 |
| -These 2 py files, create one final CSV solution file for the test.csv dataset. |
| 9 | +### Overview |
10 | 10 |
|
| 11 | +These Python scripts are needed only when the main `.ipynb` file (`main_team_qstar_amazon.ipynb`) has been executed several times in batches due to compute limitation, targeting different ranges of images in the test dataset. Multiple executions generate more than one CSV file. These scripts create one final CSV solution file for the `test.csv` dataset. |
11 | 12 |
|
| 13 | +### Script Details |
12 | 14 |
|
13 |
| -`merge.py`: It takes prediction from different output CSV files having different indexes and merges it into one CSV file having an index from 0-131287 (Note: test dataset index starts from 0 to 131287) |
14 |
| -`delete_extra_Index.py`: The below index values were not present in original test dataset but when **merge.py** file run then it creates CSV files containing index 0-131287. So this script deletes these indexes. |
| 15 | +#### `merge.py` |
| 16 | +- **Function**: Merges predictions from multiple output CSV files with different indices into one CSV file. The resulting file contains a continuous index from 0 to 131,287. |
| 17 | +- **Note**: The test dataset index ranges from 0 to 131,287. |
15 | 18 |
|
| 19 | +#### `delete_extra_Index.py` |
| 20 | +- **Function**: After running `merge.py`, some indices not present in the original test dataset are added to the merged CSV file. This script deletes those extra indices. |
16 | 21 |
|
17 |
| -{ |
18 |
| - 4613, 121862, 33803, 33804, 33805, 25115, 25116, 124444, 124445, |
19 |
| - 108082, 108083, 17479, 17480, 3150, 54862, 47185, 18514, 18515, |
20 |
| - 104531, 71253, 88676, 119400, 119401, 34922, 19567, 19568, 21619, |
21 |
| - 21620, 21621, 127615, 120450, 120451, 127110, 43657, 101003, 64168, |
22 |
| - 15540, 15541, 55990, 122084, 69367, 69368, 69369, 15098, 1787, 763, |
23 |
| - 1788, 3842, 34057, 120077, 20238, 20239, 16144, 120078, 124692, |
24 |
| - 124693, 3864, 3865, 8480, 31018, 31019, 15662, 63792, 120112, 120113, |
25 |
| - 2871, 63807, 18752, 64848, 109399, 75610, 75611, 75612, 112480, 121198, |
26 |
| - 16751, 121199, 63346, 63347, 24950, 24951, 62330, 66951, 66952, 1950, |
27 |
| - 36254, 36255, 10662, 86447, 86448, 89529, 89530, 27580, 129532, 73662, |
28 |
| - 128461, 39917, 129531, 58364, 58365, 58366 |
29 |
| - } |
| 22 | + The indices to be deleted are: |
| 23 | + |
| 24 | + ```python |
| 25 | + { |
| 26 | + 4613, 121862, 33803, 33804, 33805, 25115, 25116, 124444, 124445, |
| 27 | + 108082, 108083, 17479, 17480, 3150, 54862, 47185, 18514, 18515, |
| 28 | + 104531, 71253, 88676, 119400, 119401, 34922, 19567, 19568, 21619, |
| 29 | + 21620, 21621, 127615, 120450, 120451, 127110, 43657, 101003, 64168, |
| 30 | + 15540, 15541, 55990, 122084, 69367, 69368, 69369, 15098, 1787, 763, |
| 31 | + 1788, 3842, 34057, 120077, 20238, 20239, 16144, 120078, 124692, |
| 32 | + 124693, 3864, 3865, 8480, 31018, 31019, 15662, 63792, 120112, 120113, |
| 33 | + 2871, 63807, 18752, 64848, 109399, 75610, 75611, 75612, 112480, 121198, |
| 34 | + 16751, 121199, 63346, 63347, 24950, 24951, 62330, 66951, 66952, 1950, |
| 35 | + 36254, 36255, 10662, 86447, 86448, 89529, 89530, 27580, 129532, 73662, |
| 36 | + 128461, 39917, 129531, 58364, 58365, 58366 |
| 37 | + } |
0 commit comments