No video

77 - Image Segmentation using U-Net - Part 5 (Understanding the data)

  Рет қаралды 81,380

DigitalSreeni

DigitalSreeni

Күн бұрын

In the previous 4 videos of this playlist we learnt about U-Net and how to define it in Python. In this video we'll go through the data set and understand the images that need to be segmented. The data set can be downloaded from here: www.kaggle.com...
The code from this video is available at: github.com/bns...

Пікірлер: 183
@data_quest_studio4944
@data_quest_studio4944 3 жыл бұрын
you are too good sir , subbed your channel with all my 3 mail acc ,folllowed you on git and shared your video in my college group :)
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Thank you very much for subscribing and also spreading the word. I really appreciate it.
@radhikamalhotra7221
@radhikamalhotra7221 3 жыл бұрын
Thanks a lot for the explanation !! You have explained this in a well structured form and I request you to please upload segmentation of the BRATS 2018 Dataset . Hoping to hear from you soon. Thanks !!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
BRATS is on my list but I need to find time to work it out. I will try. Thanks for the suggestion.
@chenjerry1015
@chenjerry1015 2 жыл бұрын
Sometimes line 73 168 177 imshow can't handle bool, and need convert to float or int imshow(np.squeeze(Y_train[image_x]) should be imshow(np.squeeze(Y_train[image_x].astype(float)))
@dickymr1878
@dickymr1878 2 жыл бұрын
very helpfull sir
@Berks3240
@Berks3240 Жыл бұрын
Thanks a lot!
@ramchandracheke
@ramchandracheke 4 жыл бұрын
Thanks Sreeni!
@monagmd
@monagmd 4 жыл бұрын
Many thanks. Great tutorial !
@jacobusstrydom7017
@jacobusstrydom7017 4 жыл бұрын
Thanks, very good explanation of the weird file structure.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You are welcome!
@marcusbranch2100
@marcusbranch2100 4 жыл бұрын
for mask_file in next(os.walk(path + '/masks/'))[2] ^ SyntaxError: invalid syntax help here please, I don't know how to fix this
@chenjerry1015
@chenjerry1015 2 жыл бұрын
Finally, I know what line 163 mean X_train.shape[0] ## = 670 means the number of the sample X_train.shape[0]*0.9 ## = 603 means the 90% of the sample model.predict(X_train[:int(X_train.shape[0]*0.9)] ## use the model to predict the Top 90% of the sample
@rituparnabarman7402
@rituparnabarman7402 3 ай бұрын
Its showing an error: module 'numpy' has no attribute 'zeroes'. What should I do can you help me please?
@aswinimullainadhan4592
@aswinimullainadhan4592 3 жыл бұрын
Hello, great video. I have datasets of lungs without masks (only .png files) and it gives me the following error when I run the program, what should I do? FileNotFoundError: No such file: I'd really appreciate your help. :)
@Nelouafi
@Nelouafi 4 жыл бұрын
Hello I would like to thank you for your very simple and professional videos. I watched your videos on UNET and I would like to know please, how do you make the masks of the images?
@zakariasaidi2191
@zakariasaidi2191 3 жыл бұрын
Hi #NOUR-EDDINE did you find how to obtain masks
@Nelouafi
@Nelouafi 3 жыл бұрын
​@@zakariasaidi2191 using shapefiles + satellite images in arcgis
@temitopeakinboyewa3137
@temitopeakinboyewa3137 2 жыл бұрын
@NOUR-EDDINE ELOUAFI please I would love to know how you created the masks in ArcGIS. I am currently working on something similar.. I have tried the "Exporting training dataset for deep learning" in ArcGIS pro, but the label image I have is just black image. Please I'm am really in need of this. Looking forward to hear from you soon.
@faaalsh8784
@faaalsh8784 2 жыл бұрын
@@temitopeakinboyewa3137 You need to adjust the contrast from 255 to class number. You can use Imagej for that
@temitopeakinboyewa3137
@temitopeakinboyewa3137 2 жыл бұрын
@@faaalsh8784 Thanks so much. I will try this.
@rachelbj3840
@rachelbj3840 2 жыл бұрын
As always, you are the best !!!!
@alexomelak4200
@alexomelak4200 7 ай бұрын
Great tutorial, you are created to simplify the complex. I have one doubt. I was looking your image segmentation tutorial's(histogram based, random walker and u-net) . I am doing my master thesis on kidney stone image and i want to perform segmentation on the image. is their any condition that guide to use specific segmentation techniques? how we choose the specific techniques? thank you.
@akankshamaurya8920
@akankshamaurya8920 4 жыл бұрын
Can you please explain why data type of Y_train is selected as bool? I didnt find this explanation anywhere on the internet
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Because our prediction is binary, either background or cell. Our ground truth training masks have binary values (0 and 255), therefore it makes sense to limit our prediction to binary. Please go ahead and change bool to uint8 to see how the output looks.
@yacine074
@yacine074 4 жыл бұрын
@@DigitalSreeni Sir why loss become negative when we change Y_train dtype and how we can use float dtype instead of bool and getting a positive result.
@CristhianSanchez
@CristhianSanchez 3 жыл бұрын
luckily I reach an answer from you... I pre processed my data before watching your videos, I wrote a code to catch the part of the image only whenever there is a label (to dont use part of the image that is not useful) so all my images and masks have a dimension of 256x256. Should I change the architecture or as you set it would work? because so far I got some errors when running... I know that it may change as your first conv layer starts considering an input data of 128x128.Hilfeee :(
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
If all your images and masks are 256x256 then change the input to architecture to 256. Have a look at the model summary to make sure it makes sense. Another option you have is to cut down your 256x256 images as 4 patches of 128x128 each and use them for training.
@CristhianSanchez
@CristhianSanchez 3 жыл бұрын
@@DigitalSreeni awesome, thank you so much. Greetings from Germany.
@sindhura2233
@sindhura2233 3 жыл бұрын
Thank you so much for such detailed tutorial. I want to use Unet on medical images (.nrrd / dicom formats) with a different number of slices in each image. Also, my segmentation masks have 5 labels. Can you guide me in this regard?
@feridjabri9154
@feridjabri9154 2 жыл бұрын
THANK YOU very much sir/when i run the code i have this error message [ StopIteration] obout this line of code[ ( train_ids = next(os.walk(TRAIN_PATH))[1]) please help
@cheesecake8283
@cheesecake8283 2 жыл бұрын
me too.. same problem T.T
@RAVIMAURYA-sj5fl
@RAVIMAURYA-sj5fl 2 жыл бұрын
Dear sir, it was a wonderful explanation of a complex concept. i would be very thankful if you could explain the code line 145 and 146 i.e. preds_train = model.predict(X_train[:int(X_train.shape[0]*0.9)], verbose=1) preds_val = model.predict(X_train[int(X_train.shape[0]*0.9):], verbose=1) How can we be so sure that only the last 10% were used for validation. Is this a general architecure of tf.keras or I'm missing some basic concept. Kind regards
@unamattina6023
@unamattina6023 Жыл бұрын
I dont undestand this part of the code. What is the meaning of multiplying by 0.9 the with the 128? because X_train.shape[0] == 128?
@rituparnabarman7402
@rituparnabarman7402 3 ай бұрын
Its showing too many indices for array: array is 2-dimentional, but 3 were indexed . In line: img = imread()[]
@basmamohamed8242
@basmamohamed8242 4 жыл бұрын
Please sir, if I have gray scale data and I only have folders that contain images directly without subfolder , How can I change the part of reading data?
@SawsanAAlowa
@SawsanAAlowa 2 жыл бұрын
did you find out how to do that?
@bamitsmanas
@bamitsmanas 3 жыл бұрын
Hello there! I really loved the tutorial series:) I had a question. I hope you can answer that: What exactly does the accuracy signify in the context of image segmentation? Thank you!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Depends on what you are comparing. Image segmentation refers to pixel classification. Therefore, accuracy can be simply a measure between original label vs predicted label at each pixel. But pixel accuracy does not tell you much about imbalanced classes. Therefore, intersection over union may be a better metric. Also look up Dice coefficient.
@bamitsmanas
@bamitsmanas 3 жыл бұрын
@@DigitalSreeni Thank you for your reply sir. I will read more about what you have mentioned!
@almasrurkhan9865
@almasrurkhan9865 3 жыл бұрын
testing the model with an image which is not present in the dataset is just producing a black image. Can you please help me regarding this
@husainsignalwala8196
@husainsignalwala8196 Жыл бұрын
Amazing tutorial. At the end of the code we perform some "sanity" check and predict masks from your training and validation datasets. Works fine. I saved the model using model.save('my_model.h5'). Then loaded the model in a different script using tf.keras.models.load_model() and predict the masks on some other images. That does not work. How do I correctly do this?
@nazilaameli8639
@nazilaameli8639 Жыл бұрын
Great tutorial! Although I found it a bit late but I helped me a lot. just a question, The prediction on my preds_train_t is completely black. what factors can cause this? My training set contains 84 images and their corresponding masks. Is it possible to get the correct prediction by augmenting the images? Thanks
@zeeshanahmed3997
@zeeshanahmed3997 4 жыл бұрын
Hello sir! Can you please show how to plot confusion matrix for this sementic segmentation?!
@bhargavgurrapu8421
@bhargavgurrapu8421 2 жыл бұрын
Sir,I need dataset for this and from kaggle it is not downloading please help me sir
@manueladdae9438
@manueladdae9438 2 жыл бұрын
my spyder IDE cant create a 3 dimentional array. im using the same code and dataset. any suggestions.
@karankamat8531
@karankamat8531 10 ай бұрын
GREAT TUTORIAL!
@dardar9913
@dardar9913 3 жыл бұрын
@16:45 Hi DigitalSreeni, how should I write the code if all my segmented images are compiled into one .png image already?
@parthkadav9176
@parthkadav9176 2 жыл бұрын
Great Tutorial, What if we have one mask/label image for each raw image and not multiple ones like the dataset you refered to in this tutorial, how would the code that loops through the masks look then?
@vamer7373
@vamer7373 2 жыл бұрын
mask_ = imread(path/to your/mask/file)[:,:] mask = np.expand_dims(resize(mask_, (IMG_HEIGHT, IMG_WIDTH), mode='constant',preserve_range=True), axis=-1) Y_train[n] = mask
@afreedmohammad8381
@afreedmohammad8381 4 жыл бұрын
hello sir when i am using next(os.walk('path)) its giving an error of 'STOP ITERATION' I AM LOOKING FORWARD FOR AN ANSWER
@amiralessigue9075
@amiralessigue9075 4 жыл бұрын
having the exact same issue here
@amiralessigue9075
@amiralessigue9075 4 жыл бұрын
fixed this by fixing train_path it was not set properly to 'stage1_train'
@marcusbranch2100
@marcusbranch2100 4 жыл бұрын
@@amiralessigue9075 Hello amira, how did you fix this? Its happening here too and I don't know what to do
@Wolfleiden
@Wolfleiden 3 жыл бұрын
@@marcusbranch2100 May be a little late, but I fixed it by seting the aboslute path to the variables TRAIN_PATH and TEST_PATH... a momentary solution until I find why relative path doesn't work with os.walk...
@oguzcanbekar2536
@oguzcanbekar2536 3 жыл бұрын
I had the same problem, after I change the stage1_train and stage1_test to in my computer folder way it was fixed. I hope it will be help all of us. Thanks.
@DeathlessLife786
@DeathlessLife786 Жыл бұрын
Thank you for your wonderful tutorial sir. where can I get testing and training data set for CT liver image? Can anybody help me? Do you have any tutorial to generate testing and training dataset for CT liver images?
@prithwirajdebbarma308
@prithwirajdebbarma308 4 ай бұрын
Sir my code is not working could you help me out
@nunorodrigues3195
@nunorodrigues3195 4 жыл бұрын
One thing i really cant understand is that `x_train.shape[0]*0.9`. You are taking the first 115 images for prediction? If so, why use such a convoluted way of saying that? Or am i missing something? Best regards.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
In the data set I've used for the video, we have a total 670 images for training. Of those I used 90% (603) for prediction which is where I used the term - X_train[:int(X_train.shape[0]*0.9)]. This just returns the array of 608 images, each 128x128x3. Similarly, X_train[int(X_train.shape[0]*0.9):] returns the remaining 10% data which I assigned to a variable preds_val.
@degumuliye7144
@degumuliye7144 2 жыл бұрын
sir,I am getting this error image_x = random.randint(0, len(train_ids)) imshow(X_train[image_x]) plt.show() imshow(np.squeeze(Y_train[image_x])) plt.show() IndexError: index 0 is out of bounds for axis 0 with size 0
@shuvrodas932
@shuvrodas932 2 жыл бұрын
Sir, how to segment the images when we don't have the mask in our dataset? If the mask is a must then how to create the mask for our particular dataset??
@richardfinney2548
@richardfinney2548 Жыл бұрын
I am also unsure of this
@afolabiowoloye804
@afolabiowoloye804 3 ай бұрын
Nice lecture, thanks. Please how do I contact you?
@tonihullzer1611
@tonihullzer1611 2 жыл бұрын
Why are you squeezing your test image but not your train image in your plotting of a random image and mask for sanity check?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
You can plot train image if you want. I assume if it works for test, it also works for train.
@ghoshizzle
@ghoshizzle Жыл бұрын
Thank you for this tutorial, can you make one about using nnU-Net on a custom dataset? I am unsure how to get started with that tool, although it claims to be out-of-the-box medical image segmentation gold standard
@DigitalSreeni
@DigitalSreeni Жыл бұрын
I have done many videos on using custom data set, please check other videos on my channel.
@chiho7311
@chiho7311 4 жыл бұрын
I love the way you constructed the flow. May I ask if my dataset have 6 classes (6 label pixel), what should be the type of the Y_train? I tried to search but could not find out on online code. Thanks so much
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Since my example performs binary segmentation I encoded my Y values as binary. For multi-class segmentation you can define them as integers 0, 1, 2, .... I've also seen examples where people used colors for each class, for example red (255,0,0), blue (0, 255, 0), green (0, 0, 255).
@adithiajovandy8572
@adithiajovandy8572 4 жыл бұрын
Nah how to do that sir? I still confused how ti make itu 3 classes
@adithiajovandy8572
@adithiajovandy8572 4 жыл бұрын
How to define it :(
@unamattina6023
@unamattina6023 Жыл бұрын
@@adithiajovandy8572 could you find a solution for this? I have the same problem
@SaiKumar-rw2dm
@SaiKumar-rw2dm 2 жыл бұрын
one doubt can we use this code for breast segmentation process ?? to segment fat and breast tissues ??
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Yes, of course. You can use U-net to segment fat and tissue as long as a human can segment them. If even a human cannot tell the difference then the machine has no chance.
@manueladdae9438
@manueladdae9438 2 жыл бұрын
IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed. when try to run till ,,,,,,,,,,,,,,,,,,,,,,,,,,,, print('Resizing training images and masks')
@reshmababuraj1900
@reshmababuraj1900 4 жыл бұрын
Sir, can you explain how to calculate Mean Average Precision for U-Net
@daljeetsinghranawat6359
@daljeetsinghranawat6359 10 ай бұрын
THAN K YOU SO MUCH FOR MAKING THIS CONTENT
@kevinchen3860
@kevinchen3860 3 жыл бұрын
import skimage.transform.resize as resize ImportError: DLL load failed: can not find that model / searched but not solve it
@bhanusrinivaskoppolu4814
@bhanusrinivaskoppolu4814 3 жыл бұрын
Sir, how can I generate mask for my own dataset..???
@SawsanAAlowa
@SawsanAAlowa 2 жыл бұрын
did you find out how?
@bhanusrinivaskoppolu4814
@bhanusrinivaskoppolu4814 2 жыл бұрын
@@SawsanAAlowa yeah I used the label me but only for single object segmentation
@bhanusrinivaskoppolu4814
@bhanusrinivaskoppolu4814 2 жыл бұрын
@@SawsanAAlowa kzfaq.info/get/bejne/q8qCabao1NC9iKM.html I followed this playlist
@SawsanAAlowa
@SawsanAAlowa 2 жыл бұрын
@@bhanusrinivaskoppolu4814 Hi, Thank you for the fast response. does label me provide converting from JSON to MASK as well or only produces the JSON file.
@bhanusrinivaskoppolu4814
@bhanusrinivaskoppolu4814 2 жыл бұрын
@@SawsanAAlowa yeah I later converted the file to png format and used it
@thasweerah
@thasweerah 4 жыл бұрын
sir what of if my image is from satellite must i define it width and height were as it has a default dimension
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
The system doesn't care if it is a microscope image or a satellite image.
@surakshaaithal9484
@surakshaaithal9484 4 жыл бұрын
Can you please suggest me on how the image dimension parameters change for 3D U-Net? I mean what should be the image dimensions to train a 3D U-Net?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Not as easy as changing one little thing. Please search for 3D unet topics on KZfaq so you can do it properly. Unfortunately I do not have any example code to share.
@surakshaaithal9484
@surakshaaithal9484 4 жыл бұрын
@@DigitalSreeni Thank you.
@nofals8170
@nofals8170 3 жыл бұрын
Can you explain this code? I don’t understand mask = np.zeros((IMG_HEIGHT, IMG_WIDTH, 1), dtype=np.bool) for mask_file in next(os.walk(path + '/masks/'))[2]: mask_ = imread(path + '/masks/' + mask_file) mask_ = np.expand_dims(resize(mask_, (IMG_HEIGHT, IMG_WIDTH), mode='constant', preserve_range=True), axis=-1) mask = np.maximum(mask, mask_) Y_train[n] = mask If training data masks over a single image for each images has one mask? What is the change in this code?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
This code is unique to the images used in the video. In this case the masks are such a way each object is represented in a separate image. So if a training image has 100 objects then we have 100 images for masks, each showing a separate object. Therefore, I had to merge all masks into single array. If your mask has all objects your job is easy. Ultimately you know your images better so get them in the right format to comply with Unet input requirements.
@niloymridha1717
@niloymridha1717 3 жыл бұрын
@@DigitalSreeni sir, why it you took "[2]" for mask_file in next(os.walk(path + '/masks/'))[2]
@tanyagarg4998
@tanyagarg4998 4 жыл бұрын
what if there are multiple classes and not 2 classes? the mask for a particular image won't be binary right?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Of course, if you have multiple regions for segmentation then the labeled masks would be multinary (not sure if that is a word). In other words, your masks will have pixel values 0, 1, 2, 3, etc. depending on the number of classes. For binary the pixel values would be wither 0 or 1.
@yacine074
@yacine074 4 жыл бұрын
@@DigitalSreeni so we need to have a ground truth with different pixel value not a binary image is that what you mean
@omrahulpandey
@omrahulpandey 4 жыл бұрын
Sir, How do I apply pre processing operations like smoothing etc on the input image before feeding it to the input layer.... Since its not a single image and rthe data set has many images ....more like adding extra layer in front of input layer to preprocess. Please do help me out on this one.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Just pre-process all images like you normally would do. Read images one by one and apply preprocessing operations such as smoothing and then add them to the dataframe that goes in as input to the neural network. A simple for loop would do the job. Saying that, I do not recommend such operations for deep learning as noise often contains information about your image. If you clean it up or do any image processing operations it may not help and potentially could hurt the results. Of course, it depends on the application but just be careful with any such operations.
@omrahulpandey
@omrahulpandey 4 жыл бұрын
@@DigitalSreeni OK Thank You Sir...it was of great help.
@danielebonaposta4228
@danielebonaposta4228 2 жыл бұрын
great tutorial, very usefull!!!
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Glad it was helpful!
@richardfinney2548
@richardfinney2548 Жыл бұрын
@@DigitalSreeni Hi, What do we do if we don't have masks? Can we create these?
@soumi7356
@soumi7356 3 жыл бұрын
This is for binary classes only. What about multi class segmentation?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Please watch my videos 204 and later for more U-net related videos. For example, this one talks about multiclass U-net. kzfaq.info/get/bejne/jt-IaKt_2tyRqHk.html
@rajeshwarsehdev2318
@rajeshwarsehdev2318 3 жыл бұрын
How to deal with Nifti1Image or nii.gz images? If we can convert those into NumPy array use your approach to deal it is it possible?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Use nibabel library to load nii images. Using this library you can real nii images as numpy arrays and then this approach can be used. I will be releasing new videos on the topic of Brats dataset segmentation so please stay tuned. Also, I hope you watched my latest videos on U-net.
@rajeshwarsehdev2318
@rajeshwarsehdev2318 3 жыл бұрын
@@DigitalSreeni Just Saw, I was looking for this 3D-Unet. You are awesome :)
@victorzhong2890
@victorzhong2890 8 ай бұрын
Thank you so such
@navroopgill7594
@navroopgill7594 3 жыл бұрын
Hi "train_ids= next(os.walk(TRAIN_PATH))[1]" raising stopiteration error for me inspite of using the absolute path to TRAIN_PATH. Any suggestions on how to fix this?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
next will throw that error if it sees no directories to walk through. Try using a for loop instead.... for path, dirs, files in os.walk('your path to directory'): Print(path) Print(dirs) Print(files)
@LesleyPotters
@LesleyPotters 2 жыл бұрын
or try: try: train_ids = next(os.walk(... except StopIteration: pass
@aliveluk8563
@aliveluk8563 4 ай бұрын
Can u give exact code to fix that please
@aliveluk8563
@aliveluk8563 4 ай бұрын
​@@DigitalSreenisir please help me I'm arising same problem what is exact code for it
@abdoubhc7784
@abdoubhc7784 4 жыл бұрын
I want to understand why you expand dimentions to the mask array ??
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
It has been a while since I wrote that code but upon quick look here is what I can say... At this part of the code: mask = np.maximum(mask, mask_) we are taking maximum value at a given pixel between mask and mask_ images. The mask image has a dimension of (128, 128, 1) and mask_ originally has a dimension of (128, 128) so in order to make the dimensions same between both images we add (extend) dimensions of the mask_ image.
@sando_7
@sando_7 3 жыл бұрын
@@DigitalSreeni This helps a lot! Thank you :)
@pavanabs1752
@pavanabs1752 3 жыл бұрын
can we do segmentation without mask binary images but only color images?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
For supervised segmentation you need to provide ground truth for segmentation, for example in the form of masks / labels. You can perform unsupervised segmentation where the system can segment without ground truth; for example using k-means or GMM. You can also perform manual segmentation using image histogram and other image processing operations. The type of image you have and your segmentation needs defines the approach.
@pavanabs1752
@pavanabs1752 3 жыл бұрын
@@DigitalSreeni thank you so much
@felipeaguiar5052
@felipeaguiar5052 Жыл бұрын
Thank you so much.
@منةالرحمن
@منةالرحمن 3 жыл бұрын
thank you verry much sir! please answer me it's an emergency using my own dataset wich contains only images in train and test and no masks or ids i had error with the declaration of X_train
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Not sure what you are trying to do. Why would you only have images and not masks for semantic segmentation using Unet? You need to have masks, otherwise how would the network know what to model your images to?
@SawsanAAlowa
@SawsanAAlowa 2 жыл бұрын
@@DigitalSreeni how can we create the masks. please advise.
@javeriatabraiz2434
@javeriatabraiz2434 Жыл бұрын
@@DigitalSreeni for image reconstruction maybe
@shashireddy7371
@shashireddy7371 3 жыл бұрын
Thanks Sreeni
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You're welcome.
@yacine074
@yacine074 4 жыл бұрын
sir why we can not add dice coeff as loss for this code
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You can use dice coefficient if you want. Normally people use cross entropy because everyone uses it. I am not proficient with dice coefficient but cross entropy has gradients nice to work with back propagation. Please check with any online examples where people used dice; if it isn't common there must be a reason.
@yacine074
@yacine074 4 жыл бұрын
@@DigitalSreeni thanks for your answer sir, dice coeff work only if we change dtype of Y_train from bool to uint or float im not sure but i think crossntroy it's used for binary segmentation ..,what i'm doing it's segmentation of multiple région so when i try to change dtype of Y_train and use dice coeff it's give me bad results. Thanks again for those helpful information.
@yacine074
@yacine074 4 жыл бұрын
it give me a negative loss
@hadeerabdellatif2335
@hadeerabdellatif2335 3 жыл бұрын
please why Y-train is a boolean type array , can any one help and reply .i make it uint8 but not give me results why ?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Y-train is Boolean in my example as it is binary segmentation. You can use other values. In fact, for multiclass segmentation it is customary to assign y labels as 0, 1, 2, 3, .... I’m not sure why it isn’t working for you but technically it is not U-net limitation.
@hadeerabdellatif2335
@hadeerabdellatif2335 3 жыл бұрын
@@DigitalSreeni thanks for your reply, i apply the same code for segmentation of alzheimer disease dataset but not give me results . i can't know the reason .please if you want to help me contact me please .
@shabinaa6407
@shabinaa6407 3 жыл бұрын
What if I have Data base of Images with its class, no mask image then how can I use this ?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Then you do not use U-Net as it is used for semantic segmentation. You seem to be looking for classification as you'd like to classify an entire image.
@shabinaa6407
@shabinaa6407 3 жыл бұрын
@@DigitalSreeni thank you for replying, i am developing two approaches and in 1st approach Entire image is used for classification and for the second approach I have to segment the region of interest and then classification will be done. I want to Use U-Net for all these.
@shabinaa6407
@shabinaa6407 3 жыл бұрын
@@DigitalSreeni I will try to Mask image as it is required to provide ground truth
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Please look into Mask RCNN approach, may be it is fit for your needs!
@shabinaa6407
@shabinaa6407 3 жыл бұрын
@@DigitalSreeni sure! I will go through it, thank you..
@BiswajitJena_chandu
@BiswajitJena_chandu 4 жыл бұрын
Sir thank you for the nice content. But Sir, please do a video for segmentation of BRATS dataset
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Not sure what BRATS data set is? Is it Brain Tumor related? Can you share a link to the data set?
@BiswajitJena_chandu
@BiswajitJena_chandu 3 жыл бұрын
@@DigitalSreeni Sorry Sir for being late to reply, due to pandemic issues. yes, it brain tumor segmentation dataset. Here is the link www.med.upenn.edu/cbica/brats2019/data.html
@BiswajitJena_chandu
@BiswajitJena_chandu 3 жыл бұрын
One more question, what are preprocessing kind of jobs, we can apply to the 2018 data science bowl dataset.
@shaheeralam6540
@shaheeralam6540 4 жыл бұрын
kindly send me whole code of image segmentation that you have done above.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You can find code here: github.com/bnsreenu/python_for_microscopists
@sejadayoubi5402
@sejadayoubi5402 4 жыл бұрын
hey Dear i have a problem with train_ids and train_ test there is some kind of stop iteration error i try to write the same code as yours but i have still this stopiteration problem thanks for your nice Videos
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Not sure how to help as errors seems ambiguous. Did you try running my code as-is? You can find my code on my GitHub page, github.com/bnsreenu/python_for_microscopists
@DevOpsGuy0
@DevOpsGuy0 4 жыл бұрын
Stop iteration occurs when you have not set the training path to stage1_train properly..
@radiator007
@radiator007 3 жыл бұрын
@@DigitalSreeni same problem here
@radiator007
@radiator007 3 жыл бұрын
@@DigitalSreeni same problem here
@radiator007
@radiator007 3 жыл бұрын
same problem here
@bavalpreetsingh4664
@bavalpreetsingh4664 4 жыл бұрын
how the masking work is done?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
A great question!!!! I failed to find a good solution for mask creation. We are developing a solution for that at my work and it will be released soon. Please sign up at www.apeer.com and keep on eye on the upcoming updates. APEER is a free online platform for image processing that you can use using a browser on any device. In any case, we will hopefully have a solution for you in a few weeks.
@whatstop1010
@whatstop1010 4 жыл бұрын
you can use imagej software for manual masking
@shahnewazjubayed8159
@shahnewazjubayed8159 4 жыл бұрын
Hi, Great works! Can you provide the packages list or requirements.txt file for this implementation!!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I'm not sure what you mean. Please watch parts 1 to 4 videos for other details. You can also find my code here: github.com/bnsreenu/python_for_microscopists
@shahnewazjubayed8159
@shahnewazjubayed8159 4 жыл бұрын
@@DigitalSreeni Thanks for responding. I meant for this Unet implementation can you provide the version numbers of all packages !! Like Keras==2.0.0, matplotlib==3.01 likewise... all the packages' version numbers. Anyway thanks again :)
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
@@shahnewazjubayed8159 Oh, I get it. I will have to check, but good point. I work with 3 different systems so I need to find out which one I used for what tutorial. I know, so irresponsible of me but we all learn as we make mistakes :)
@chaitanyagujarathi4318
@chaitanyagujarathi4318 2 жыл бұрын
What does np.squeeze() do ?
@summitjoshi7901
@summitjoshi7901 2 жыл бұрын
image_x = random.randint(0, len(train_ids)) imshow(X_train[image_x]) plt.show() imshow(np.squeeze(Y_train[image_x])) plt.show() this code show me error like this "TypeError: numpy boolean subtract, the `-` operator, is not supported, use the bitwise_xor, the `^` operator, or the logical_xor function instead."
@amal8284
@amal8284 2 жыл бұрын
did you solve it ? I am having same problem
@SawsanAAlowa
@SawsanAAlowa 2 жыл бұрын
---> 20 train_ids = next(os.walk(TRAIN_PATH))[1] 21 test_ids = next(os.walk(TEST_PATH))[1] 22 StopIteration: I receive this error please support. how to fix this issue I am using google colab
@aliveluk8563
@aliveluk8563 4 ай бұрын
I'm seeing exact error did u fix it
The U-Net (actually) explained in 10 minutes
10:31
rupert ai
Рет қаралды 98 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 3,4 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 42 МЛН
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 59 МЛН
Люблю детей 💕💕💕🥰 #aminkavitaminka #aminokka #miminka #дети
00:24
Аминка Витаминка
Рет қаралды 662 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 644 М.
Concerning the Stranded Astronauts
13:27
StarTalk
Рет қаралды 176 М.
PUBLIC - Make You Mine (Put Your Hand in Mine) [The Sequel]
5:19
PUBLICTHEBAND
Рет қаралды 24 МЛН
This is why Deep Learning is really weird.
2:06:38
Machine Learning Street Talk
Рет қаралды 384 М.
Labeling images for semantic segmentation using Label Studio
27:08
DigitalSreeni
Рет қаралды 59 М.
6 Inventions That Are Older Than You Think
14:24
SciShow
Рет қаралды 134 М.
126 - Generative Adversarial Networks (GAN) using keras in python
33:34
Everything about Image Segmentation with UNET visually explained!
10:52
Neural Breakdown with AVB
Рет қаралды 1,3 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 3,4 МЛН