230 - Semantic Segmentation of Landcover Dataset using U-Net
Semantic Segmentation of Landcover Dataset by loading images in batches from the drive.
Code generated in the video can be downloaded from here:
https://github.com/bnsreenu/python_for_microscopists/tree/master/230_landcover_dataset_segmentation
For all code:
https://github.com/bnsreenu/python_for_microscopists
Dataset from: https://landcover.ai/
Labels:
0: Unlabeled background
1: Buildings
2: Woodlands
3: Water
You can use any U-net but this code demonstrates the use of pre-trained encoder in the U-net - available as part of segmentation models library.
To install the segmentation models library: pip install -U segmentation-models
If you are running into generic_utils error when loading segmentation models library watch this video to fix it: https://youtu.be/syJZxDtLujs.
Prepare the data first:
1. Read large images and corresponding masks, divide them into smaller patches. And write the patches as images to the local drive.
2. Save only images and masks where masks have some decent amount of labels other than 0. Using blank images with label=0 is a waste of time and may bias the model towards unlabeled pixels.
3. Divide the sorted dataset from above into train and validation datasets.
4. You have to manually move some folders and rename them appropriately if you want to use ImageDataGenerator from keras.
After training, you can use the smooth blending process to segment large images.
Видео 230 - Semantic Segmentation of Landcover Dataset using U-Net канала DigitalSreeni
Code generated in the video can be downloaded from here:
https://github.com/bnsreenu/python_for_microscopists/tree/master/230_landcover_dataset_segmentation
For all code:
https://github.com/bnsreenu/python_for_microscopists
Dataset from: https://landcover.ai/
Labels:
0: Unlabeled background
1: Buildings
2: Woodlands
3: Water
You can use any U-net but this code demonstrates the use of pre-trained encoder in the U-net - available as part of segmentation models library.
To install the segmentation models library: pip install -U segmentation-models
If you are running into generic_utils error when loading segmentation models library watch this video to fix it: https://youtu.be/syJZxDtLujs.
Prepare the data first:
1. Read large images and corresponding masks, divide them into smaller patches. And write the patches as images to the local drive.
2. Save only images and masks where masks have some decent amount of labels other than 0. Using blank images with label=0 is a waste of time and may bias the model towards unlabeled pixels.
3. Divide the sorted dataset from above into train and validation datasets.
4. You have to manually move some folders and rename them appropriately if you want to use ImageDataGenerator from keras.
After training, you can use the smooth blending process to segment large images.
Видео 230 - Semantic Segmentation of Landcover Dataset using U-Net канала DigitalSreeni
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
208 - Multiclass semantic segmentation using U-Net228 - Semantic segmentation of aerial (satellite) imagery using U-net231 - Semantic Segmentation of BraTS2020 - Part 0 - Introduction (and plan)When deep learning meets satellite imageryPython tips and tricks - 5: Extracting patches from large images and masks for semantic segmentation220 - What is the best loss function for semantic segmentation?Pretrained RESNET50 UNET in TensorFlow using Keras | Semantic Segmentation | Deep Learning215 - 3D U-Net for semantic segmentation225 - Attention U-net. What is attention and why is it needed for U-Net?Mask R-CNN Practical ImplementationHow to Train YOLO v5 on a Custom DatasetRunway Lights | AIR REGULATIONS | Best ExplanationData Augmentation for Semantic Segmentation | Deep Learning | Semantic Segmentation73 - Image Segmentation using U-Net - Part1 (What is U-net?)229 - Smooth blending of patches for semantic segmentation of large images (using U-Net)226 - U-Net vs Attention U-Net vs Attention Residual U-Net - should you care?Python tips and tricks - 10: Loading images and masks in the right order for semantic segmentation219 - Understanding U-Net architecture and building it from scratch