All Projects → hassony2 → Torch_videovision

hassony2 / Torch_videovision

Licence: gpl-3.0
Transforms for video datasets in pytorch

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Torch videovision

Grand
Source code and dataset of the NeurIPS 2020 paper "Graph Random Neural Network for Semi-Supervised Learning on Graphs"
Stars: ✭ 75 (-56.9%)
Mutual labels:  data-augmentation
All Conv Keras
All Convolutional Network: (https://arxiv.org/abs/1412.6806#) implementation in Keras
Stars: ✭ 115 (-33.91%)
Mutual labels:  data-augmentation
Copy Paste Aug
Copy-paste augmentation for segmentation and detection tasks
Stars: ✭ 132 (-24.14%)
Mutual labels:  data-augmentation
Synthetic Occlusion
Synthetic Occlusion Augmentation
Stars: ✭ 88 (-49.43%)
Mutual labels:  data-augmentation
Fcn train
The code includes all the file that you need in the training stage for FCN
Stars: ✭ 104 (-40.23%)
Mutual labels:  data-augmentation
Semsegpipeline
A simpler way of reading and augmenting image segmentation data into TensorFlow
Stars: ✭ 126 (-27.59%)
Mutual labels:  data-augmentation
Data generator object detection 2d
A data generator for 2D object detection
Stars: ✭ 73 (-58.05%)
Mutual labels:  data-augmentation
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (-5.75%)
Mutual labels:  data-augmentation
What I Have Read
Paper Lists, Notes and Slides, Focus on NLP. For summarization, please refer to https://github.com/xcfcode/Summarization-Papers
Stars: ✭ 110 (-36.78%)
Mutual labels:  data-augmentation
Torchsample
High-Level Training, Data Augmentation, and Utilities for Pytorch
Stars: ✭ 1,731 (+894.83%)
Mutual labels:  data-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 (-48.85%)
Mutual labels:  data-augmentation
Cutmix
a Ready-to-use PyTorch Extension of Unofficial CutMix Implementations with more improved performance.
Stars: ✭ 99 (-43.1%)
Mutual labels:  data-augmentation
Unsupervised Data Augmentation
Unofficial PyTorch Implementation of Unsupervised Data Augmentation.
Stars: ✭ 127 (-27.01%)
Mutual labels:  data-augmentation
Pose Adv Aug
Code for "Jointly Optimize Data Augmentation and Network Training: Adversarial Data Augmentation in Human Pose Estimation" (CVPR 2018)
Stars: ✭ 83 (-52.3%)
Mutual labels:  data-augmentation
Evoskeleton
Official project website for the CVPR 2020 paper (Oral Presentation) "Cascaded Deep Monocular 3D Human Pose Estimation With Evolutionary Training Data"
Stars: ✭ 154 (-11.49%)
Mutual labels:  data-augmentation
Pedestrian Synthesis Gan
Pedestrian-Synthesis-GAN: Generating Pedestrian Data in Real Scene and Beyond
Stars: ✭ 73 (-58.05%)
Mutual labels:  data-augmentation
Aaltd18
Data augmentation using synthetic data for time series classification with deep residual networks
Stars: ✭ 124 (-28.74%)
Mutual labels:  data-augmentation
Stylealign
[ICCV 2019]Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Transition
Stars: ✭ 172 (-1.15%)
Mutual labels:  data-augmentation
Imagecorruptions
Python package to corrupt arbitrary images.
Stars: ✭ 158 (-9.2%)
Mutual labels:  data-augmentation
Ghost Free Shadow Removal
[AAAI 2020] Towards Ghost-free Shadow Removal via Dual Hierarchical Aggregation Network and Shadow Matting GAN
Stars: ✭ 133 (-23.56%)
Mutual labels:  data-augmentation

torch_videovision - Basic Video transforms for Pytorch

This repository implements several basic data-augmentation transforms for pytorch video inputs

transform_image

The idea was to produce the equivalent of torchvision transforms for video inputs. (The code is therefore widely based on the code from this repository :) )

The basic paradigm is that dataloading should produce videoclips as a list of PIL Images or numpy.ndarrays (in format as read by opencv).

Several transforms are then provided in video_transforms.

Each transform iterates on all the images in the list and applies the wanted augmentation.

We then have to convert those inputs to torch tensors. This can be produced by the volume_transform.ClipToTensor class, which produces a video volume in format (n_channels, n_images, height, width) where n_channels = 3 in case of images.

When randomness is involved, the same random parameters (crop size, scale size, rotation angle,...) are applied to all the frames.

Transforms can be composed just as in torchvision with video_transforms.Compose.

To quickly see a demo of the transformations, run python testtransforms.py

This should produce something like the top image (this is a dummy clip for now, so the same image is repeated several times)

Advancement

video_transforms.py

  • [x] Compose
  • [x] Resize
  • [x] CenterCrop
  • [x] RandomCrop
  • [x] RandomHorizontalFlip
  • [x] RandomResize
  • [x] RandomRotation
  • [x] ColorJitter (acts on brightness, saturation, contrast and hue, only on PIL Images for now)
  • [ ] RandomResizedCrop

volume_transforms.py

  • [x] ClipToTensor

  • [ ] Add profiling utilites

How to use

Install torch_videovision

pip install git+https://github.com/hassony2/torch_videovision

Thanks to bachsh !

In your python script

from torchvideotransforms import video_transforms, volume_transforms

video_transform_list = [video_transforms.RandomRotation(30),
			video_transforms.RandomCrop((200, 200))
			volume_transforms.ClipToTensor()]
transforms = video_transforms.Compose(video_transform_list)
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].