The grouping implemented during 01:15:00 - 02:15:00 lacks one vital component. Each list of the DICOM file paths returned by glob, has to be sorted first prior to being grouped. Otherwise the elements of each group will be random and hence each subsequent slice will result in a random distance with its previous one inside any given group. This results in an error when each DICOM group is inverted to its corresponding NIfTI file. You can solve this by simply replacing all existing `glob()` with `sorted(glob())`. By including `sorted`, all the file names will be sorted and the grouped slices will have uniform axial-wise distances, preventing errors like the one mentioned above.
I love this course, it is useful I think in at 1:50:57 there is something wrong with the enumerate it should be for j, file in enumerate.... you already use the i in the outer loop.
Very good course. But there is something that I have to mention, I don't think people who came across here to watch an advanced course on medical image processing, need to learn how to install Python or relevant softwares
He sellected few data which I think 10 from volume and 10 from label folders. Please note that the volume and label s you sellected must be the same. for example, if you choose Liver_24_3 volume the label must be Liver_24_3, etc.
It's a possibility but it must be logical and with policies. We will used this planet resources. The totality of science used isnt it's maximum potential. Having longer life of 200 years and slowing aging is more likely to happen but on aspects that our resources would not be depreciated. We will decide on this. How will the world behave and process things will define its own future. Right now, we have the capability and capacity to terraform planets. I just need two nations or several ,if the rest would not do what it should be to fix things or increases instability I'm sorry. That life.
Is there any difference between Monai networks (Resnet, Densenet , Unet ) and their standard versions? I see monai documentation mentioned that their networks are adapted from standard networks but I noticed a huge performance difference when trained 2D hand X-rays on Monai Resnet and Monai Densenet when compared to the ones trained on tensorflow. Could it be because of Monai networks design or transformations ?
Hi, this is helping me a lot in learning MONAI. Btw, could you please tell me how you construct or where to get the Training and Testing folders in the Preprocessing Content, cause I follow the video at the beginning, and the first dataset folders structure is not like that.
One thing not clear to me is what is the purpose of segmentation. If you save this segmentation how can you read it into to python so that the model focuses on features of a specific region of interest?
Hello, I followed your steps one by one but when I import monai the following error occurs:" AttributeError Traceback (most recent call last) Cell In[5], line 1 ----> 1 import monai File D:\Anacoda\envs\liver_segmentation\Lib\site-packages\monai\__init__.py:58 44 excludes = "|".join( 45 [ 46 "(^(monai.handlers))", (...) 54 ] 55 ) 57 # load directory modules only, skip loading individual files ---> 58 load_submodules(sys.modules[__name__], False, exclude_pattern=excludes) 60 # load all modules, this will trigger all export decorations 61 load_submodules(sys.modules[__name__], True, exclude_pattern=excludes) File D:\Anacoda\envs\liver_segmentation\Lib\site-packages\monai\utils\module.py:212, in load_submodules(basemod, load_all, exclude_pattern) 210 try: 211 mod = import_module(name) --> 212 importer.find_module(name).load_module(name) # type: ignore 213 submodules.append(mod) 214 except OptionalImportError: AttributeError: 'FileFinder' object has no attribute 'find_module'" Hope you will reply me as soon as possible so I can complete it
Is there any actual predicting? It seems like the testing loop is just validation and still requires a train and label pair. How would I use the trained model to predict/segment a single scan to get the subsequent segmented output?
first thanku very much for such amazing explanation , but i wanna ask a question the data i have some patients have 20 dicoms slices and aothers have 400 dicoms slices so i wanna divide into groubs like u did so i divide in which each group have 20 dicoms in it or 64 dicoms or what?? to convert each group into nifti file
When i am trying to load the nii gz file, I am getting this error " Error occurred while loading the selected files. Click 'Show details' button and check the application log for more information." Can anyone help me out
hi, can i use this approach for detecting changes over a period of time of same places in satellite imagery.? Ijust want to detect changes in satellite imagery at different time
Training a model with the exact dimensions can not be possible if you have one of these two conditions: Using sliding window: if the image is very large (which 70% the case) and you don't have enough gpu memory then it will be impossible to train the model with the data as it is. Not using sliding window: you will not have the same number of slices for all the cases so you will need to normalize them and also you may have the problem discussed in the first point. So if you have one of these two problems then you can't use the data as it is, and spliting them to 128 or 64 is one method that I proposed. If you have a better idea you can use it as well :)
Hello sir, while doing the code of pre-processing part, i have encountered an issue "FutureWarning: : Class `AddChannel` has been deprecated since version 0.8. please use MetaTensor data type and monai.transforms.EnsureChannelFirst instead. warn_deprecated(obj, msg, warning_category)" After this i have replaced the AddChanneld to EnsureChannelFirstd and also imported the library of MetaTensor. while executing above scripts, my kernel was dead and it doesn't reflecting any thing other than this. Even i dont know where i have to use the metatensor library. Kindly help me resolving this issue sir.
Hi, Yes indeed the function AddChannel is deprecated. There is simple solution for this, you can use a numpy function that adds an axis to your array, you can use it to an axis at the beginning of your array and this will help you use the rest of the code with no problem.
I'm getting an error in "from monai.transforms import( Compose, AddChanneld, LoadImaged, Resized, ToTensord, Spacingd, Orientationd, ScaleIntensityRanged, CropForegroundd," anything with 'd' makes an error !!anyone can help me?
after running up the train file im having this error RuntimeError: Sizes of tensors must match except in dimension 4. Got 64 and 63 (The offending index is 0)
Hey I just had a quick question, can we train a U-net model to detect multiple instances of an object present in a single image or is it good for training models to detection of a single instance per image
Depends on the pattern under the masks in your labels used during training. If it detects that particular pattern at different places in an image, it will produce segmentation instances at all those places.
The amount of mistakes that you made from min. 49 to min 55 is making it hard to understand the difference between passions or whatever it is and dicom slices. I think have a script to refer to when you are reading would be great
Hi everyone,
I hope that the course is useful, if you have any questions please let me know.
Happy learning
could we talk in private , got some questions please
it is very useful for us thank u
what are the pre-requisites for thi course?
@@NacerAbid-l7i Hi
I would love to, but I will be available after the 15th of january.
@@codingjhames You may need some knowledge about python and few understanding of the basics of machine learning
I know a Moroccan voice when I hear it . Happy to see my fellow compatriot delivering a course on this channel.
haha same here , seeing our brothers achieving something make you feel proud especially for us who started from scratch
HHHHHHHHUU tanta ban lik mghribi
I am from Jordan, an I am very happy to see fellow Arab.
He’s Algerian
A 5hr course for one use case !! I like this because it is so comprehensive.
Wow! All my dream courses are being made by this wonderful team! Thank you so much!
The grouping implemented during 01:15:00 - 02:15:00 lacks one vital component. Each list of the DICOM file paths returned by glob, has to be sorted first prior to being grouped. Otherwise the elements of each group will be random and hence each subsequent slice will result in a random distance with its previous one inside any given group. This results in an error when each DICOM group is inverted to its corresponding NIfTI file.
You can solve this by simply replacing all existing `glob()` with `sorted(glob())`. By including `sorted`, all the file names will be sorted and the grouped slices will have uniform axial-wise distances, preventing errors like the one mentioned above.
Thank you! That one worked.
Very exciting topic, thanks for all of your hard work on this channel!!!
Anyone who's confused with the word "paasions", it means "patients". I too was confused due to his moroccan accent.
Wonderful! I’m currently on a journey with AI and ML and starting my masters on March
You finished your master?
he is surely Moroccan , very happy to wlad bladi in this amazing channel!
he is Algerian, but same same. no difference. the important is the course. regards
TbarkaAllah 3lik 🖒🖒🖒
ALLAH iwaf9ek
I love this course, it is useful
I think in at 1:50:57 there is something wrong with the enumerate
it should be for j, file in enumerate....
you already use the i in the outer loop.
Wow! So cool ! 🙏 Thank you !!
Can’t wait to try this !
Very very very competitive... Thanks for letting us know.
Thanks for this course!
What a great topic. Clean explanation, Cool editing, Classy content
Thank you, this is a such a calmly and well explain and thought out course and video, thank you for your help.
I watched the complete video. It was useful for me.
Thank you very much for this video
Wow, thanks for this course.
Very good course. But there is something that I have to mention, I don't think people who came across here to watch an advanced course on medical image processing, need to learn how to install Python or relevant softwares
❤️❤️❤️❤️Love you guys channel
You guys are amazing.
Thank you so much for this course.:)
Thank you so much!! Amazing!!!!!
Thanks for the great job 👍
دانت جامد فششششششخخخ ❤❤❤❤❤❤❤❤❤ معندكش كورسات تانيه؟
Anymore videos for mokhtar?
A great course
Thanks you so much :)
FCC is on steroids this year 2 gr8 vids b2b its awesome keep it up
thank you so much a sat 👍 keep it up
Excellent
awesome!
Wow it's un ! Je t'ai reconnu de ta voix 😅😅 bon courage et bonne réussite
Thousand of likes for your explanations :)
Gracias timely
3:11:19' how you have 4 folders immediately?? we had juste 2 folders ''image train and labels"
He sellected few data which I think 10 from volume and 10 from label folders. Please note that the volume and label s you sellected must be the same. for example, if you choose Liver_24_3 volume the label must be Liver_24_3, etc.
For real, 👏🏻
Thesis wrote in LaTeX:)
what is passions and what is it's relation to slices!!
We can use something like "!rm -r {label} && rm -r {image}" inside the loop to remove the volumes which only have background class.
Interesting
Can you please explain computational chemistry
Hmm, that looks a bit over my head..
Adding it "for later".
please make courses on FMRI data preprocessing and analysis in python
Great videos first
Thank you so much! bro. can you help me to implementing Network datasets for Anomaly detection in python?
What's inside the train/test segmentation and volumes folders? What do I put in them?
It's a possibility but it must be logical and with policies.
We will used this planet resources.
The totality of science used isnt it's maximum potential.
Having longer life of 200 years and slowing aging is more likely to happen but on aspects that our resources would not be depreciated.
We will decide on this.
How will the world behave and process things will define its own future.
Right now, we have the capability and capacity to terraform planets.
I just need two nations or several ,if the rest would not do what it should be to fix things or increases instability
I'm sorry.
That life.
Is there any difference between Monai networks (Resnet, Densenet , Unet ) and their standard versions? I see monai documentation mentioned that their networks are adapted from standard networks but I noticed a huge performance difference when trained 2D hand X-rays on Monai Resnet and Monai Densenet when compared to the ones trained on tensorflow. Could it be because of Monai networks design or transformations ?
3:11:00 How did u get 4 folders can u explain that properly bcz we converted dicoms to nifti we got Images and Labels folder how did u get 4 folders
hello! I have the same problem. Could you solve it? If yes, can you please explain it to me
❤️❤️❤️
Hi, this is helping me a lot in learning MONAI. Btw, could you please tell me how you construct or where to get the Training and Testing folders in the Preprocessing Content, cause I follow the video at the beginning, and the first dataset folders structure is not like that.
exactly i have same question now
Wow
One thing not clear to me is what is the purpose of segmentation. If you save this segmentation how can you read it into to python so that the model focuses on features of a specific region of interest?
Hello, I followed your steps one by one but when I import monai the following error occurs:" AttributeError Traceback (most recent call last)
Cell In[5], line 1
----> 1 import monai
File D:\Anacoda\envs\liver_segmentation\Lib\site-packages\monai\__init__.py:58
44 excludes = "|".join(
45 [
46 "(^(monai.handlers))",
(...)
54 ]
55 )
57 # load directory modules only, skip loading individual files
---> 58 load_submodules(sys.modules[__name__], False, exclude_pattern=excludes)
60 # load all modules, this will trigger all export decorations
61 load_submodules(sys.modules[__name__], True, exclude_pattern=excludes)
File D:\Anacoda\envs\liver_segmentation\Lib\site-packages\monai\utils\module.py:212, in load_submodules(basemod, load_all, exclude_pattern)
210 try:
211 mod = import_module(name)
--> 212 importer.find_module(name).load_module(name) # type: ignore
213 submodules.append(mod)
214 except OptionalImportError:
AttributeError: 'FileFinder' object has no attribute 'find_module'"
Hope you will reply me as soon as possible so I can complete it
Sir as a radiographer is this course important for me
ayyyyyyy jonam
Hi, how to detect acne???
Please provide any tutorial or suggestions
Is there any actual predicting? It seems like the testing loop is just validation and still requires a train and label pair. How would I use the trained model to predict/segment a single scan to get the subsequent segmented output?
Does this code work on a normal laptop, or do I need GPU?
hii the tutorial was nice but how can i get the Data_Train_Test folder
first thanku very much for such amazing explanation , but i wanna ask a question
the data i have some patients have 20 dicoms slices and aothers have 400 dicoms slices so i wanna divide into groubs like u did
so i divide in which each group have 20 dicoms in it or 64 dicoms or what??
to convert each group into nifti file
Hello Monai, can you allow me to put the DICOM files to be analyzed and thus find a medical diagnosis? thank you
When i am trying to load the nii gz file, I am getting this error
" Error occurred while loading the selected files. Click 'Show details' button and check the application log for more information."
Can anyone help me out
Hi, is there an MacOS alternative to CUDA that will work for this project? Metal Performance?
Please upload a flutter Full devlopment
can you show me Folder TestSegmentation?
this code doesnt work in vscode ...
I have run out of superlatives. I'll be back with a thesaurus.
Where can we find pretrained models for this?
I got this error ground truth has different shape ((2, 512, 128, 128, 64)) from input ((2, 512, 768)) when calculating the loss
hi, can i use this approach for detecting changes over a period of time of same places in satellite imagery.? Ijust want to detect changes in satellite imagery at different time
Instead of web cam I wants to use live desktop screen to detect objects, is it possible? And show in desktop rectangle itself?
Which dataset has been actually used here. MONAI or Kaggle one ?
MONAI: drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2
Hello, what is the best compiler for the C ++ language that I can download on my phone so that I can see the execution time of the program?
what do i need to fully understand this course?
python+ai knowledge
Who knows why I cannot add this video to my Favs or playlists pls?
Thanks.
Had anyone already tried this way? Does it work well.
i have integrated intel graphics can i still use cuda
Can I see the Monai's U-net code?
What is the purpose of going from 128 slices to 64 and then storing them in the "dicom_group" folder?
Training a model with the exact dimensions can not be possible if you have one of these two conditions:
Using sliding window: if the image is very large (which 70% the case) and you don't have enough gpu memory then it will be impossible to train the model with the data as it is.
Not using sliding window: you will not have the same number of slices for all the cases so you will need to normalize them and also you may have the problem discussed in the first point.
So if you have one of these two problems then you can't use the data as it is, and spliting them to 128 or 64 is one method that I proposed. If you have a better idea you can use it as well :)
Sir please make Video on making whatsapp clone app using Android studio and Java
Hello sir, while doing the code of pre-processing part, i have encountered an issue "FutureWarning: : Class `AddChannel` has been deprecated since version 0.8. please use MetaTensor data type and monai.transforms.EnsureChannelFirst instead.
warn_deprecated(obj, msg, warning_category)"
After this i have replaced the AddChanneld to EnsureChannelFirstd and also imported the library of MetaTensor. while executing above scripts, my kernel was dead and it doesn't reflecting any thing other than this. Even i dont know where i have to use the metatensor library. Kindly help me resolving this issue sir.
Hi,
Yes indeed the function AddChannel is deprecated. There is simple solution for this, you can use a numpy function that adds an axis to your array, you can use it to an axis at the beginning of your array and this will help you use the rest of the code with no problem.
@@pycad Can you please make a video illustrating this process? I got 4.75 hours in and can't finish
I'm getting an error in "from monai.transforms import(
Compose,
AddChanneld,
LoadImaged,
Resized,
ToTensord,
Spacingd,
Orientationd,
ScaleIntensityRanged,
CropForegroundd,"
anything with 'd' makes an error !!anyone can help me?
Constructive criticism : This could have been a 3 hours video.
dude i am watching at 1.75x, so, i second you
How can I email you?
Or any way to ask you about something if no problem
pls, someone tell me why in "00:52" he talks about niftii to dcm. because he said that monai uses nii(nifti), then why we need dcm?!
You could use dcm, but then you need to convert it to nifty. Because MONAI can only handle nifty.
Hi guys, do you know the gpu specification used on this tutorial? Thanks
I used gtx 1080 with 4 GB of GPU memory.
1:39:09
i think that the prof is from Morocco (yak awla la )
Lala Algerian
Which data is being used here, the Decathlon one or the Kaggle one, someone please help me with this.
Yeah he keeps going back and forth with that. In the end he shows the contents of the Decathlon one, so I'd use that.
I am stuck at 31:09 converting the Kaggle datasets into 3D slicer.... please help. How long does the download take for both liver datasets???
From what I saw that's just a demo, it will be done more clearly later. Downloading took me about 2 hours on wifi.
what is passion???
patient
the only comment that I have for you is : please make the language of Windows "English":))
after running up the train file im having this error
RuntimeError: Sizes of tensors must match except in dimension 4. Got 64 and 63 (The offending index is 0)
hello! i'm getting the same error. have you managed to find any fix for it?
2:42:20 from preporcess import prepare
You keep saying passiants like at 1:17:20 can you tell me what it means
patients
Hey I just had a quick question, can we train a U-net model to detect multiple instances of an object present in a single image or is it good for training models to detection of a single instance per image
Depends on the pattern under the masks in your labels used during training. If it detects that particular pattern at different places in an image, it will produce segmentation instances at all those places.
you can detect multiple instances, However, you have to segment all the instances that you want to detect in the training data
28:41
The amount of mistakes that you made from min. 49 to min 55 is making it hard to understand the difference between passions or whatever it is and dicom slices. I think have a script to refer to when you are reading would be great