Closed stnava closed 2 years ago
Oh, that's not good. Let me see if I can figure it out.
Hey, @stnava , I just ran your code snippet a couple times on a couple different machines (2 macs/python 3.7 and archeozoic/python 3.8) and I'm getting patch shapes of the same size (20, 20). What are you getting?
this should do it more reliably
import ants
import antspynet
msk=ants.image_read("exmsk.nii.gz")
img=ants.image_read("eximg.nii.gz")
ptch = antspynet.extract_image_patches( img, tuple([20,20,20]), mask_image=msk,max_number_of_patches = 1000, return_as_array=False )
for k in range(len(ptch)):
print(ptch[k].shape)
you see things like: (20, 20, 13)
I just ran this on archeozoic - images are in my ~/
just trying to get this application correct - images sorted by quality using a blind image quality method
were you able to reproduce?
Sorry @stnava , just getting breakfast for the kids. I’ll test it in just a sec.
np - am about to head out for surf in 4 degree weather
Oh, man, that’s insane.
Okay, yeah, I was able to reproduce. Interesting that it seems to be only in the 3rd dimension which makes me wonder if it is a dimensionality issue when I modified the code from 2-D to 3-D.
I have to go run an errand (on my OneWheel so it'll kind of be like surfing but in 64 degree weather) but I'll work on it when I get back.
Okay, check this commit which should fix the issue.
that did it - thx! do you have any thoughts on my PR?
Great. During my attempts at debugging, I found a second, unrelated bug so I'm glad you discovered this issue.
I really didn't have any thoughts on the brain extraction part as I just assumed you had discovered a problem with "nobrainer". If its related to quality assessment than I confess I haven't used that much (although I was thinking quite a bit about these models recently with deep flash and using it to see if it is as I suspect that DeepFlash performs relatively better (compared to e.g., FreeSurfer) on higher quality data.
Ok - I have several approaches to quality assessment
Important to note that outlierness , aesthetic quality versus noise versus information scale and other things are all a piece of the puzzle
On Sat, Jan 15, 2022 at 6:24 PM Nick Tustison @.***> wrote:
Great. During my attempts at debugging, I found a second, unrelated bug so I'm glad you discovered this issue.
I really didn't have any thoughts on the brain extraction part as I just assumed you had discovered a problem with "nobrainer". If its related to quality assessment than I confess I haven't used that much (although I was thinking quite a bit about these models recently with deep flash and using it to see if it is as I suspect that DeepFlash performs relatively better (compared to e.g., FreeSurfer) on higher quality data.
— Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsPyNet/issues/46#issuecomment-1013770288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPE7WNLIMMEQU4STOWC2TUWH6ZNANCNFSM5MBAKWMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you modified the open/close state.Message ID: @.***>
--
brian
hi @ntustison - do you know a quick solution to this?
shows patches of variable sizes. when trying to compute consistent patch statistics, this can lead to issues of power. I believe this behavior is different from antsrnet.