深層学習によるフェライト・パーライト組織のセグメンテーションを用いた組織解析
Analysis of ferrite-pearlite microstructure using deep learning segmentation
13 directories, 28 files. ├── 🗁 app │ ├── 🗁 services │ │ ├──
create_mask_image.ipynb │ │ ├──
image_analysis.ipynb │ │ ├──
image_analysis_confirm.ipynb │ │ └──
rough_and_fine_image_analysis.ipynb │ ├──
unet_colab.ipynb │ └──
unet_command.ipynb ├── 🗁 bin │ ├──
docker_setup.sh │ ├──
exec_ipynb.sh │ ├──
formatter.sh │ └──
setup.sh ├── 🗁 config │ ├──
init.py │ └──
setting.py ├── 🗁 data │ └── 🗁 model │ ├── 🗁 SegNet │ └── 🗁 UNet ├── 🗁 module │ ├──
init.py │ ├──
const.py │ ├──
image_loader.py │ └──
tissue_analysis.py ├── 🗁 readme_svg │ ├── docker.svg │ ├── md_file.svg │ ├── python.svg │ ├── terminal_shell.svg │ └── text.svg ├── 🗁 result │ ├── 🗁 services │ │ └──
rough_and_fine_image_analysis_epoch_9px.nbconvert.ipynb │ └──
unet_command_result.nbconvert.ipynb ├──
Dockerfile ├──
README.md ├──
requirements.sample.txt ├──
requirements.txt └──
setup.py
機械学習ライブラリにPyTorchを使用しているためGPUが必須.
/data直下に以下のような構造でimgディレクトリを用意する.
├── 🗁 data │ ├── 🗁 img(`img`には`config/setting.py`内の`const.TRAIN_DIR`の値を入れる) │ │ ├── 🗁 images ─... │ │ └── 🗁 masks ─... │ └─── 🗁 model │ ├── 🗁 SegNet │ └── 🗁 UNet
Build & Running Docker Container
sh bin/docker_setup.sh
コンテナ内に入ったらaliasを登録するために毎回以下を実行.
source bin/setup.sh
/app内のJupyter Notebookを実行するときは、APP_PATHで以下を叩くと実行結果ファイル/result/${file_name}_epoch_${epochs}.nbconvert.ipynbが出力される.
ipynb ${file_name} ${epochs}
※第2引数は省略可
ex. 300epochs分を回す/app/unet_command.ipynbを実行時は以下を実行.
ipynb unet_command 300
出力ファイル:/result/unet_command_epoch_300.nbconvert.ipynb
Check Linter
black ./ --check
Exec Linter
black ./