ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Python tips and tricks - 10: Loading images and masks in the right order for semantic segmentation
ฝัง
- เผยแพร่เมื่อ 18 ส.ค. 2024
- This video explains the process of loading images and masks in the right order (in python) for semantic segmentation .
Code generated in the video can be downloaded from here:
github.com/bns...
from this video, I can say that you cover more than needed. Awesome trick saved my time. Thanks a lot sir
You are most welcome
Actually in windows OS this random loading of images takes place. Basically organizing images before working on them is of ample importance. Actually there are several ways of sorting images in the order we want. Your way is absolutely fine and easy. There are other ways. I use the module called 're' and also making use of "lambda" function operator and also use sorted() inbuilt function of python. Also I write a line of code to see the list of files and call it as "fil_list" as follows:-
fil_list = sorted (glob.glob('PATH'),key=lambda x:float (re.findall(("\d+)",x)[number])).
Here the "number" is integer value number which is upto user and its significance is that if you have your files in single folder then you should write number as 0. If files are after some nested folders then number is the exact number of nestings.
For instance our file is having path structure as: 'D:/folder1/folder 2/files", then number = 2.
I like how very technical are your videos in core computer vision tasks. Keep it up same quality.
@Srini- you sort really saved my ass ;)
I am usually working on windows and now I have GPU Ubuntu machine for my massive image analysis. I watched this video and forgot, but when my files were all random and especially- images and corresponding masks! Great thanks to you!
good work🤘👃
Fantastic solution to a frustrating issue. Thanks
Nice tip! A rarely mentioned but, I would suppose, a frequent and confusing problem. Thanks.
Sreeni Sir , your videos are so great and helpful ,,Thank you sir
Very good practicla explanation
Thank u sir , it is very helpful for my research sir
#Thanks, This is very helpful video
I have a data for which I want to apply masks on images. There are 538 images but 152 masks. What to do? How to get masks for others?
Thank You Sir for awesome video
Welcome!
Sir, please make video on Metrics for evaluating 3D medical image segmentation like
Dice Coefficient
Jaccard Coefficient
Area under ROC Curve (one system state)
Cohen Kappa
Volumetric Similarity Coefficient
Hausdorff Distance (optionally in voxel or millimeter)
Average Hausdorff Distance (optionally in voxel or millimeter)
Balanced Average Hausdorff Distance
Mahanabolis Distance
Global Consistency Error
Coefficient of Variation
Probabilistic Distance
and also Classic measures
I would like to make an appreciation about the masks in the remote sensing data which have some singularities. For semantic segmentation problems in satellite images (land use / land cover classification) we usually have a very large image that can be divided into small splits to create a set of smaller images (and with the same dimensions) and their respective masks. . However, ground truth data is usually obtained from field visits where some areas (eg. agricultural parcels) homogeneously distributed throughout the territory are labeled. This means that when creating the masks, not the entire image is labeled, since only some pixels are labeled. In this way we obtain masks with 3 classes of pixels: (1) class 1 (eg. Urban), (2) class 2 (eg. Forestry), (3) class 3 (eg. Agricultural) and (0) not labeled. How can we deal with this problem? Thank you very much for your help and your amazing explanations.
Hello Sir, Great video series. Its really helpful. Thank you for your time. Sir, I have a request. Can you please create a Discord server or Telegram Group where we all can connect and discuss about Image processing, Python, Machine Learning and Deep Learning.
Thank you so much sir!
We can use sort with glob that also works
how can we use pretext task ? for any downstream task
Hello Sir, can u please do a video on image data analysis before training. What all we should consider before selecting an architecture, optimisers, loss etc to train on the data?
great 1 sir
Thanks
Thank you sir
sir how did you create these multicolour masks for these images
hello sir, this great video and documentation but i'm sorry, can i get the data standstone in this practice ?
Thank you!
Hi Srini, again thanks for the wonderful informative session.. if we want to hand annotate the ground truth from images for semantic segmentation, is there any tool?. can you make a video on it.
I've made a few videos on that topic.
th-cam.com/video/KopmsnC8GWI/w-d-xo.html
th-cam.com/video/UUP_omOSKuc/w-d-xo.html
th-cam.com/video/9G6uaoC18WA/w-d-xo.html
Thanks for always sharing these wonderful tips, if you don't mind... what software do you normally use for creating your mask label. I'm working with geological materials and will like to generate label for a very large dataset.
you could use cellpose! if your data includes cells.
Why these codes only work with the dataset you have?
I am trying to do segmentation from colonoscopy images from the kvasir dataset. It does not seem to work and the dataset shape is only giving (808, ) can you help? Of do you have a video about it already? I am getting left behind with your videos. I am a slow learner.
you have to train your model
How do you create a mask for segmentation?
I've recorded a few videos on this topic...
th-cam.com/video/UUP_omOSKuc/w-d-xo.html
th-cam.com/video/9G6uaoC18WA/w-d-xo.html
th-cam.com/video/KopmsnC8GWI/w-d-xo.html
Can you advise how to create masks from a dataset of images?
Have you found how to make the masks?
How to create masks from the image?
Hi Have you found how to make the masks?
how do you create masked image? please reply
You can use any software that allows you to paint on your images to create ground truth and save them as masks. I use APEER as that is what y team at work develops. www.apeer.com
@@DigitalSreeni if i would masking 20.000+ image in the same time, should i use this tools? thanks sir 🤝
Sir please provide link for the dataset for brain tumor and mask images used into this video. will be great help for me. Thanks in advance sir
I am not sure what you mean by brain tumor data set, I do not have any such data sets. The one I used in this video is sandstone and you can download it from here: drive.google.com/file/d/1HWtBaSa-LTyAMgf2uaz1T9o1sTWDBajU/view?usp=sharing
@@DigitalSreeni Thank You sir for Your quick reply. I must tell you that I am the BIGGEST fan of yours. :)
Thanks :)
This whole process is not necessary, insted of using glob.glob('......'), use sorted(glob.glob('......')). This does same job as shown in the video.
Thanks for the tip.
@@DigitalSreeni hi Dr. Sreeni, can you pls make a video on dealing with 3+ dimensional imbalanced data, i.e. (n_images, img_width, img_height, n_classes). I watched your previous video on imbalanced data handling but it's not working on such data types.
While doing multi-class sementic segmentation using U-nets with any kind of backbone, I'm not able to give class_weights since the data type would be 4 dimensional.
Could you pls check on to this issue and make a video for us. It would be helpful.
Thankyou