Code Monkey home page Code Monkey logo

sam_topo's Introduction

sam_topo

Segment anything model for topographic data

  • easy to costumize: matplotlib-based GUI
  • Segment everything first and then interactive segmentation for individual masks

Installation

Please follow the instructions to install segment-anything: https://github.com/facebookresearch/segment-anything.git

Install sam_topo:

git clone https://github.com/ZhiangChen/sam_topo.git
cd sam_topo
pip install .

Run

  1. Run GUI for interactive segmentation
python3 gui.py
  1. Use the sam_topo library
from sam_topo.gui import SAM_Topo_GUI
sam_topo_gui = SAM_Topo_GUI(img_path='../data/data/sample_data/beach_hillshade_grayscale.png', 
                            sam_checkpoint = "../data/models/sam_vit_h_4b8939.pth", 
                            model_type = "vit_h", 
                            is_cuda=True)
  1. Tiff data preprocessing: SAM requires RGB images. sam_topo.preprocessing provides functions to convert tiff data to color or grayscale images.

Demo

  1. Segment everything
  1. Visualize individaul mask
  1. Delete masks
  1. Modify individaul mask
  1. Jupyter notebook option (preview)

sam_topo's People

Stargazers

 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.