DIH-Cell-Augmentor

DIH-Cell-Augmentor

A setup for augmentation of biological cells captured via Digital Inline Holography

Aim

  • A script to augment the cell-lines obtained via DIHM.
  • It generates rotated copies of the input cell sample, while maintaining the same image dimensions and near-similar sample background, using OpenCV.
  • The augmented samples preserve the spatial features as well as the statistical distribution present in the input sample.

Method

  • Load dataset, having images grouped under labels
  • Augment cell sample by rotation at specific angle
  • Store augmented images in a csv

Augmentation Procedure

  • Create a mask to extract the cell background
  • Negate the above mask to extract the cell
  • Rotate the image by specified degree, achieved via getRotationMatrix2D and warpAffine functions in cv2
  • Extract the rotated cell signature using the negated mask
  • Mask it with the extracted cell background to create an augmented image, with same shape as original image

Note: The code is applicable only for augmentation of objects/cells lying within the maximum fitting circle which can be fit into the image

Pre-requisites:

  • cv2
  • glob, or alternatively use os
  • numpy

Demo:

Input Image:

Augmented Images:

Augmented Images on rotation by 0, 10, 20, 30,…..,350 degrees :

Note: Black dot has been added for easier vizualization

Git: DIH Cell Augmentor

Rajkumar Vaghashiya
Rajkumar Vaghashiya
MS in Computer Science

My research interests include applied machine learning and computer vision.