GithubHelp home page GithubHelp logo

geoz-lab / augmented-pattern Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arashrabbani/augmented-pattern

0.0 0.0 0.0 28.98 MB

Image augmentation tool for creating new realizations and their labels

License: Creative Commons Zero v1.0 Universal

MATLAB 100.00%

augmented-pattern's Introduction

Augmented-Pattern

Image augmentation tool for creating new realizations and their labels using Matlab

This repository can be used to generate new realizations of the images with patterns, especially porous or composite material. In addition, if you have a label map or mask that distinguish specific elements or parts in the images, that map can be reconstructed accordingly. Here, I have provided a few examples through Demo codes. If you are using this code please cite this paper:
Arash Rabbani, Masoud Babaei, Masoumeh Gharib, Automated segmentation and morphological characterization of placental histology images based on a single labeled image, arXiv https://arxiv.org/abs/2210.03566, (2022). (Link)

Demo 1

Use this code to see a set of reconstructed images and their labeles. This is useful when you need to augment a dataset of images and labels for machine learning purposes. Here are some sample results for reconstruction of a placental tissue as well as a porous carbonate rock:

Alt text Alt text

Demo 2

Use this code to generate a short animated gif file of the reconstruction process.

Porous carbonate rock example

Alt text Alt text

Porous Sandstone example

Alt text Alt text

Placental tissue

Alt text Alt text

Demo 3

Use this code to generate a set reconstructed images and their corresponded labels and save them on the Output directory.

Alt text

How to use

For running each of demo files, you need to set some input paramters:

  • Input raw image as matrix
  • Input mask or label as a matrix of 0 and 1
  • Grid size ratio as an integer larger than 2, pereferably below 20 for computational efficiency. larger the ratio, smaller the tiles will be.
  • Show or not? the last input takes the value of 1 (to show the reuslts) or 0 to hide them.

Outputs of the "AugmentPattern" function are:

  • Reconstructed image
  • Reconstructed mask/label

Note: if you don't have labels you can pass a matrix of zeros, the code will still work.

Raw image sources

  • Sandstone image: Gilbert Scott, Kejian Wu, Yingfang Zhou. Multi-scale Image-Based Pore Space Characterisation and Pore Network Generation: Case Study of a North Sea Sandstone Reservoir. Springer Link. 2019.
  • Carbonate image: Tom Bultreys, Luc Van Hoorebeke, Veerle Cnudde. Multi-scale, micro-computed tomography-based pore network models to simulate drainage in heterogeneous rocks. Advances in Water Resources. 2015

augmented-pattern's People

Contributors

arashrabbani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.