All Projects β†’ HasnainRaz β†’ Semsegpipeline

HasnainRaz / Semsegpipeline

Licence: mit
A simpler way of reading and augmenting image segmentation data into TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Semsegpipeline

CAP augmentation
Cut and paste augmentation for object detection and instance segmentation
Stars: ✭ 93 (-26.19%)
Mutual labels:  semantic-segmentation, augmentation
Torchsat
πŸ”₯TorchSat 🌏 is an open-source deep learning framework for satellite imagery analysis based on PyTorch.
Stars: ✭ 261 (+107.14%)
Mutual labels:  data-augmentation, semantic-segmentation
mix3d
Mix3D: Out-of-Context Data Augmentation for 3D Scenes (3DV 2021 Oral)
Stars: ✭ 183 (+45.24%)
Mutual labels:  semantic-segmentation, augmentation
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (+30.16%)
Mutual labels:  data-augmentation, augmentation
Torchio
Medical image preprocessing and augmentation toolkit for deep learning
Stars: ✭ 708 (+461.9%)
Mutual labels:  data-augmentation, augmentation
Deltapy
DeltaPy - Tabular Data Augmentation (by @firmai)
Stars: ✭ 344 (+173.02%)
Mutual labels:  data-augmentation, augmentation
classification
Catalyst.Classification
Stars: ✭ 35 (-72.22%)
Mutual labels:  pipeline, augmentation
Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+647.62%)
Mutual labels:  pipeline, augmentation
Pba
Efficient Learning of Augmentation Policy Schedules
Stars: ✭ 461 (+265.87%)
Mutual labels:  data-augmentation, augmentation
Audiomentations
A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
Stars: ✭ 439 (+248.41%)
Mutual labels:  data-augmentation, augmentation
Segmentation
Catalyst.Segmentation
Stars: ✭ 27 (-78.57%)
Mutual labels:  pipeline, augmentation
Wb color augmenter
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
Stars: ✭ 89 (-29.37%)
Mutual labels:  data-augmentation, semantic-segmentation
Lastbackend
System for containerized apps management. From build to scaling.
Stars: ✭ 1,536 (+1119.05%)
Mutual labels:  pipeline
Refinenet Image Segmentation
a tensorflow implement of refinenet ,RefineNet: Multi-Path Refinement Networks for High-Resolution Semantic Segmentation
Stars: ✭ 122 (-3.17%)
Mutual labels:  semantic-segmentation
All Conv Keras
All Convolutional Network: (https://arxiv.org/abs/1412.6806#) implementation in Keras
Stars: ✭ 115 (-8.73%)
Mutual labels:  data-augmentation
Pytorch Semantic Segmentation
PyTorch for Semantic Segmentation
Stars: ✭ 1,580 (+1153.97%)
Mutual labels:  semantic-segmentation
Refinenet Pytorch
RefineNet-101 VOC in PyTorch
Stars: ✭ 125 (-0.79%)
Mutual labels:  semantic-segmentation
Openvehiclevision
An opensource lib. for vehicle vision applications (written by MATLAB), lane marking detection, road segmentation
Stars: ✭ 120 (-4.76%)
Mutual labels:  semantic-segmentation
Europa
Puppet Container Registry
Stars: ✭ 114 (-9.52%)
Mutual labels:  pipeline
Mmsegmentation
OpenMMLab Semantic Segmentation Toolbox and Benchmark.
Stars: ✭ 2,875 (+2181.75%)
Mutual labels:  semantic-segmentation

SemSeg Pipeline

This is an efficient semantic segmentaiton data input pipeline function for Tensorflow 2.

The pipeline is made to be multithreaded, and uses the tf data API to prerocess the image and segmentation masks with augmentations on the CPU.

Augmentation Examples:

Following shows the same image, loaded with the pipeline, note the different augmentations (birghtness, contrast, saturation, cropping, flips) where the masks are changed accordingly. The example image is taken from the PASCAL VOC dataset.

screenshot 2018-10-16 at 22 56 50

Example use:

from dataloader import DataLoader
import tensorflow as tf
import os

IMAGE_DIR_PATH = 'data/training/images'
MASK_DIR_PATH = 'data/training/masks'
BATCH_SIZE = 4

# create list of PATHS
image_paths = [os.path.join(IMAGE_DIR_PATH, x) for x in os.listdir(IMAGE_DIR_PATH) if x.endswith('.png')]
mask_paths = [os.path.join(MASK_DIR_PATH, x) for x in os.listdir(MASK_DIR_PATH) if x.endswith('.png')]

# Where image_paths[0] = 'data/training/images/image_0.png' 
# And mask_paths[0] = 'data/training/masks/mask_0.png'

# Initialize the dataloader object
dataset = DataLoader(image_paths=image_paths,
                     mask_paths=mask_paths,
                     image_size=(256, 256),
                     crop_percent=0.8,
                     channels=(3, 1),
                     augment=True,
                     compose=False,
                     seed=47)

# Parse the images and masks, and return the data in batches, augmented optionally.
dataset = dataset.data_batch(batch_size=BATCH_SIZE,
                             shuffle=True)

# Initialize the data queue
for image, mask in dataset:      
  # Do whatever you want now

Note

You can optionally also specify a color palette for your masks. If your masks are encoded as RGB images and you want to one hot encode them.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].