ZrrSkywalker / Personalize-SAM

Personalize Segment Anything Model (SAM) with 1 shot in 10 seconds
MIT License
1.5k stars 101 forks source link

Faster persam.py #8

Closed arman-hk closed 1 year ago

arman-hk commented 1 year ago

@ZrrSkywalker, Hey there! I've made the following changes to persam.py:

  1. Used os.path.join() to create paths instead of string concatenation. This makes path prep more portable and robust.
  2. Used context manager to save images with matplotlib to make sure resources are nicely closed.
ZrrSkywalker commented 1 year ago

@arman-hk Hi, thanks very much your contribution! This makes our project more robust and easy to use. :)

ZrrSkywalker commented 1 year ago

@arman-hk I have also updated persam_f.py according to your code. Thanks again!

arman-hk commented 1 year ago

@ZrrSkywalker That's great, glad I could help.