-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,540 changed files
with
8,135 additions
and
894 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- [x] wandb visualization : 상현 | ||
- [ ] annotation 겹친 후에 픽셀 수 : 상현 | ||
- [ ] test csv 만 있으면 시각화 가능하도록 구현 : 상현 |
235 changes: 235 additions & 0 deletions
235
release/data_processing/EDA_vis_tools/csv_visualization.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
337 changes: 337 additions & 0 deletions
337
...cessing/EDA_vis_tools/images_with_masks/.ipynb_checkpoints/json_analisys-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"import numpy as np\n", | ||
"from PIL import Image\n", | ||
"\n", | ||
"from easydict import EasyDict as edict\n", | ||
"import json" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 40, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"common_json_path = \"/opt/ml/segmentation/input/data/\"\n", | ||
"train_all_json_path = common_json_path + \"train_all.json\"\n", | ||
"train_json_path = common_json_path + \"train.json\"\n", | ||
"val_json_path = common_json_path + \"val.json\"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"dict_keys(['info', 'licenses', 'images', 'categories', 'annotations'])" | ||
] | ||
}, | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"with open(train_all_json_path,'r') as f:\n", | ||
" train_all_json = json.load(f)\n", | ||
"\n", | ||
"train_all_json.keys()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"start number ::: 0002 || end number ::: 1259\n", | ||
"total number ::: 949\n", | ||
"start number ::: 0001 || end number ::: 2005\n", | ||
"total number ::: 1561\n", | ||
"start number ::: 0002 || end number ::: 1000\n", | ||
"total number ::: 762\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"train_all_json = edict(train_all_json)\n", | ||
"batch_01, batch_02, batch_03 = [], [], []\n", | ||
"for im in train_all_json.images:\n", | ||
" batch, f_name = im.file_name.split('/')\n", | ||
" if batch == \"batch_01_vt\":\n", | ||
" batch_01.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_02_vt\":\n", | ||
" batch_02.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_03\":\n", | ||
" batch_03.append(f_name.split('.')[0])\n", | ||
" else:\n", | ||
" print(\"unexpected case ::: \", f_name)\n", | ||
"\n", | ||
"batch_01.sort()\n", | ||
"print(\"start number ::: \",batch_01[0],\" || end number ::: \",batch_01[-1])\n", | ||
"print(\"total number ::: \",len(batch_01))\n", | ||
"batch_02.sort()\n", | ||
"print(\"start number ::: \",batch_02[0],\" || end number ::: \",batch_02[-1])\n", | ||
"print(\"total number ::: \",len(batch_02))\n", | ||
"batch_03.sort()\n", | ||
"print(\"start number ::: \",batch_03[0],\" || end number ::: \",batch_03[-1])\n", | ||
"print(\"total number ::: \",len(batch_03))\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 36, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"3272" | ||
] | ||
}, | ||
"execution_count": 36, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"949+1561+762" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 37, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"dict_keys(['info', 'licenses', 'images', 'categories', 'annotations'])" | ||
] | ||
}, | ||
"execution_count": 37, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"with open(train_json_path,'r') as f:\n", | ||
" train_json = json.load(f)\n", | ||
"\n", | ||
"train_json.keys()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 38, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"start number ::: 0003 || end number ::: 1259\n", | ||
"total number ::: 739\n", | ||
"start number ::: 0001 || end number ::: 2005\n", | ||
"total number ::: 1264\n", | ||
"start number ::: 0002 || end number ::: 1000\n", | ||
"total number ::: 614\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"train_json = edict(train_json)\n", | ||
"batch_01, batch_02, batch_03 = [], [], []\n", | ||
"for im in train_json.images:\n", | ||
" batch, f_name = im.file_name.split('/')\n", | ||
" if batch == \"batch_01_vt\":\n", | ||
" batch_01.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_02_vt\":\n", | ||
" batch_02.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_03\":\n", | ||
" batch_03.append(f_name.split('.')[0])\n", | ||
" else:\n", | ||
" print(\"unexpected case ::: \", f_name)\n", | ||
"\n", | ||
"batch_01.sort()\n", | ||
"print(\"start number ::: \",batch_01[0],\" || end number ::: \",batch_01[-1])\n", | ||
"print(\"total number ::: \",len(batch_01))\n", | ||
"batch_02.sort()\n", | ||
"print(\"start number ::: \",batch_02[0],\" || end number ::: \",batch_02[-1])\n", | ||
"print(\"total number ::: \",len(batch_02))\n", | ||
"batch_03.sort()\n", | ||
"print(\"start number ::: \",batch_03[0],\" || end number ::: \",batch_03[-1])\n", | ||
"print(\"total number ::: \",len(batch_03))\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 39, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"2617" | ||
] | ||
}, | ||
"execution_count": 39, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"739+1264+614" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 41, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"dict_keys(['info', 'licenses', 'images', 'categories', 'annotations'])" | ||
] | ||
}, | ||
"execution_count": 41, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"with open(val_json_path,'r') as f:\n", | ||
" val_json = json.load(f)\n", | ||
"\n", | ||
"val_json.keys()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 42, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"start number ::: 0002 || end number ::: 1255\n", | ||
"total number ::: 210\n", | ||
"start number ::: 0002 || end number ::: 1998\n", | ||
"total number ::: 297\n", | ||
"start number ::: 0011 || end number ::: 0995\n", | ||
"total number ::: 148\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"val_json = edict(val_json)\n", | ||
"batch_01, batch_02, batch_03 = [], [], []\n", | ||
"for im in val_json.images:\n", | ||
" batch, f_name = im.file_name.split('/')\n", | ||
" if batch == \"batch_01_vt\":\n", | ||
" batch_01.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_02_vt\":\n", | ||
" batch_02.append(f_name.split('.')[0])\n", | ||
" elif batch == \"batch_03\":\n", | ||
" batch_03.append(f_name.split('.')[0])\n", | ||
" else:\n", | ||
" print(\"unexpected case ::: \", f_name)\n", | ||
"\n", | ||
"batch_01.sort()\n", | ||
"print(\"start number ::: \",batch_01[0],\" || end number ::: \",batch_01[-1])\n", | ||
"print(\"total number ::: \",len(batch_01))\n", | ||
"batch_02.sort()\n", | ||
"print(\"start number ::: \",batch_02[0],\" || end number ::: \",batch_02[-1])\n", | ||
"print(\"total number ::: \",len(batch_02))\n", | ||
"batch_03.sort()\n", | ||
"print(\"start number ::: \",batch_03[0],\" || end number ::: \",batch_03[-1])\n", | ||
"print(\"total number ::: \",len(batch_03))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 43, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"655" | ||
] | ||
}, | ||
"execution_count": 43, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"210+297+148" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 46, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"20.01833740831296\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"print(100*655/3272)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"interpreter": { | ||
"hash": "57de06900712cf18029ae1aa25e596fdd00c5bfb0417441f21d75cec62e8b0cb" | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3.10.0 64-bit ('EDA': conda)", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.0" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Oops, something went wrong.