Giter VIP home page Giter VIP logo

bubmask's Introduction

Mask R-CNN for Bubble mask extraction

This is a project of Multiphase flow & Flow visualization Lab for bubble detection and mask extraction. The purpose of the project is to automatically extract bubble mask of experimental images from various experimental conditions using deep learning model. More information can be found in the paper (Kim & Park, 2021).

The codes are based on Matterport Mask R-CNN implementation, using ResNet-101 as the backbone and applied transfer learning from pre-trained COCO weights.

The output of the model is as follows:

  • color mask for input image/video
  • PNG logical mask for each bubble detected
  • bubble property txt (centroid, area, axes, orientation)

The repository includes:

  • Source code of Mask R-CNN built on FPN and ResNet101.
  • Source code to visualize the color mask of the input image/video.
  • source code to detect and save logical mask and bubble properties.

Mask Extraction Example

Tested environment

This code was tested on the below environment.

  • NVIDIA RTX 2080 ti
  • Driver 440.95.01
  • CUDA 10.2
  • cuDNN 7.6.5
  • Python 3.7
  • TensorFlow 1.14.0
  • Keras 2.2.5 and other common packages listed in requirements.txt.

Preparing the input

Prepare images (JPG or PNG or TIF) under a series of folders ending in _###

  • For example, folder_001, folder_002 ...
  • Your path/to/image become .../folder

How to test your own bubble image/video

  1. Clone this repository

  2. Install dependencies

    pip3 install -r requirements.txt
  3. Run setup from the repository root directory

    python3 setup.py install
  4. Download trained weights (mask_rcnn_bubble.h5) from the link.

  5. Run bubble detection script in bubble/ directory to visualize color mask (supports only 3-channel jpg image or video)

    bubble$ python3 bubble.py splash --weights=path/to/mask_rcnn_bubble.h5 --image=path/to/image

    for the video:

    bubble$ python3 bubble.py splash --weights=path/to/mask_rcnn_bubble.h5 --video=path/to/video
  6. Run bubble detection script in bubble/ directory to extract logical mask and bubble properties (JPG or PNG or TIF images)

    bubble$ python3 bubble.py detect --weights=path/to/mask_rcnn_bubble.h5 --image=path/to/image --results=/path/to/results --folder_num_start=0 --folder_num=1 --confidence=0.5 to 0.99

bubmask's People

Contributors

waleedka avatar keineahnung2345 avatar ywflow avatar philferriere avatar borda avatar coreyhu avatar cpruce avatar jningwei avatar ps48 avatar maxfrei750 avatar viredery avatar yanfengliu avatar cclauss avatar concerttttt avatar jmtatsch avatar bill2239 avatar llltttppp avatar marluca avatar mowoe avatar np-csu avatar robaleman avatar xelmirage avatar yqnlp avatar ziyigogogo avatar veemon avatar stevenhickson avatar skt7 avatar rymalia avatar moorage avatar manasbedmutha98 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.