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

  • @pycad
    @pycad2 жыл бұрын

    Hi everyone, I hope that the course is useful, if you have any questions please let me know. Happy learning

  • @user-km9uo4ft8g

    @user-km9uo4ft8g

    2 жыл бұрын

    could we talk in private , got some questions please

  • @shivakarthikrathod2026

    @shivakarthikrathod2026

    2 жыл бұрын

    it is very useful for us thank u

  • @codingjhames

    @codingjhames

    2 жыл бұрын

    what are the pre-requisites for thi course?

  • @pycad

    @pycad

    2 жыл бұрын

    @@user-km9uo4ft8g Hi I would love to, but I will be available after the 15th of january.

  • @pycad

    @pycad

    2 жыл бұрын

    @@codingjhames You may need some knowledge about python and few understanding of the basics of machine learning

  • @vishaloza6981
    @vishaloza69812 жыл бұрын

    Wow! All my dream courses are being made by this wonderful team! Thank you so much!

  • @pranayp1950
    @pranayp19502 жыл бұрын

    A 5hr course for one use case !! I like this because it is so comprehensive.

  • @rosalieo5045
    @rosalieo50452 жыл бұрын

    Very exciting topic, thanks for all of your hard work on this channel!!!

  • @abdelilahtamesna6981
    @abdelilahtamesna69812 жыл бұрын

    I know a Moroccan voice when I hear it . Happy to see my fellow compatriot delivering a course on this channel.

  • @hatimel01001

    @hatimel01001

    2 жыл бұрын

    haha same here , seeing our brothers achieving something make you feel proud especially for us who started from scratch

  • @badreddinehamid2377

    @badreddinehamid2377

    2 жыл бұрын

    HHHHHHHHUU tanta ban lik mghribi

  • @abdullahyousef3596

    @abdullahyousef3596

    2 жыл бұрын

    I am from Jordan, an I am very happy to see fellow Arab.

  • @WukiQimo

    @WukiQimo

    6 ай бұрын

    He’s Algerian

  • @fred273
    @fred2732 жыл бұрын

    Wow! So cool ! 🙏 Thank you !! Can’t wait to try this !

  • @samsalhi5887
    @samsalhi58872 жыл бұрын

    What a great topic. Clean explanation, Cool editing, Classy content

  • @rehan314
    @rehan3142 жыл бұрын

    Thanks for this course!

  • @abhinavgarg5611
    @abhinavgarg56112 жыл бұрын

    Anyone who's confused with the word "paasions", it means "patients". I too was confused due to his moroccan accent.

  • @gellies998
    @gellies9982 жыл бұрын

    Wonderful! I’m currently on a journey with AI and ML and starting my masters on March

  • @neural_nonsense

    @neural_nonsense

    3 ай бұрын

    You finished your master?

  • @mariamwhb1042
    @mariamwhb10422 жыл бұрын

    TbarkaAllah 3lik 🖒🖒🖒 ALLAH iwaf9ek

  • @apo_dimu
    @apo_dimu11 ай бұрын

    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

    @karthikdani

    6 ай бұрын

    Thank you! That one worked.

  • @explorewithshoaib6682
    @explorewithshoaib66822 жыл бұрын

    Very very very competitive... Thanks for letting us know.

  • @sameepshah3835
    @sameepshah38357 ай бұрын

    Thank you, this is a such a calmly and well explain and thought out course and video, thank you for your help.

  • @taithan8596
    @taithan85962 жыл бұрын

    Wow, thanks for this course.

  • @parsasarosh4079
    @parsasarosh4079 Жыл бұрын

    Thank you so much for this course.:)

  • @butianxiong8093
    @butianxiong80932 жыл бұрын

    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.

  • @samwelogaro9725
    @samwelogaro97252 жыл бұрын

    Thanks for the great job 👍

  • @augustusja
    @augustusja2 жыл бұрын

    You guys are amazing.

  • @ashishgautam5989
    @ashishgautam59895 ай бұрын

    I watched the complete video. It was useful for me.

  • @amineelarif7001
    @amineelarif70012 жыл бұрын

    he is surely Moroccan , very happy to wlad bladi in this amazing channel!

  • @mokhtariali5097

    @mokhtariali5097

    2 жыл бұрын

    he is Algerian, but same same. no difference. the important is the course. regards

  • @ArijitDe92
    @ArijitDe922 жыл бұрын

    Thank you very much for this video

  • @gideononwe8089
    @gideononwe80892 жыл бұрын

    ❤️❤️❤️❤️Love you guys channel

  • @sunnyabraham2703
    @sunnyabraham27032 жыл бұрын

    Thank you so much!! Amazing!!!!!

  • @gustavojuantorena
    @gustavojuantorena2 жыл бұрын

    awesome!

  • @missme2733
    @missme27332 жыл бұрын

    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 ?

  • @killerdroid99
    @killerdroid992 жыл бұрын

    FCC is on steroids this year 2 gr8 vids b2b its awesome keep it up

  • @aybber
    @aybber2 жыл бұрын

    thank you so much a sat 👍 keep it up

  • @valentinacenaj7226
    @valentinacenaj72262 жыл бұрын

    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?

  • @mohd.alsharif
    @mohd.alsharif Жыл бұрын

    A great course

  • @RajabNatshah
    @RajabNatshah2 жыл бұрын

    Thanks you so much :)

  • @ismailsalah1129
    @ismailsalah11292 жыл бұрын

    Wow it's un ! Je t'ai reconnu de ta voix 😅😅 bon courage et bonne réussite

  • @nazeef-ibnu-musa
    @nazeef-ibnu-musa2 жыл бұрын

    Thank you so much! bro. can you help me to implementing Network datasets for Anomaly detection in python?

  • @asserloney6899
    @asserloney6899 Жыл бұрын

    دانت جامد فششششششخخخ ❤❤❤❤❤❤❤❤❤ معندكش كورسات تانيه؟ Anymore videos for mokhtar?

  • @emmanuelntumba4708
    @emmanuelntumba47084 ай бұрын

    3:11:19' how you have 4 folders immediately?? we had juste 2 folders ''image train and labels"

  • @mutiuadegboye3827

    @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.

  • @prabhatkumar4211
    @prabhatkumar42112 жыл бұрын

    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

  • @tamilidiotbox9071
    @tamilidiotbox90712 жыл бұрын

    Can you please explain computational chemistry

  • @carloswinkler6382
    @carloswinkler6382Ай бұрын

    Excellent

  • @seongukpark-cz1dd
    @seongukpark-cz1dd6 ай бұрын

    What's inside the train/test segmentation and volumes folders? What do I put in them?

  • @ProjectileGrommet
    @ProjectileGrommet6 ай бұрын

    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?

  • @axisaligned9799
    @axisaligned97992 жыл бұрын

    Where can we find pretrained models for this?

  • @limbertacha4742
    @limbertacha47429 ай бұрын

    Hello Monai, can you allow me to put the DICOM files to be analyzed and thus find a medical diagnosis? thank you

  • @Asemu_Asuno
    @Asemu_Asuno2 жыл бұрын

    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

    @rasakondapriyanka4219

    2 жыл бұрын

    exactly i have same question now

  • @PANDURANG99
    @PANDURANG9911 ай бұрын

    Instead of web cam I wants to use live desktop screen to detect objects, is it possible? And show in desktop rectangle itself?

  • @brianwskim
    @brianwskim Жыл бұрын

    Hi, is there an MacOS alternative to CUDA that will work for this project? Metal Performance?

  • @sumbomarcus
    @sumbomarcus2 жыл бұрын

    Gracias timely

  • @shivammehta829
    @shivammehta8292 жыл бұрын

    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

  • @mayankpundir4040
    @mayankpundir40402 жыл бұрын

    Hi, how to detect acne??? Please provide any tutorial or suggestions

  • @nadalaban4188
    @nadalaban41882 жыл бұрын

    For real, 👏🏻

  • @abgeenakhan4009
    @abgeenakhan40092 жыл бұрын

    please make courses on FMRI data preprocessing and analysis in python

  • @thepenguincourse
    @thepenguincourse2 жыл бұрын

    Interesting

  • @shaibal_saha
    @shaibal_saha Жыл бұрын

    I got this error ground truth has different shape ((2, 512, 128, 128, 64)) from input ((2, 512, 768)) when calculating the loss

  • @rrh4955
    @rrh49552 жыл бұрын

    Great videos first

  • @azatgaripov2380
    @azatgaripov23802 жыл бұрын

    Who knows why I cannot add this video to my Favs or playlists pls? Thanks.

  • @yuvrajbhati3509
    @yuvrajbhati3509 Жыл бұрын

    hii the tutorial was nice but how can i get the Data_Train_Test folder

  • @parsakhavarinejad
    @parsakhavarinejad9 ай бұрын

    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

  • @tutorAL9618
    @tutorAL9618 Жыл бұрын

    what is passions and what is it's relation to slices!!

  • @lucasantagata4551
    @lucasantagata4551 Жыл бұрын

    Does this code work on a normal laptop, or do I need GPU?

  • @domillima
    @domillima5 ай бұрын

    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?

  • @cyprian.T.
    @cyprian.T.11 ай бұрын

    Sir as a radiographer is this course important for me

  • @riaroy371
    @riaroy371 Жыл бұрын

    i have integrated intel graphics can i still use cuda

  • @eisaalyaqoub5251
    @eisaalyaqoub52512 жыл бұрын

    Thousand of likes for your explanations :)

  • @bunnykhatana
    @bunnykhatana2 жыл бұрын

    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

    @chandanswarit3930

    2 ай бұрын

    hello! i'm getting the same error. have you managed to find any fix for it?

  • @boombellyoungdraco
    @boombellyoungdraco Жыл бұрын

    Had anyone already tried this way? Does it work well.

  • @abdulrhman4209
    @abdulrhman42092 жыл бұрын

    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

  • @chicagogirl9862
    @chicagogirl98628 ай бұрын

    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?

  • @Abdulhameedmhoray
    @Abdulhameedmhoray2 жыл бұрын

    ❤️❤️❤️

  • @mohammedabwwardh6782
    @mohammedabwwardh67822 жыл бұрын

    what do i need to fully understand this course?

  • @QWERTY-gp8fd

    @QWERTY-gp8fd

    2 жыл бұрын

    python+ai knowledge

  • @runal5777
    @runal57772 жыл бұрын

    2:42:20 from preporcess import prepare

  • @AiTrendsInsights
    @AiTrendsInsights10 ай бұрын

    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

    @vailish2601

    6 ай бұрын

    hello! I have the same problem. Could you solve it? If yes, can you please explain it to me

  • @MrChristian331
    @MrChristian331 Жыл бұрын

    What is the purpose of going from 128 slices to 64 and then storing them in the "dicom_group" folder?

  • @pycad

    @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 :)

  • @ssoooooo129
    @ssoooooo12910 ай бұрын

    Can I see the Monai's U-net code?

  • @puranjitsingh1782
    @puranjitsingh17822 жыл бұрын

    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

    @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

    @abhisai594

    2 жыл бұрын

    you can detect multiple instances, However, you have to segment all the instances that you want to detect in the training data

  • @green-media-pl
    @green-media-pl2 жыл бұрын

    Thesis wrote in LaTeX:)

  • @justinbenavidez1985
    @justinbenavidez19856 ай бұрын

    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

    @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.

  • @flioink
    @flioink2 жыл бұрын

    Hmm, that looks a bit over my head.. Adding it "for later".

  • @user-sh7lj2oh9q
    @user-sh7lj2oh9q8 ай бұрын

    Which dataset has been actually used here. MONAI or Kaggle one ?

  • @pycad

    @pycad

    8 ай бұрын

    MONAI: drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2

  • @dukasu
    @dukasu2 жыл бұрын

    this code doesnt work in vscode ...

  • @chicagogirl9862
    @chicagogirl98628 ай бұрын

    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

    @ewoutlagendijk9604

    6 ай бұрын

    You could use dcm, but then you need to convert it to nifty. Because MONAI can only handle nifty.

  • @abhinavkumarmishra5272
    @abhinavkumarmishra5272 Жыл бұрын

    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

    @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

    @ProjectileGrommet

    6 ай бұрын

    @@pycad Can you please make a video illustrating this process? I got 4.75 hours in and can't finish

  • @user-sw5fr4xd5k
    @user-sw5fr4xd5k9 ай бұрын

    Hi guys, do you know the gpu specification used on this tutorial? Thanks

  • @pycad

    @pycad

    8 ай бұрын

    I used gtx 1080 with 4 GB of GPU memory.

  • @salahalsalahi8204
    @salahalsalahi8204 Жыл бұрын

    How can I email you? Or any way to ask you about something if no problem

  • @sameepshah3835
    @sameepshah38356 ай бұрын

    Which data is being used here, the Decathlon one or the Kaggle one, someone please help me with this.

  • @ewoutlagendijk9604

    @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.

  • @sasanmir8122
    @sasanmir81222 жыл бұрын

    ayyyyyyy jonam

  • @rajahaseeb8418
    @rajahaseeb84182 жыл бұрын

    We can use something like "!rm -r {label} && rm -r {image}" inside the loop to remove the volumes which only have background class.

  • @kunalpangare7371
    @kunalpangare73712 жыл бұрын

    Please upload a flutter Full devlopment

  • @admin8784
    @admin87842 жыл бұрын

    Wow

  • @truongtuankhue3156
    @truongtuankhue31562 ай бұрын

    can you show me Folder TestSegmentation?

  • @truongtuankhue3156
    @truongtuankhue31563 ай бұрын

    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

  • @ravihandique2694
    @ravihandique26942 жыл бұрын

    Sir please make Video on making whatsapp clone app using Android studio and Java

  • @ccuny1
    @ccuny12 жыл бұрын

    I have run out of superlatives. I'll be back with a thesaurus.

  • @thegamechanger7157
    @thegamechanger71572 жыл бұрын

    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.

  • @favoritetroll9774
    @favoritetroll97748 ай бұрын

    You keep saying passiants like at 1:17:20 can you tell me what it means

  • @ewoutlagendijk9604

    @ewoutlagendijk9604

    6 ай бұрын

    patients

  • @aminrezaei919
    @aminrezaei919 Жыл бұрын

    what is passion???

  • @lgustavomata

    @lgustavomata

    4 ай бұрын

    patient

  • @badreddinehamid2377
    @badreddinehamid23772 жыл бұрын

    i think that the prof is from Morocco (yak awla la )

  • @lotfibessaad5242

    @lotfibessaad5242

    2 жыл бұрын

    Lala Algerian

  • @dantevale0
    @dantevale02 жыл бұрын

    Constructive criticism : This could have been a 3 hours video.

  • @HafeezUllah

    @HafeezUllah

    2 жыл бұрын

    dude i am watching at 1.75x, so, i second you

  • @chqrds35
    @chqrds357 ай бұрын

    1:39:09

  • @tafarakasparovmhangami2356
    @tafarakasparovmhangami23562 жыл бұрын

    The video is 40 mins old, and some have finished it🤣🤣🤣🤣

  • @palikircis5877

    @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.

  • @VanNguyen-co1dv
    @VanNguyen-co1dvАй бұрын

    28:41

  • @d_lollol524
    @d_lollol5248 ай бұрын

    where to download ( free or paid) medical imaging dataset ?

  • @pycad

    @pycad

    8 ай бұрын

    drive.google.com/drive/folders/1HqEgzS8BV2c7xYNrZdEAnrHk7osJJ--2

Келесі