Giter Site home page Giter Site logo

project577's Introduction

Project of Course CS577

To run on your system

  • Make a virtual enviroment using python 3.9 (using a virtualenv, not conda because we specific pip packages).
  • Clone the repo
git clone https://github.com/FloatyDev/project577.git 
  • Install dependencies using the following command.
pip install -r requirements.txt

Scripts

The main scripts of this project are mnist_finch.py and segment_finch.py

mnist_finch.py

Offers estimation performance of FINCH on MNIST_10K dataset (with plots). The metrics provided are:

  • Normalized Mutual Information (NMI) Score
  • Adjuster Rand Index (ARI)
  • Silhouette Score
  • Calinski-Harabasz Score
  • Davies-Bouldin Score

After running the script results will be saved on mnist_results directory. The script evaluates FINCH with both image raw pixels as well as CNN classification features (From ResNet50). These weights are pre-extracted and saved on data directory of the project.

segment_finch.py

This script uses the foundation model Segment Aything to produce quality binary masks of the provided image (some test images are put on images directory). After that FINCH is applied to the features made by either Hu-Moment or HOG extracting methods to cluster the binary masks by shape. To run the script you have to specify the argument --algo that takes 2 values:

  • hu (use Hu-Moments as the feature extraction method)
  • hog (use hog as the feature extraction method, with predefined parameters) So for example if you want to run the scripot using hu-moments as the feature extraction method you execute as:
python segment_finch.py --algo hu

Masks from segment-anything model are saved on images directory. The cluster results are saved on sam_finch_results directory.

Note

Weights for SAM are downloaded automatically if they are not found.

project577's People

Contributors

floatydev avatar

Watchers

 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.