kadirnar / segment-anything-video

MetaSeg: Packaged version of the Segment Anything repository
Apache License 2.0
952 stars 67 forks source link

Great work, Does it download the model checkpoints as well? #10

Closed amrrs closed 1 year ago

amrrs commented 1 year ago

I've not tried it yet, just wanted to check if it also downloads the model checkpoints.

kadirnar commented 1 year ago

I updated the codes. Just write model_type. I also added video support.

from metaseg import SegAutoMaskGenerator

# If gpu memory is not enough, reduce the points_per_side and points_per_batch.

# For image

autoseg_image = SegAutoMaskGenerator().save_image(
    source="image.jpg",
    model_type="vit_l",
    points_per_side=16, 
    points_per_batch=64
)

# For video

autoseg_video = SegAutoMaskGenerator().save_video(
    source="video.mp4",
    model_type="vit_l",
    points_per_side=16, 
    points_per_batch=64
)

download_model(): https://github.com/kadirnar/segment-anything-pip/blob/main/metaseg/utils/file.py

amrrs commented 1 year ago

Thank you @kadirnar - This link doesn't exist - https://github.com/kadirnar/segment-anything-pip/blob/main/metaseg/utils/file.py

amrrs commented 1 year ago

@kadirnar your library is covered here - https://www.youtube.com/watch?v=8SvQqZCd-ww Great work 🎉

kadirnar commented 1 year ago

I updated the codes. https://github.com/kadirnar/segment-anything-video/blob/main/metaseg/utils/file_utils.py

Thank you for the youtube video. I will add it to the readme tomorrow.