Skip to content

This project is a replication of edge detection implemented using Segment Anything.

Notifications You must be signed in to change notification settings

Meng-Sang/segment-anything-edge-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Segment Anything Edge Detection

This project is a replication of edge detection implemented using Segment Anything. It is reproduced as described in the Segment Anything paper and Segment Anything issues#226. Please advise us if there are any problems.

Installation

The code requires python>=3.8, as well as pytorch>=1.7 and torchvision>=0.8. Please follow the instructions here to install both PyTorch and TorchVision dependencies. Installing both PyTorch and TorchVision with CUDA support is strongly recommended.

Install Segment Anything:

pip install git+https://github.com/facebookresearch/segment-anything.git

Install opencv:

pip install opencv-python

Run

  • download weight

    please refer to segment anything that is a awesome work.

  • edge detect

python edge_detect.py --edge_dir EDGE_DIR --save_dir SAVE_DIR [--sam_checkpoint SAM_CHECKPOINT] [--model_type MODEL_TYPE] [--device DEVICE]

Demo

References

About

This project is a replication of edge detection implemented using Segment Anything.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages