Code Monkey home page Code Monkey logo

segment-anything-ui's Introduction

Segment Anything UI

Simple UI for the model: Segment anything from Facebook.

Segment anything UI for annotations GUI

Usage

  1. Install segment-anything python package from Github: Segment anything.
  2. Download checkpoint Checkpoint and put it into workspace folder.
  3. Fill default_path in config.py.
  4. Install requirements.txt. pip install -r requirements.txt.
  5. export PYTHONPATH=$PYTHONPATH:..
  6. python segment_anything_ui/main_window.py.

Currently, for saving a simple format is used: mask is saved as .png file, when masks are represented by values: 1 ... n and corresponding labels are saved as jsons. In json, labels are a map with mapping: MASK_ID: LABEL. MASK_ID is the id of the stored mask and LABEL is one of "labels.json" files.

Buttons

Button Description Shortcut
Add Points Mouse click will add positive (left) or negative (right) point. A
Add Box Mouse click will add a box. Q
Annotate All Runs regular grid annotation with parameters from the form Enter
Pick Mask Pick mask when clicking on it. Cycling through masks if pixel belongs to multiple masks. X
Merge Masks WIP: Merge masks when clicking on them. Cycling through masks if pixel belongs to multiple masks. Z
Move Current Mask to Front Use current mask as background (less important) None
Cancel Annotation Cancel current annotation C
Save Annotation Save current annotation N
Manual Polygon Draw polygon with mouse M
---- ---- ----
Open Files Load files from the folder None
Next File Load next image F
Previous File Load previous image T
---- ---- ----
Precompute All Embeddings Currently not implemented None
Show Image Currently not implemented None
Show Visualization Currently not implemented None

TODO:

  • - FIX: mouse picker for small objects is not precise.
  • - Region merging.
  • - Manual annotation.
  • - Saving and loading of masks.
  • - Class support for assigning classes to objects.
  • - Add object borders.
  • - Fix mask size and QLabel size for precise mouse clicks.
  • - Draft mask when no points are visible.

segment-anything-ui's People

Contributors

branislavhesko 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.