Project-MONAI / Project-MONAI/tutorials
Fix (+suggestions) to instantiation of LocalNet in 3D registration tutorial
まだ誰も着手していません。
- 主要言語
- Jupyter Notebook
- スター
- 2.5k
- フォーク
- 803
- 平均マージ
- 6日 22時間
- マージ済み PR(30日)
- 3
説明
The LocalNet in the 3D registration tutorial is currently instantiated as:
model = LocalNet(
spatial_dims=3,
in_channels=2,
out_channels=3,
num_channel_initial=32,
extract_levels=[3],
out_activation=None,
out_kernel_initializer="zeros",
).to(device)
However, the number of extraction levels should be set as extract_levels=[3, 2, 1, 0] in order for the average over feauture maps to be takes over all possible resolutions. With extract_levels=[3] the average is only taken over the coarsest (deepest) feature map, meaning a very coarse displacement field is predicted by the network, impacting performance negatively.
I would further recommend that out_kernel_initializer is set to "kaiming_uniform", as this is the default value in the LocalNet constructor (not "zeros"), and we have seen instabilities during training when using "zeros". An additional proposal would be to use an additional layer in the network, and adjust num_channel_initial, accordingly.
All in all, the instantiation would become:
model = LocalNet(
spatial_dims=3,
in_channels=2,
out_channels=3,
num_channel_initial=16,
extract_levels=[4, 3, 2, 1, 0],
out_activation=None,
out_kernel_initializer="kaiming_uniform",
).to(device)
Or simplified (using defaults):
model = LocalNet(
spatial_dims=3,
in_channels=2,
out_channels=3,
num_channel_initial=16,
extract_levels=[4, 3, 2, 1, 0],
).to(device)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
3d_registration/paired_lung_ct.ipynb を開き、LocalNet のインスタンス化箇所を見つけます。リンクされている regunet_block.py の動作を確認し、提案された設定を使用するか、簡略化されたデフォルト値を使用するかを判断してから、ノートブックを更新し、合意したパラメーターで実行できることを確認するために、関連するチュートリアルのセルを実行します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- jupyter-notebook, python, pytorch
- 領域
- documentation, machine-learning
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100