PyTorch and Monai for AI Healthcare Imaging - Python Machine Learning Course
Learn how to use PyTorch, Monai, and Python for computer vision using machine learning. One practical use-case for artificial intelligence is healthcare imaging. In this course, you will improve your machine learning skills by creating an algorithm for automatic liver segmentation.
✏️ Course from Mohammed El Amine MOKHTARI. Check out his KZread channel: / pycad
💻 Code: github.com/amine0110/Liver-Se...
⭐️ Course Content ⭐️
(0:00:00) Introduction
(0:02:11) What is U-Net
(0:13:21) Software Installation
(0:22:35) Finding the Datasets
(0:35:11) Preparing the Data
(2:49:08) Installing the Packages
(3:03:56) Preprocessing
(3:50:14) Errors you May Face
(4:12:06) Dice Loss
(4:21:44) Weighted Cross Entropy
(4:33:09) The Training Part
(4:50:04) The Testing Part
(5:01:50) Using the GitHub Repository
🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news
Пікірлер: 179
Hi everyone, I hope that the course is useful, if you have any questions please let me know. Happy learning
@user-km9uo4ft8g
2 жыл бұрын
could we talk in private , got some questions please
@shivakarthikrathod2026
2 жыл бұрын
it is very useful for us thank u
@codingjhames
2 жыл бұрын
what are the pre-requisites for thi course?
@pycad
2 жыл бұрын
@@user-km9uo4ft8g Hi I would love to, but I will be available after the 15th of january.
@pycad
2 жыл бұрын
@@codingjhames You may need some knowledge about python and few understanding of the basics of machine learning
Wow! All my dream courses are being made by this wonderful team! Thank you so much!
A 5hr course for one use case !! I like this because it is so comprehensive.
Very exciting topic, thanks for all of your hard work on this channel!!!
I know a Moroccan voice when I hear it . Happy to see my fellow compatriot delivering a course on this channel.
@hatimel01001
2 жыл бұрын
haha same here , seeing our brothers achieving something make you feel proud especially for us who started from scratch
@badreddinehamid2377
2 жыл бұрын
HHHHHHHHUU tanta ban lik mghribi
@abdullahyousef3596
2 жыл бұрын
I am from Jordan, an I am very happy to see fellow Arab.
@WukiQimo
6 ай бұрын
He’s Algerian
Wow! So cool ! 🙏 Thank you !! Can’t wait to try this !
What a great topic. Clean explanation, Cool editing, Classy content
Thanks for this course!
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
@neural_nonsense
3 ай бұрын
You finished your master?
TbarkaAllah 3lik 🖒🖒🖒 ALLAH iwaf9ek
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.
@karthikdani
6 ай бұрын
Thank you! That one worked.
Very very very competitive... Thanks for letting us know.
Thank you, this is a such a calmly and well explain and thought out course and video, thank you for your help.
Wow, thanks for this course.
Thank you so much for this course.:)
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.
Thanks for the great job 👍
You guys are amazing.
I watched the complete video. It was useful for me.
he is surely Moroccan , very happy to wlad bladi in this amazing channel!
@mokhtariali5097
2 жыл бұрын
he is Algerian, but same same. no difference. the important is the course. regards
Thank you very much for this video
❤️❤️❤️❤️Love you guys channel
Thank you so much!! Amazing!!!!!
awesome!
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 ?
FCC is on steroids this year 2 gr8 vids b2b its awesome keep it up
thank you so much a sat 👍 keep it up
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?
A great course
Thanks you so much :)
Wow it's un ! Je t'ai reconnu de ta voix 😅😅 bon courage et bonne réussite
Thank you so much! bro. can you help me to implementing Network datasets for Anomaly detection in python?
دانت جامد فششششششخخخ ❤❤❤❤❤❤❤❤❤ معندكش كورسات تانيه؟ Anymore videos for mokhtar?
3:11:19' how you have 4 folders immediately?? we had juste 2 folders ''image train and labels"
@mutiuadegboye3827
Ай бұрын
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.
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
Can you please explain computational chemistry
Excellent
What's inside the train/test segmentation and volumes folders? What do I put in them?
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?
Where can we find pretrained models for this?
Hello Monai, can you allow me to put the DICOM files to be analyzed and thus find a medical diagnosis? thank you
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.
@rasakondapriyanka4219
2 жыл бұрын
exactly i have same question now
Instead of web cam I wants to use live desktop screen to detect objects, is it possible? And show in desktop rectangle itself?
Hi, is there an MacOS alternative to CUDA that will work for this project? Metal Performance?
Gracias timely
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, how to detect acne??? Please provide any tutorial or suggestions
For real, 👏🏻
please make courses on FMRI data preprocessing and analysis in python
Interesting
I got this error ground truth has different shape ((2, 512, 128, 128, 64)) from input ((2, 512, 768)) when calculating the loss
Great videos first
Who knows why I cannot add this video to my Favs or playlists pls? Thanks.
hii the tutorial was nice but how can i get the Data_Train_Test folder
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
what is passions and what is it's relation to slices!!
Does this code work on a normal laptop, or do I need GPU?
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?
Sir as a radiographer is this course important for me
i have integrated intel graphics can i still use cuda
Thousand of likes for your explanations :)
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)
@chandanswarit3930
2 ай бұрын
hello! i'm getting the same error. have you managed to find any fix for it?
Had anyone already tried this way? Does it work well.
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
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?
❤️❤️❤️
what do i need to fully understand this course?
@QWERTY-gp8fd
2 жыл бұрын
python+ai knowledge
2:42:20 from preporcess import prepare
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
@vailish2601
6 ай бұрын
hello! I have the same problem. Could you solve it? If yes, can you please explain it to me
What is the purpose of going from 128 slices to 64 and then storing them in the "dicom_group" folder?
@pycad
Жыл бұрын
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 :)
Can I see the Monai's U-net code?
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
@go64bit
2 жыл бұрын
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.
@abhisai594
2 жыл бұрын
you can detect multiple instances, However, you have to segment all the instances that you want to detect in the training data
Thesis wrote in LaTeX:)
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???
@ewoutlagendijk9604
6 ай бұрын
From what I saw that's just a demo, it will be done more clearly later. Downloading took me about 2 hours on wifi.
Hmm, that looks a bit over my head.. Adding it "for later".
Which dataset has been actually used here. MONAI or Kaggle one ?
@pycad
8 ай бұрын
MONAI: drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2
this code doesnt work in vscode ...
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?!
@ewoutlagendijk9604
6 ай бұрын
You could use dcm, but then you need to convert it to nifty. Because MONAI can only handle nifty.
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.
@pycad
Жыл бұрын
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.
@ProjectileGrommet
6 ай бұрын
@@pycad Can you please make a video illustrating this process? I got 4.75 hours in and can't finish
Hi guys, do you know the gpu specification used on this tutorial? Thanks
@pycad
8 ай бұрын
I used gtx 1080 with 4 GB of GPU memory.
How can I email you? Or any way to ask you about something if no problem
Which data is being used here, the Decathlon one or the Kaggle one, someone please help me with this.
@ewoutlagendijk9604
6 ай бұрын
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.
ayyyyyyy jonam
We can use something like "!rm -r {label} && rm -r {image}" inside the loop to remove the volumes which only have background class.
Please upload a flutter Full devlopment
Wow
can you show me Folder TestSegmentation?
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 please make Video on making whatsapp clone app using Android studio and Java
I have run out of superlatives. I'll be back with a thesaurus.
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.
You keep saying passiants like at 1:17:20 can you tell me what it means
@ewoutlagendijk9604
6 ай бұрын
patients
what is passion???
@lgustavomata
4 ай бұрын
patient
i think that the prof is from Morocco (yak awla la )
@lotfibessaad5242
2 жыл бұрын
Lala Algerian
Constructive criticism : This could have been a 3 hours video.
@HafeezUllah
2 жыл бұрын
dude i am watching at 1.75x, so, i second you
1:39:09
The video is 40 mins old, and some have finished it🤣🤣🤣🤣
@palikircis5877
2 жыл бұрын
That could probably mean they know the first parts and go directly to the part that they don't know of, which is close to the end part and thus they're done earlier than the usual time.
28:41
where to download ( free or paid) medical imaging dataset ?
@pycad
8 ай бұрын
drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2