├── .gitignore ├── README.md ├── __init__.py ├── apply_net.py ├── apply_net_single.py ├── configs ├── exp01.yaml ├── exp02.yaml ├── exp03.yaml ├── exp04.yaml ├── exp05.yaml └── exp06.yaml ├── evaluate_net.py ├── imaterialist ├── __init__.py ├── config.py ├── data │ ├── __init__.py │ ├── dataset_mapper.py │ ├── datasets │ │ ├── __init__.py │ │ ├── coco.py │ │ ├── make_dataset.py │ │ ├── rle_utils.py │ │ ├── rle_utils_old.py │ │ └── test_rle.py │ └── structures.py ├── evaluator.py ├── modeling │ ├── __init__.py │ ├── attributes_rcnn.py │ └── roi_heads │ │ ├── __init__.py │ │ ├── attributes_head.py │ │ └── roi_heads.py └── submission_utils │ ├── resize_longest_edge.py │ └── test_csv_write.py ├── notebooks ├── 01-EDA.ipynb ├── 02-rle_encoder_decoder.ipynb ├── 03-Create-dataset.ipynb ├── 04-Inference.ipynb ├── 05-Training_and_inference_experiments.ipynb ├── 06-Attribute-inference.ipynb ├── 07-Results.ipynb └── InteractiveLabelExplorer.ipynb ├── requirements.txt └── train_net.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | *.egg-info/ 23 | .installed.cfg 24 | *.egg 25 | 26 | # PyInstaller 27 | # Usually these files are written by a python script from a template 28 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 29 | *.manifest 30 | *.spec 31 | results_bengali/ 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | 36 | # Unit test / coverage reports 37 | htmlcov/ 38 | .tox/ 39 | .coverage 40 | .coverage.* 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | *.cover 45 | 46 | # Translations 47 | *.mo 48 | *.pot 49 | 50 | # Django stuff: 51 | *.log 52 | 53 | # Sphinx documentation 54 | docs/_build/ 55 | 56 | # PyBuilder 57 | target/ 58 | 59 | # DotEnv configuration 60 | .env_bengali 61 | 62 | # Database 63 | *.db 64 | *.rdb 65 | 66 | # Pycharm 67 | .idea 68 | 69 | # VS Code 70 | .vscode/ 71 | 72 | # Spyder 73 | .spyproject/ 74 | 75 | # Jupyter NB Checkpoints 76 | .ipynb_checkpoints/ 77 | */.ipynb_checkpoints/ 78 | 79 | # exclude data from source control by default 80 | /home 81 | /data 82 | /data_* 83 | /results_* 84 | /notebooks_* 85 | /output 86 | /iMaterialist2020/configs/* 87 | 88 | # Mac OS-specific storage files 89 | .DS_Store 90 | 91 | # vim 92 | *.swp 93 | *.swo 94 | 95 | # Mypy cache 96 | .mypy_cache/ 97 | 98 | .idea/ 99 | __pycache__ 100 | configs/eai_server_paths.yaml 101 | 102 | # inbox folder for experiment runs should stay local 103 | configs/inbox 104 | 105 | 106 | configs/Archive/ 107 | 108 | models/mobilenet_v2-b0353104.pth 109 | 110 | /depends/depends.zip 111 | /depends/dill.pkl 112 | /depends/wheelhouse 113 | submission.csv 114 | /depends/wheelhouse/ 115 | .env* 116 | .flake8 117 | =2.0.1 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iMaterialist 2020 Kaggle Competition in Detectron2 2 | 3 | In this competition we are tasked to do instance segmentation as well as attribute localization (recognize one or multiple attributes for the instances) on a fashion and apparel dataset. [Here is the link to competition](https://www.kaggle.com/c/imaterialist-fashion-2020-fgvc7/overview). 4 | 5 |
\n", 144 | " | ImageId | \n", 145 | "EncodedPixels | \n", 146 | "Height | \n", 147 | "Width | \n", 148 | "ClassId | \n", 149 | "AttributesIds | \n", 150 | "x0 | \n", 151 | "y0 | \n", 152 | "x1 | \n", 153 | "y1 | \n", 154 | "
---|---|---|---|---|---|---|---|---|---|---|
322 | \n", 159 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 160 | "1131858 13 1131917 36 1133630 42 1133718 40 11... | \n", 161 | "1800 | \n", 162 | "1200 | \n", 163 | "23 | \n", 164 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 165 | "628 | \n", 166 | "1418 | \n", 167 | "692 | \n", 168 | "1583 | \n", 169 | "
307 | \n", 172 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 173 | "212864 7 213881 21 214899 31 215920 35 216943 ... | \n", 174 | "1024 | \n", 175 | "683 | \n", 176 | "23 | \n", 177 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 178 | "207 | \n", 179 | "878 | \n", 180 | "257 | \n", 181 | "961 | \n", 182 | "
136 | \n", 185 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 186 | "179500 6 180515 16 181534 22 182557 25 183579 ... | \n", 187 | "1024 | \n", 188 | "680 | \n", 189 | "10 | \n", 190 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 191 | "175 | \n", 192 | "163 | \n", 193 | "530 | \n", 194 | "956 | \n", 195 | "
370 | \n", 198 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 199 | "5669654 1 5673613 1 5677571 3 5681530 4 568548... | \n", 200 | "3960 | \n", 201 | "2640 | \n", 202 | "31 | \n", 203 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 204 | "1431 | \n", 205 | "1546 | \n", 206 | "2057 | \n", 207 | "2923 | \n", 208 | "
288 | \n", 211 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 212 | "896338 1 897937 4 899537 7 901137 9 902736 13 ... | \n", 213 | "1600 | \n", 214 | "1067 | \n", 215 | "33 | \n", 216 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 217 | "560 | \n", 218 | "282 | \n", 219 | "631 | \n", 220 | "349 | \n", 221 | "
167 | \n", 224 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 225 | "247017 4 248399 11 249780 16 251162 18 252543 ... | \n", 226 | "1383 | \n", 227 | "900 | \n", 228 | "4 | \n", 229 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 230 | "178 | \n", 231 | "337 | \n", 232 | "682 | \n", 233 | "984 | \n", 234 | "
53 | \n", 237 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 238 | "701292 5 703597 15 705903 25 708209 34 710515 ... | \n", 239 | "2310 | \n", 240 | "1536 | \n", 241 | "6 | \n", 242 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 243 | "303 | \n", 244 | "1181 | \n", 245 | "824 | \n", 246 | "2136 | \n", 247 | "
75 | \n", 250 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 251 | "1590945 1 1593942 4 1596939 7 1599938 8 160293... | \n", 252 | "3000 | \n", 253 | "2000 | \n", 254 | "37 | \n", 255 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 256 | "530 | \n", 257 | "929 | \n", 258 | "741 | \n", 259 | "1003 | \n", 260 | "
350 | \n", 263 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 264 | "243646 2 244218 6 244714 16 244743 3 244760 5 ... | \n", 265 | "576 | \n", 266 | "1024 | \n", 267 | "24 | \n", 268 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 269 | "422 | \n", 270 | "217 | \n", 271 | "456 | \n", 272 | "575 | \n", 273 | "
265 | \n", 276 | "/home/julien/data-science/kaggle/imaterialist/... | \n", 277 | "1660869 5 1663151 15 1665436 21 1667723 22 167... | \n", 278 | "2287 | \n", 279 | "1522 | \n", 280 | "33 | \n", 281 | "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... | \n", 282 | "726 | \n", 283 | "499 | \n", 284 | "887 | \n", 285 | "571 | \n", 286 | "