ANTsX / ANTsPyNet

Pre-trained models and utilities for deep learning on medical images in Python
https://antspynet.readthedocs.io
Apache License 2.0
201 stars 29 forks source link

Getting deep gray volumes from DKT labeling #143

Open dbrennan44 opened 3 weeks ago

dbrennan44 commented 3 weeks ago

Hi team, Should we use "PropogateLabelsThroughMask" on the DKT labels to get an accurate volume? the labels incompletely cover some structures such as caudate in this image. Any other processing necessary to use the volumes?

Screenshot 2024-10-29 at 11 13 02 AM

Thank you!

cookpa commented 3 weeks ago

Is this from an antspynet DKT call? The labels usually look nicer than this.

I do use PropagateLabelsThroughMask with a moderate "stopping value" eg, 5 voxels. Beware that this can mask poor registrations, especially if you run without the stopping value.

dbrennan44 commented 3 weeks ago

in general I find they are good, but small by maybe a 1-2 voxels in "diameter". Here's another subject:

Screenshot 2024-10-29 at 11 41 13 AM
ntustison commented 3 weeks ago

Hey @dbrennan44 . Ditto to what @cookpa said although I can see this being an output of the antspynet dkt call. I believe I mentioned it but we're revamping certain core networks. In fact, DKT is finishing up today/tomorrow and I'll probably be posting it sometime this week.

dbrennan44 commented 3 weeks ago

Thanks @ntustison - I'll reprocess DKT after the weights are released. I've processed a lot of subjects in this project with the current cortical thickness pipeline weights. Where's the best place to get info about these updates?

ntustison commented 3 weeks ago

So we're reworking our brain extraction, deep atropos, and dkt pipelines. @cookpa is heading up a paper on all this. We don't have any other formal mechanism for advertising new developments but if you check the antsx tutorial, I always post usage right after I update the repo.

I've posted a tentative set of weights that anybody has access to if they update their ANTsPyNet repo but they're a WIP. The new pipelines are

new t1 brain extraction: bext = antspynet.brain_extraction(t1, modality="bw20"). The results are a three tissue segmentation so be sure to look at the return images so you know specify what you're looking for.

new deep atropos: da = antspynet.deep_atropos([t1, None, None])

Cortical thickness can also be based on the new deep atropos if you do: thk = antspynet.cortical_thickness([t1, None, None])

But again, this is all WIP.

cookpa commented 3 weeks ago

It's on my to-do list to get CI and regular releases working for ANTsPyNet, so we can help users keep track of new features better.

I'm also developing antsnetct, which uses BIDS and Templateflow to provide an implementation like antsCorticalThickness and antsLongitudinalCorticalThickness that support antspynet brain extraction and segmentation.

It's also pretty early in development and the dependencies with AntsPy[Net] are fairly rapidly moving right now. But, if you can use containers, I create docker images that have the software and data dependencies installed (see the antsnetct README for more details).