autodistill / autodistill-grounded-sam

GroundedSAM Base Model plugin for Autodistill
https://docs.autodistill.com
Apache License 2.0
44 stars 9 forks source link

Finish labelling fpr each image. #7

Open shersoni610 opened 1 year ago

shersoni610 commented 1 year ago

Hello,

From the following code if the input is a directory then labels are written when all the files in the directory are processed. How can I modify the code so that labels are immediately available after a file is processed ?

from autodistill_grounding_dino import GroundingDINO from autodistill.detection import CaptionOntology import sys base_model = GroundingDINO(ontology=CaptionOntology({"person": "person"})) folder_name = sys.argv[1] base_model.label(input_folder=folder_name, output_folder='labels')

shersoni610 commented 1 year ago

However, it writes on the screen like this:

Labeling /Volumes/EasyStore1/Dataset/BingCoco/apple/Image_10.jpg: 2%|▌ | 1/44 [00:16<12:08, 16.95s/it]