Giter Site home page Giter Site logo

la-zu-li / pca-on-semantic-segmentation-with-translated_maskrcnn-output Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10.51 MB

PCA to calculate longest diagonal of C3S crystals of semantic segmentation from an implementation of MaskRCNN.

Jupyter Notebook 100.00%

pca-on-semantic-segmentation-with-translated_maskrcnn-output's Introduction

PCA-on-Semantic-Segmentation-with-Translated_MaskRCNN-Output

PCA to calculate longest diagonal of C3S crystals of semantic segmentation from an implementation of MaskRCNN.

About

This repository is for an academic research in Federal University of Ceará, Campus Russas, Brazil. It features the application of the PCA (Principal Component Analysis) algorithm on the masks of C3S crystals, segmented by an architecture of mask-RCNN. This repository contains code for the use of a specific architecture of mask-RCNN implemented with Tensorflow2.

The research

The measurement of C3S crystals is an important part of a stage of portland cement production, the clynker microscopy. It is mostly done by analysts, by examinating microscopic images of the clynker (a subproduct of cement) and measuring the crystals manually, in computers, with the help of drawing software. The research is about automating this, and there's where the PCA algorithm enters.

The algorithm showed good approximated results for the longest diagonal of the polygons segmented by the network of the C3S crystals, and a very good performance. This repository aims to show these results.

The network

The Mask-RCNN architecture used was implemented with Tensorflow and migrated to Tensorflow 2.8 and enhanced by Renê Michel. It is also part of the research, which also includes a comparative analysis of this architecture and another from Detectron2 API.

You can find Michel's code for it in this repository.

Also, you can find the alternative code for Detectron2 on this repository.

Contents

This repository contains two python notebooks:

  • PCA_with_Translated_Mask_Output.ipynb;
  • PCA_with_Translated_Mask_Output_COLAB.ipynb

Plus the folder 'pretrained_weights/'.

The first noteboook is in case you want to clone this repository and run it in your computer. The second notebook is for running in Google Colab environment.

The 'pretrained_weights/' folder contains the pre-trained weights. They are needed so that we don't need to go through the process of training the network again. The weights are loaded by the network, which makes it ready for inference.

Running in your machine

When running in your machine, use the 'PCA_with_Translated_Mask_Output.ipynb' notebook. The other one will only work in colab.

There's code in the notebook for installing missing libraries via pip, so make sure to have it installed and well-updated.

After opening the notebook with a software from your choice, just run all cells in sequence.

Running in Google Colab

When running in Colab, use the notebook 'PCA_with_Translated_Mask_Output_COLAB.ipynb'. The other one will not work properly there. It's very recommended to run in Google Colab with GPU hardware accelerator. The GPU helps accelerating the inference process.

After opening the notebook in Colab, run all cells in sequence.

pca-on-semantic-segmentation-with-translated_maskrcnn-output's People

Contributors

la-zu-li avatar

Watchers

Kostas Georgiou avatar  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.