swarms/playground/models/kosmos2.py

11 lines
193 B

from swarms.models.kosmos2 import Kosmos2, Detections
from PIL import Image
model = Kosmos2.initialize()
image = Image.open("images/swarms.jpg")
detections = model(image)
print(detections)