Comments (4)
我们采用了ANTsPyNet (https://github.com/ANTsX/ANTsPyNet) 这个第三方库进行自动分割。具体我们调用了其antspynet.utilities.deep_atropos。关于这个function的说明可以在这里找:https://antsx.github.io/ANTsPyNet/docs/build/html/utilities.html#applications
from arssr.
吴博士,你好,我尝试去用了antspynet,但是没弄出来,能否提供详细的脚本 和 以及这两个Dice and IoU指标该怎么整?刚读研不太懂,一直学习这篇文章。感谢谢!264x264x264目前我没跑动。我用的下面的代码,我不知道对不对。我用的下采样后的132x132x132的MRI.nii.gz,然后再3Dslicer上查看是这样,颜色跟你论文中的也不一样。
import ants import antspynet file_path = './671855.nii.gz'
image = ants.image_read(file_path)
segmentation_result = antspynet.utilities.deep_atropos(image, do_preprocessing=True)['segmentation_image']
ants.image_write(segmentation_result, "./segmentation_671855.nii.gz")
![image](https://private-user-images.githubusercontent.com/93995539/243184973-e865228e-194d-4e1c-83d0-eedb899ffef4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDM2Nzk2NjMsIm5iZiI6MTcwMzY3OTM2MywicGF0aCI6Ii85Mzk5NTUzOS8yNDMxODQ5NzMtZTg2NTIyOGUtMTk0ZC00ZTFjLTgzZDAtZWVkYjg5OWZmZWY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjI3VDEyMTYwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5ZjExM2UwMDIwNTQ5NWY0OTg1MWU4MDE2ZWE5Y2M1MjFiN2Y4MDA0NDdlYjdjMjNkMzE5MWI0YWZkOTMzN2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vuAKotJhRz3No4BLpbwv4tK7ok2TzIifcu6LGIlDz2s)
from arssr.
我们论文里面的图像是采用itk-snap进行显示的。从你的结果来看,应该是对的。另外关于IOU和dice指标的计算网上有比较多的实现,以下是一个参考代码
import numpy as np
def iou(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
union = np.logical_or(mask1, mask2).sum()
iou_score = intersection / union
return iou_score
def dice_coefficient(mask1, mask2):
intersection = np.logical_and(mask1, mask2).sum()
total = mask1.sum() + mask2.sum()
dice = (2.0 * intersection) / total
return dice
from arssr.
from arssr.
Related Issues (13)
- 能否提供一下测试数据集 HOT 25
- HCP_1200 T1w原始数据 HOT 1
- HCP_1200 t1w 原始数据 HOT 1
- Question about evaluation metric calculation HOT 2
- Which HCP-1200 data set of skull dissection was used in the paper? HOT 1
- 评价指标的代码 HOT 6
- quality metrics HOT 6
- 关于测试集下采样的问题 HOT 2
- some questions
- 自动分割的问题 HOT 16
- Wrong command in README HOT 1
- training loss HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arssr.